Support GeoJSON filtering by properties

Created on 22 March 2024, 8 months ago
Updated 12 August 2024, 3 months ago

FYI:
https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/filte...
https://gis.stackexchange.com/questions/437835/leaflet-geojson-filter-ba...

An exmaple GeoJSON:

{
"type": "FeatureCollection",
"name": "v62",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { "NAME_PY": "Liao Zhou", "BEGIN_YEAR ": 1151, "END_YEAR": 1217}, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 113.54941, 36.75454 ], [ 113.54329, 36.75215 ], [ 113.53745, 36.74418 ], [ 113.53119, 36.74643 ], [ 113.52768, 36.74794 ], [ 113.5212, 36.75068 ], [ 113.51571, 36.75423 ], [ 113.51114, 36.76001 ], [ 113.50753, 36.76454 ], [ 113.50427, 36.76949 ],
......

I'd like to filter GeoJSON data by the properties of BEGIN_YEAR and END_YEAR. How to make it? Or even via Javascript?

Feature request
Status

Closed: won't fix

Version

1.0

Component

Code

Created by

🇨🇳China fishfree

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @fishfree
  • Status changed to Closed: won't fix 3 months ago
  • 🇦🇹Austria plepe

    Sorry, I just saw your issue.

    Filtering is not something which I intended with this module. I currently don't see how I should fit this into this module, especially as you would need some kind of user interface.

    You should clone the module and add filtering to the JavaScript code, it should be easy to implement (the hard bits are user interface, how to update the filtered data when the filter values change, ...).

    If you come with a general solution, I might consider it integrating this into this module. So please come back to report on progress.

Production build 0.71.5 2024