Hello guys, I have UNION query
all is working good BUT is there a way to grouping the received Nodes(or ways) like this?
asked 01 Feb '18, 16:21 davittorosyan |
I have some progress... current query
ONLY one problem i have now - ORDERING. I Know, Overpass by default return ordered by id, but is there a way, get response with this ordering ?
because currently this 2 custom tags added in very bottom of the whole result. answered 06 Feb '18, 07:16 davittorosyan 1
You need to use multiple out statements, like in my earlier answer. Note that Anyway, to get results all together with ordering determined by the server, use a union. To get results in an order that you determine, use multiple out statements.
(06 Feb '18, 12:51)
maxerickson
@maxerickson you are one of the best Overpass QL masters. Thanks a lot for finding solution for this problem. Works fine for me, Thanks again
(06 Feb '18, 14:47)
davittorosyan
|
Thanks @maxerickson for solution, if you can please help me here also: I Have this part of code, and this is works good, my custom tag inserted with separate OUT in end of whole XML:
is there solution to insert many custom tags after each category, for eaxmple?:
answered 05 Feb '18, 14:06 davittorosyan sorry if my question will sounds simple...but i'm not expert on overpass queries.. but in my concept of query i wrote above in this comment, how can i place multiple "make"? this is union query and I cant imagine how i can insert between categories my "make"-s. can you please wrote example?
(06 Feb '18, 06:18)
davittorosyan
UPDATE. @maxerickson I have some progress, please see comment below.
(06 Feb '18, 07:11)
davittorosyan
|
Thank you guys for answers, but lets think from another angle of view What if we will have one querie for pub and bars and between this 2 results insert additional line(for example "+++" this line)? Or this is also mran structure changing? My problem im 2 words - have 1 query but separate results in response. Response I need, should be like this:
answered 04 Feb '18, 15:04 davittorosyan 1
You can use the https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#The_make_statement
(05 Feb '18, 00:31)
maxerickson
@maxerickson wow...thanks a lot finally i can see something, which can help resolve my problem. Can you see my comment below please.
(05 Feb '18, 13:30)
davittorosyan
|
To group the results, get rid of the union and repeat the
They won't be grouped under cafe and bar elements in the output but they will be separated by type. answered 01 Feb '18, 21:20 maxerickson Sorry, but don't works, only show the "Cafe" results. is there a way for example add some separator between categories? For example -------, or +++++ ?
(02 Feb '18, 06:01)
davittorosyan
Sorry, the
(04 Feb '18, 00:30)
maxerickson
|
Sorry, but AFAIK, it is not possible as maxerickson already indicated. You try to introduce a tags that does not exist in the OSM model (bar & cafe). You have to be aware that Overpass is just a very thin layer above the raw OSM data. Although it's powerful, you are still expected to write some code to format the result in the model you want. answered 02 Feb '18, 10:25 escada amenity=cafe and amenity=bar are widely used tags, so I'm not sure what you mean here.
(02 Feb '18, 16:28)
alester
@alester I mean can we somehow separate the results with some custom separators?
(02 Feb '18, 16:49)
davittorosyan
They are widely used as value for v (see XML above), not as tag e. g. <pub>. The OP tries to create a whole new XML format. This is not possible server side and should be done locally
(02 Feb '18, 17:39)
escada
|