Code Monkey home page Code Monkey logo

Comments (5)

micahcochran avatar micahcochran commented on May 19, 2024

Are the coordinates in feet or meters? Pyproj will assume that you want meters so you might try this nc = Proj(init='epsg:3359', preserve_units=True). BTW that didn't exactly produce your target coordinates.

Do you have a proj4 string, WKT, shapefile, or something else that defines the projection?

from pyproj.

Jestre avatar Jestre commented on May 19, 2024

Based on the setup I had in the Perl script (below), I am assuming they are in ft. These are data exported from a 911 CAD system, so I don't have access to a better definition than that.

my $proj = Geo::Proj4->new(
proj => "lcc",
units => "us-ft",
datum => "NAD83",
lat_0 => 33.75,
lon_0 => -79,
x_0 => 609601.22,
y_0 => 0,
lat_1 => 34.33,
lat_2 => 36.166667
)

Based on that config, the values match EPSG reference is 32019 (which I'm thinking is working in feet also based on the to_meters option.

http://spatialreference.org/ref/epsg/32019/proj4/

I will try the preserve units.

from pyproj.

micahcochran avatar micahcochran commented on May 19, 2024

Hold on epsg 32019 uses the older NAD27 datum, and the above uses NAD83. Changing those can cause things willy nilly can make your data be off by hundreds of feet.

>>> from pyproj import Proj
>>> nc = Proj("+proj=lcc +lat_1=34.33333333333334 +lat_2=36.16666666666666 +lat_0=33.75 +lon_0=-79 +x_0=609601.2192024384 +y_0=0 +datum=NAD83 +to_meter=0.3048006096012192 +no_defs ", preserve_units=True)
>>> nc(2110926, 738252, inverse=True)
(-78.62602489780987, 35.77787470941835)

That seems to work. I used the one that you defined in EPSG:32019 and combined it with the above. Or translate the one used in the code. I would encourage you to use a standard EPSG number or state plane projection if at all possible.

from pyproj.

jswhit avatar jswhit commented on May 19, 2024

Here's what I get with github master:

from pyproj import Proj
p = Proj(init='epsg:3359')
lon, lat = p(21109260., 7382520., inverse=True)
print lon, lat

68.1559778764 -40.6009157221

from pyproj.

Jestre avatar Jestre commented on May 19, 2024

Thank you all for your assistance. It appears that ESRI:102719 was what I was looking for. It differs minimally in the +x_0 setting from that posted above, but the answers are certainly within the limits allowed by this map.

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.