[Featureserver] problem with ogr and featureserver within windows

Christian.Strobl at dlr.de Christian.Strobl at dlr.de
Tue Dec 23 16:32:49 EST 2008



hi all,

first of all, featureserver is a great tool and i think it's a promising way to edit and deliver geodata via the internet. thanks for that. but i have a problem to load shapefiles within featureserver on windows.

1) i have installed FeatureServer 1.2 (according http://featureserver.org/doc/Readme.html) within windows and it works well with DBM and PostGIS

2) i have installed the python bindings (python 2.5) of GDAL 1.6 (according http://trac.osgeo.org/gdal/wiki/GdalOgrInPython) and it also works well. the following python script runs without any problems

-----------------------%<------------------------------------->8------------------------------
#!c:\python25\python.exe

from osgeo import gdal
from osgeo import gdalconst

filename="c:/sandbox/gdal/092b05.tif"

dataset = gdal.Open( filename, )
if dataset is None:
  print "Datei nicht vorhanden"

print 'Driver: ', dataset.GetDriver().ShortName,'/', \
dataset.GetDriver().LongName
print 'Size is ',dataset.RasterXSize,'x',dataset.RasterYSize, \
'x',dataset.RasterCount
print 'Projection is ',dataset.GetProjection()

-----------------------%<------------------------------------->8------------------------------

3) if i want to add now an OGR datasource to FeatureServer (featureserver.cfg) like

-----------------------%<------------------------------------->8------------------------------

#Shapefile
[test]
type=OGR
dsn=C:/sandbox/daten/Indonesia.shp
layer=Indonesia

-----------------------%<------------------------------------->8------------------------------

i get also with the following http-request

-----------------------%<------------------------------------->8------------------------------

curl.exe -X GET http://localhost:81/cgi-bin/featureserver-1.12/featureserver.cgi/scribble/all.gml

-----------------------%<------------------------------------->8------------------------------

the following error messages

-----------------------%<------------------------------------->8------------------------------

C:\muell>curl.exe -X GET http://localhost:81/cgi-bin/featureserver-1.12/features
erver.cgi/scribble/all.gml
An error occurred: DLL load failed: Das angegebene Modul wurde nicht gefunden.
  File "C:\ms4w\Apache\cgi-bin\featureserver-1.12\FeatureServer\Server.py", line
 264, in cgiHandler
    service = Server.load(*cfgfiles)
  File "C:\ms4w\Apache\cgi-bin\featureserver-1.12\FeatureServer\Server.py", line
 69, in _load
    config, section, 'DataSource')
  File "C:\ms4w\Apache\cgi-bin\featureserver-1.12\FeatureServer\Server.py", line
 43, in _loadFromSection
    module = __import__("%s.%s" % (module_type, type), globals(), locals(), type
)
  File "C:\ms4w\Apache\cgi-bin\featureserver-1.12\FeatureServer\DataSource\OGR.p
y", line 14, in <module>
    import ogr
  File "C:\Python25\Lib\site-packages\ogr.py", line 2, in <module>
    from osgeo.gdal import deprecation_warn
  File "C:\python25\lib\site-packages\osgeo\gdal.py", line 7, in <module>
    import _gdal

-----------------------%<------------------------------------->8------------------------------

i tried a lot of variations but it led to nothing. i am very glad about every hint

thanks, greetings from munich and merry christmas
christian

p.s. i followed also the following thread

http://lists.osgeo.org/pipermail/gdal-dev/2007-October/014354.html

which is very similar to my problem but also this gave no better result. especially i tried to add the following line to the featureserver.cgi

sys.path.append("c:/Python25/lib/site-packages/osgeo/")

but also this doesn't help. "c:/Python25/lib/site-packages/osgeo" is the folder where the file -gdal.pyd resides




More information about the Featureserver mailing list