ThinkGeo.com    |     Documentation    |     Premium Support

BuildIndexFile and Projections Question

I have a shapefile that has a projection of WGS84 - Proj4Projection.GetEpsgParametersString(4326).


I project this shapefile onto a GoogleMapsOverlay using the Google Maps projection - Proj4Projection.GetGoogleMapParametersString().


When I build the index of the WGS84 shapefile, do I need to build it with either projection as a parameter? Or can i used the default BuildIndexFile function?


Thanks,


Treasa



If you have a shapefile in WGS84 and you want to have it onto GoogleMapsOverlay, you can use the default BuildIndexFile function and set the Projection property of ShapeFilefeatyreLayer to Proj4Projection. It is going to work just fine.

 If you have a large shapefile, I would recommend saving the shapefile to the Google Maps projection and work completely in that projection. There is going to be a better drawing performance because of the lesser overhead compare to projecting on the fly all the points making up the shapefile. There is a project in the Code Community that shows how to do that Save to Projection. You don't have to do that and I would not worry doing this if you have a small shapefile. The improved drawing performance is going to be minimal and this is more data maintenance. I just let you know that this is an option.


code.thinkgeo.com/projects/show/savetoprojection



Thank you.



You are welcome. Any other questions, let us know.