Question

I recently started off on working with shape map files, I downloaded a few shape files from the internet, the files had the following extension .shp, .dbf, .shx which I am unable to decipher what these extensions are. Then I found some actionscript libraries to parse these files here

However I am not able to understand the documentation there.

But using some example files I was finally able to draw a map in actionscript. However these are without latitudes and longitudes,

Is latitude and longitude information stored in shape files, if so, how do I extract the data?. Or are there special shape files with latitude/longitude information encoded into?

Was it helpful?

Solution

Just use the x/y coordinates directly as long/lat.

Quoting from The 'Pedia:

Shapefiles deal with coordinates in terms of X and Y, although they are often storing longitude and latitude, respectively. While working with the X and Y terms, be sure to respect the order of the terms (longitude is stored in X, latitude in Y).

It's not guaranteed that these coordinates are lat/long -- sometimes they can be pixels. However, that's determined by the generator of the Shapefile -- nothing inherit to the Shapefile itself.

OTHER TIPS

You may want to check out iLog Elixir which has Flex components for Mapping and an application to convert Shapefiles into Flex Map Objects.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top