Geocoding
 

  You don't need to be an 'investor' to invest in Singletrack: 6 days left: 95% of target - Find out more

[Closed] Geocoding

3 Posts
4 Users
0 Reactions
59 Views
Posts: 290
Full Member
Topic starter
 

I'm looking for upper and lower limits for latitude and longitude fro all (or most) global countries. Current plan is to look it up on google earth and create my own spreadsheet.

Something like

Lat (low) (high) Long (low) (high)
UK 50.0 58.0 -9.0 1.5

Any ideas how to speed this up or where I can get that sort of data?


 
Posted : 08/11/2013 3:35 pm
Posts: 13594
Free Member
 

Steal a list of defined borders from here:

http://thematicmapping.org/downloads/world_borders.php

You could then just test to see if the coordinate entered by the user is within a border. You'd need a set of functions to process shape files, but that's easy to get hold of eg I use MapWindow's DLL (open source): http://www.mapwindow.org/

You can just test a coordinate and find out which country it is in eg:

sfMap.PointInShapefile(Lon, Lat) will return the # of the shape, in the shape file (which has many shapes) and you can just look up the Name of that shape using the #. 0 means it's outside all the shapes.

Where sfMap is defined as MapWinGIS.Shapefile


 
Posted : 08/11/2013 3:39 pm
Posts: 1080
Free Member
 

There might also be a way of finding this information in the [url= http://gmt.soest.hawaii.edu/ ]GMT tool[/url], which is open-source and a great source if you are interested in these things and can invest the time in learning how to use it.

Depending on what you are using the data for, you might want to think about the accuracy of your lat/lon coordinates and also how a country's border is being defined. For example, France administers a number of its territories as Departments, with representation in their Parliament (i.e. Guadeloupe in the Caribbean is part of France and the EU). Similarly, how to deal with disputed borders.


 
Posted : 08/11/2013 4:27 pm
Posts: 0
Free Member
 

You'll need to check, but this looks like it might have the info you require:

More here: http://geocommons.com/overlays/18458


 
Posted : 08/11/2013 4:40 pm

6 DAYS LEFT
We are currently at 95% of our target!