Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Benoit ZERR
drivers-ddboat-v2
Commits
6e6255c0
Commit
6e6255c0
authored
Sep 28, 2021
by
BenZr
Browse files
test projection lat,lon (deg) to x,y (m)
parent
5a6be4bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
tst_proj.py
0 → 100644
View file @
6e6255c0
#
# requires : sudo apt install python3-pyproj
# test project lat,lon (deg) to meters
from
pyproj
import
Proj
,
transform
inProj
=
Proj
(
"+init=EPSG:2263"
,
preserve_units
=
True
)
outProj
=
Proj
(
"+init=EPSG:4326"
)
# WGS84 in degrees and not EPSG:3857 in meters)
x2
,
y2
=
-
74.2700000001129
,
40.46999999990434
print
(
x2
,
y2
)
x1
,
y1
=
transform
(
outProj
,
inProj
,
x2
,
y2
)
print
(
x1
,
y1
)
print
(
transform
(
inProj
,
outProj
,
x1
,
y1
))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment