Creating map from OOmapper via o-utils

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Creating map from OOmapper via o-utils

tweigert
Hi,
when trying to create a checksite event from an OpenOrienteering map 0.9.4 via export as jpg+jgw and convert to kmz using o-utils, the map ends up in the right location in MaprunF basically, but at a wrong scale. What could I have done wrong?
Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Creating map from OOmapper via o-utils

MichaelRaz
This post was updated on .
I'm in the process of documenting a way to go from OpenOrientering Map (the web application) through OOM to Purple Pen, including getting relatively high res results from the original web App.  Process is fairly simple but for one issue - using the O-Util to KMZ files from OOM when any map declination is used.  

Now onto your issue!  The most likely things I can think that are causing problems in your case (without seeing the World File and image) is you are not using the correct coord system (O-Util expects EPSG code 3857).  Check the JGW World file and  make sure that the coord lines (5,6) are the 3857 coord system and check the geo-referencing window in OOM.

Or you have a rotation value in the world file (line 2 and 3).  I think??? that the O-Util app does not handle rotation in the world file, at least from my testing (although I am hoping it is another problem).

Using O-Utils it to produce KMZs from a world file (produced by OOM) with rotation values always causes an offset so far as I have found.  Editing the rotation values to 0 in the JGW and doing this again seems to produce the same offset in the resulting KMZ implying that they are being ignored so messing up the overall location/scaling.

Michael
Reply | Threaded
Open this post in threaded view
|

Re: Creating map from OOmapper via o-utils

tweigert
Hi Michael, thank you for taking the time to reply.
My jgw is:
0.6759518626
-0.04323799061
-0.04323799061
-0.6759518626
1205600.556
6872379.325
So I am using 3857 and a rotation, right? I had started off without a rotation, but then came upon this post (http://maprun.250607.n8.nabble.com/Maps-tiled-using-MapRun-utils-give-MapRunF-error-on-start-
tp350p352.html) and added a rotation (the one that is applicable hereabouts anyway), the results were the same.
I suspect that my mistake is somewhere far more basic and embarrassing... Like, I thought I ought to have stated a scale and resolution somewhere in the process, but I was never asked for them? Or was I?
This is what I get when I open the course in Checksites.
Reply | Threaded
Open this post in threaded view
|

Re: Creating map from OOmapper via o-utils

MichaelRaz
Can't seem to get to the link you posted but I think I remember this.  Different case I believe.  In some cases a KMZ produced by some software would omit the tag <rotation>0.0</rotation> when the rotation was 0 and this messed up the reading of the KMZ by MapRunF for display.  Can't remember if it was fixed or not but the workaround was to just add 0 tags (a bit of a pain if using a tiles KMZ but not too difficult with a search and replace).  Many maps and corresponding KMZ files have a rotation (magnetic north the most likely reason) and these are fine.  The problem I am seeing is only with the O-Util for producing the KMZ from a JPG and JGW file.  The util appears to ignore any rotation in the World File (remember, these are not the same rotation numbers - one is the XML tag in the KML doc within the KMZ, the other is the geo-referencing rotations (x,y axis) in a World File).  Try producing the KMZ from an OOM map (through the export of the image and JGW) that does not have any rotation factor assigned in the map properties/geo referencing so that lines 2,3 should be 0 in the world file. This should work.

Heading out to snowshoe run and fat bike with a map in my hand now!  let me know how it turns out.
Reply | Threaded
Open this post in threaded view
|

Re: Creating map from OOmapper via o-utils

Peter Effeney
Administrator
In reply to this post by tweigert
I see Michael replying on the specifics of the approach you are taking.

Another option (work-around) is to export an image file of your map and use the simple two-point geo-referencing offered by the KMZ Create feature of the MapRun Console: https://console.maprun.net/#/kmz_create

I say this in the context that MapRun doesn't actually use the Map for any function other than displaying it to the user, the key thing is the precision of the controls in the KML file.

Peter
Reply | Threaded
Open this post in threaded view
|

Re: Creating map from OOmapper via o-utils

tweigert
This post was updated on .
EDIT2: After causing you all the trouble I should tell you that it works now. My map was properly georeferenced in the first place but I must somehow have messed up the georeference when changing it from UTM to EPSG. I can't figure how that happened though, so this can't even serve to warn others...

EDIT: My mistake must have occurred before converting so I have probably messed up the georeferencing, so it's not really a topic for this forum, sorry.

Thanks again, and to you too Peter, but right you are - the position of the controls must be correct, so if I use your workaround, the map will be correctly aligned but the controls will still be wrong (unless I give up on using PurplePen for coursesetting?).
This is what I did:
1) Created map at scale 1:5000 in OOMapper based on OSM import - so should be georeferenced?
2) Changed georeferencing to 3857 with no declination
3) created course in PurplePen
4) exported map to jpg 150dpi + jgw and converted to kmz via o-utils
5) exported course to gpx and converted to kml via the widmann tool
6) set up in checksites
(7,8,9, tried with rotations, different scales...)
-> Result as above: controls are correct within the map, but map&controls together are in the wrong position. That's why I wondered: where does the scale come in? Has that information got lost along the way somewhere? Does the scale compensation in the OOMapper georeferencing dialog play a role in this? Or where did I miss something?
Reply | Threaded
Open this post in threaded view
|

Re: Creating map from OOmapper via o-utils

MichaelRaz
Don't think it is just youQ

I'm seeing a similar problem that I am trying to sort through.  Using the image and JGW file as the template in OOM everything is fine initially.  Won't list all the combinations I tested but a few examples (I noted the lon/lon of a specific item on the template and validated on GE):
Save as OMAP and re-open the location is still correct.
Save as OCAD then re-open, the location coordinates are shifted.
Open the OCAD version in OCAD and the location coordinates is shifted.
Using either OOM version (OMAP or OCD) in purple pen gives incorrect coordinates with things shifted

Gets even stranger if I add objects into the OOM map then save as OCAD or OMAP.  Opening these up in Purple Pen, depending on the version, will actually show the added objects shifted from the template/map but neither the map or objects seem to be correct (exported IOFXML and checking the coordinates of controls added).  

I'm still trying to figure out the pattern but way to many permutations and combinations!
Reply | Threaded
Open this post in threaded view
|

Re: Creating map from OOmapper via o-utils

tweigert
Um, yes, I didn't dare add an edit 3, but I can't get correct positions out of Purple Pen either.
What I noticed in OOMapper when I reimported from Ocad was that the scale compensation in the georeferencing dialog had changed (to the same value that yielded the inaccurate results when I wrote the the first time), but I cannot conclude anything from this observation
Reply | Threaded
Open this post in threaded view
|

Re: Creating map from OOmapper via o-utils

MichaelRaz
As I hinted it is even stranger when you add an object to the OOM map.  In PP both the object and map get shifted but not the same.  I still can't tell where the fundemental problem is, although, given saving the OOM in OCAD format then opening it up again causes shifting I think it is OOM (and PP is just a symptom).  Still playing.  I did check the original jpg and JGW into QGIS which seems fine.  It is pissing me off as I use PP with full OCAD often without issues.
Reply | Threaded
Open this post in threaded view
|

Re: Creating map from OOmapper via o-utils

MichaelRaz
Progress, although I'm not sure why this is working and the more "normal" process does not. Try:
Add the JPG/JGW 3857 as per previous and select ok etc.  Go back to the Map GeoRef menu and in the scaling section, (where there is the system Combined scale applied has been added for some reason) and in the auxiliary section put the reciprocal of  Combined ( or as close as possible).  I.E. if combined is 1.422793 use .702843 so the Combined is as close to 1 as possible.  The option comes up to shrink the map - so far I have not found any difference.   Save in OCAD format and then open in PP.  So far this seems to work - any objects added in OOM are properly placed in PP.  Add controls to PP and export as IOF XML v3 then convert to KML are properly positioned in GE.  In addition, using the Image Export function (with Worldfile) and then O-Utits produces a proper KMZ (although I think you need to also show a course - could have a extra course with just start and finish??)

I have also played with adding Declination and magnetic north lines with OOM.  These seem to work in PP and not mess up control locations although it does break the KMZ production process from within PP.  Still working on it.

Either we are missing something (obvious) or there is a bug in OOM I think.
Reply | Threaded
Open this post in threaded view
|

Re: Creating map from OOmapper via o-utils

tweigert
Hi Michael,
Thanks a lot!!! That will be a nice workaround and a step closer to finding the exact problem. I followed your method (using OCAD 10) except that I exported from PP to gpx and checked the positions in JOSM. However I found it did make a difference whether or not I had shrunk the map in the georef menu - the gpx was only correct with the map shrunk. Then converted using o-utils for the original OOM map and the widmann tool for the gpx as described.
I'm almost considering trying out the course in darkness and rain now... amost...
Reply | Threaded
Open this post in threaded view
|

Re: Creating map from OOmapper via o-utils

MichaelRaz
It sort of works but I'm still seeing weird stuff at times so really important to double check before you get lost in the dark!  Enjoy.  When I have a chance I'll try to better define the various situations and  try to get a better workaround in place but contact developers.
Reply | Threaded
Open this post in threaded view
|

Re: Creating map from OOmapper via o-utils

MichaelRaz
Hi Twiegert
Well I think I have a sustainable process going from an image obtained from the web app Openorienteering Map (with the World file .JGW), importing into OpenOrienteeringMapper OOM (windows app - free) , modifying the map as needed (including rotation and Magnetic North lines), then using this as the map for Purple Pen (free) to design courses and publish.  There are some really bizarre (at least to me) things that are happening with the various GeoCoordinate systems that cause a shifting of the map and any objects added  so control coordinates are wrong if done differently.  I'm sure I'm missing something but for now this works.  As the quality of the initial JPG is generally low res, the end result is only so so but there is a fairly easy way to get higher quality images from the web app - I think I'll put together a short package end to end for this.  For now, here it is:

Starting with the JPG and corresponding JWG in EPSG 3857
With OOM Create a new map
Select Templates Open and select The jpg
Should show as  Georeferenced with a world file
Open - this brings up the Map Georeferencing window
select EPSG 3857
Declination if desired to rotate the map
Click OK
"select the coordinate reference system of the coord in the world file": Same as map

Reopen the Map Georeferencing window
Change to UTM and set zone for your map.
Note the 'On CRS Change, keep' section will be showing Geographic
OK

Add/modify the map as needed including Magnetic North lines if desired.
**Save as OCAD!!!

Purple Pen should now open this ocd file without any issues with changes to objects etc.  Add controls, item, courses etc export maps to PDF or images. Export the Course(s) as IOF XML v3 and use the Maprunf utilities to convert.

Note: You cannot use the PP export of the image and world file to produce the KMZ using the O_Utils as the projection is not 3857.  If you change this in OOM you will have an offset.  Either use the new KMZ function in the Admin page or manually in Goggle Earth.  If you have not rotated the map or made any important map changes you can use the original KMZ from the