请输入您要查询的百科知识:

 

词条 GeoJSON
释义

  1. History

  2. Example

     Geometries 

  3. Supported software

  4. TopoJSON

      TopoJSON Schema  

  5. References

  6. Sources

{{Infobox file format
| name = GeoJSON
| logo =
| icon =
| iconcaption =
| screenshot =
| caption =
|_noextcode = on
| extensions = .json, .geojson
|_nomimecode = on
| mime = application/geo+json[1]
| type code =
| uniform type =
| conforms to =
| magic =
| owner =
| released =
| latest release version =
| latest release date =
| genre = GIS file format
| container for =
| contained by =
| extended from = JSON
| extended to =
| standard = RFC 7946
| free = yes
| url = {{URL|http://geojson.org/}}
}}

GeoJSON[2] is an open standard format designed for representing simple geographical features, along with their non-spatial attributes. It is based on JSON, the JavaScript Object Notation.

The features include points (therefore addresses and locations), line strings (therefore streets, highways and boundaries), polygons (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.[3]

The GeoJSON format differs from other GIS standards in that it was written and is maintained not by a formal standards organization, but by an Internet working group of developers.[4]

A notable offspring of GeoJSON is 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[5] and the format specification was finalized in June 2008.

In April 2015 the Internet Engineering Task Force has founded the Geographic JSON working group[6] which released GeoJSON as RFC 7946 in August 2016.

Example

{
  "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" }      }    }  ]

}

Geometries

Geometry primitives
TypeExamples
Point {
    "type": "Point",     "coordinates": [30, 10]

}

LineString {
    "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

}

Multipart geometries
TypeExamples
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
        ]    ]

}

Supported software

GeoJSON is supported by numerous mapping and GIS software packages, including ArcGIS[7], OpenLayers,[8] Leaflet, MapServer,[9] Geoforge software,[10] GeoServer,[11] GeoDjango,[12] GDAL,[13] Safe Software FME,[14] and CartoDB.[15] It is also possible to use GeoJSON with PostGIS[16] and Mapnik,[17] both of which handle the format via the GDAL OGR conversion library. Bing Maps, Yahoo!, HERE[18], and Google also support GeoJSON in their API services.

The Google Maps JavaScript API v3 directly supports the integration of GeoJSON data layers[19] as of March 19, 2014.[20] For the Julia language a [https://github.com/JuliaGeo/GeoJSON.jl GeoJSON.jl package] is available.

GitHub also supports GeoJSON rendering[21] and Potrace GeoJSON export.

[https://geojson.io Geojson.io] supports GeoJSON rendering and editing in the web browser.

TopoJSON

TopoJSON is an extension of GeoJSON that encodes topology. Rather than representing geometries discretely, geometries in TopoJSON files are stitched together from shared line segments called arcs.[22] 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.[23] In addition, TopoJSON facilitates applications that use topology, such as topology-preserving shape simplification, automatic map coloring, and cartograms.

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[24] and PostGIS as of version 2.1.0.[25]

TopoJSON Schema

Given a GIS shape near coordinates latitude 0° and longitude 0°, a simple but valid and complete topojson file containing all metadata, Polygon, LineString, Point elements, arcs and properties is defined as follows:

{
  "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

}

References

1. ^{{cite web|title=The GeoJSON Format (RFC 7946)|url=https://tools.ietf.org/html/rfc7946|publisher=Internet Engineering Task Force (IETF)}}
2. ^[https://tools.ietf.org/html/rfc7946 The GeoJSON Format]
3. ^[https://developer.apple.com/library/ios/documentation/userexperience/conceptual/LocationAwarenessPG/ProvidingDirections/ProvidingDirections.html iOS Location and Maps Programming Guide]
4. ^The GeoJSON Discussion List
5. ^March 2007 Archives by thread
6. ^https://datatracker.ietf.org/wg/geojson/history/
7. ^{{cite web |url=https://doc.arcgis.com/en/arcgis-online/reference/geojson.htm |title=geoJSON in ArcGIS Online}}
8. ^{{cite web |url=http://openlayers.org/dev/examples/vector-formats.html |title=Archived copy |accessdate=2010-03-16 |deadurl=yes |archiveurl=https://web.archive.org/web/20100316141001/http://openlayers.org/dev/examples/vector-formats.html |archivedate=2010-03-16 |df= }}
9. ^http://mapserver.org/output/template_output.html
10. ^http://leafletjs.com/reference.html#geojson
11. ^{{cite web |url=http://svn.codehaus.org/geoserver/tags/2.0.0-alpha1/geoserver/release/README.txt |title=Archived copy |accessdate=2009-12-13 |deadurl=yes |archiveurl=https://web.archive.org/web/20091213135246/http://svn.codehaus.org/geoserver/tags/2.0.0-alpha1/geoserver/release/README.txt |archivedate=2009-12-13 |df= }}
12. ^{{cite web |url=http://geodjango.org |title=Archived copy |accessdate=2009-10-09 |deadurl=yes |archiveurl=https://web.archive.org/web/20090907092957/http://geodjango.org/ |archivedate=2009-09-07 |df= }}
13. ^{{cite web |url=http://gdal.org/ogr/drv_geojson.html |title=Archived copy |accessdate=2009-10-09 |deadurl=yes |archiveurl=https://web.archive.org/web/20090415054743/http://www.gdal.org/ogr/drv_geojson.html |archivedate=2009-04-15 |df= }}
14. ^{{cite web |url=http://www.safe.com/reader_writerPDF/geojson.pdf |title=Archived copy |accessdate=2008-07-24 |deadurl=yes |archiveurl=https://web.archive.org/web/20080724103529/http://www.safe.com/reader_writerPDF/geojson.pdf |archivedate=2008-07-24 |df= }}
15. ^http://developers.cartodb.com/documentation/cartodb-js.html
16. ^{{cite web |url=http://pugs.postgresql.org/files/Introduction_to_PostGIS_v1.0.pdf |title=Archived copy |accessdate=2010-06-01 |deadurl=yes |archiveurl=https://web.archive.org/web/20100601122329/http://pugs.postgresql.org/files/Introduction_to_PostGIS_v1.0.pdf |archivedate=2010-06-01 |df= }}
17. ^{{cite web |url=http://svn.mapnik.org/tags/release-0.6.0/docs/api_docs/python/mapnik-module.html |title=Archived copy |accessdate=2009-05-02 |deadurl=yes |archiveurl=https://web.archive.org/web/20090502183602/http://svn.mapnik.org/tags/release-0.6.0/docs/api_docs/python/mapnik-module.html |archivedate=2009-05-02 |df= }}
18. ^https://developer.here.com/documentation/maps/topics_api/h-data-geojson-intro.html
19. ^https://developers.google.com/maps/documentation/javascript/examples/layer-data-simple
20. ^http://googledevelopers.blogspot.com/2014/03/maps-made-easier-geojson-in-javascript.html
21. ^https://github.com/blog/1528-there-s-a-map-for-that
22. ^https://github.com/topojson/topojson-specification
23. ^https://github.com/mbostock/topojson/wiki
24. ^GDAL/OGR 1.11.0 Release Notes
25. ^PostGIS AsTopoJSON

Sources

  • http://geojson.org/
  • 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 | deadurl=yes | archiveurl=https://web.archive.org/web/20090522050557/http://www.directionsmag.com/article.php?article_id=2550 | archivedate=22 May 2009 | df= }}
  • {{cite web |url=http://www.geowebguru.com/articles/97-technical-overview-geojson |title=Geoweb Guru: Technical Overview: GeoJSON |date=16 February 2009 |deadurl=yes |archiveurl=https://web.archive.org/web/20090221220320/http://www.geowebguru.com/articles/97-technical-overview-geojson |archivedate=2009-02-21 |df= }}
  • {{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}}
  • https://github.com/mbostock/topojson
  • https://github.com/topojson/topojson-specification

2 : JSON|GIS vector file formats

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/11/12 10:50:33