[ZMapServer-Developers] PCL: MapServer-specific datastore committed to CVS
Status: Alpha
Brought to you by:
sgillies
|
From: Sean G. <sgi...@fr...> - 2005-03-16 14:48:49
|
As I mentioned in a previous email, the GEOS software that I would like
to use for evaluation of spatial predicates ("intersects", "contains",
etc) resists compilation on windows with MSVC6. This means that PCL
users on windows will not be able to use GEOS until they upgrade to
Python 2.4. 2.4 binaries should be compiled using the next higher
version of the MS compiler. As far as I know, there is not a stable
Zope release that is perfectly compatible with Python 2.4 ... which
leaves a gap to bridge.
As a bridge, I've committed a new data store and filtering iterator to
PCL's engine.mapserver.data module that operate without any dependency
on GEOS. Unfortunately, MapServer's own geometry operations are
limited to "intersects". Usage is like this (from the tests):
from cartography.engine.mapserver.data import DiskFeatureStore
from cartography.data import Query
from cartography.filter import PythonFilter
from cartography.spatial import Point
subject_p = Point(0.0, 51.5)
pyfilt = PythonFilter('g.intersects(p)')
query = Query(filter=pyfilt, p=subject_p)
features = [f for f in self.features(query)]
assert len(features) == 1, len(features)
Etienne, it is not as fast as a query using mapscript, but a loss of
speed is the price we pay now for the richer and more powerful filter
expressions. If you have access to the MSVC6 compiler. you may want to
check out the latest PCL from CVS and give it a try.
I'm going to be out of the office through Saturday, catch up with you
then.
cheers,
Sean
--
Sean Gillies
sgillies at frii dot com
http://users.frii.com/sgillies
|