openpotato / openplzapi.data

Raw data for the OpenPLZ API project
https://www.openplzapi.org
Open Data Commons Open Database License v1.0
22 stars 0 forks source link

Missing Street #4

Closed alexander-rebello closed 2 months ago

alexander-rebello commented 2 months ago

Hi there,

First, thanks for this API, very usefull. When using it to autofill addresses, one of our customers noticed a missing street in Germany, Wuppertal, 42327: "Arndtstraße" I've tried multiple ways of writing it, also "Arndtstr", which gives me multiple results from other cities. When checking the OpenStreetMap website, I actually am able to find it. So I'm not quite sure if I'm doing something wrong here or if it's just missing in the data? Thanks in advance

fstueber commented 2 months ago

Hi, this gives me the street:

https://openplzapi.org/de/Streets?name=Arndtstr&postalCode=42327&page=1&pageSize=10

Or am I missing something?

alexander-rebello commented 2 months ago

Ok I get where the issue is now. So it does exist, but because we are searching for streets, we are not using the postalCode parameter. Now if you do this without postal code, there are more than 50 results. But because 50 is the maximum page size, the wuppertal result never shows up. I have to think of a way to do this, because we are showing it in a dropdown, and as I saw it, there is no way to submit a searchstring, which lets you search for streets and cities at the same time, or is there? So that one could search for "Wuppertal Arndtstr"? Thanks again

fstueber commented 2 months ago

What about this?

https://openplzapi.org/de/Streets?name=Arndtstr&locality=Wuppertal&page=1&pageSize=10
fstueber commented 2 months ago

Or this:

https://openplzapi.org/de/Streets?name=%5EArndtstr&locality=Wuppertal&page=1&pageSize=10

Difference: Street name must START with "Arndtstr" (expressed via reg expr "^Arndtstr")

alexander-rebello commented 2 months ago

Yeah true, but for that i would need to figure out what part of the search string is the city and what part is the street. Imagine an input like the google maps search bar.

fstueber commented 2 months ago

Ah ok, I see. Thats indeed missing at the moment. But you can emulate this via regular expressions:

https://openplzapi.org/de/Streets?name=%5EArndtstr%7C%5EWuppertal&locality=%5EArndtstr%7C%5EWuppertal&page=1&pageSize=10

It says: Give me all streets where the street name starts with "Arndtsr" OR "Wuppertal", and the location starts "Arndtsr" OR "Wuppertal". This should give you a hint in the right direction.

alexander-rebello commented 2 months ago

Ok perfect, thank you very much!