Closed rutgervanwilligen closed 9 years ago
Gemeentegeschiedenis/106 contains a syntactically correct GeoJSON geometry, but is not valid.
http://bl.ocks.org/d/5334d09b72d09c940730
The geometry is formatted as a single polygon, but this contains two islands. Syntactically speaking, the second 'island' in the polygon array is interpreted as a hole in the first, instead of a second island.
Should geometries be OGC-simple feature specification valid? This could ve checked during conversion if checking at the source is the preferred solution.
Verzonden vanaf Samsung Mobile
-------- Oorspronkelijk bericht -------- Van: Rutger van Willigen notifications@github.com Datum:11-03-2015 14:54 (GMT+01:00) Aan: histograph/core core@noreply.github.com Cc: Onderwerp: Re: [core] Elasticsearch rejects geometries (#19)
Gemeentegeschiedenis/106 contains a syntactically correct GeoJSON geometry, but is not valid.
http://bl.ocks.org/d/5334d09b72d09c940730
The geometry is formatted as a single polygon, but this contains two islands. Syntactically speaking, the second 'island' in the polygon array is interpreted as a hole in the first, instead of a second.
— Reply to this email directly or view it on GitHubhttps://github.com/histograph/core/issues/19#issuecomment-78266688.
So often, the geometry type should be multipolygon, not polygon?
Verzonden vanaf Samsung Mobile
-------- Oorspronkelijk bericht -------- Van: Rutger van Willigen notifications@github.com Datum:11-03-2015 12:58 (GMT+01:00) Aan: histograph/core core@noreply.github.com Cc: Onderwerp: [core] Elasticsearch rejects geometries (#19)
See https://gist.github.com/rutgervanwilligen/5bc20ee44e839d7ca4a2 for a list of rejected geometries, including the reasons of rejection and a sample geometry.
— Reply to this email directly or view it on GitHubhttps://github.com/histograph/core/issues/19.
All of the Gemeentegeschiedenis geometries are now accepted.
:+1:
:-)
See also: this link
Elasticsearch has (custom?) geometry checking procedure using Java Topology Suite and Spatial4j:
import com.spatial4j.core.shape.Shape;
import com.vividsolutions.jts.geom.*;
From here
Node conversion scripts need similar checking for the geometries to be inserted I suppose.
Perhaps use this
kapotte geometrieren op andere queue zetten?
@bertspaan zegt:
heeft te maken met strengheid van Lucene. Meeste gefixed - nieuwe issues aanmaken als tegenkomen.
See https://gist.github.com/rutgervanwilligen/5bc20ee44e839d7ca4a2 for a list of rejected geometries, including the reasons of rejection and a sample geometry.