Convert the data

Nov 7, 2011 at 9:30 AM

I am currently attempting to read a shapefile in UTM (as far as I know). It consists of the .shp, .dbf, .prj and .shx files. If I import it into e.g. MapWindow, the program can easily show both the UTM and the Lat-Long, but when I use Catfood.ShapeFile I only get teh UTM (at least the values I get seems to be UTM). The Shapefile must contain the projection, and maybe the WKT, but what is the easiest way to use Catfood.ShapeFile and possibly Proj.NET (or other) to convert the format in my Shapefile to a Lat-Long I can use with Google Maps (I believe that is WGS84)? It is mentioned on the front page that Catfood.ShapeFile may be used for converting the data, so I am thinking there must be a way.

Nov 8, 2011 at 3:35 AM

As far as I'm aware the shapefile only contains one coordinate system. It's possible that MapWindow handles the conversion for you (I'm not familiar with this software). Catfood.Shapefile won't help you with the conversion. If you know the system used in the shapefile you're reading then you could convert each point as you read the file, but there isn't anything in Catfood.Shapefile to do this, it just returns the values in the file.

Nov 8, 2011 at 5:52 AM

Thank you very much for the reply. I have solved the problem in the same manor that you mention and converted each point. I found an algorithm to convert between UTM and lat-long based on an elliptic convertion. I was surprised that I could not find a library to do the conversion - at least I was unable to find a WKT and library that worked.