Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong conversion for negative numbers #3

Open
marek-benes opened this issue Feb 17, 2023 · 1 comment
Open

Wrong conversion for negative numbers #3

marek-benes opened this issue Feb 17, 2023 · 1 comment

Comments

@marek-benes
Copy link

When x and y are negative numbers, the GPS position is calculated wrong.

Expected result from jtsk2wgs84(-958536.373252941, -672661.9897268) function:

{
  
  "lat": 50.92288974005017,
  "lon": 15.245786769287704,
  
}

Wrong result from jtsk2wgs84() function:

{
  "jtsk_x": -958536.373252941,
  "jtsk_y": -672661.9897268,
  "wgs84_lat": "67°53'47.745N",
  "wgs84_lon": "39°29'55.804E",
  "lat": 67.89659573952238,
  "lon": 39.498834572460694,
  "altitude": 154.9
}
@marek-benes
Copy link
Author

Motivace:

V oblasti užití dat v geografických informačních systémech (GIS) není užíván EPSG 2065 S-JTSK/Krovak s kladnými souřadnicemi v pořadí x, y - South, West, který naopak užívají geodeti pro měření v terénu a zobrazují pak ve svých měřických výstupech kladné souřadnice y,x.
Pokud však tento výstup použiji přímo jako zdroj pro GIS aplikaci či mapovou službu, data se nezobrazí správně, neboť aplikace jsou naprogramovány na užití Křovákovy projekce se zápornými souřadnicemi.

Vztah mezi souřadnicemi „záporného“ X ,Y a „kladného“ x,y Křováka (tedy mezi EPSG 5514 a EPSG 2065) je tento: X = -y a Y = -x.

Zdroj: Geoportál ČÚZK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant