I am trying to reproject a shapefile from EPSG:2229 (NAD83 / California zone 5 (ftUS)) to EPSG:2163 (US National Atlas Equal Area (meters)).
Below is the code that does this transformation for a point in the shapefile:
import fiona from fiona.crs import from_epsg from pyproj import Proj, transform # Open the shapefile we want to reproject and initiate original projection shape = fiona.open(inputfile) oriproj = Proj(shape.crs) # Initiate output projection outcrs = fiona.crs.from_epsg(2163) outproj = Proj(outcrs) # Create a new file where the transformed point shapefile will be written with fiona.open(outputfile,'w',shape.driver,shape.schema.copy(),crs=outcrs) as output: for feat in shape: point = feat['geometry']['coordinates'] x,y = point new_x,new_y = transform(oriproj,outproj,x,y) feat['geometry']['coordinates'] = (new_x,new_y) output.write(feat)
This process works well with lat/long to meter transformations and transformations that involve meters to meters (EPSG:2163 to EPSG:32620) but for some reason it is breaking when trying to transform from feet to meters.
After this transformation, the points maintain their original distribution, but are located off of the coast of Delaware (when they should be in Los Angeles County). I have a feeling this might be an origin issue but I'm not sure.
Has anyone had this issue before? And if so, how did you fix it?