NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

1
1

Hello

I am trying to use a query for retrieving wrong ( abbreviated ) values in keys, for example: places of worship which names beginning with "S."

this is the query

[out:xml]
;
(
  node
    ["name"~"^S\."]
    ["amenity"="place_of_worship"]
    (46.00,12.24,46.70,13.80);
  way
    ["name"~"^S\."]
    ["amenity"="place_of_worship"]
    (46.00,12.24,46.70,13.80); 
);
out meta;
>;
out meta;

This returns ALL the features beginning whith "S", backslash before the dot seems not to work.

Where am I wrong?

Thank You

asked 16 Feb '13, 17:53

gpstracks's gravatar image

gpstracks
51123
accept rate: 0%


In Overpass QL you need to escape backslashes: ["name"~"^S\."] results in the regular expression ^S. (which finds every name starting with "S"). By contrast, ["name"~"^S\\."] produces the most likely ment regular expression ^S\. (which finds every name starting with "S.").

permanent link

answered 18 Feb '13, 08:23

Roland%20Olbricht's gravatar image

Roland Olbricht
6.7k36489
accept rate: 36%

2

It works. Thank You

(19 Feb '13, 22:11) gpstracks
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×483
×6
×4

question asked: 16 Feb '13, 17:53

question was seen: 3,193 times

last updated: 19 Feb '13, 22:11

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum