You are not logged in.
- Topics: Active | Unanswered
Announcement
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***
#2601 2012-04-12 14:51:56
- liosha
- Member
- From: Moscow
- Registered: 2008-03-04
- Posts: 8,447
- Website
Re: Конвертер OSM -> MP
а можно заставить osm2mp оставить в карте только роутинговый граф, выкинув все остальные объекты?
отключить все нероутинговые конфиги
Offline
#2602 2012-04-12 15:19:31
- Ezhick
- Member
- From: Moscow
- Registered: 2008-10-08
- Posts: 2,508
- Website
Re: Конвертер OSM -> MP
Ezhick wrote:а можно заставить osm2mp оставить в карте только роутинговый граф, выкинув все остальные объекты?
отключить все нероутинговые конфиги
это можно сделать одним махом или придется долго и вдумчиво тереть лишнее из конфиг. файлов?
Offline
#2603 2012-04-12 15:20:42
- Ezhick
- Member
- From: Moscow
- Registered: 2008-10-08
- Posts: 2,508
- Website
Re: Конвертер OSM -> MP
А не проще osmosis-ом отфильтровать только то что нужно?
может быть и проще, осталось понять, как это сделать? через --tt у меня не получилось оставить только роутинг и не поломать его...
Offline
#2604 2012-04-12 15:21:07
- liosha
- Member
- From: Moscow
- Registered: 2008-03-04
- Posts: 8,447
- Website
Re: Конвертер OSM -> MP
оставить только *-roads
Offline
#2605 2012-04-12 15:39:46
- Sergey Astakhov
- Member
- From: St.Petersburg, Russia
- Registered: 2009-11-13
- Posts: 5,816
Re: Конвертер OSM -> MP
Sergey Astakhov wrote:А не проще osmosis-ом отфильтровать только то что нужно?
может быть и проще, осталось понять, как это сделать? через --tt у меня не получилось оставить только роутинг и не поломать его...
Надо не через --tt а через --tf. Оставить только нужные линии highway + отношения type=restriction и все точки, на которые они ссылаются.
Типа такого: --tf accept-ways highway=* --tf accept-relations type=restriction --used-node --used-way
Типы highway можно перечислять через запятую: --tf accept-ways highway=motorway,motorway_link,trunk,trunk_link
Last edited by Sergey Astakhov (2012-04-12 15:41:10)
Offline
#2606 2012-04-12 15:45:07
- Ezhick
- Member
- From: Moscow
- Registered: 2008-10-08
- Posts: 2,508
- Website
Re: Конвертер OSM -> MP
я имел в виду tf, конечно. пробовал, не получилось.
Offline
#2607 2012-04-16 05:53:17
- taxi-fortuna
- Member
- Registered: 2012-02-22
- Posts: 26
Re: Конвертер OSM -> MP
Непонятная ошибка при операции "Processing ways". Выскакивает куча подобных и меняется только номер линии (как видно).
Use of uninitialized value $chain[0] in hash element at C;\.....\osm2mp.pl line 1040, <$_[...]> line 2192553.
Use of uninitialized value in concatenation (.) or string at C:\.....\osm2mp.pl line 1040, <$_[...]> line 2192553.
Use of uninitialized value $chain[0] in hash element at C;\.....\osm2mp.pl line 1040, <$_[...]> line 2203568.
Use of uninitialized value in concatenation (.) or string at C:\.....\osm2mp.pl line 1040, <$_[...]> line 2203568.
Last edited by taxi-fortuna (2012-05-10 05:00:27)
Offline
#2608 2012-04-17 11:36:05
- liosha
- Member
- From: Moscow
- Registered: 2008-03-04
- Posts: 8,447
- Website
Re: Конвертер OSM -> MP
Потихоньку начал глобальный рефакторинг конвертера, а то там полный ужос-ужос.
Уже сделано:
* единый скрипт развален на модули (уже давно перерос тот формат)
* исходный .osm теперь читается стандартным xml-парсером в один проход - должно стать быстрее, и можно подавать вход на stdin
* поменялся формат мастер-конфига, теперь это обычный ini, и в него вынесены дефолтные опции; остальное осталось в yaml
* сильно поменялись внутренности обработки фич-конфигов (должно стать побыстрее и построже), но внешне они остались почти такими же
* остальное (в том числе генерация роутинга) по возможности оставлено нетронутым, хотя там ещё разгребать и разгребать...
* и это только начало
Новые фичи пока все в статусе беты, использовать с осторожностью.
Offline
#2609 2012-04-24 06:43:49
- Kostik
- Member
- From: Moscow
- Registered: 2011-01-02
- Posts: 2,111
Re: Конвертер OSM -> MP
getbound.pl RU-MOS > RU-MOS.poly
Downloading RelID=51490............Failed
таймаут 900 поставил, не помогло. Хотя ID верный.
И ещё в aliases.yml неверно указаны ID Мурманской и Тверской областей, должно быть 2099216 и 2095259 соответственно.
Offline
#2610 2012-04-24 06:57:25
- liosha
- Member
- From: Moscow
- Registered: 2008-03-04
- Posts: 8,447
- Website
Re: Конвертер OSM -> MP
Downloading RelID=51490............Failed
Это апи падает, внешним таймаутом тут не поможешь.
http://www.openstreetmap.org/api/0.6/re … 51490/full
Если не вылечится, придётся что-то придумывать.
неверно указаны ID Мурманской и Тверской областей
спасибо, поменял
Offline
#2611 2012-04-24 07:14:28
- Ezhick
- Member
- From: Moscow
- Registered: 2008-10-08
- Posts: 2,508
- Website
Re: Конвертер OSM -> MP
Если не вылечится, придётся что-то придумывать.
Уже пора придумывать, ибо есть релейшены, которые не качаются хронически. У Gryphon есть некий питоновский скрипт, который качает как-то подругому и потом скармливает результат твоему скрипту. Может их как-то объединить в единый инструмент?
Offline
#2612 2012-04-24 07:30:21
- liosha
- Member
- From: Moscow
- Registered: 2008-03-04
- Posts: 8,447
- Website
Re: Конвертер OSM -> MP
Уже пора придумывать
Придумать-то несложно, но по-хорошему надо лечить апи, а не навешивать ещё одно кольцо костылей.
/full - вполне официальный метод, ограничения у него не описаны - значит, должен работать.
Offline
#2613 2012-04-24 08:31:09
- Kostik
- Member
- From: Moscow
- Registered: 2011-01-02
- Posts: 2,111
Re: Конвертер OSM -> MP
liosha
С причинами разобрались, а как быть то?
Offline
#2614 2012-04-24 08:36:01
- liosha
- Member
- From: Moscow
- Registered: 2008-03-04
- Posts: 8,447
- Website
Re: Конвертер OSM -> MP
а как быть то
Я ж говорю, по-хорошему надо пинать админов со словами "чё за фигня, почему апи падает?!"
Offline
#2615 2012-04-24 11:32:23
- Kostik
- Member
- From: Moscow
- Registered: 2011-01-02
- Posts: 2,111
Re: Конвертер OSM -> MP
Пнул, вот ответ:
It's probably timing out - some relations are just too big for the current code to handle.
Offline
#2616 2012-04-24 11:38:01
- liosha
- Member
- From: Moscow
- Registered: 2008-03-04
- Posts: 8,447
- Website
Re: Конвертер OSM -> MP
It's probably timing out
Да кто б сомневался, что это таймаут...
То есть, я так понимаю, чинить это они не собираются.
Offline
#2617 2012-04-24 11:53:17
- Kostik
- Member
- From: Moscow
- Registered: 2011-01-02
- Posts: 2,111
Re: Конвертер OSM -> MP
Ну может надо как то по особому пинать, я в английском не силён. Писал на webmaster@openstreetmap.org
Offline
#2618 2012-04-24 18:08:50
- liosha
- Member
- From: Moscow
- Registered: 2008-03-04
- Posts: 8,447
- Website
Re: Конвертер OSM -> MP
Добавил возможность скачать большие релейшены по частям.
getbound теперь вынесен в самостоятельный проект: http://code.google.com/p/osm-getbound/
Offline
#2619 2012-04-24 21:20:38
- Kostik
- Member
- From: Moscow
- Registered: 2011-01-02
- Posts: 2,111
Re: Конвертер OSM -> MP
This project currently has no downloads.
Offline
#2620 2012-04-25 05:04:49
- z3s
- Member
- Registered: 2011-06-08
- Posts: 111
Re: Конвертер OSM -> MP
Offline
#2621 2012-04-25 06:37:25
- Kostik
- Member
- From: Moscow
- Registered: 2011-01-02
- Posts: 2,111
Re: Конвертер OSM -> MP
liosha
У меня почему то не работает и выдаёт кучу ошибок:
C:\OSM\getbound>getbound.pl RU-MOS 1>RU-MOS.poly
Bareword found where operator expected at C:\OSM\getbound\getbound.pl line 8, ne
ar ""Content-Type" content"
(Missing operator before content?)
Bareword found where operator expected at C:\OSM\getbound\getbound.pl line 40, n
ear "" rel="stylesheet"
(Missing operator before stylesheet?)
String found where operator expected at C:\OSM\getbound\getbound.pl line 40, nea
r "stylesheet" href=""
Bareword found where operator expected at C:\OSM\getbound\getbound.pl line 40, n
ear "" href="http"
(Missing operator before http?)
Having no space between pattern and following word is deprecated at C:\OSM\getbo
und\getbound.pl line 40.
String found where operator expected at C:\OSM\getbound\getbound.pl line 42, nea
r "<link type=""
(Might be a runaway multi-line "" string starting on line 40)
(Missing semicolon on previous line?)
Bareword found where operator expected at C:\OSM\getbound\getbound.pl line 42, n
ear "<link type="text"
(Missing operator before text?)
String found where operator expected at C:\OSM\getbound\getbound.pl line 42, nea
r "css" rel=""
Bareword found where operator expected at C:\OSM\getbound\getbound.pl line 42, n
ear "" rel="stylesheet"
(Missing operator before stylesheet?)
String found where operator expected at C:\OSM\getbound\getbound.pl line 42, nea
r "stylesheet" href=""
Bareword found where operator expected at C:\OSM\getbound\getbound.pl line 42, n
ear "" href="http"
(Missing operator before http?)
Having no space between pattern and following word is deprecated at C:\OSM\getbo
und\getbound.pl line 42.
String found where operator expected at C:\OSM\getbound\getbound.pl line 45, nea
r "<link type=""
(Might be a runaway multi-line "" string starting on line 42)
(Missing semicolon on previous line?)
Bareword found where operator expected at C:\OSM\getbound\getbound.pl line 45, n
ear "<link type="text"
(Missing operator before text?)
String found where operator expected at C:\OSM\getbound\getbound.pl line 45, nea
r "css" rel=""
Bareword found where operator expected at C:\OSM\getbound\getbound.pl line 45, n
ear "" rel="stylesheet"
(Missing operator before stylesheet?)
String found where operator expected at C:\OSM\getbound\getbound.pl line 45, nea
r "stylesheet" href=""
Bareword found where operator expected at C:\OSM\getbound\getbound.pl line 45, n
ear "" href="http"
(Missing operator before http?)
Having no space between pattern and following word is deprecated at C:\OSM\getbo
und\getbound.pl line 45.
String found where operator expected at C:\OSM\getbound\getbound.pl line 50, nea
r "<link type=""
(Might be a runaway multi-line "" string starting on line 45)
(Missing semicolon on previous line?)
Bareword found where operator expected at C:\OSM\getbound\getbound.pl line 50, n
ear "<link type="text"
(Missing operator before text?)
String found where operator expected at C:\OSM\getbound\getbound.pl line 50, nea
r "css" rel=""
Bareword found where operator expected at C:\OSM\getbound\getbound.pl line 50, n
ear "" rel="stylesheet"
(Missing operator before stylesheet?)
String found where operator expected at C:\OSM\getbound\getbound.pl line 50, nea
r "stylesheet" href=""
Bareword found where operator expected at C:\OSM\getbound\getbound.pl line 50, n
ear "" href="http"
(Missing operator before http?)
Having no space between pattern and following word is deprecated at C:\OSM\getbo
und\getbound.pl line 50.
String found where operator expected at C:\OSM\getbound\getbound.pl line 52, nea
r "<style type=""
(Might be a runaway multi-line "" string starting on line 50)
(Missing semicolon on previous line?)
Bareword found where operator expected at C:\OSM\getbound\getbound.pl line 52, n
ear "<style type="text"
(Missing operator before text?)
String found where operator expected at C:\OSM\getbound\getbound.pl line 120, ne
ar "<body class=""
(Might be a runaway multi-line "" string starting on line 52)
(Missing semicolon on previous line?)
Bareword found where operator expected at C:\OSM\getbound\getbound.pl line 120,
near "<body class="t4"
(Missing operator before t4?)
String found where operator expected at C:\OSM\getbound\getbound.pl line 121, ne
ar "<script type=""
(Might be a runaway multi-line "" string starting on line 120)
(Missing semicolon on previous line?)
Bareword found where operator expected at C:\OSM\getbound\getbound.pl line 121,
near "<script type="text"
(Missing operator before text?)
String found where operator expected at C:\OSM\getbound\getbound.pl line 128, ne
ar "<script type=""
(Might be a runaway multi-line "" string starting on line 121)
(Missing semicolon on previous line?)
Bareword found where operator expected at C:\OSM\getbound\getbound.pl line 128,
near "<script type="text"
(Missing operator before text?)
String found where operator expected at C:\OSM\getbound\getbound.pl line 131, ne
ar "{var po = document.createElement(""
(Might be a runaway multi-line "" string starting on line 128)
(Missing semicolon on previous line?)
Bareword found where operator expected at C:\OSM\getbound\getbound.pl line 131,
near "{var po = document.createElement("script"
(Missing operator before script?)
String found where operator expected at C:\OSM\getbound\getbound.pl line 132, ne
ar "po.type = ""
(Might be a runaway multi-line "" string starting on line 131)
(Missing semicolon on previous line?)
Bareword found where operator expected at C:\OSM\getbound\getbound.pl line 132,
near "po.type = "text"
String found where operator expected at C:\OSM\getbound\getbound.pl line 132, ne
ar "javascript"; po.async = true;po.src = ""
Bareword found where operator expected at C:\OSM\getbound\getbound.pl line 132,
near ""; po.async = true;po.src = "https"
(Missing operator before https?)
String found where operator expected at C:\OSM\getbound\getbound.pl line 133, ne
ar "var s = document.getElementsByTagName(""
(Might be a runaway multi-line "" string starting on line 132)
(Missing semicolon on previous line?)
Bareword found where operator expected at C:\OSM\getbound\getbound.pl line 133,
near "var s = document.getElementsByTagName("script"
(Do you need to predeclare var?)
String found where operator expected at C:\OSM\getbound\getbound.pl line 137, ne
ar "<div class=""
(Might be a runaway multi-line "" string starting on line 133)
(Missing semicolon on previous line?)
Bareword found where operator expected at C:\OSM\getbound\getbound.pl line 137,
near "<div class="headbg"
(Missing operator before headbg?)
String found where operator expected at C:\OSM\getbound\getbound.pl line 139, ne
ar "<div id=""
(Might be a runaway multi-line "" string starting on line 137)
(Missing semicolon on previous line?)
Bareword found where operator expected at C:\OSM\getbound\getbound.pl line 139,
near "<div id="gaia"
(Missing operator before gaia?)
String found where operator expected at C:\OSM\getbound\getbound.pl line 144, ne
ar "<a href=""
(Might be a runaway multi-line "" string starting on line 139)
(Missing semicolon on previous line?)
syntax error at C:\OSM\getbound\getbound.pl line 6, near "html>"
syntax error at C:\OSM\getbound\getbound.pl line 24, near ""profileUrl":"
syntax error at C:\OSM\getbound\getbound.pl line 34, near "title>"
Excessively long <> operator at C:\OSM\getbound\getbound.pl line 145.
Offline
#2622 2012-04-25 06:38:52
- liosha
- Member
- From: Moscow
- Registered: 2008-03-04
- Posts: 8,447
- Website
Re: Конвертер OSM -> MP
line 8, near ""Content-Type" content"
Что-то ты явно не то запускаешь. Больше похожее на html
Offline
#2623 2012-04-25 07:01:18
- Ezhick
- Member
- From: Moscow
- Registered: 2008-10-08
- Posts: 2,508
- Website
Re: Конвертер OSM -> MP
Командная строка как-то странно выглядит
getbound.pl RU-MOS 1>RU-MOS.poly
Offline
#2624 2012-04-25 08:09:55
- Kostik
- Member
- From: Moscow
- Registered: 2011-01-02
- Posts: 2,111
Re: Конвертер OSM -> MP
liosha
Скачивал по ссылке указанной z3s. Правой кнопкой на файле, сохранить объект как....
А я так понимаю что нужно было открыть и выделить код и сохранить в текстовой файл и переименовать. Сам ступил короче.
Ezhick
Она выглядит так:
getbound.pl RU-MOS > RU-MOS.poly
еденичка как то сама добавляется.
Last edited by Kostik (2012-04-25 08:16:03)
Offline
#2625 2012-04-25 08:11:32
- liosha
- Member
- From: Moscow
- Registered: 2008-03-04
- Posts: 8,447
- Website
Re: Конвертер OSM -> MP
Там же всё написано:
http://code.google.com/p/osm-getbound/source/checkout
# Non-members may check out a read-only working copy anonymously over HTTP.
svn checkout http://osm-getbound.googlecode.com/svn/trunk/ osm-getbound-read-only
Offline