Skip to main content
tyop
Source Link
Vince
  • 20.3k
  • 16
  • 48
  • 65

The arguments for transform is lon first then lat. Also, transform method is depreciateddeprecated, instead you can use the following

import pyproj

proj_daymet = "+proj=lcc +lat_0=42.5 +lon_0=-100 +lat_1=25 +lat_2=60 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs" #my custom CRS

lat = 31.177685 
lon = -87.103554

pyproj.Proj(proj_daymet)(lon, lat)

# output: (1192750.1882841575, -1114999.8438182664)

The arguments for transform is lon first then lat. Also, transform method is depreciated, instead you can use the following

import pyproj

proj_daymet = "+proj=lcc +lat_0=42.5 +lon_0=-100 +lat_1=25 +lat_2=60 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs" #my custom CRS

lat = 31.177685 
lon = -87.103554

pyproj.Proj(proj_daymet)(lon, lat)

# output: (1192750.1882841575, -1114999.8438182664)

The arguments for transform is lon first then lat. Also, transform method is deprecated, instead you can use the following

import pyproj

proj_daymet = "+proj=lcc +lat_0=42.5 +lon_0=-100 +lat_1=25 +lat_2=60 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs" #my custom CRS

lat = 31.177685 
lon = -87.103554

pyproj.Proj(proj_daymet)(lon, lat)

# output: (1192750.1882841575, -1114999.8438182664)
Source Link
Aman Bagrecha
  • 1.1k
  • 6
  • 14

The arguments for transform is lon first then lat. Also, transform method is depreciated, instead you can use the following

import pyproj

proj_daymet = "+proj=lcc +lat_0=42.5 +lon_0=-100 +lat_1=25 +lat_2=60 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs" #my custom CRS

lat = 31.177685 
lon = -87.103554

pyproj.Proj(proj_daymet)(lon, lat)

# output: (1192750.1882841575, -1114999.8438182664)