[Featureserver] FW: getting started with featureserver..

Simon Hope SimonH at geobiz.co.nz
Tue Oct 9 01:06:44 EDT 2007


Hi Chris,

Thanks for your email.

I'm making some progress. I've ditched FWTools and Python25. 

I've installed Python2.4, GDAL 1.4.2 and the associated Python Bindings
(using
http://download.osgeo.org/gdal/win32/Python_GDAL-1.4.2.win32-py2.4.exe).

I've amended the cgi file to point to Python24 and have tested using
your suggestion of limiting the features returned:

http://localhost:8080/featureserver/featureserver.cgi/scribble/all.atom?
maxfeatures=5

and....i get this:

An error occurred: DLL load failed: The specified module could not be
found.
  File "C:\Program Files\Apache Software
Foundation\Apache2.2\htdocs\featureserver\FeatureServer\Server.py", line
239, in cgiHandler
    service = Server.load(*cfgfiles)
  File "C:\Program Files\Apache Software
Foundation\Apache2.2\htdocs\featureserver\FeatureServer\Server.py", line
60, in _load
    datasources[section] = cls.loadFromSection(
  File "C:\Program Files\Apache Software
Foundation\Apache2.2\htdocs\featureserver\FeatureServer\Server.py", line
35, in _loadFromSection
    module = __import__("%s.%s" % (module_type, type), globals(),
locals(), type)
  File "C:\Program Files\Apache Software
Foundation\Apache2.2\htdocs\featureserver\FeatureServer\DataSource\OGR.p
y", line 2, in ?
    import ogr, osr
  File "C:\Python24\Lib\site-packages\ogr.py", line 33, in ?
    import _gdal


I'm guessing something is screwed up between the python bindings and
GDAL - so I'm going down that hole now

Thanks again for the help

Si

-----Original Message-----
From: Christopher Schmidt [mailto:crschmidt at metacarta.com] 
Sent: Tuesday, 9 October 2007 4:16 p.m.
To: Simon Hope
Cc: featureserver at openlayers.org
Subject: Re: [Featureserver] getting started with featureserver..

On Tue, Oct 09, 2007 at 01:10:12PM +1300, Simon Hope wrote:
> Hi,
> 
> I am looking to use featureserver with PostGIS, but I'm running into
> some difficulty and was wondering whether anybody could assist? I
should
> warn you I am fresh as a daisy to this stuff so please bare with me...

> 7. I've installed FWTools for OGR
> 
> 8. I understand FWTools comes with the python bindings....? Is this
> where I'm messing up?

I don't know for sure. However, if it does, you'll likely need to use
the same version of Python as the OGR Bindigns are built for. I don't
think anyone has yet gotten FeatureServer running with the OGR bindings
in the FWTools dist. (I'd be glad to be corrected on that.)

> I looked at the datasources.txt in the featureserver download and
found
> that the PostGIS support requires psycopg. I've downloaded this and
> looked at the install file which mentions building  psycopg however
I'm
> a bit confused - should I be building and installing  psycopg onto my
> PostGIS server? (i.e. server1).

Nope. Server2. psycopg is the Postgres client which FeatureServer uses.
The server shouldn't need anything.

> [scribble]
> type=OGR
> dsn=/data/Courts_WGS84.shp
> layer=Courts_WGS84.shp
> 
> and tested using this URL:
> 
> http://localhost:8080/featureserver/featureserver.cgi/scribble/all.atm
> 
>  
> 
> Now I'm expecting to get back GeoRSS representation of my features
> right? (Could well be wrong?) But all that happens is that the browser
> hangs (by hanging i mean it just seems to be processing. It doesn't
> return an error)

Well, depending on the size of the shapefile, it may just take a long
time :) try doing this instead: 

http://localhost:8080/featureserver/featureserver.cgi/scribble/all.atom?
maxfeatures=5

Encoding a full shapefile into Atom could take a long time depending on
the size (and might be too big for the browser to handle sanely anyway
-- Firefox, iirc, doesn't do partial rendering of RSS feeds).  

> So I guess my questions/problems are:
> 
> 1. Is FWTools enough in terms of the OGR requirements (including the
> python bindings?

I don't know. Someone else might be able to say.

> 2. For PostGIS support I need psycopg - should I be building this on
my
> PostGIS server or the featureserver box? Or both?

FeatureServer box. 

> 3. With regard to shapefile data sources any ideas where I may have
> messed up

May just not have been patient enough :) I've seen it take minutes even
for a relatively small shapefile. 

Regards,
-- 
Christopher Schmidt
MetaCarta







More information about the Featureserver mailing list