0

I have a series of Coordinates in standard LAT/LONG format. I would like to plot them on a X-Y axis using a meter scale.

Ideally I would find the most southern eastern point and use it as origin. I found online the library "pyproj" and I would like to use "pyproj.Proj" to perform the conversion. However, I cannot find clear explanations of how to use this function. I was wondering if anyone dealt with the same task and could provide me with an example.

Mike
  • 375
  • 1
  • 4
  • 14
  • You could take a look at https://stackoverflow.com/questions/44488167/plotting-lat-long-points-using-basemap which uses Basemap (rather than pyproj). – brechmos Jun 10 '19 at 18:05

1 Answers1

0

I would recommend taking a look at the getting started page here.

In the example:

>>> from pyproj import Transformer
>>> transformer = Transformer.from_crs("EPSG:4326", "EPSG:26917", always_xy=True)
>>> lat = [44, 45, 46]
>>> lon = [1, 2, 3]
>>> xx, yy = transformer.transform(lon, lat)
>>> xx, yy
([6191965.477646244, 6058467.993147502, 5922924.021335099], [9085520.44799874, 9224724.562140543, 9356393.406337533])

Also, the inputs can be a scalar, a python array, or numpy arrays.

Another thing to note is on the pyproj gotchas page here where it gives a warning about using pyproj.Proj as it is not a generic lat,lon to X,y coordinate converter and you should be careful when using it.

snowman2
  • 646
  • 4
  • 11