1

I am trying to add a converted shapefile (now a geojson) to a Leaflet basemap, using EPSG 26986, so I tried using proj4leaflet to reproject it. However, I keep getting an error message "phi2z has NoConvergence" - in fact, I seem to be getting one message for each point feature in the shapefile (there are over 800). I'm not sure why I'm getting this message - anyone have any thoughts?

Proj4js.defs["EPSG:26986"] = "+proj=lcc +lat_1=42.68333333333333 +lat_2=41.71666666666667 +lat_0=41 lon_0=-71.5 +x_0=200000 +y_0=750000 +ellps=GRS80 +datum=NAD83 +units=m +no_defs";
var map = L.map('map').setView([42.317007, -71.088560], 12);
L.tileLayer('http://{s}.tile.cloudmade.com/655da89c06dd43a7aee306e594341325/997/256/{z}/{x}/{y}.png', {
    attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="http://cloudmade.com">CloudMade</a>',
    maxZoom: 16
}).addTo(map);

$.getJSON("image_locations.geojson", function(data) {
    data.crs={
        "type": "name",
        "properties": {"name": "urn:ogc:def:crs:EPSG::26986"}
        };
    L.Proj.geoJson(data).addTo(map);
});

live version here: http://altani.continuation.org/trilobites/leaflet.html

1 Answer 1

1

Took a look at this in the JavaScript debugger, and found that you are missing the + in front of lon_0, which causes it to fail to parse the lat_0 and lon_0 definitions:

+proj=lcc +lat_1=42.68333333333333 +lat_2=41.71666666666667 +lat_0=41 lon_0=-71.5

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.