0

I'm going to convert some coordinates from Canada LCC (EPSG/SRID 102002) into WGS84 (EPSG/SRID 4326). I found a python package for this purpose which is pyproj. However, seems it doesn't support 102002.

since I get this result:

Proj("+init=EPSG:102002")

CRSError: Invalid projection: +init=epsg:102002 +type=crs: (Internal Proj Error: proj_create: crs not found)

Transformer.from_crs(102002, 4326)

Invalid projection: epsg:102002: (Internal Proj Error: proj_create: crs not found)

I know there is a way to define a new coordinate with pyproj but it needs expertise in GIS which I don't have. Building a Coordinate Reference System in pyproj

Would you please help me to create that coordinate reference system or give me a simple python code to convert those coordinate to each other?

I found this but it doesn't work fine:

>>> import pyproj
>>> p = pyproj.Proj("+proj=lcc +lat_1=50 +lat_2=70 +lat_0=40 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs")
>>> p(7678236.84856942, 1280719.40571689,inverse=True)
-27.952924124739766 15.502198604012452

but I expect a pair of number near (45.4330538,-75.722731)

  • 2
    that's an ESRI code not an EPSG code – Ian Turton Jul 29 '20 at 14:26
  • Does the data provider have a WKT or description of Esri:102002? Lat/lon coordinates are in/near Ottawa. 102002 coordinates for Ottawa are quite different. Statistics Canada LCC (3348) is closer. – mkennedy Aug 7 '20 at 20:14
1

You need to use ESRI:102002 for Canada LCC: https://epsg.io/102002

Transformer.from_crs("ESRI:102002", "EPSG:4326")
  • which doesn't give the "correct" answer - (72.50527788053216, 70.53351525126045) isn't in Canada for sure! – Ian Turton Jul 29 '20 at 14:49
  • Is axis order an issue here? – snowman2 Jul 29 '20 at 15:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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