[GeoJSON] GeoJSON "Interior Ring" and "Hole" Definitions
Mateusz Loskot
mateusz at loskot.net
Tue Nov 12 14:20:44 PST 2013
On 12 November 2013 17:54, David Ellis <ellis at uber.com> wrote:
>
> Some questions on the spec:
>
> Is there a reference implementation for generation and/or consumption of
> GeoJSON objects. Alternatively, is there a test suite of some sort involving
> GeoJSON objects?
I am aware of numerous implementations, but I don't know if any of them
offers qualities of a reference implementation.
PostGIS,
> What are "Interior Rings" and what are "Holes"? Are they synonyms?
In 2.1.6. section, the spec says "any others must be interior rings or holes"
what AFAIU is equivalent of
"any others must be interior rings, known also as holes"
So, they are usually used as synonyms.
If, however, we take OGC SFS spec as a reference definition of a ring
and a hole,
they are not "mathematically" the same animals.
A ring is part of closure, a boundary, of polygon.
A hole, it's 'body' is part of exterior of polygon.
> What happens if interior rings overlap? If holes overlap? If an interior
> ring overlaps a hole? What happens if they partially intersect? (See image
> in the link above.)
Unspecified.
Means, handling of those cases, as well as self-intersection, bla bla
is application-specific.
Check Tim Schaub's clarification [1] on that matter (the whole thread
is worth checking)
"""
We want to be able to represent geometries before they have been
simplified, cleaned, etc.
A client that does not have the ability to detect intersections should
be able to represent a geometry and send it somewhere that will
simplify it.
"""
[1] http://lists.geojson.org/htdig.cgi/geojson-geojson.org/2007-October/000270.html
Simply, GeoJSON semantic is more relaxed than OGC model.
> Finally, the specification does not define what a GeoJSON interpreter should
> do with malformed and/or extended GeoJSON objects.
> Is this truly implementation specific?
Unspecified.
IOW, implementation/application specific.
> (This would seem to limit the ability for interop
> between GeoJSON producers and consumers written by different software teams.)
What OGC SFS specifies parsers should do about malformed WKT or WKB input?
Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
More information about the GeoJSON
mailing list