„GeoJSON“ – Versionsunterschied

aus Wikipedia, der freien Enzyklopädie
Zur Navigation springen Zur Suche springen
[ungesichtete Version][gesichtete Version]
Inhalt gelöscht Inhalt hinzugefügt
RFC
Erstellt durch Übersetzen der Seite „GeoJSON
Zeile 1: Zeile 1:
GeoJSON ist ein [[JavaScript Object Notation|offenes Format]] um [[Geodatenzugangsgesetz|geografische Daten]] nach der [[JavaScript Object Notation|Simple Feature Access]]-Spezifikation zu repräsentieren. Dafür wird die [[JavaScript Object Notation]] verwendet.
{{Infobox file format
| name = GeoJSON
| logo =
| icon =
| iconcaption =
| screenshot =
| caption =
|_noextcode = on
| extensions = <code>.json</code>, <code>.geojson</code>
| mime = application/vnd.geo+json
| type code =
| uniform type =
| conforms to =
| magic =
| owner =
| released = <!-- {{Start date and age|YYYY|mm|dd|df=yes/no}} -->
| latest release version =
| latest release date = <!-- {{Start date and age|YYYY|mm|dd|df=yes/no}} -->
| genre = [[GIS file formats|GIS file format]]
| container for =
| contained by =
| extended from = [[JSON]]
| extended to =
| standard = RFC 7946
| free = yes
| url = {{URL|http://geojson.org/}}
}}


Zu den unterstützten Geometrien zählen Punkte (beispielsweise Adressen und Point of Interest), Linien (beispielsweise Straßen und Flüsse), Polygone (beispielsweise Ländergrenzen und Landnutzungen) sowie mehrteilige Typen dieser Geometrien.
'''GeoJSON'''<ref>[http://geojson.org/geojson-spec.html The GeoJSON Format Specification]</ref> is an [[open standard]] format designed for representing [[Simple Features|simple geographical features]], along with their non-spatial attributes, based on [[JSON|JavaScript Object Notation]].<ref name="RichardsonAmundsen2013">{{cite book|author1=Leonard Richardson|author2=Mike Amundsen|author3=Sam Ruby|title=RESTful Web APIs|url=http://books.google.com/books?id=wWnGAAAAQBAJ&pg=PA228|date=12 September 2013|publisher="O'Reilly Media, Inc."|isbn=978-1-4493-5974-4|page=228|quote=Geojson: A Trobled Type ... a standard based on JSON, designed for representing geographic features like points on a map. ... There's another problem with GeoJSON: Iit has no registered media type. A GeoJSON document is served as application/json, just like any other JSON document. How is a client supposed to distinguish between geoJSON and plain old JSON? }}</ref><ref name="Westra2015">{{cite book|author=Erik Westra|title=Python Geospatial Analysis Essentials|url=http://books.google.com/books?id=bJ_5CQAAQBAJ&pg=PA27|date=23 June 2015|publisher=Packt Publishing Ltd|isbn=978-1-78355-389-1|page=27|quote=GeoJSON ... is an open standard used to represent geospatial data structures as JavaScript Object Notation (JSON) objects.}}</ref>


== Geschichte ==
The features include points (therefore addresses and locations), [[Polygonal chain|line strings]] (therefore streets, highways and boundaries), [[polygon]]s (countries, provinces, tracts of land), and multi-part collections of these types. GeoJSON features need not represent entities of the physical world only; mobile routing and navigation apps, for example, might describe their service coverage using GeoJSON.<ref>[https://developer.apple.com/library/ios/documentation/userexperience/conceptual/LocationAwarenessPG/ProvidingDirections/ProvidingDirections.html iOS Location and Maps Programming Guide]</ref>
Die Entwicklung des GeoJSON-Formats begann im März 2007 durch eine Gruppe von Entwicklern über eine Mailingliste.<ref>[http://lists.geojson.org/pipermail/geojson-geojson.org/2007-March/thread.html March 2007 Archives by thread]</ref> Im Juni 2008 wurde die Formatspezifikation verabschiedet.


Im April 2015 gründete die [[Internet Engineering Task Force]] eine ''Geographic JSON working group.''<ref>https://datatracker.ietf.org/wg/geojson/history/</ref>  Diese veröffentlichte GeoJSON als RFC 7946 im August 2016.
The GeoJSON format differs from other [[Geographic information system|GIS]] standards in that it was written and is maintained not by a formal standards organization, but by an Internet working group of developers.<ref>[http://lists.geojson.org/listinfo.cgi/geojson-geojson.org The GeoJSON Discussion List]</ref>


== Beispiel ==
A notable offspring of GeoJSON is [[#TopoJSON|TopoJSON]], an extension of GeoJSON that encodes [[geospatial topology]] and that typically provides smaller file sizes.

==History==

The GeoJSON format working group and discussion were begun in March 2007<ref>[http://lists.geojson.org/pipermail/geojson-geojson.org/2007-March/thread.html March 2007 Archives by thread]</ref> and the format specification was finalized in June 2008.

In April 2015 the [[Internet Engineering Task Force]] has founded the ''Geographic JSON working group''<ref>https://datatracker.ietf.org/wg/geojson/history/</ref> which released GeoJSON as RFC 7946 in August 2016.

==Example==
<source lang="JavaScript">
<source lang="JavaScript">
{ "type": "FeatureCollection",
{ "type": "FeatureCollection",
Zeile 78: Zeile 45:
</source>
</source>


===Geometries===
=== Geometrien ===
{| class="wikitable" style="margin-bottom: 10px;"

|+Einfache Geometrien
{| class="wikitable"
! Typ
|+Geometry primitives
! colspan="2" | Beispiel
|-
! Type
!colspan="2"| Examples
|-
|-
| [[Point (geometry)|Point]]
| [[Punkt (Geometrie)|Point]]<br>
(Punkt)
| [[File:SFA Point.svg]]
| [[Datei:SFA_Point.svg]]
| <source lang="JavaScript">{ "type": "Point",
| <source lang="JavaScript">{ "type": "Point",
"coordinates": [30, 10]
"coordinates": [30, 10]
}</source>
}</source>
|-
|-
| [[Line segment|LineString]]
| [[Strecke (Geometrie)|LineString]]<br>
(Linie)
| [[File:SFA LineString.svg]]
| [[Datei:SFA_LineString.svg]]
| <source lang="JavaScript">{ "type": "LineString",
| <source lang="JavaScript">{ "type": "LineString",
"coordinates": [
"coordinates": [
Zeile 100: Zeile 67:
}</source>
}</source>
|-
|-
|rowspan="2"| [[Polygon]]
| rowspan="2" | [[Polygon]]
| [[File:SFA Polygon.svg]]
| [[Datei:SFA_Polygon.svg]]
| <source lang="JavaScript">{ "type": "Polygon",
| <source lang="JavaScript">{ "type": "Polygon",
"coordinates": [
"coordinates": [
Zeile 108: Zeile 75:
}</source>
}</source>
|-
|-
| [[File:SFA Polygon with hole.svg]]
| [[Datei:SFA_Polygon_with_hole.svg]]
| <source lang="JavaScript">{ "type": "Polygon",
| <source lang="JavaScript">{ "type": "Polygon",
"coordinates": [
"coordinates": [
Zeile 116: Zeile 83:
}</source>
}</source>
|}
|}

{| class="wikitable"
{| class="wikitable"
|+Mehrteilige Geometrien
|+Multipart geometries
! Typ
|-
! colspan="2" | Beispiel
! Type
!colspan="2"| Examples
|-
|-
|[[Point (geometry)|MultiPoint]]
|[[Punkt (Geometrie)|MultiPoint]]
| [[File:SFA MultiPoint.svg]]
| [[Datei:SFA_MultiPoint.svg]]
| <source lang="JavaScript">{ "type": "MultiPoint",
| <source lang="JavaScript">{ "type": "MultiPoint",
"coordinates": [
"coordinates": [
Zeile 131: Zeile 96:
}</source>
}</source>
|-
|-
| [[Line segment|MultiLineString]]
| [[Strecke (Geometrie)|MultiLineString]]
| [[File:SFA MultiLineString.svg]]
| [[Datei:SFA_MultiLineString.svg]]
| <source lang="JavaScript">{ "type": "MultiLineString",
| <source lang="JavaScript">{ "type": "MultiLineString",
"coordinates": [
"coordinates": [
Zeile 140: Zeile 105:
}</source>
}</source>
|-
|-
|rowspan="2"| [[Polygon|MultiPolygon]]
| rowspan="2" | [[Polygon|MultiPolygon]]
| [[File:SFA MultiPolygon.svg]]
| [[Datei:SFA_MultiPolygon.svg]]
| <source lang="JavaScript">{ "type": "MultiPolygon",
| <source lang="JavaScript">{ "type": "MultiPolygon",
"coordinates": [
"coordinates": [
Zeile 153: Zeile 118:
}</source>
}</source>
|-
|-
| [[File:SFA MultiPolygon with hole.svg]]
| [[Datei:SFA_MultiPolygon_with_hole.svg]]
| <source lang="JavaScript">{ "type": "MultiPolygon",
| <source lang="JavaScript">{ "type": "MultiPolygon",
"coordinates": [
"coordinates": [
Zeile 167: Zeile 132:
|}
|}


== Softwareunterstützung ==
==Supported software==
GeoJSON is supported by numerous mapping and [[GIS]] software packages, including [[OpenLayers]],<ref>http://openlayers.org/dev/examples/vector-formats.html</ref> [[Leafletjs|Leaflet]], [[MapServer]],<ref>http://mapserver.org/output/template_output.html</ref> [http://www.geoforge.org Geoforge] software,<ref>http://leafletjs.com/reference.html#geojson</ref> [[GeoServer]],<ref>http://svn.codehaus.org/geoserver/tags/2.0.0-alpha1/geoserver/release/README.txt</ref> [[Django (Web framework)|GeoDjango]],<ref>http://geodjango.org</ref> PointPlot, <ref>http://www.ndm.io</ref> [[GDAL]],<ref>http://gdal.org/ogr/drv_geojson.html</ref> [[Safe Software]] [[Feature Manipulation Engine|FME]],<ref>http://www.safe.com/reader_writerPDF/geojson.pdf</ref> and [[CartoDB]].<ref>http://developers.cartodb.com/documentation/cartodb-js.html</ref> It is also possible to use GeoJSON with [[PostGIS]]<ref>http://pugs.postgresql.org/files/Introduction_to_PostGIS_v1.0.pdf</ref> and [[Mapnik]],<ref>http://svn.mapnik.org/tags/release-0.6.0/docs/api_docs/python/mapnik-module.html</ref> both of which handle the format via the GDAL OGR conversion library. [[Bing Maps]], [[Yahoo!]] and [[Google]] also support GeoJSON in their API services.
GeoJSON wird von einer Vielzahl von [[Geoinformationssystem|Geoinformationssystemen]] und [[Mapping|Mapping-Software]] unterstützt, beispielsweise [[OpenLayers]]<ref>http://openlayers.org/dev/examples/vector-formats.html</ref>[[Leafletjs|Leaflet]], [[MapServer]]<ref>http://mapserver.org/output/template_output.html</ref>[http://www.geoforge.org Geoforge]<ref>http://leafletjs.com/reference.html#geojson</ref>[[GeoServer]]<ref>http://svn.codehaus.org/geoserver/tags/2.0.0-alpha1/geoserver/release/README.txt</ref>[[Django (Framework)|GeoDjango]]<ref>http://geodjango.org</ref>, PointPlot<ref>http://www.ndm.io</ref>[[Geospatial Data Abstraction Library|GDAL]],<ref>http://gdal.org/ogr/drv_geojson.html</ref> und [[CartoDB]]<ref>http://developers.cartodb.com/documentation/cartodb-js.html</ref>. Weiters kann GeoJSON in [[PostGIS]]<ref>http://pugs.postgresql.org/files/Introduction_to_PostGIS_v1.0.pdf</ref> und [[Mapnik]]<ref>http://svn.mapnik.org/tags/release-0.6.0/docs/api_docs/python/mapnik-module.html</ref> verwendet werden, weil diese beiden Softwarepakete auf die GDAL-Bibliothek zurückgreifen.


[[Bing Maps]], [[Yahoo|Yahoo!]] and [[Google Maps]] verwenden/unterstützen GeoJSON in deren [[Programmierschnittstelle|Programmierschnittstellen]].
The Google Maps JavaScript API v3 directly supports the integration of GeoJSON data layers<ref>https://developers.google.com/maps/documentation/javascript/examples/layer-data-simple</ref> as of March 19, 2014.<ref>http://googledevelopers.blogspot.com/2014/03/maps-made-easier-geojson-in-javascript.html</ref> For the [[Julia (programming language)|Julia]] language a [https://github.com/JuliaGeo/GeoJSON.jl GeoJSON.jl package] is available.


[[GitHub]] also supports GeoJSON rendering<ref>https://github.com/blog/1528-there-s-a-map-for-that</ref> and [[Potrace]] GeoJSON export.
[[GitHub]] zeigt GeoJSON-Dateien auf einer interaktiven Karte an.<ref>https://github.com/blog/1528-there-s-a-map-for-that</ref>

== TopoJSON ==
TopoJSON is an extension of GeoJSON that encodes [[Geospatial topology|topology]]. Rather than representing geometries discretely, geometries in TopoJSON files are stitched together from shared line segments called ''arcs''.<ref>https://github.com/topojson/topojson-specification</ref> ''Arcs'' are sequences of points, while line strings and polygons are defined as sequences of arcs. Each arc is defined only once, but can be referenced several times by different shapes, thus reducing redundancy and decreasing the file size.<ref>https://github.com/mbostock/topojson/wiki</ref> In addition, TopoJSON facilitates applications that use topology, such as topology-preserving shape simplification, automatic map coloring, and [[cartogram]]s.

A [https://github.com/mbostock/topojson reference implementation] of the [https://github.com/topojson/topojson-specification/blob/master/README.md TopoJSON specification] is available as a command-line tool to encode TopoJSON from GeoJSON (or ESRI Shapefiles) and a [[client side]] [[JavaScript library]] to decode TopoJSON back to GeoJSON again. TopoJSON is also supported by the popular OGR tool as of version 1.11<ref>[http://trac.osgeo.org/gdal/wiki/Release/1.11.0-News GDAL/OGR 1.11.0 Release Notes]</ref> and PostGIS as of version 2.1.0.<ref>[http://postgis.net/docs/AsTopoJSON.html PostGIS AsTopoJSON]</ref>

=== TopoJSON Schema ===
Given a [[GIS]] shape near [[coordinates]] [[latitude]] 0° en [[longitude]] 0° a simple but valid and complete topojson file containing all metadata, ''Polygon'', ''LineString'', ''Point'' elements, ''arcs'' and ''properties'' is defined as follows:
[[File:Topojson shapes-en.svg|thumb|Topojson shapes|400px]]
<source lang=JavaScript enclose=div>
{
"type":"Topology",
"transform":{
"scale": [1,1],
"translate": [0,0]
},
"objects":{
"two-squares":{
"type": "GeometryCollection",
"geometries":[
{"type": "Polygon", "arcs":[[0,1]],"properties": {"name": "Left_Polygon" }},
{"type": "Polygon", "arcs":[[2,-1]],"properties": {"name": "Right_Polygon" }}
]
},
"one-line": {
"type":"GeometryCollection",
"geometries":[
{"type": "LineString", "arcs": [3],"properties":{"name":"Under_LineString"}}
]
},
"two-places":{
"type":"GeometryCollection",
"geometries":[
{"type":"Point","coordinates":[0,0],"properties":{"name":"Origine_Point"}},
{"type":"Point","coordinates":[0,-1],"properties":{"name":"Under_Point"}}
]
}
},
"arcs": [
[[1,2],[0,-2]],
[[1,0],[-1,0],[0,2],[1,0]],
[[1,2],[1,0],[0,-2],[-1,0]],
[[0,-1],[2,0]]
]
}
</source>


== References ==
== References ==
<references/>
<references />


== Sources ==
== Weblinks ==
* http://geojson.org/
* http://geojson.org/
* http://geojson.org/geojson-spec.html
* http://geojson.org/geojson-spec.html
* {{cite web | url=http://www.directionsmag.com/article.php?article_id=2550 | title=Emerging Technology: AJAX and GeoJSON | date=18 September 2007 | first=Christopher | last=Andrews }}
* {{Cite web|url=http://www.directionsmag.com/article.php?article_id=2550|title=Emerging Technology: AJAX and GeoJSON|date=18 September 2007|last=Andrews|first=Christopher}}
* {{cite web | url=http://www.geowebguru.com/articles/97-technical-overview-geojson | title=Geoweb Guru: Technical Overview: GeoJSON | date=16 February 2009}}
* {{Cite web|url=http://www.geowebguru.com/articles/97-technical-overview-geojson|title=Geoweb Guru: Technical Overview: GeoJSON|date=16 February 2009}}
* {{cite web | url=http://googlegeodevelopers.blogspot.com/2009/05/build-on-top-of-your-public-latitude.html | title=Google Geo Developers Blog: Build on top of your public Latitude location with GeoJSON & KML | date=4 May 2009 | first=Chris | last=Lambert}}
* {{Cite web|url=http://googlegeodevelopers.blogspot.com/2009/05/build-on-top-of-your-public-latitude.html|title=Google Geo Developers Blog: Build on top of your public Latitude location with GeoJSON & KML|date=4 May 2009|last=Lambert|first=Chris}}
* https://github.com/mbostock/topojson
* https://github.com/mbostock/topojson
* https://github.com/topojson/topojson-specification
* https://github.com/topojson/topojson-specification
[[Kategorie:GIS-Datenformat]]

[[Category:GIS file formats]]
[[Category:JSON]]

Version vom 12. August 2016, 17:29 Uhr

GeoJSON ist ein offenes Format um geografische Daten nach der Simple Feature Access-Spezifikation zu repräsentieren. Dafür wird die JavaScript Object Notation verwendet.

Zu den unterstützten Geometrien zählen Punkte (beispielsweise Adressen und Point of Interest), Linien (beispielsweise Straßen und Flüsse), Polygone (beispielsweise Ländergrenzen und Landnutzungen) sowie mehrteilige Typen dieser Geometrien.

Geschichte

Die Entwicklung des GeoJSON-Formats begann im März 2007 durch eine Gruppe von Entwicklern über eine Mailingliste.[1] Im Juni 2008 wurde die Formatspezifikation verabschiedet.

Im April 2015 gründete die Internet Engineering Task Force eine Geographic JSON working group.[2]  Diese veröffentlichte GeoJSON als RFC 7946 im August 2016.

Beispiel

{ "type": "FeatureCollection",
    "features": [
      { "type": "Feature",
        "geometry": {"type": "Point", "coordinates": [102.0, 0.5]},
        "properties": {"prop0": "value0"}
        },
      { "type": "Feature",
        "geometry": {
          "type": "LineString",
          "coordinates": [
            [102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0]
            ]
          },
        "properties": {
          "prop0": "value0",
          "prop1": 0.0
          }
        },
      { "type": "Feature",
         "geometry": {
           "type": "Polygon",
           "coordinates": [
             [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0],
               [100.0, 1.0], [100.0, 0.0] ]
             ]
         },
         "properties": {
           "prop0": "value0",
           "prop1": {"this": "that"}
           }
         }
       ]
     }

Geometrien

Einfache Geometrien
Typ Beispiel
Point

(Punkt)

{ "type": "Point", 
    "coordinates": [30, 10]
}
LineString

(Linie)

{ "type": "LineString", 
    "coordinates": [
        [30, 10], [10, 30], [40, 40]
    ]
}
Polygon
{ "type": "Polygon", 
    "coordinates": [
        [[30, 10], [40, 40], [20, 40], [10, 20], [30, 10]]
    ]
}
{ "type": "Polygon", 
    "coordinates": [
        [[35, 10], [45, 45], [15, 40], [10, 20], [35, 10]], 
        [[20, 30], [35, 35], [30, 20], [20, 30]]
    ]
}
Mehrteilige Geometrien
Typ Beispiel
MultiPoint
{ "type": "MultiPoint", 
    "coordinates": [
        [10, 40], [40, 30], [20, 20], [30, 10]
    ]
}
MultiLineString
{ "type": "MultiLineString", 
    "coordinates": [
        [[10, 10], [20, 20], [10, 40]], 
        [[40, 40], [30, 30], [40, 20], [30, 10]]
    ]
}
MultiPolygon
{ "type": "MultiPolygon", 
    "coordinates": [
        [
            [[30, 20], [45, 40], [10, 40], [30, 20]]
        ], 
        [
            [[15, 5], [40, 10], [10, 20], [5, 10], [15, 5]]
        ]
    ]
}
{ "type": "MultiPolygon", 
    "coordinates": [
        [
            [[40, 40], [20, 45], [45, 30], [40, 40]]
        ], 
        [
            [[20, 35], [10, 30], [10, 10], [30, 5], [45, 20], [20, 35]], 
            [[30, 20], [20, 15], [20, 25], [30, 20]]
        ]
    ]
}

Softwareunterstützung

GeoJSON wird von einer Vielzahl von Geoinformationssystemen und Mapping-Software unterstützt, beispielsweise OpenLayers[3]Leaflet, MapServer[4]Geoforge[5]GeoServer[6]GeoDjango[7], PointPlot[8]GDAL,[9] und CartoDB[10]. Weiters kann GeoJSON in PostGIS[11] und Mapnik[12] verwendet werden, weil diese beiden Softwarepakete auf die GDAL-Bibliothek zurückgreifen.

Bing Maps, Yahoo! and Google Maps verwenden/unterstützen GeoJSON in deren Programmierschnittstellen.

GitHub zeigt GeoJSON-Dateien auf einer interaktiven Karte an.[13]

References

  1. March 2007 Archives by thread
  2. https://datatracker.ietf.org/wg/geojson/history/
  3. http://openlayers.org/dev/examples/vector-formats.html
  4. http://mapserver.org/output/template_output.html
  5. http://leafletjs.com/reference.html#geojson
  6. http://svn.codehaus.org/geoserver/tags/2.0.0-alpha1/geoserver/release/README.txt
  7. http://geodjango.org
  8. http://www.ndm.io
  9. http://gdal.org/ogr/drv_geojson.html
  10. http://developers.cartodb.com/documentation/cartodb-js.html
  11. http://pugs.postgresql.org/files/Introduction_to_PostGIS_v1.0.pdf
  12. http://svn.mapnik.org/tags/release-0.6.0/docs/api_docs/python/mapnik-module.html
  13. https://github.com/blog/1528-there-s-a-map-for-that