0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

geojson ファイルの図形の正常判定

Last updated at Posted at 2016-03-31

こんにちは。
geojson ファイル内の各図形が正常かどうか(polygon の self-intersection など)を判定してみました。ogr2ogr (GDAL) を利用しました。

$ cat input.geojson | ogr2ogr -f GeoJSON /dev/stdout /vsistdin/ -dialect sqlite -sql "select *, ST_IsValid(geometry) as ST_IsValid from OGRGeoJSON" | jq '.features[] | select(.properties.ST_IsValid == 1)' | grep ST_IsValid
    "ST_IsValid": 1
    "ST_IsValid": 1
    "ST_IsValid": 1
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?