Register | Login
Attackpoint - performance and training tools for orienteering athletes

Discussion: Trouble importing a WMS into OCAD 12

in: Orienteering; General

Aug 20, 2017 12:19 PM # 
Klepperton:
There's probably an easy fix to this issue, but I'm not too tech savvy.

I'm getting the following error message when trying to access a City of Toronto online WMS. See picture below:

Untitled

I was told by their GIS department that the data uses the MTM coordinate system:

"The Modified Transverse Mercator (MTM) coordinate system is a metric grid-based method of specifying locations, similar to the Universal Transverse Mercator coordinate system. MTM uses a Transverse Mercator projection with zones spaced 3° of longitude apart. The coordinate system is used in Eastern Canada."

I cannot find this (or something similar), when trying to change the coordinate system in OCAD.

Where do I go from here? Make a user-defined system?
Advertisement  
Aug 20, 2017 5:35 PM # 
gordhun:
What is it you are trying to do Mark?
Is it make a map of a park in the city?
It may be just as simple to start with importing the area from Open Street Map in to OCAD 12 and converting as much as you can to orienteering symbols.
Then use your computer's snipping tool to grab an image or images of the contours for the park from the City of Toronto map site. Depending on your magnification the contour interval will be from 5 metres to .5 metres.
Then put your contour image in background for the map project and start tracing.
It is the easy fix for the not-too-tech-savvy so I use it a lot.
Aug 20, 2017 6:13 PM # 
Klepperton:
Ya, that's definitely an option Gord.

I'm trying to eliminate all the cropping and importing and fitting to scale, as it seems like their WMS captures everything I need...just trying to simplify the remote sensing/digitizing...and trying to ensure its accuracy.

And...

To answer your question, 'what am I trying to do?'

I'm trying to make ISSOM sprint maps of countless areas in Toronto...(but with very limited free time).

It's time to start planting the seeds to build a proper sprint community here.
Aug 20, 2017 8:36 PM # 
gordhun:
I think if you can get the City of Toronto information in to an SHP or DXF file you can be away to the races with OCAD 12 and bypass the worry about MTM vs UTM.

However sprint maps (ISSOM) are definitely harder to do from Open Street Map and from the City of Toronto information because those sources treat all pathways, roads and other linear features as being of uniform width whereas ISSOM maps require them to be drawn exactly to scale.
My solution:
Get the framework of the map from Open Street Map and import it to OCAD 12.
Most important is to get the boundaries of the park, usually streets and their intersections in place. Sometimes it helps to go a little larger than the park itself.
Convert the useful symbols such as buildings, water features, roads and paths to O symbols, realizing that you are going to have to go back and redraw the linear features to scale later on. And the beauty of importing from OSM to OCAD 12 as opposed to Open Orienteering Mapper is that you can batch covert all the buildings, all the paths, all the water features, etc at the same time. It is a very quick process compared to OOM.
Import the contours by way of background and tracing.
Snip aerial photos from Bing or Google Earth and place in background. Repeat the tracing process to get as much detail as possible.
Once you have the base map go out in the field and add/ correct detail, knowing that detail under trees and sometimes hidden by the taller buildings' shadows will not have been seen from the aerial photos.
Aug 20, 2017 9:01 PM # 
Klepperton:
So there's no real science when importing online aerial photos?

Just adjust the image to fit the maps' boundaries?

Sidenote:

I would pay for someone to compile layers of georeferenced base data for me, (exhausting all possible online sources), to digitize at my leisure.

I think Nevin mentioned that David Bakker was auctioning off that type of service at the COC's...is that correct?
Aug 21, 2017 12:10 AM # 
Juffy:
Rather than trying to get the WMS to fit the map, can you get the map to fit the WMS?

Your screenshot says the WMS supports epsg 2019 (MTM). OCAD allows you to import .prj files of other SRs.

https://www.ocad.com/wiki/ocad12/en/index.php?titl...

Get the prj from here:

http://spatialreference.org/ref/epsg/2019/

and create your new map. Then try and hook in the WMS service.
Aug 21, 2017 6:09 AM # 
dbakker:
@Klepperton Yes I did offer up a similar service for auction at the HPP silent auction, but included all the digitization into orienteering map symbols traced from the ortho photos, but with no fieldwork.

As to whether there is a science in importing online aerial photos, in my experience you either get nice data sources (geotiffs, or other image files with georeferencing.) or bad data sources (without georeferencing). Nice data sources, such as from http://opendata.kelowna.ca/, give you already georeferenced data, allowing you to match multiple basemaps up perfectly and easily. (By the way this does appear to be an option in Toronto, you just have to pay for it: https://www1.toronto.ca/wps/portal/contentonly?vgn...) Open Street Map

Then there are not so nice data sources which you have to georeference. This is your screenshot from google maps, bing maps, etc. which has the advantage of being available everywhere around the globe. Sometimes you can even get contour data as image files for free (which you then spend hours tracing...) from some city websites. When this is the case, I do basically what gordhun does, except I just use OOM and never saw enough advantage in using OCAD to pay for it. So I just trace everything from the photo once it is lined up with Open Street Map. (sidenote, open street map data is pretty sparse where I come from, so it wouldn't really be worth it anyways... http://www.openstreetmap.org/search?query=salmon%2...). Then, as you say, "there's no real science when importing online aerial photos".

And then there is what Toronto has (which I have never seen anywhere out west). You don't have to pay for it, it is georeferenced, it just takes a lot of work to play with it. So I got my older brother to figure it out for you! Everything from here on out is all him:
--------------------------------------------------------------


GDAL and QGIS

You need to install both GDAL (http://www.gdal.org/) and QGIS (http://qgis.org/en/site/)

Follow http://www.qgistutorials.com/en/docs/working_with_..., using the Toronto server (http://gis.toronto.ca/arcgis/services/primary/cot_...?) as the URL. After adding the layer, zoom to the area you want. Click Project->Save as image, and save it wherever you want to.

Next, open a command line in the folder (in older versions of windows: shift+right-click, Open Command Prompt IIRC, in newer versions Windows+R, then type cmd and hit return. In command prompt, type cd and then the folder name) that you saved the PNG in. Run the following command:
gdal_translate input.png -a_srs EPSG:32617 -of PNG -co WORLDFILE=yes output.png
Replace input.png with whatever you called the file you saved above. This will create a file called "output.png" with a georeferenced world file that uses UTM 17N (which is what Toronto is).

GDAL Only

Download the file from (here). This is a prebuilt file for Toronto's open data. Open a command line in the folder you downloaded it to. Edit the file (any text editor, eg notepad, will work). Replace the UpperLeftX, UpperLeftY, LowerRightX, LowerRightY with the corners of your map with the coordinates you pick from http://epsg.io/map#srs=2019&x=312399.075406&am...

Now, run the command
gdal_translate toronto.xml -of PNG -outsize 2000 2000 -co WORLDFILE=yes input.png
where each of the 2000's is the pixel height and width of the output image (you can change this, bigger is better quality but slower to render in OCAD/OOM). Now, convert the projection as in the QGIS/GDAL option above with the command
gdal_translate input.png -a_srs EPSG:32617 -of PNG -co WORLDFILE=yes output.png

The advantage to using QGIS is that you get to preview what the image will look like before you save it, plus its slightly more point and click, however, you do need to install another program.
--------------------------------------------------------------------------

Note that it might be possible to skip some of these steps using OCAD, but we are limited to OCAD 9 (which I almost never use except for updating a few maps without wanting to change file types to OOM) so can't help there.

PS: Alternatively, if you are not dedicated to using OCAD and could endure using OOM, send me an email through my profile and we can work out my brother and I setting up your maps.
Aug 21, 2017 10:03 PM # 
Klepperton:
Wow!

This is awesome David. Thanks for taking the time to sift through the City of Toronto site, and then putting all this together.

I'll have some time on Wednesday to follow what you and your brother have outlined here. Unfortunately, I'm quite sure I'll have an issue or two.

You asked if I was open to using OOM...most definitely. My familiarity with OCAD is back in the days of OCAD 5 and 6. A lot has changed...with that, my familiarity is gone.

I'll let you know how this goes...
Aug 22, 2017 1:34 PM # 
gudeso:
I agree (as a gis person) change the projection in QGIS or ArcGIS easier to align with the web map service you intend to use

Please login to add a message.