Open Hoedic opened 9 years ago
We should talk a bit more about what Geospatial features exactly will the site need. Right now I know we are doing:
Now, ckanext-spatial
with PostGIS has not been updated for CKAN 2.3. One problem is the resource views - ckanext-spatial
is still using previews. Another problem is that spatial is still only compatible with PostGIS 1.x and PostgreSQL 8.x, while we are using Postgres 9.x for some other features.
The two features in the list above can both be accomplished without ckanext-spatial
. For previews, I am looking at modifying ckanext-geoview
, and for the second it's possible to do bounding box geo search purely via solr.
So we should find out how much more geospatial features we need, as it might be possible to avoid needing PostGIS altogether, which would mean we don't need to bother fixing ckanext-spatial
for 2.3
Ok, those are import points (not updated with 2.3, postgres/postgis version differences) we should discuss these points at the next call. To answer the question "what is expected to come with ckanext-spatial
:
I don't know if you tried to install ckanext-spatial
on postgresql 9.x/postgis2 but in theory it is backward compatible. Postgis 2.x comes with new ways to declare geometries but still supports the old one.
Need to take a look at geofiltering using Solr
For the moment a "bbox" field has been added at the organization level, not use for the moment however.
I don't know why IPackageController doesn't have a before_create hook like IResourceController does. after_create and after_update happen after data has already been committed, so altering the dataset again would result in an infinite loop.
I'll have to think more about this. What is the use case for the bbox?
I'll have to think more about this. What is the use case for the bbox?
- Is to have as complete metadata as possible
- It's not being activated yet, but it would make possible to use geofiltering feature.
As said, not a huge deal.
The best thing I can think of at the moment is to have a bbox field on the dataset level as well. In before_index, if the dataset-level field is empty, insert the bbox of the parent organization.
This would work if geofiltering is done via Solr, but if it's to be done with PostGIS, a different solution would be needed.
There is an equivalent of the bbox field at the dataset level (which is "spatial", same name as used by the spatial extension).
Tell me if I'm wrong, but before_index only alters the dict sent to Solr, which means that Solr would get the added spatial/bbox field at the dataset level, but in CKAN (in the CKAN DB), the field would remain empty. Is that correct?
Yes, that's right. It would only be useful if the spatial filtering was done through Solr
Define a geospatial BBox in geojson at the organization level. It is not to be displayed in the page, but the bbox could be assigned to the "spatial" fields of the datasets owned by the organization (if the spatial field was not filled when the dataset is created/updated)