Changeset 564 for trunk/zoo-project


Ignore:
Timestamp:
Feb 9, 2015, 5:16:06 PM (10 years ago)
Author:
djay
Message:

Add kmz output support, small fix in readGeneratedFile.

Location:
trunk/zoo-project/zoo-kernel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-project/zoo-kernel/service_internal.c

    r554 r564  
    24592459void readGeneratedFile(maps* m,map* content,char* filename){
    24602460  FILE * file=fopen(filename,"rb");
     2461  if(file==NULL){
     2462    fprintf(stderr,"Failed to open file %s for reading purpose.\n",filename);
     2463    setMapInMaps(m,"lenv","message","Unable to read produced file. Please try again later");
     2464    return ;
     2465  }
    24612466  fseek(file, 0, SEEK_END);
    24622467  long count = ftell(file);
     
    24642469  struct stat file_status;
    24652470  stat(filename, &file_status);
    2466   if(file==NULL){
    2467     fprintf(stderr,"Failed to open file %s for reading purpose.\n",filename);
    2468     setMapInMaps(m,"lenv","message","Unable to read produced file. Please try again later");
    2469     return ;
    2470   }
    24712471  map* tmpMap1=getMap(content,"value");
    24722472  if(tmpMap1==NULL){
  • trunk/zoo-project/zoo-kernel/service_internal_otb.c

    r561 r564  
    190190                              ext="shp";
    191191                            else
    192                             if(strncasecmp(tmpVal->value,"application/vnd.google-earth.kml+xml",36)==0)
    193                               ext="kml";
     192                              if(strncasecmp(tmpVal->value,"application/vnd.google-earth.kml+xml",36)==0)
     193                                ext="kml";
     194                              else
     195                                if(strncasecmp(tmpVal->value,"application/vnd.google-earth.kmz",32)==0)
     196                                  ext="kmz";
     197
    194198                      }
    195199                      sprintf(tmp,"%s/%s_%s.%s",tmpPath->value,s->name,tmpSid->value,ext);
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png