Fetch child relations by naming parent with Osmosis

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Fetch child relations by naming parent with Osmosis

Humphries, Grant

I have an OSM extract from which I am trying to use Osmosis to import into PostGIS only railways that are a part of a transit network that is defined by relations.  There is a super relation for this network and all of the ways that I need are members of that relation’s child or grandchild relations.  Is there a way with Osmosis that I can name just the parent relation and get all of the child members as well?  In this case there are many children so it would be much more efficient if I could do this.

 

Also a couple of other Osmosis questions

·         Does the --way-key-value’s keyValueListFile have wild card support?  I’ve tried including a line like `highway=*`, but that didn’t seem to match anything

·         Does the --tag-filter parameter support wild cards in conjunction with other characters?  I’ve been able to successfully pass something like `name=*`, but when I try `name=“John*” it seems to see the asterisk as a literal.

 

Thanks in advance!


_______________________________________________
dev mailing list
[hidden email]
https://lists.openstreetmap.org/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Fetch child relations by naming parent with Osmosis

Jochen123
On Di, Jul 05, 2016 at 11:26:50 +0000, Humphries, Grant wrote:
> I have an OSM extract from which I am trying to use Osmosis to import into PostGIS only railways that are a part of a transit network that is defined by relations.  There is a super relation for this network and all of the ways that I need are members of that relation's child or grandchild relations.  Is there a way with Osmosis that I can name just the parent relation and get all of the child members as well?  In this case there are many children so it would be much more efficient if I could do this.

Not sure about osmosis, but "osmium getid -r ..." does this.
See http://osmcode.org/osmium/
and http://docs.osmcode.org/osmium/master/osmium-getid.html .

Jochen
--
Jochen Topf  [hidden email]  http://www.jochentopf.com/  +49-351-31778688

_______________________________________________
dev mailing list
[hidden email]
https://lists.openstreetmap.org/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Fetch child relations by naming parent with Osmosis

Brett Henderson
On Wed, 6 Jul 2016 at 12:34 Jochen Topf <[hidden email]> wrote:
On Di, Jul 05, 2016 at 11:26:50 +0000, Humphries, Grant wrote:
> I have an OSM extract from which I am trying to use Osmosis to import into PostGIS only railways that are a part of a transit network that is defined by relations.  There is a super relation for this network and all of the ways that I need are members of that relation's child or grandchild relations.  Is there a way with Osmosis that I can name just the parent relation and get all of the child members as well?  In this case there are many children so it would be much more efficient if I could do this.

Not sure about osmosis, but "osmium getid -r ..." does this.
See http://osmcode.org/osmium/
and http://docs.osmcode.org/osmium/master/osmium-getid.html .

Nice!

I don't think Osmosis can do this.  It does have some recursive inclusion logic in the bounding-xxx tasks (completeWays and completeRelations options), but that can't be triggered by requesting a single relation by id.  And those options are very slow because they use temporary storage.


_______________________________________________
dev mailing list
[hidden email]
https://lists.openstreetmap.org/listinfo/dev