Comparing conceptual limitations in GeoJSON and in GML-SF Comparing GeoJSON coordinates with WKT

18 Copyright © 2015 Open Geospatial Consortium. Type Representation Point Point 10 10 type: Point, coordinates: [10, 10] a Point LineString LineString 10 10, 20 20, 30 40 type: LineString, coordinates: [[10, 10], [20, 20], [30, 40]] a LineString with 3 points Polygon Polygon 10 10, 10 20, 20 20, 20 15, 10 10 type: Polygon, coordinates: [[[10, 10], [10, 20], [20, 20], [20, 15], [10,10]]] a Polygon with 1 exteriorRing and 0 interiorRings Multipoint MultiPoint 10 10, 20 20 type: MultiPoint, coordinates: [[10, 10], [20, 20]] a MultiPoint with 2 points MultiLine String MultiLineString10 10, 20 20, 15 15, 30 15 type: MultiLineString, coordinates: [[[10, 10], [10, 20]], [[15, 15], [30, 15]]] a MultiLineString with 2 linestrings MultiPoly gon MultiPolygon 10 10, 10 20, 20 20, 20 15, 10 10, 60 60, 70 70, 80 60, 60 60 type: MultiPolygon, coordinates: [[[[10, 10], [10, 20], [20, 20] , [20, 15], [10, 10]]], [[[60, 60], [70, 70], [80, 60], [60, 60]]]] a MultiPolygon with 2 polygons GeomColl ection GeometryCollection POINT 10 10, POINT 30 30, LINESTRING 15 15, 20 20 type: GeometryCollection , [{ type: Point, coordinates: [10, 10] },{ type: Point, coordinates: [30, 30]] },{ type: LineString, coordinates: [[15, 15], [20, 20]] a GeometryCollec tion consisting of 2 Point values and a LineString value Copyright © 2015 Open Geospatial Consortium. 19 }] Polyhedro n Polyhedron Z 0 0 0, 0 0 1, 0 1 1, 0 1 0, 0 0 0, 0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0, 0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0, 1 1 0, 1 1 1, 1 0 1, 1 0 0, 1 1 0, 0 1 0, 0 1 1, 1 1 1, 1 1 0, 0 1 0, 0 0 1, 1 0 1, 1 1 1, 0 1 1. 0 0 1 NA A polyhedron cube, corner at the origin and opposite corner at 1, 1, 1. Tin Tin Z 0 0 0, 0 0 1, 0 1 0, 0 0 0, 0 0 0, 0 1 0, 1 0 0, 0 0 0, 0 0 0, 1 0 0, 0 0 1, 0 0 0, 1 0 0, 0 1 0, 0 0 1, 1 0 0, NA A tetrahedron 4 triangular faces, corner at the origin and each unit coordinate digit. Point Point Z 10 10 5 type: Point, coordinates: [10, 10, 5] a 3D Point Point Point ZM 10 10 5 40 NA the same 3D Point with M value of 40 Point Point M 10 10 40 NA a 2D Point with M value of 40

5.6 TopoJSON

TopoJSON is an extension of GeoJSON that encodes only a specific topological case: 2D planar topological polygons composed by sequences of edges. Rather than representing geometries directly as arrays of coordinates, polygons geometries are defined as sequences of edges actually TopoJSON call them “arcs”. Each edge is defined only once, but can be referenced several times by different shapes, thus reducing redundancy and decreasing the file size and it is specified here: https:github.comtopojsontopojson- specificationblobmasterREADME.md. Some state that a typical TopoJSON file is 80 smaller than its GeoJSON equivalent. A JavaScript library such as https:github.commbostocktopojson can be used to transform form TopoJSON to GeoJSON. The last river document could be presented in TopoJSON as: { 20 Copyright © 2015 Open Geospatial Consortium. type:Topology, transform:{ scale: [1,1], translate: [0,0] }, objects:{ mississipi_river:{ type:GeometryCollection, geometries:[ { type: LineString, arcs: [0], properties:{ url: http:en.wikipedia.orgwikiMississippi_River, name: mississipi, length: 3734, discharge: 16790, source: Lake Itasca, mouth: Gulf of Mexico, country: United States of America, bridges: [Eads Bridge, Chain of Rocks Bridge] } } ] } }, arcs: [[[-95.2075, 47.239722], [-89.253333, 29.151111]]] } In particular, a JavaScript code has been developed to transform TopoJSON in GeoJSON. This way, JavaScript clients supporting GeoJSON can automatically support TopoJSON.