Changeset 863 for branches/prototype-v0/zoo-project/zoo-services
- Timestamp:
- Feb 5, 2018, 1:19:13 PM (7 years ago)
- Location:
- branches/prototype-v0/zoo-project/zoo-services
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/prototype-v0/zoo-project/zoo-services/cgal/cgal_service.c
r862 r863 26 26 int parseInput(maps* conf,maps* inputs, std::vector<Pointz>* points,char* filename){ 27 27 map* tmpm=NULL; 28 tmpm=getMapFromMaps(inputs,"InputPoints","value"); 29 VSILFILE *ifile=VSIFileFromMemBuffer(filename,(GByte*)tmpm->value,strlen(tmpm->value),FALSE); 30 VSIFCloseL(ifile); 28 tmpm=getMapFromMaps(inputs,"InputPoints","cache_file"); 31 29 #if GDAL_VERSION_MAJOR >= 2 32 GDALDataset *ipoDS = 33 (GDALDataset*) GDALOpenEx( filename, 34 GDAL_OF_READONLY | GDAL_OF_VECTOR, 35 NULL, NULL, NULL ); 30 GDALDataset *ipoDS; 36 31 #else 37 OGRDataSource* ipoDS = OGRSFDriverRegistrar::Open(filename,FALSE);32 OGRDataSource* ipoDS; 38 33 #endif 34 if(tmpm==NULL){ 35 tmpm=getMapFromMaps(inputs,"InputPoints","value"); 36 VSILFILE *ifile=VSIFileFromMemBuffer(filename,(GByte*)tmpm->value,strlen(tmpm->value),FALSE); 37 VSIFCloseL(ifile); 38 #if GDAL_VERSION_MAJOR >= 2 39 ipoDS = (GDALDataset*) GDALOpenEx( filename, 40 GDAL_OF_READONLY | GDAL_OF_VECTOR, 41 NULL, NULL, NULL ); 42 #else 43 ipoDS = OGRSFDriverRegistrar::Open(filename,FALSE); 44 #endif 45 }else 46 #if GDAL_VERSION_MAJOR >= 2 47 ipoDS = (GDALDataset*) GDALOpenEx( tmpm->value, 48 GDAL_OF_READONLY | GDAL_OF_VECTOR, 49 NULL, NULL, NULL ); 50 #else 51 ipoDS = OGRSFDriverRegistrar::Open(tmpm->value,FALSE); 52 #endif 53 39 54 if( ipoDS == NULL ) 40 55 { -
branches/prototype-v0/zoo-project/zoo-services/ogr/base-vect-ops-py/cgi-env/ogr_sp.py
r465 r863 95 95 96 96 def extractInputs(conf,obj): 97 if obj.keys().count("cache_file"): 98 print >> sys.stderr,obj 99 geometry=[] 100 ds = osgeo.ogr.Open(obj["cache_file"]) 101 if sql is not None: 102 if sql.count("from")==0: 103 layerName=ds.GetLayerByIndex(0).GetName() 104 sql+=" from "+layerName 105 lyr=ds.ExecuteSQL( sql, None, None ) 106 else: 107 lyr = ds.GetLayer(0) 108 feat = lyr.GetNextFeature() 109 while feat is not None: 110 geometry+=[feat.Clone()] 111 feat.Destroy() 112 feat = lyr.GetNextFeature() 113 ds.Destroy() 114 return geometry 97 115 if obj["mimeType"]=="application/json": 98 116 return createLayerFromJson(conf,obj["value"]) -
branches/prototype-v0/zoo-project/zoo-services/ogr/ogr2ogr/service.c
r862 r863 366 366 dfMaxSegmentLength = atof(tmpMap->value); 367 367 } 368 369 /*tmpMap=NULL;370 tmpMap=getMapFromMaps(inputs,"segmentize","value");371 if(tmpMap!=NULL){372 dfMaxSegmentLength = atof(tmpMap->value);373 }*/374 375 368 376 369 tmpMap=NULL;
Note: See TracChangeset
for help on using the changeset viewer.