본문으로 이동

GeoJSON: 두 판 사이의 차이

위키백과, 우리 모두의 백과사전.
내용 삭제됨 내용 추가됨
새 문서: 지오제이슨(GeoJSON) <ref>[https://tools.ietf.org/html/rfc7946 The GeoJSON Format]</ref>은 공간적이지 않은 속성과 함께 간단한 지형을 표현하기 위해 설계...
(차이 없음)

2018년 8월 15일 (수) 08:32 판

지오제이슨(GeoJSON) [1]은 공간적이지 않은 속성과 함께 간단한 지형을 표현하기 위해 설계된 개방형 공개 표준 형식이다. 이것은 JSON자바스그립트 Object Notation을 기반으로한다.

지형지물(주소 및 위치), 선분 스트링(LineString,거리, 고속도로 및 경계등 정보를 담을수있는 Geocode 문자열), 다각형 (국가,도, 토지) 및 이러한 유형의 여러 부분으로 구성된 모음을 특징으로 한다. GeoJSON 기능은 물리적 세계의 엔티티만을 나타낼 필요는 없다. 예를 들어, 모바일 라우팅 및 네비게이션 애플리케이션은 GeoJSON을 사용하여 서비스 범위를 확장 기술할 수 있다. [2] 또한 GPX가 특정 목적을 위한 경로 정보 공유 도구로 활용되는것처럼 즉, 산악 등반이나 마운틴 바이크를 위한 루트 및 길안내 자료등으로 사용할수있다.

GeoJSON 형식은 공식 표준 조직이 아니라 인터넷 작업 그룹의 개발자에 의해 작성되고 유지된다는 점에서 다른 GIS 표준과 다르지만 XML을 기반으로 한GPX와 함께 사실상 표준처럼 사용된다.[3]

GeoJSON은 지형 공간 토폴로지를 인코딩하며 일반적으로 파일 크기가 더 작다.

GeoJSON의 주목할만한 계열은 TopoJSON이다.

워킹그룹

GeoJSON 형식의 워킹그룹과 토론은 2007년 3월에 시작되었으며 [4] 형식 지정은 2008년 6월에 마무리되었다.

2015년 4월 IETF(Internet Engineering Task Force)는 GeoJSON을 2016년 8월 RFC 7946으로 제안된 Geographic JSON 워킹그룹을 구성했다.[5]


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

지원 소프트웨어

GeoJSON은 OpenLayers[6], Leaflet, MapServer[7], Geoforge 소프트웨어[8] GeoServer, [9] GeoDjango[9], GDAL, [11] Safe Software FME 등 많은 매핑 및 GIS 소프트웨어 패키지에서 지원하고있다.[10] CartoDB[11]와 GDAL OGR 변환 라이브러리를 통해 형식을 처리하는 PostGIS[12]Mapnik[13]에서 GeoJSON을 사용할 수도 있다. Bing Maps, 야후!, HERE [14]GoogleAPI 서비스에서 GeoJSON을 지원한다.

Google Maps JavaScript API v3은 2014년 3월 19일 기준으로 GeoJSON 데이터 레이어의 통합을 직접 지원한다.[15][16] Julia 언어의 경우 GeoJSON.jl 패키지를 사용할 수 있다.

GitHub은 GeoJSON 렌더링[17]과 Potrace GeoJSON 내보내기도 지원한다.

Geojson.io는 웹 브라우저에서 GeoJSON 렌더링 및 편집을 지원합니다.


TopoJSON 스키마

위도0 °와 경도 0 ° 근처에 GIS 모양이 주어지면 모든 메타 데이터를 포함하고있는 단순하지만 유효하고 완전한 topojson 파일의 'Polygon', ' LineString ', 'Point' ,'arc' 및 'properties'는 다음과 같이 정의할수있다.

Topojson 속성들과 표현
{
  "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]]
  ]
}


함께보기

참고

  1. The GeoJSON Format
  2. iOS Location and Maps Programming Guide
  3. The GeoJSON Discussion List
  4. March 2007 Archives by thread
  5. https://datatracker.ietf.org/wg/geojson/history/
  6. “Archived copy”. 2010년 3월 16일에 원본 문서에서 보존된 문서. 2010년 3월 16일에 확인함. 
  7. http://mapserver.org/output/template_output.html
  8. http://leafletjs.com/reference.html#geojson
  9. “Archived copy”. 2009년 9월 7일에 원본 문서에서 보존된 문서. 2009년 10월 9일에 확인함. 
  10. “Archived copy” (PDF). 2008년 7월 24일에 원본 문서 (PDF)에서 보존된 문서. 2008년 7월 24일에 확인함. 
  11. http://developers.cartodb.com/documentation/cartodb-js.html
  12. “Archived copy” (PDF). 2010년 6월 1일에 원본 문서 (PDF)에서 보존된 문서. 2010년 6월 1일에 확인함. 
  13. “Archived copy”. 2009년 5월 2일에 원본 문서에서 보존된 문서. 2009년 5월 2일에 확인함. 
  14. https://developer.here.com/documentation/maps/topics_api/h-data-geojson-intro.html
  15. https://developers.google.com/maps/documentation/javascript/examples/layer-data-simple
  16. http://googledevelopers.blogspot.com/2014/03/maps-made-easier-geojson-in-javascript.html
  17. https://github.com/blog/1528-there-s-a-map-for-that