[Featureserver] OGR layers

Christopher Schmidt crschmidt at metacarta.com
Sun May 27 23:57:26 EDT 2007


On Sun, May 27, 2007 at 08:39:49PM -0700, Matthew Perry wrote:
> On to the next featureserver adventure; getting an OGR layer set up as
> a data source.
> 
> I have a recent gdal/ogr svn installed with the ngpython bindings and
> I can confirm that they're working well.

Note that I'm not sure that the ng bindings are what we test with. We
use whatever is installed by the python-gdal bindings. I think these are
different things, and iirc, there may be some lack of backwards
compatibility there... but I could also be wrong. 

>   File "./FeatureServer/Server.py", line 180, in cgiHandler
>     service = Server.load(*cfgfiles)
>   File "./FeatureServer/Server.py", line 45, in _load
>     config, section, 'DataSource')
>   File "./FeatureServer/Server.py", line 22, in _loadFromSection
>     module = __import__("%s.%s" % (module_type, type), globals(),
> locals(), type)
>   File "./FeatureServer/DataSource/OGR.py", line 2, in <module>
>     import ogr, osr
>   File "build/bdist.linux-i686/egg/ogr.py", line 7, in <module>
>   File "build/bdist.linux-i686/egg/_ogr.py", line 7, in <module>
>   File "build/bdist.linux-i686/egg/_ogr.py", line 4, in __bootstrap__

This worries me. It appears that running 'import ogr' is attempting to
run from something with 'egg' in the name, and I know only enough about
eggs to be scared of them :)


> I'm not sure why it's trying to install any eggs on my system since I
> have all the dependencies already. Anyone have any thoughts on how to
> get this working?

"get this working" is simple -- give www-data wrote access to /var/www/
-- but that's not the 'right' solution :) eggs are a packaging mechanism
for distributions: it's possible (I don't know well enough to say) that
the ogr stuff you have built *is* an egg, and that importing it does use
the egg version. 

I don't know if there's an 'install' step for the python bindings: if
there is, you might try that, and see if it helps. Other than that, I'm
afraid I can't really help, having always used the Debian packages  to
get the gdal stuff working.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Featureserver mailing list