I am trying to map a Shapefile (download) onto a Google Map using the Javascript API. The Shapefile describes the boundaries of NYC School Districts.
The file's projection was Lambert Conformal Conic
, and so I tried to convert it to Google Mercator
using QGIS. However, the coordinates still don't make sense. When I map the polygons, they cover all of Earth.
For example, one of the impossible points that I get is -8240484.27362, 4961069.9502
.
How can I properly convert my Shapefile to an acceptable format?
Answer
It's true that Google uses Google Mercator (EPSG:3857 or EPSG:900913) for displaying, but I think you/the Javascript API want lat/lon coordinates for input.
So convert the data into EPSG:4326, and look if it fits.
You can load the shapefile into QGIS, and use Openlayers plugin with Google or Openstreetmap background to check if the transformation is correct.
No comments:
Post a Comment