Closed mathiasbno closed 2 years ago
Oki, so I did some more digging and found that running the cli export worked as intended.
I also found that I was kind of lucky that the default EPSG included my map area. But I also tried using a different EPSG that was the same as my UTM zone
specified in the map file. When doing that the point at 0, 0
ended up as [4.511256, 0]
. So not [0, 0]
as intended but it at least did change.
I'm not too familiar with EPSG and all the georeferencing and how it works, so it might be that I have made something wrong.
Hi!
I'm not certain on how OCAD sets the origin for the map: that might be the reason the coordinates turned out different than expected when using the same UTM code as in OCAD, but it's just a guess.
Any chance you can share the OCAD file? I haven't tested the CRS logic with a lot of different files, I have just verified that it worked as expected with the very limited set of maps I have available and I know geographically.
Sendt you a OCAD file for test now.
As I mentioned earlier, I might also be doing something wrong, just curious why it gives different results in the online converter and the cli.
For my project I guess I'll end up including the cli-bit and convert ODAC files on the fly anyway, so its not a big deal.
Ok, so I finally looked at this, sorry about taking forever.
If I understand correctly, you expect the small knoll at [0, 0]
to end up at [0, 0]
in the GeoJSON exported by the web UI at https://www.liedman.net/ocad2geojson/, not at some more or less random longitude?
The web UI, which I first made just as a viewer to test the conversion, always reprojects the OCAD file's local coordinates to WGS84 (EPSG:4326), since that is what the map viewer (Mapbox GL) requires. It is also the standard coordinate system for GeoJSON. However, it is not necessarily a very good format for storing orienteering maps in, so I can totally understand if you would want the coordinates in the same system as in the file.
At the moment, this is not possible from the web UI, but from the CLI tool, as you have noticed.
At some point, I should also probably rewrite the web UI with more functionality and be clearer about what its purpose is.
Also, see #17 - I am going to try to improve the support for coordinate systems, since it's more or less hardwired in many places.
Closing since I think everything needed is specified in #17
Hi, I'm using your online OCAD to GeoJSON converter to get some data to plot into a 3D render of a map.
But I am a bit confused as to how the coordinate system works. I made a 1:10 000 map in OCAD with a small point knoll at
0, 0
. But when I convert it to GeoJson it returns[10.511256, 0]
So I started testing some other maps and I noticed that the first item in all GeoJson coordinates are offset by
10.511256
. I first assumed that this was a longitude value in degrees or something, but that seems not to be the case.Is there a reason/standard behind this? I'm a bit perplexed.