geojson 中的坐标顺序 [英] Order of coordinates in geojson

查看:84
本文介绍了geojson 中的坐标顺序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在测试通过 GitHub 以 geojson 格式呈现数据,因为我想将其用于 INSPIRE 数据.INSPIRE 数据采用 GML 3.2.1 格式.我已经从 http://services.cuzk.cz/下载了其中一个数据集gml/inspire/cp/epsg-4258/(在 ETRS 中).我需要从中获取 json 文件,因此我在 Quantum GIS(版本 1.9)中打开了 GML 文件并将其保存为 geojson 文件(CRS=EPSG::4326),然后上传到我的 GitHub.geojson 中的坐标顺序是(东,北),但从 QGIS 保存文件后,它是(北,东).我的数据来自捷克共和国,但它在也门呈现.有没有人有这个问题的经验?有人知道如何在 geojson 文件中切换坐标(或轴)的顺序吗?我对基于 xml 的数据格式的经验比 json 多得多,因此我希望这不是那么愚蠢的问题.

I was testing rendering of data via GitHub in geojson format, because I wanted to use it for INSPIRE data. INSPIRE data are in GML 3.2.1 format. I've downloaded one of datasets from http://services.cuzk.cz/gml/inspire/cp/epsg-4258/ (which is in ETRS). I needed to get json file from it, so I've opened GML file in Quantum GIS (version 1.9) and saved it like geojson file (CRS=EPSG::4326) and then uploaded to my GitHub. Order of coordinates in geojson is (easting, northing), but after saving file from QGIS it's (northing, easting). My data comes from Czech Republic, but it's rendered in Yemen. Does anybody have any experience with this problem? Does anybody know how to switch order of coordinates (or axis) in geojson file? I have much more experience with xml based data formats than with json and because of that I hope that this isn't so silly question.

推荐答案

对于在那里寻找标题中问题答案的任何人:

For anyone up there looking for the answer for the question in the title:

坐标顺序是经纬度,或者东距和北距.

来源:

3.1.1.位置

位置是基本的几何结构.这Geometry 对象的坐标"成员由以下任一组成:

A position is the fundamental geometry construct. The "coordinates" member of a Geometry object is composed of either:

o 点几何中的一个位置,

o one position in the case of a Point geometry,

o 在 LineString 或 MultiPoint 的情况下的位置数组几何,

o an array of positions in the case of a LineString or MultiPoint geometry,

o 一个 LineString 或线性环的数组(参见第 3.1.6 节)在 Polygon 或 MultiLineString 几何的情况下的坐标,或

o an array of LineString or linear ring (see Section 3.1.6) coordinates in the case of a Polygon or MultiLineString geometry, or

o 在 MultiPolygon 的情况下,Polygon 坐标数组几何.

o an array of Polygon coordinates in the case of a MultiPolygon geometry.

位置是一个数字数组.必须有两个或更多
元素.前两个元素是经度和纬度,或者
东移和北移
,完全按照这个顺序并使用十进制
数字.高度或海拔可以作为可选的第三项
元素.

A position is an array of numbers. There MUST be two or more
elements. The first two elements are longitude and latitude, or
easting and northing
, precisely in that order and using decimal
numbers. Altitude or elevation MAY be included as an optional third
element.

来自 GeoJSON 规范

这篇关于geojson 中的坐标顺序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆