[Qgis-user] Address-search at the base of a shapefile
Stefan Giese
Stefan.Giese at wheregroup.com
Wed Feb 6 07:56:43 PST 2019
Hi Kai,
if you want do it by your own, you can use a small python function to
access nominatim, something like:
# -*- coding: utf-8 -*-
import json
import urllib
def getCoordinates(location):
url =
"https://nominatim.openstreetmap.org/search/"+location+"?format=json&addressdetails=0&limit=1"
try:
response = urllib.urlopen(url)
data = json.loads(response.read())
if data:
return [float(data[0]['lon']), float(data[0]['lat'])]
else:
return []
except:
return []
Mit freundlichen Grüßen
Stefan Giese
Projektleiter/Consultant
****************************************************************************
FOSS Academy Kompaktkurs "Winterschule 2019"
Grundwissen zum Aufbau von Geodateninfrastrukturen mit Open-Source-Software
https://foss-academy.com/kompaktkurse
****************************************************************************
WhereGroup GmbH & Co. KG
Schwimmbadstr. 2
79100 Freiburg
Germany
Fon: +49 (0)761 / 519 102 - 61
Fax: +49 (0)761 / 519 102 - 11
stefan.giese at wheregroup.com
www.wheregroup.com
Amtsgericht Bonn, HRA 6788
-------------------------------
Komplementärin:
WhereGroup Verwaltungs GmbH
vertreten durch:
Olaf Knopp, Peter Stamm
-------------------------------
Am 06.02.2019 um 16:32 schrieb Kai Behncke:
>
> Dear users,
>
> I wonder how I can integrate an adresssearch at the base of e.g. an
> Shapefile with adresses (not via the MMQGIS- or the GeoCoding-Plugin)?
>
> A nice solution would be a kind of a very very easy formular in which
> the user can type the streetname and the house number?
> After finding that address a "move" to that address should happen.
>
> Does anybody know if that solution already exists or can anybody give
> me a hint how to get that?
>
> Thank you very much, Kai
>
> Mit freundlichen Grüßen
> Im Auftrag
>
> Kai Behncke
> Geoinformation
> Tel.: +49 5451 931-7125
>
> E-Mail: kai.behncke at ibbenbueren.de <mailto:kai.behncke at ibbenbueren.de>
>
> Rathaus II
> Roncallistraße 3-5
> 1. Stock, Raum 105
> 49477 Ibbenbüren
>
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20190206/58b95203/attachment.html>
More information about the Qgis-user
mailing list