fitnr / stateplane

Convert between state plane coordinate systems and long/lat
GNU General Public License v3.0
21 stars 5 forks source link

Identifying by lat/lon returns wrong countyfp for irregular state border between VT/NH #9

Open sqcsabbey opened 1 year ago

sqcsabbey commented 1 year ago

To doublecheck that I'm using this library correctly, I tried using a NOAA control point in VT, but I was getting an EPSG for a NH SPCS returned instead:

>>> import stateplane
>>> stateplane.identify(-72.31277095, 43.66430076)
'32110'

I then found the countyfp using the FCC Area API, and with that I could get the correct SPCS:

>>> stateplane.identify(None, None, countyfp='50027')
'32145'

I assume this is a problem for other irregular state boundaries, too.

This image illustrates the issue, with a sample showing green dots for what this package returns for VT and red for NH, and the rough border between the 2 states in yellow.

image

fitnr commented 1 year ago

The package is using low-resolution boundary files for speed and simplicity. The goal is to help making appropriate maps, especially in states with multiple state plane systems. You are correctly using the the statefp and countyfp arguments as intended.