It seems like the best option for supporting both CKAN 2.2 (SQLAlchemy
0.7.x) and CKAN 2.3 (SA 0.9.x) with the same code base is to add both
GeoAlchemy and GeoALchemy2 to the requirements. As long as GeoAlchemy is
installed first, both will be installed and the SQLAlchemy install (the
CKAN requirement) won't be affected. Tested with pip 1.5.6 and 6.0.8.
We will target a specific changeset of OWSLib for the time being, just until
there is a proper release which includes geopython/OWSLib@4b0a62cd.
Basically OWSLib required python-dateutil==2.1, which is intended for
Python 3 and conflicted with the version used by CKAN core.
The spatial_query plugin now automatically checks for the existance of an
'spatial' extra when creating, updating or deleting a package and syncs its
value (in GeoJSON format) with the geometry column of the package_extent
table. The extension now uses GeoAlchemy, that makes performing spatial
operation extremely easy. The geometry field has been updated to support
multiple geometry types (Polygons, Points, MultiPolygons...) and the default
srid has been set as WGS 84 lat/lon (EPSG:4326).