Commit Graph

509 Commits

Author SHA1 Message Date
Sergey Motornyuk d5cee0b148 chore: restore empty line 2023-04-11 11:24:52 +03:00
Sergey Motornyuk 24f0841165 fix: Keep quiet and skip missing spatial 2023-04-11 11:24:12 +03:00
Sergey Motornyuk 20d63d3a94 TypeError when spatial is missing 2023-01-31 12:07:11 +02:00
Adrià Mercader 57e2ea40ad
Merge branch 'master' into dev-v2.0 2023-01-25 10:48:26 +01:00
amercader 1e1af32618 Fix icon in spatial search widget 2022-12-20 13:09:53 +01:00
amercader 6d12e56b4d Merge branch 'master' of github.com:ckan/ckanext-spatial 2022-12-19 16:21:07 +01:00
Adrià Mercader 48e28e37f3
Merge pull request #280 from NCAR/fix-html-link
Fix HTML view of ISO XML
2022-12-19 16:20:26 +01:00
amercader 5536382b59 Don't require ckanext-harvest, fixes #302 2022-12-19 16:19:21 +01:00
amercader cc61f711d7 Support Bootstrap 5 (CKAN >= 2.10) 2022-12-19 15:46:35 +01:00
amercader c41e361499 Improve zoom handling, cleanup 2022-12-16 15:46:56 +01:00
amercader dce34bb0c7 Update libraries in fanstatic for older ckans 2022-12-15 11:36:05 +01:00
amercader 9430763003 Activate the draw control when opening the popup 2022-12-15 11:34:03 +01:00
amercader 64f7cb63db Bump lint workflow py version 2022-12-14 15:57:23 +01:00
amercader 917110f155 Refactor the spatial query widget
Instead of expanding the sidebar map, open a new map in a modal window,
to make it easier to integrate with existing themes. Cleaned up the
code.

TODO:
* activate the draw control when opening the popup
* Boostrap 5 (CKAN 2.10)
2022-12-14 15:50:08 +01:00
amercader 734a1c7e4a Upgrade leaflet libraries
Leaflet to 1.9.3 and Leaflet.draw to 0.4.14. Leaflet.draw is no longer
maintainer so we'll need to change the implementation in the future
2022-12-12 13:13:05 +01:00
amercader 7bb0127e26 Remove unused openlayers distribution 2022-12-07 15:50:06 +01:00
amercader 6c48fdd32d Document ckanext.spatial.solr_query 2022-10-11 15:13:39 +02:00
amercader 03ad3ef31c Add test for combined q in spatial field 2022-10-11 15:09:44 +02:00
amercader ec0cc00bbe Revert to the old implementation for Bbox based searches
The approach using Solr's own BBoxField turned out to be not optimal as
it required the use of LocalParams. This is fine if the query is used in
`fq` but CKAN core does not allow it on `q` (unreasonably IMO). Long
story short the old implementation is a bit more verbose but supports:

* Proper spatial sorting
* Combining queries in `q` with a spatial filter
* Antimeridian queries handling

It doesn't support Point geometries, but users can use
`solr-spatial-field` if they need them
2022-10-11 14:36:59 +02:00
amercader 15caaad9f1 Refactor the search logic to move it to its own module 2022-10-11 10:20:45 +02:00
amercader b89da29192 Add tests for ordering and other queries 2022-10-10 11:26:25 +02:00
amercader 2945795b5f Update backend internally whenusing deprecated "solr" one 2022-10-07 15:23:55 +02:00
amercader f64121ab04 Fix CSRF issus in functional tests 2022-10-06 11:49:03 +02:00
amercader ef8c3c1134 Rename solr backend to solr-bbox for clarity 2022-10-06 11:19:38 +02:00
Andres Vazquez e5628f088a Test GeometryCollection 2022-09-14 13:20:37 -03:00
Andres Vazquez 31d73b2b48 Fix error for older Shapely versions 2022-09-14 12:45:00 -03:00
Andres Vazquez ca7a054a39 Py2 compatibility 2022-09-13 17:02:01 -03:00
Andres Vazquez 9bc5b4f000 Allow Multiple Geometries 2022-09-13 16:36:57 -03:00
amercader 44e3ce1a42 Fix, add 2.9 hook variant in test plugin 2022-09-07 10:24:35 +02:00
amercader 3fce3934bf Add tests for custom indexing and multivalued geometries 2022-09-06 14:37:40 +02:00
amercader efc244bff4 Update spatial search documentation 2022-09-06 13:44:56 +02:00
amercader f28b42a8aa Load plugins in test classes 2022-09-06 11:58:09 +02:00
amercader cf2b2a9089 Drop big fields from indexed dict before 2022-09-06 11:25:40 +02:00
amercader 89070be10c Allow to configure the Solr spatial query sent 2022-09-06 10:31:51 +02:00
amercader a358afce5c Clean up and consolidate solr based searches 2022-09-05 15:40:32 +02:00
amercader 244b2ba20f More antimeridian fixes 2022-09-05 15:26:26 +02:00
amercader 07a028f06f Handle some antimeridian cases 2022-09-05 12:36:56 +02:00
amercader c4fd9ce21a Re-add lost logic to remove fields from the index (take 2) 2022-09-05 12:36:22 +02:00
amercader 4a4c36f4e2 Spatial field tests
Still 2 failing
2022-09-01 14:35:10 +02:00
amercader 65de1d0e77 Refactor search backend handling 2022-09-01 14:33:49 +02:00
amercader 9cb4fb5fb3 Move query tests to own file 2022-09-01 12:00:34 +02:00
amercader 95c7b67132 PostGIS' and Solr's logic for wrapping bboxes is different 2022-09-01 11:44:54 +02:00
amercader d0a722551d Don't fit bbox in normalize function 2022-08-31 17:10:49 +02:00
amercader de7c85b59d Re-add lost logic to remove fields from the index 2022-08-31 17:08:58 +02:00
amercader d7e55b7290 cleanup 2022-08-31 16:46:46 +02:00
amercader 916d5c92ba Update Bbox based search (`solr` backend)
Use the `bbox` field in Solr, and the relevant query syntax
2022-08-31 13:21:18 +02:00
amercader eebd3954a1 Separate functions for normalizing and fitting a bbox
`normalize_bbox()` just parses incoming coordinates into a normalized dict
`fit_bbox()`  will translate any outlying coordinates to ensure they fit
the -180, -90, 180, 90 extent
2022-08-31 13:19:14 +02:00
Adrià Mercader 6507845bec
Merge pull request #283 from NCAR/nginx-server
Add nginx WAF server
2022-08-25 13:01:16 +02:00
amercader b4a9eba67a Fix all tests 2022-08-24 16:24:14 +02:00
amercader 322a92bcec Remove old API in Pylons controller 2022-08-24 13:56:50 +02:00