Reverse geocode different road between public osm database and local database - openstreetmap

I have a problem with the result of reverse geocoding.
I have created a local instance of openstreet with an Italy OSM database downloaded from geofabrik. The local instance daily updates the database.
When I search an address with public request:
https://nominatim.openstreetmap.org/reverse?format=xml&lat=41.9189&lon=12.52001&zoom=18&accept-language=it
The result of road is: "Viale Ventuno Aprile"
But when I call my local instance with the same request the result of road is different.
Why?

Related

Update attribute in Overpass-API Local server

I have created an overpass API server locally using docker (https://hub.docker.com/r/wiktorn/overpass-api). Suppose I would like to update an attribute of a node/way such as smoothness, surface, speed limit etc. with a new value for a single point or make a bulk update of points in my locally installed server (instead of the public server), how does one do that? Any feedback is appreciated.

OSMNx: How to fetch street network using saved osm xml instead of overpass api call request

I can fetch OSM street network using
G=ox.graph_from_point((lat, lng),custom_filter=road_filter,dist=20,simplify=False,retain_all=True)
The process is very slow if i have to make 1000 of such requests.I was hoping if i can load the saved osm file then query locally for the osm road networks.
In Osmnx, the only way to create a graph from a local .osm formatted XML file is:
graph = osmnx.graph_from_xml(filepath, simplify=False, retain_all=True)
There are not filters as other graph_from_*() functions, but once you got the graph you can query the Geodataframes containing nodes and edges that you get with:
nodes, edges = osmnx.graph_to_gdfs(graph, nodes=True, edges=True)

I can't get the VirtualGuests location name using softlayer Rest API

I can't get the location longName (Paris, Amsterdam, ...) using this URL
https://api.softlayer.com/rest/v3.1/SoftLayer_Account/getVirtualGuests.json?objectMask=mask[id,hostname,domain,primaryIpAddress,primaryBackendIpAddress,location[id,name,longName]]
Currently the control portal use the relational property datacenter instead of location to retrieve the information you need, try this request:
https://api.softlayer.com/rest/v3.1/SoftLayer_Account/getVirtualGuests.json?objectMask=mask[id,hostname,domain,primaryIpAddress,primaryBackendIpAddress,datacenter[id,name,longName]]

Where does Nominatim get its address info?

Till now, I was using the Nominatim API to fetch landmark information from but recently, I've downloaded the OpenStreetMaps database, and tried to make my own dataset, so I would not rely so heavily on Nominatim services. I managed to extract from the OSM database the needed information (nodes tagged with amenity for example), but I realized, that while I was querying for amenities through Nominatim, it returned a bunch of address info, which is nowhere to be found in the OSM database.
Example:
Reverse geocoding of a hotel from Spain using Nominatim:
http://nominatim.openstreetmap.org/reverse?format=xml&osm_type=N&osm_id=1207098527
The data that is attached to the same node used to reverse geocode in OSM:
http://open.mapquestapi.com/xapi/api/0.6/node/1207098527
While Nominatim gives me Suburb, Pedestrian, City, County, State, etc. information, this node in OSM contains only a name tag, and a tourism tag.
Does anyone know, where is Nominatim getting the additional data it uses to display its information from?
Nominatim does not just look at individual objects but gathers information from multiple objects instead. Look at the information Nominatim knows about "HOTEL LA MORADA MAS HERMOSA": There are:
the node, lacking all address information (feel free to improve this!, at least house number and street should be added)
a nearby street
the suburb the hotel is located in
the city
... and so on.
Remember, OSM is a spatial database. Instead of attaching all information to each individual object one can do spatial queries in order to gather various kinds of additional information.

iPhone application Getting data from Mysql database

I am creating store locator application. This application should show nearest store to given latitude and longitude.
I can get latitude and longitude. I have data in my Mysql database on server containing information regarding stores and their corresponding latitude and longitudes.
1. Is it secure to connect MySQL database through application(because i have to connect to database to get nearest stores through Haversine formula.).
2. how can i implement whole process.
Update:---
Basically i till now i can get my location coordinates like longitude and latitude. I can get nearest stores in table form using googlePlaces but i want to add opening and closing time as well. So i was thinking about connecting mySql database having all information. But main point is getting nearest stores. I have searched a lot and found there is haversine formula for that. i have found tutorial using haversine with php and mysql. but i dont know php.So please suggest me any way with which i can accomplish this.
Thanks
Normally you would use a webservice (via SOAP, REST, JSON, …) for such tasks, as this would prevent opening the database-server to the public and also makes you independent from the used programming language.