Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EPSG 6512 is labeled US Feet but returns meters #160

Closed
blcartwright opened this issue Feb 28, 2019 · 5 comments
Closed

EPSG 6512 is labeled US Feet but returns meters #160

blcartwright opened this issue Feb 28, 2019 · 5 comments

Comments

@blcartwright
Copy link

I'm working on an airport in Missouri East NAD83(2011) Us Ft [6512]

state plane should be East = 969167.470 North = 278826.850 as calculated by CorpsCon
but with pyproj & at EPSG website I get {'East': 295430.2841388423, 'North': 85247.59598697856}

Going from state plane to geo puts me in West Virginia instead of southeast Missouri, preventing me from doing a Lat/Lon search for nearby points in a reference table

I am using "preserve_units" My code has given accurate results in other projection zones.

def sp2geo(epsg_id,easting,northing):

inProj = Proj(init='epsg:%s' % epsg_id, preserve_units=True)
outProj = Proj(init='epsg:%s' % latlon_id)

rec = {}
rec['Lon'],rec['Lat'] = transform(inProj,outProj,easting,northing)

return rec

@snowman2
Copy link
Member

snowman2 commented Mar 1, 2019

Definitely looks like PROJ.4 & EPSG thinks it should be meters.

>>> from pyproj import CRS
>>> CRS.from_epsg(6512)
<CRS: epsg:6512>
Name: NAD83(2011) / Missouri East
Ellipsoid:
- semi_major_metre: 6378137.00
- semi_minor_metre: 6356752.31
- inverse_flattening: 298.26
Area of Use:
- name: USA - Missouri - SPCS - E
- bounds: (-91.97, 35.98, -89.1, 40.61)
Prime Meridian:
- longitude: 0.0000
- unit_name: degree
- unit_conversion_factor: 0.01745329
Axis Info:
- Easting[X] (east) EPSG:9001 (metre)
- Northing[Y] (north) EPSG:9001 (metre)

According to https://epsg.io/6512, it says meters as well.

If you want it to be feet, replace "units=m" with "units=us-ft".

>>> crs = CRS.from_epsg(6512)
>>> crs.to_proj4()
'+proj=tmerc +lat_0=35.8333333333333 +lon_0=-90.5 +k=0.999933333 +x_0=250000 +y_0=0 +ellps=GRS80 +units=m +no_defs +type=crs'
>>> crsft = CRS('+proj=tmerc +lat_0=35.8333333333333 +lon_0=-90.5 +k=0.999933333 +x_0=250000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs')
>>> crsft
<CRS: +proj=tmerc +lat_0=35.8333333333333 +lon_0=-90.5 + ...>
Name: unknown
Ellipsoid:
- semi_major_metre: 6378137.00
- semi_minor_metre: 6356752.31
- inverse_flattening: 298.26
Area of Use:
- UNDEFINED
Prime Meridian:
- longitude: 0.0000
- unit_name: degree
- unit_conversion_factor: 0.01745329
Axis Info:
- Easting[E] (east) EPSG:9003 (US survey foot)
- Northing[N] (north) EPSG:9003 (US survey foot)

This would be the solution:

+proj=tmerc +lat_0=35.8333333333333 +lon_0=-90.5 +k=0.999933333 +x_0=250000 +y_0=0 +ellps=GRS80 +units=us-ft +no_defs

But, not necessarily the one you want. It would require some code logic on your end to handle edge cases.

@blcartwright
Copy link
Author

Thanks! Is there anywhere in my downloaded package code that I can edit that. I'm not finding it in a text search.

@blcartwright
Copy link
Author

blcartwright commented Mar 1, 2019

In the EPSG database table "coordinatereferencesystem" 6511, 6512 & 6513 are the only Missouri zones using NAD83(2011) but there is no notation for units. That must have then triggered using a default setting of meters, but our contract specifies US survey feet.

Specifications
Horiz. Datum: | NAD83 (2011) | State and Zone: | MISSOURI EAST ZONE
Vertical Datum: | NAVD88, GEOID 12B | V. Units: | US Survey Feet | Horiz. Units: | US Survey Feet

@snowman2
Copy link
Member

snowman2 commented Mar 2, 2019

Is there anywhere in my downloaded package code that I can edit that.

I would recommend just handling it in the code in your package. Have a special case for the EPSG codes of interest. The units m for the EPSG are likely correct and your work requires the us-ft version.

@snowman2
Copy link
Member

I am going to mark this as resolved. Feel free to reopen if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants