histograph / core

Histograph Core: Graph management and inferencing
MIT License
1 stars 3 forks source link

Elasticsearch rejects geometries #19

Closed rutgervanwilligen closed 8 years ago

rutgervanwilligen commented 9 years ago

See https://gist.github.com/rutgervanwilligen/5bc20ee44e839d7ca4a2 for a list of rejected geometries, including the reasons of rejection and a sample geometry.

rutgervanwilligen commented 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.

reinvantveer commented 9 years ago

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.

reinvantveer commented 9 years ago

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.

rutgervanwilligen commented 9 years ago

All of the Gemeentegeschiedenis geometries are now accepted.

reinvantveer commented 9 years ago

:+1:

mmmenno commented 9 years ago

:-)

reinvantveer commented 9 years ago

PostGIS valid geometries are sometimes rejected by Elasticsearch shape indexer

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.

reinvantveer commented 9 years ago

Perhaps use this

wires commented 9 years ago

kapotte geometrieren op andere queue zetten?

jobspierings commented 8 years ago

@bertspaan zegt:

heeft te maken met strengheid van Lucene. Meeste gefixed - nieuwe issues aanmaken als tegenkomen.