Coder Social home page Coder Social logo

Comments (4)

micahcochran avatar micahcochran commented on August 27, 2024 5

EPSG:2263 is a state plane coordinate system "NAD83 / New York Long Island (ftUS)". I assume it is US Survey Feet.

You need to set the preserve_units flag to True. Otherwise, pyproj will set your coordinate units to meters.

IPython console to show my work.

In [1]: import pyproj

In [2]: ny_state = pyproj.Proj(init="EPSG:2263", preserve_units=True)

In [3]: ny_state(-74.01720548026697, 40.641305906460005)
Out[3]: (979475.050077198, 172921.88086868977)

Calling ny_state() as a function does a transform to epsg:4326, as a shortcut. Your above code should also work when you add the preserve_units=True flag.

This is not an isolated incident, other get tripped up by this too. (Duplicate of #58 , #40)

from pyproj.

JamesFysh avatar JamesFysh commented on August 27, 2024 4

This is not an isolated incident, other get tripped up by this too.

I just came here to raise an issue also (transforming from epsg:4326 -> epsg:102697 AKA NAD_1983_StatePlane_Missouri_Central_FIPS_2402_Feet) where I was finding that the resulting coordinates were given in meters, not us-ft as expected.

It all makes more sense now, although I wonder: What is the purpose of the preserve_units parameter? It seems like it should at least be set to True by default, as the current behavior is clearly unexpected.

from pyproj.

snowman2 avatar snowman2 commented on August 27, 2024 2

Closing as preserve_units=True is now the default in pyproj>=2.0.0

from pyproj.

kevhill avatar kevhill commented on August 27, 2024

what's the rationale behind defaulting to preserve_units=False? This cost me probably 4 hours of time, and obviously, this is affecting multiple people. I can't see any reason why you would ever have a default that ignored specific information entered in elsewhere.

from pyproj.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.