OpenStreetMap: get coordinates from address - geolocation

Is there any function in OpenStreetMap that gives you the coordinated from an address ?
something like
http://router.project-osrm.org/locate?request=GetGeocoding&nbaddresses=1&outputFormat=json&addresses_0=1240+Place+Jourdan+PARIS

I have it, Nominatim is a tool to search OSM data by name and address and to generate synthetic addresses of OSM points (reverse geocoding).
http://nominatim.openstreetmap.org/search?q=135+pilkington+avenue,+birmingham&format=json&polygon=1&addressdetails=1

Related

Resolve a physical location to a logical location

I already found the resolveLocation() function to convert a logical location to a physical location. Does there also exist a function to convert a physical location to a logical location?
In that case, a location with for example "|project://...", would resolve in "|java+class:///...".
I would then be able to use it in the readFileLines() function.
You can look up the mapping in both directions in the m3 model with the .declarations field:
data M3(
rel[loc name, loc src] declarations ...
To look up physical from logical:
mymodel.declarations[logicalURI]
A reverse lookup requires you to invert the relation first
mymodel.decls<src, name>[physicalURI]
By the way, if your m3 model is "registered" the readFile functions will do the resolution for you and just work on any URi. Registration happens by default as a side effect from the createM3FromEclipseProject function.

Find if a point (latitude, longitude) is within OpenStreetMaps "way" (area)

I have a list of longitude and latitude points for various houses, offices, etc. I am trying to split them up to determine if they are inside a certain Way or not. I don't want to use the old "centre point" of an area and then radius value as that is not accurate enough.
So for example if I had 4 locations in an Way like "Richmond Upon Thames" that looks like this:
It should return just point B and C. Is this possible using Open Street Maps API?
If you like Java, you could load the way as a Polygon and use the JTS (Java Topology Suite) library, or the AWT library to compute whether your points are inside or not.
Here is an example of how the Atlas library uses a combination of both in that specific case. For you it would look like this:
Convert each latitude/longitude pair of the Way to a Location object
Add each Location to a List and create a new Polygon with it
Call the Polygon.fullyGeometricallyEncloses(Location) method on that Polygon with each of the points of interest you have
The Atlas library is available in Maven Central for you to download.

Locating GPS locations using GeoJSON

I've got a GeoJSON file of administrative borders i.e. state and county, and a CSV file with 12,500+ named GPS coordinates located within the geographic area.
My boss wants me to use the GeoJSON identify the county for each GPS location so I ended up with a CSV file (format) like;
LOCNAME, LOCLONG, LOCLAT, COUNTY, STATE
Is there any tool that can do this?
Thanks a bunch.
You may use QGIS to do this. You may import your geojson polygon file and import the csv containing coordinates as a point layer.
Follow the tutorial here: http://www.qgistutorials.com/en/docs/points_in_polygon.html

Get additional info for Zillow Neighborhood Boundaries

I am trying to use Neighborhood boundaries data(shape files) provide by Zillow.
files available at - http://www.zillow.com/howto/api/neighborhood-boundaries.htm
I am able to read the provided .dbf files but it just have information about state, county, city, name, and region ID.
can some one please guide me to get latitude longitudes or polygon information from this .dbf files or even from shape files.
also how to read the provided shape files?
Use the GetRegionChildren API to get the Lat/Long and other details corresponding to a regionId.

Is there a formula to convert from Thomas Bros Map page & grid to a latitude/longitude?

I'm working on a project that contains Thomas Brothers Map page and grid numbers. Is there a way to programatically convert from this map page to a latitude & longitude?
An Example would be for the intersection of the US101 & I405 freeways.
ThomasBrothers: 561-3G (page-grid)
Not that I know of, but I don't have a lot of experience with Thomas bros maps. Are you talking about printed version of the maps or is there a link somewhere to an online map?
If you just need a few lat/longs, then you can look up the locations that correspond to the grid and get the lats and longs manually at many websites, including http://itouchmap.com/latlong.html
If you provide a link to a Thomas bros map that you are using, I might be able to help further.
By looking at the link above, you can determine that US 101 and I-405 has a latitude of 34.16073390017978 and a longitude of -118.46952438354492.
Your best source would be the map publisher. If they choose to help, someone there can tell you exactly what you need to know. If they won't help you, it's unlikely that they've released the information to anyone else.
If that's the case, you could do some work by hand to correlate one point from the map grid to your target coordinate system. Effectively, you could reverse engineer a mapping "datum" for each page. You'd also have to know what map projection was used to render the maps, so that you can calculate the transform from the map coordinates to the geographic coordinates as you move away from your "origin". Finally, you'll need to establish the orientation of the map, since different notions of "north" exist.
It sounds like the Thomas maps use a new grid for every page, rather than bleeding the grid continuously from page to page. If that's the case, you'll have to correlate one point on each map. For example, find a spot where a map grid intersection coincides with a notable road intersection. Then you can find the coordinates of the road intersection using a map with latitude and longitude (a topographic map, TerraServer, etc.). Doing this with two points on the same vertical grid line should help you establish the north used on the map as well.
The short answer is that each of the nine regions has a grid derived from a Lambert conformal conic projection with custom parameters, so you cannot write a conversion program without the parameters.
I've also got ThomasBros. pages that I would like to convert to lat/long for lookup against Google Maps API. They also provided something called TBXY ... not sure what this is -- perhaps some notation for GPS/lat/long?
<Area>"El Cajon"</Area>
<ThomasBrothers>"1297 5E"</ThomasBrothers>
<TBXY>"6481390:1827008"</TBXY>
Thomas Brothers Maps invested a lot when developing their GIS system to create their digital mapping system. Though the first "digitally produced" map was Sacramento County-1990, the development began back in 1986. I expect that their map projection equations are a well guarded trade-secret, which Rand McNally now owns. I'd don't know those equations, but would also like to know them.
There are 9 projections covering the 48 states. If you know the equations for Los Angeles, it is valid across California & Nevada. Oregon & Washington have their own projection. Arizona, New Mexico, Colorado, and Utah share another projection.
I do know this...
As many know, the page grid is an exact 1/2 mile square, or 2640 feet by 2640 feet. The coordinate measurement unit is 1 foot.
To determine the Thomas Brothers XY Coordinate, get one or more of the Thomas Guide CD- ROM maps, which were recently discontinued. The last ones produced for certain California counties were the 2008 edition. Last editions for Seattle, Portland, Las Vegas, and Phoenix/Tucson were the 2007 edition. Each is still available on the Rand McNally website for $20.
When you geo-code a group of addresses, you'll see an output file with the TGXY coordinates and Lat/Lon for the addresses you specified, and the page # and grid that point is in. Once that file is open, you can click on the map to add additional geo-coded points, which will also provide both the coordinates. The output file is saved in an Access database ".mdb" file.
If you know a lot about map projections or solid geometry, the set of corresponding TGXY and Lat/Lon coordiantes will provide you some good data for testing.
As you mentioned San Diego Page 1297, I'll provide its bordering coordinates.
West x=3062760
East x=3086520
North y=0985040
South-y=0966560
This is not in range of the "TBXY" you found on Google. Maybe it's the same projection, with a relocated origin.

Resources