-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Присвоение регионов фотографиям 4. Вывод регионов под названием фотог…
…рафии
- Loading branch information
1 parent
5000dc0
commit db41586
Showing
3 changed files
with
62 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,41 @@ | ||
Как найти номер отношения OSM, которое является административной гтраницей: | ||
http://nominatim.openstreetmap.org/ Вводим искомое название, находим, нажимаем 'details' и в открывшейся странице находим 'boundary:administrative, relation: NUMBER' | ||
|
||
Номера OSM границ некоторых объектов: | ||
Russia - 60189 | ||
Moscow - 102269 | ||
Moscow Oblast - 51490 | ||
Saint Petersburg - 337422 | ||
Krasnogorsk - 181345 | ||
|
||
USA - 148838 | ||
New York - 61320 | ||
New York City - 175905 | ||
New Jersey - 224951 | ||
|
||
France - 1403916 | ||
Bretagne - 102740 | ||
Ile-de-France - 8649 | ||
|
||
Andorra - 9407 | ||
Monaco - 1124039 | ||
OSM: | ||
|
||
Как найти номер отношения OSM, которое является административной границей: | ||
http://nominatim.openstreetmap.org/ Вводим искомое название, находим, нажимаем 'details' и в открывшейся странице находим 'boundary:administrative, relation: NUMBER' | ||
|
||
Получение всех координат в формате GeoJSON мультиполигона: http://osm102.openstreetmap.fr/~jocelyn/polygons/index.py?id=+NUMBER | ||
Вводим номер, делаем refresh и открываем GeoJSON | ||
Внимание! Он выводит все полигоны в виде отдельных полигонов в составе multipolygon, даже выколотые. | ||
Это необходимо проверять и править руками путем понижения уровня массивов выколотых полигонов. | ||
|
||
Или с помощью программы JOSM скачать все объекты по номеру отношения (Download object с опцией Download referrers), | ||
разбить в объектах все связи, удалить все тэги у всех точек и сохранить как geojson. Не забыть вставить в массив последние элементы массива равные первым для каждого полигона. | ||
Подробнее: https://help.openstreetmap.org/questions/8082/export-boundaries | ||
|
||
Еще варианты: https://help.openstreetmap.org/questions/8273/how-do-i-extract-the-polygon-of-an-administrative-boundary | ||
|
||
Номера OSM границ некоторых объектов: | ||
Russia - 60189 | ||
Moscow - 102269 | ||
Moscow Oblast - 51490 | ||
Saint Petersburg - 337422 | ||
Krasnogorsk - 181345 | ||
|
||
USA - 148838 | ||
New York - 61320 | ||
New York City - 175905 | ||
New Jersey - 224951 | ||
|
||
France - 1403916 | ||
Bretagne - 102740 | ||
Ile-de-France - 8649 | ||
|
||
Andorra - 9407 | ||
Monaco - 1124039 | ||
|
||
|
||
Вариант с shpefile: | ||
Сайт http://www.gadm.org/ может отдать shapefile полигонов административных областе (с не очень хорошей точностью) | ||
Онлайн иструмент: http://mapshaper.org/ | ||
Утилита: http://vallandingham.me/shapefile_to_geojson.html | ||
Клиентский скрипт для конвертации shapefile в geojson: https://github.com/wavded/js-shapefile-to-geojson (Реализован в pastvu: pastvu.com/js/shape2geojson/leaf.html) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters