[Featureserver] Windows Install

Andrew de Klerk andrew.deklerk at gmail.com
Wed Jul 30 08:53:20 EDT 2008


Hi all

I am attempting to get featureserver installed on my windows xp for testing,
and will then move on to our windows server for live. I must admit that I am
not familiar with python at all, so please ignore my ignorance.

 I have been through the step by step guides and done the following:
1. I am sure my python is running correctly as a cgi under iis
2. I have installed the json, postgis and gdal addons for python ( again, I
think I have - using the following  files)
(http://www.stickpeople.com/projects/python/win-psycopg/psycopg2-2.0.7.win32
-py2.5-pg8.3.1-release.exe)
(http://pypi.python.org/packages/2.5/G/GDAL/GDAL-1.5.2.win32-py2.5.exe#md5=1
7db2b36b9417d767414373c3c87c780)
(http://pypi.python.org/packages/2.5/j/jsonlib/jsonlib-1.3.5.win32-py2.5.exe
#md5=8ed1beeae5f9619945fd3e948ebfa76f)

3. I have modified my featureserver.cgi file

When I run I get an error related to my virtual directories.

Here are all my files:

<-----FeatureServer.cgi----->
#!C:/Program Files/Python25/python.exe -u

import sys

from FeatureServer.Server import Server, cgiHandler, cfgfiles

if __name__ == '__main__':
    cgiHandler()

<-----FeatureServer.cfg----->
# Metadata section allows you to define the default
# service type to be created, and location for error logging
[metadata]
default_service=GeoJSON
# error_log=error.log

# each additional section is a 'layer', which can be accessed.
# see DataSources.txt for more info on configuring.

[scribble]
type=DBM
file=c:/temp/featureserver.scribble
gaping_security_hole=yes

#LocateX PostGIS geofence
[LocateX_Geofence]
type=PostGIS
dsn=host=localhost dbname=zzzz user=zzzz password=zzzz
layer=LocateX_geofence
fid=oid
geometry=geom
srid=4148

<------------------------------------------->

When I run: http://localhost/FS/featureserver.cgi/scribble/all.gml I get the
following error

<------------------------------------------->
An error occurred: Could not find the layer FS: Check your config file?
(Available layers are: scribble,LocateX_Geofence)
  File "D:\Inetpub\wwwroot\featureserver\FeatureServer\Server.py", line 298,
in cgiHandler
    format, content = service.dispatchRequest( params, path_info, host,
post_data, request_method, accepts )
  File "D:\Inetpub\wwwroot\featureserver\FeatureServer\Server.py", line 133,
in dispatchRequest
    request.parse(params, path_info, host, post_data, request_method)
  File "D:\Inetpub\wwwroot\featureserver\FeatureServer\Service\__init__.py",
line 64, in parse
    raise Exception("Could not find the layer %s: Check your config file?
(Available layers are: %s)" % (self.datasource,
",".join(self.service.datasources.keys())))
<------------------------------------------->

So it seems it is trying to find my virtual directory as a layer, can anyone
give me some pointers on what I am doing wrong. 

Thanks
Andrew
P.S I did try running FS directly from the root of my website, but got a
similar error




More information about the Featureserver mailing list