I have a query that works alright in Overpass Turbo, which I can't run directly by sending it with curl (it says "Your browser sent a request that this server could not understand."). As far as I can tell it's not using Overpass Turbo's extended syntax. The query is meant to get the buildings, shops etc, and adjoining streets, along a street. Here is the query that works only in Overpass Turbo:
and here is the biggest piece of it that I have been able to get working with curl --- it has only one of the original three parts of the "union" construct:
Also, I tried some other subsets of the original query, and they ran for a relatively long time and I killed them to avoid excessive server use; the whole thing runs in about 18 seconds under Overpass Turbo. How can I get this to work under curl (eventually, I will be using it from ClojureScript in a client-side app)? asked 09 Feb '22, 12:55 HillWithSmal... |
Remove all indentation whitespace from q1. PS Unsure if answered 09 Feb '22, 16:24 DaveF Thanks --- that fixed it! I guess Overpass Turbo must be doing that for me.
(09 Feb '22, 16:28)
HillWithSmal...
1
According to the manual page on debian, POST is the default action if --data is given.
(09 Feb '22, 18:46)
HillWithSmal...
Could you test something? I added the indents back in & it ran. what results do you get?
(13 Feb '22, 20:52)
DaveF
|
Can you show us how you tried to run the curl command? I have a hunch you might have a problem with quoting on the shell command line.
Thanks, but I don't think that'll be it. I'm using the command line:
and the contents of the file q1 are as follows:
As a side note, if I remember correctly, killing curl won't stop the request on the server, so you might as well wait for the result.
I hadn't realized that, thanks. Now I've got the query working with curl, it's taking the same length of time as it does on Overpass Turbo, so there may have been something wrong in the ones that were taking longer.