- Timestamp:
- Jan 6, 2014, 11:09:29 AM (11 years ago)
- Location:
- trunk/zoo-project/zoo-kernel
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/makefile.vc
r444 r451 6 6 # 7 7 8 !IF DEFINED(MS_DIR)9 MS_BASE=$(MS_DIR)10 !INCLUDE $(MS_DIR)\nmake.opt11 !ENDIF12 8 !INCLUDE nmake.opt 13 9 -
trunk/zoo-project/zoo-kernel/nmake.opt
r444 r451 2 2 CC=cl $(CFLAGS) 3 3 CPP=cl /TP $(CFLAGS) 4 5 !IF DEFINED(MS_DIR) 6 MS_BASE=$(MS_DIR) 7 !INCLUDE $(MS_DIR)\nmake.opt 8 !ENDIF 4 9 5 10 !IFDEF JS_DIR … … 36 41 PYTHON_CPATH=$(PY_DIR) 37 42 38 CFLAGS= $(MS_DEFS) $(INCLUDES) $(CFLAGS1) /nologo /MD /W3 /EHsc /Ox /D_CRT_SECURE_NO_WARNINGS /DWIN32 $(CJFLAGS) -I$(ZOOK_DIR) -I./ $(JAVA_CFLAGS) $(MS_CFLAGS) -I$(TROOT)\..\..\thirds\dirent-win32 -I$(INTL_DIR) -I$(CURL_DIR)\include -I$(XML2_DIR)\include -I$(GDAL_DIR)\port $(JS_CFLAGS) -I$(GDAL_DIR)\ogr -I$(GDAL_DIR)\gcore -I$(GD_DIR) -I$(ICONV_DIR) -I$(TROOT)\..\..\thirds\include -I$(TROOT)\..\..\thirds\cgic206 -I$(PYTHON_CPATH)\include -I$(SSL_DIR)/inc32 -I$(FCGI_DIR)\include $(PY_CFLAGS) -DLINUX_FREE_ISSUE #-DDEBUG #-DDEBUG_SERVICE_CONF43 CFLAGS=/traceback $(MS_DEFS) $(INCLUDES) $(CFLAGS1) /nologo /MD /W3 /EHsc /Ox /D_CRT_SECURE_NO_WARNINGS /DWIN32 $(CJFLAGS) -I$(ZOOK_DIR) -I./ $(JAVA_CFLAGS) $(MS_CFLAGS) -I$(TROOT)\..\..\thirds\dirent-win32 -I$(INTL_DIR) -I$(CURL_DIR)\include -I$(XML2_DIR)\include -I$(GDAL_DIR)\port $(JS_CFLAGS) -I$(GDAL_DIR)\ogr -I$(GDAL_DIR)\gcore -I$(GD_DIR) -I$(ICONV_DIR) -I$(TROOT)\..\..\thirds\include -I$(TROOT)\..\..\thirds\cgic206 -I$(PYTHON_CPATH)\include -I$(SSL_DIR)/inc32 -I$(FCGI_DIR)\include $(PY_CFLAGS) -DLINUX_FREE_ISSUE #-DDEBUG #-DDEBUG_SERVICE_CONF 39 44 40 45 LDFLAGSCGI=$(TROOT)/../../thirds/cgic206/libcgic.lib -
trunk/zoo-project/zoo-kernel/service_internal.c
r449 r451 2610 2610 fcontent[res.nDataLen]=0; 2611 2611 fsize=res.nDataLen; 2612 mimeType= res.mimeType;2612 mimeType=(char*)res.mimeType; 2613 2613 } 2614 2614 if(fsize==0){ -
trunk/zoo-project/zoo-kernel/service_internal_ms.c
r434 r451 211 211 map* msSrs=NULL; 212 212 hSRS = OSRNewSpatialReference(NULL); 213 if( pszProjection!=NULL && strlen(pszProjection)>1 && 214 OSRImportFromWkt( hSRS, &pszProjection ) == CE_None ){ 215 char *proj4Str=NULL; 216 if(OSRGetAuthorityName(hSRS,NULL)!=NULL && 217 OSRGetAuthorityCode(hSRS,NULL)!=NULL){ 218 char tmpSrs[20]; 219 sprintf(tmpSrs,"%s:%s", 220 OSRGetAuthorityName(hSRS,NULL),OSRGetAuthorityCode(hSRS,NULL)); 221 msLoadProjectionStringEPSG(&m->projection,tmpSrs); 222 msLoadProjectionStringEPSG(&myLayer->projection,tmpSrs); 223 224 char tmpSrss[256]; 225 sprintf(tmpSrss,"EPSG:4326 EPSG:900913 %s",tmpSrs); 226 227 msInsertHashTable(&(m->web.metadata), "ows_srs", tmpSrss); 228 msInsertHashTable(&(myLayer->metadata), "ows_srs", tmpSrss); 229 230 #ifdef DEBUGMS 231 fprintf(stderr,"isGeo %b\n\n",OSRIsGeographic(hSRS)==TRUE); 232 #endif 233 if(output!=NULL){ 234 if(OSRIsGeographic(hSRS)==TRUE) 235 addToMap(output->content,"crs_isGeographic","true"); 236 else 237 addToMap(output->content,"crs_isGeographic","false"); 238 addToMap(output->content,"crs",tmpSrs); 239 } 240 } 241 else{ 242 OSRExportToProj4(hSRS,&proj4Str); 243 if(proj4Str!=NULL){ 244 #ifdef DEBUGMS 245 fprintf(stderr,"PROJ (%s)\n",proj4Str); 246 #endif 247 msLoadProjectionString(&(m->projection),proj4Str); 248 msLoadProjectionString(&(myLayer->projection),proj4Str); 249 if(output!=NULL){ 213 if( pszProjection!=NULL && strlen(pszProjection)>1){ 214 if(OSRImportFromWkt( hSRS, &pszProjection ) == CE_None ){ 215 char *proj4Str=NULL; 216 if(OSRGetAuthorityName(hSRS,NULL)!=NULL && 217 OSRGetAuthorityCode(hSRS,NULL)!=NULL){ 218 char tmpSrs[20]; 219 sprintf(tmpSrs,"%s:%s", 220 OSRGetAuthorityName(hSRS,NULL),OSRGetAuthorityCode(hSRS,NULL)); 221 msLoadProjectionStringEPSG(&m->projection,tmpSrs); 222 msLoadProjectionStringEPSG(&myLayer->projection,tmpSrs); 223 224 char tmpSrss[256]; 225 sprintf(tmpSrss,"EPSG:4326 EPSG:900913 %s",tmpSrs); 226 227 msInsertHashTable(&(m->web.metadata), "ows_srs", tmpSrss); 228 msInsertHashTable(&(myLayer->metadata), "ows_srs", tmpSrss); 229 230 #ifdef DEBUGMS 231 fprintf(stderr,"isGeo %b\n\n",OSRIsGeographic(hSRS)==TRUE); 232 #endif 233 if(output!=NULL){ 250 234 if(OSRIsGeographic(hSRS)==TRUE) 251 235 addToMap(output->content,"crs_isGeographic","true"); 252 236 else 253 237 addToMap(output->content,"crs_isGeographic","false"); 238 addToMap(output->content,"crs",tmpSrs); 254 239 } 255 240 } 256 241 else{ 257 msLoadProjectionStringEPSG(&m->projection,"EPSG:4326"); 258 msLoadProjectionStringEPSG(&myLayer->projection,"EPSG:4326"); 242 OSRExportToProj4(hSRS,&proj4Str); 243 fprintf(stderr,"Debug WKT: %s \n",proj4Str); 244 if(proj4Str!=NULL){ 245 #ifdef DEBUGMS 246 fprintf(stderr,"PROJ (%s)\n",proj4Str); 247 #endif 248 msLoadProjectionString(&(m->projection),proj4Str); 249 msLoadProjectionString(&(myLayer->projection),proj4Str); 250 if(output!=NULL){ 251 if(OSRIsGeographic(hSRS)==TRUE) 252 addToMap(output->content,"crs_isGeographic","true"); 253 else 254 addToMap(output->content,"crs_isGeographic","false"); 255 } 256 } 257 else{ 258 msLoadProjectionStringEPSG(&m->projection,"EPSG:4326"); 259 msLoadProjectionStringEPSG(&myLayer->projection,"EPSG:4326"); 260 if(output!=NULL){ 261 addToMap(output->content,"crs_isGeographic","true"); 262 } 263 } 259 264 if(output!=NULL){ 260 addToMap(output->content,"crs_isGeographic","true"); 265 addToMap(output->content,"crs","EPSG:4326"); 266 addToMap(output->content,"real_extent","true"); 261 267 } 268 msInsertHashTable(&(m->web.metadata),"ows_srs", "EPSG:4326 EPSG:900913"); 269 msInsertHashTable(&(myLayer->metadata),"ows_srs","EPSG:4326 EPSG:900913"); 262 270 } 263 if(output!=NULL){264 addToMap(output->content,"crs","EPSG:4326");265 addToMap(output->content,"real_extent","true");266 }267 msInsertHashTable(&(m->web.metadata),"ows_srs", "EPSG:4326 EPSG:900913");268 msInsertHashTable(&(myLayer->metadata),"ows_srs","EPSG:4326 EPSG:900913");269 270 271 271 } 272 272 } … … 684 684 } 685 685 #ifdef DEBUGMS 686 686 fprintf(stderr,"Accessing the DataSource %s %d\n",pszFilename,__LINE__); 687 687 #endif 688 688 … … 696 696 return -1; 697 697 } 698 m->layers[m->numlayers]->index=m->numlayers; 698 699 699 700 layerObj* myLayer=m->layers[m->numlayers]; … … 714 715 if(tmpMap!=NULL) 715 716 abstract=tmpMap->value; 717 716 718 msInsertHashTable(&(myLayer->metadata), "ows_label", title); 717 719 msInsertHashTable(&(myLayer->metadata), "ows_title", title); -
trunk/zoo-project/zoo-kernel/service_internal_python.c
r411 r451 113 113 114 114 int zoo_python_support(maps** main_conf,map* request,service* s,maps **real_inputs,maps **real_outputs){ 115 char *pythonpath; 116 char *python_path; 115 117 maps* m=*main_conf; 116 118 maps* inputs=*real_inputs; … … 119 121 char *ntmp=tmp0->value; 120 122 map* tmp=NULL; 123 int hasToClean=0; 121 124 tmp=getMapFromMaps(*main_conf,"env","PYTHONPATH"); 122 char *python_path;123 125 #ifdef DEBUG 124 126 fprintf(stderr,"PYTHON SUPPORT \n"); 125 127 #endif 126 fflush(stderr);127 128 if(tmp!=NULL){ 128 129 #ifdef DEBUG … … 131 132 python_path=(char*)malloc((strlen(tmp->value))*sizeof(char)); 132 133 sprintf(python_path,"%s",tmp->value); 134 hasToClean=1; 133 135 } 134 136 else{ 135 python_path= strdup(".");137 python_path="."; 136 138 } 137 139 tmp=NULL; 138 140 tmp=getMap(request,"metapath"); 139 char *pythonpath;//=(char*)malloc((1+strlen(python_path)+2048)*sizeof(char));140 141 if(tmp!=NULL && strcmp(tmp->value,"")!=0){ 141 142 pythonpath=(char*)malloc((4+strlen(python_path)+strlen(ntmp)+strlen(tmp->value))*sizeof(char)); 142 143 #ifdef WIN32 143 144 #else 145 144 sprintf(pythonpath,"%s/%s/;%s",ntmp,tmp->value,python_path); 145 #else 146 sprintf(pythonpath,"%s/%s/:%s",ntmp,tmp->value,python_path); 146 147 #endif 147 148 } … … 164 165 sprintf(toto,"PYTHONPATH=%s",pythonpath); 165 166 putenv(toto); 166 #endif 167 free(python_path); 167 free(toto); 168 #endif 169 if(hasToClean>0) 170 free(python_path); 168 171 free(pythonpath); 169 172
Note: See TracChangeset
for help on using the changeset viewer.