Jump to content

 
Photo

Digitizing contours and adding Z-values

- - - - -

  • Please log in to reply
21 replies to this topic

#1
anatolij

anatolij

    Newbie

  • Validated Member
  • Pip
  • 5 posts
  • Interests:mountain bike, aviation, airshows, 3D graphics, Flight Simulator developement, web-programming
  • Czech Republic

I've got huge amount of contour map images in nice sharp and black and white format. I need to vectorize them, give each contour it's appropriate elevation value (Z-value) and export them in some 3D format or ASCII format.
At this time I'm using Vextractor, which is really nice program where vectorization is no problem, exporting to needed format is also no problem but the bad thing for me is the process of setting elevation of contours. I have to click on each contour to assign the Z-value. It's a slavery to make a small 10x10km mountain area. And I need to work up much larger area :-(

What I'm looking for is an application, which can evaluate many contour lines by only two mouse clicks. You simply draw a line across 20 contours, you set the start (200 meters above sea) and step (5 meters) and thous contours will get elevation 200, 205, 210, ... 395 meters. This could be from 10 to 30 times faster than the way the Vextractor and many other programs does it.

I've spend many hours on google to find nothing at the end. Yes, there was one program with desired functionality, but it did not work on my PC (I think it was R2V demo or trial of something like that).

Thanks in advance for any help.


(I'm new here and Search function seems not to work for me today, so sorry if my problem was mentioned here before)
http://mzak.webzdarma.cz - jet engines, airshows, FS sceneries, Lock On tutorial, 3D Mark results

#2
Hans van der Maarel

Hans van der Maarel

    CartoTalk Editor-in-Chief

  • Admin
  • PipPipPipPipPipPipPip
  • 3,882 posts
  • Gender:Male
  • Location:The Netherlands
  • Interests:Cartography, GIS, history, popular science, music.
  • Netherlands

Hi Anatolij,

As far as I know there's nothing available that can automatically assign z-values to the contour lines. I also can't see an easy solution for this, but I'll try to see what I can come up with if I have some time today or tomorrow.
Hans van der Maarel - Cartotalk Editor
Red Geographics
Email: hans@redgeographics.com / Twitter: @redgeographics

#3
frax

frax

    Hall of Fame

  • Associate Admin
  • PipPipPipPipPipPipPip
  • 2,309 posts
  • Gender:Male
  • Location:Stockholm, Sweden
  • Interests:music, hiking, friends, nature, photography, traveling. and maps!
  • Sweden

does the images contain any z information? In that case I would bring them into a raster GIS (like ArcInfo GRID) and create raster datasets out of them, that can then be exported to polygons/lines.
Hugo Ahlenius
Nordpil - custom maps and GIS
http://nordpil.com/
Twitter

#4
anatolij

anatolij

    Newbie

  • Validated Member
  • Pip
  • 5 posts
  • Interests:mountain bike, aviation, airshows, 3D graphics, Flight Simulator developement, web-programming
  • Czech Republic

does the images contain any z information? In that case I would bring them into a raster GIS (like ArcInfo GRID) and create raster datasets out of them, that can then be exported to polygons/lines.

<{POST_SNAPBACK}>

Only Z data are in separate image in form of dots and numbers.
I'm vectorizing this type of image (this is only 150x150 meters, I work with 10240x10240 meters area)
Posted Image
And I have second image opened in image viewer as an elevation reference for me when I'm working on the first image.
Posted Image
Here's what I was talking about in the first post. You set start value, step value, 2 clicks to make a line and 24 contours are done.
Posted Image
http://mzak.webzdarma.cz - jet engines, airshows, FS sceneries, Lock On tutorial, 3D Mark results

#5
l.jegou

l.jegou

    Master Contributor

  • Validated Member
  • PipPipPipPip
  • 114 posts
  • Gender:Male
  • Location:Toulouse
  • Interests:Webmapping, thematical mapping.
  • France

R2V (raster to vector) from Able software helps a bit this kind of digitalization, with some automatic labelling functions, cf. :

http://www.ablesw.com/r2v/contour.html

#6
frax

frax

    Hall of Fame

  • Associate Admin
  • PipPipPipPipPipPipPip
  • 2,309 posts
  • Gender:Male
  • Location:Stockholm, Sweden
  • Interests:music, hiking, friends, nature, photography, traveling. and maps!
  • Sweden

wow, that seems like some really boring work... Are you sure you will be able to capture everything when it is steep and the vectors are close to each other? That definately looks like something that is rendered from vectors -- no way you can get access to the original vector data... ?
Hugo Ahlenius
Nordpil - custom maps and GIS
http://nordpil.com/
Twitter

#7
anatolij

anatolij

    Newbie

  • Validated Member
  • Pip
  • 5 posts
  • Interests:mountain bike, aviation, airshows, 3D graphics, Flight Simulator developement, web-programming
  • Czech Republic

wow, that seems like some really boring work... Are you sure you will be able to capture everything when it is steep and the vectors are close to each other? That definately looks like something that is rendered from vectors -- no way you can get access to the original vector data... ?

<{POST_SNAPBACK}>

boring - yeah, it really is :)
Those data for area of my interest are freely available for viewing on internet. I'm able to download them all, but only in image format. I can get original vector data but it's matter of hundreds $. My "project" is not commercial at this time, so I can't affort buying them.
Steep slopes are absolutely no problem, I can easily get those images in resolution 0.5m/px (or even better), contours difference is 5 meters and there's no terrain gradient over 80 degrees in my area.

to l.jegou:
yes, I guess R2V has necessary feature, I'll give it a try once again.

Anyhow: I have some small programming skills, so I'll try to make a simple application which may cooperate with Vextractor or 3dsmax and somehow ensure desired functionality.
http://mzak.webzdarma.cz - jet engines, airshows, FS sceneries, Lock On tutorial, 3D Mark results

#8
Kartograph

Kartograph

    Legendary Contributor

  • Validated Member
  • PipPipPipPipPip
  • 320 posts
  • Gender:Male
  • Location:Berlin, Deutschland
  • Germany

You could write a small program that reads the geodata, and assigns z-value in the incremental way you described. You?d need to know which lines to assign, but that would be a matter of smart primary ID use.
Which fileformats are you working in?

Pseudocode:

int baseheight = paramx;

int increment; = paramy;

int i = 1;



foreach (int k in heightArray ) {



increment = increment*i;

int height = baseheight + increment;

SetValue (height);

i++;

}

Wherein the "params" would be handed over in the constructor; Of course you have to stream the data back into your file. Actually it could be more elegant to define an object called contourLine, which can be repeatedly called for a "setHeight" method. That would then read, change and stream the data back, as the loop moves from line to line. How that would look like would depend on the file format.

EDIT: If I can be of any more help, just say so. Free of charge of course :-)

#9
BEAVER

BEAVER

    Master Contributor

  • Validated Member
  • PipPipPipPip
  • 185 posts
  • Location:Middletown, NY
  • United States

I posted this on Manifold forum and the responce was:

"You could do that with a script in Manifold" so I guess it can be done.

#10
gregsd

gregsd

    Master Contributor

  • Validated Member
  • PipPipPipPip
  • 169 posts
  • Gender:Male
  • Location:Surrey, England.
  • Interests:Cycling, mostly off-road (MTB) riding.
  • United Kingdom

"You could do that with a script in Manifold" so I guess it can be done.

<{POST_SNAPBACK}>



You could do it in MapInfo if you had access to MapBasic. Happy to lend a hand if you need any help.

Greg.


Greg Driver

GIS Analyst
MapInfo User...!

#11
benbakelaar

benbakelaar

    Ultimate Contributor

  • Associate Admin
  • PipPipPipPipPipPip
  • 658 posts
  • Gender:Male
  • Location:North Brunswick, NJ
  • Interests:maps, information, technology, scripting, computers
  • United States


"You could do that with a script in Manifold" so I guess it can be done.

<{POST_SNAPBACK}>



You could do it in MapInfo if you had access to MapBasic. Happy to lend a hand if you need any help.

Greg.

<{POST_SNAPBACK}>


Should I add the now obligatory "You could do it in ESRI ArcGIS using Python"? :) (I don't know if you actually can... but I can't see why not, given the right level of technical expertise).

#12
Martin Gamache

Martin Gamache

    Ultimate Contributor

  • Associate Admin
  • PipPipPipPipPipPip
  • 980 posts
  • Gender:Male
  • Location:Washington DC
  • Interests:History of Topographic Cartography
    Topographic Mapping
    History of Relief Depiction
    Thematic Cartography
    Demographic Cartography
    Cartographic techniques, methods, and tools
    Orienteering
    Panoramic &amp; Kite Photography
  • United States

This is something I've looked into and asked around quite a bit for, on both the Manifold and ESRI lists over the years. I don't have much programming skills so it was never an option for me, but it does seem like an easy enough problem to solve given a few variables:

Draw a line perpendicular to the series of contours. Indicate the starting elevation and the contour interval. Attribute every contour the line intersects based on the order the line intersects it and whether or not it already has an elevation attribute or not. I can imagine using a point spot elevation file to seed starting contours to automate it even more.

I am surprised no one has produced a small app. to do this yet.

On a related note the Manifold list never says no, always "yes with a script"...IMO that's about the equivalent unless the person suggesting a script either has one written or is offering to write one. It is quite an infuriating and useless suggestion.

On a postive note, for the lazy, or script challenged (I count myself amongst both groups) I have found that this is the kind of task that can be outsourced fairly affordably overseas and often packaged with the contour digitizing as well.



mg

#13
benbakelaar

benbakelaar

    Ultimate Contributor

  • Associate Admin
  • PipPipPipPipPipPip
  • 658 posts
  • Gender:Male
  • Location:North Brunswick, NJ
  • Interests:maps, information, technology, scripting, computers
  • United States

anatolij, can you post one of your contour b/w images? i'll try to find some on the web anyway, but i'm not really even an amateur with contours, GRIDs, TINs, etc...

martin, your post has inspired me (for the time being... i too count myself in the lazy group) to research this within ArcMap. since i do have the coding experience.

#14
Kartograph

Kartograph

    Legendary Contributor

  • Validated Member
  • PipPipPipPipPip
  • 320 posts
  • Gender:Male
  • Location:Berlin, Deutschland
  • Germany

The problem really is very easy to solve in almost any language. As long as you have access to the file format, you wouldn?t even need any GIS software.

You only need to know:

- which contour lines
- their equidistance
- starting height

I am surprised no one has produced a small app. to do this yet.


Problems:

The routine would be different for every file format type. Providing for all major ones is quite some work, which most people want money for. Especially the Hexcoded and binary ones are hasslesome.

But for just one known type of file and one project, it?s no large effort.

#15
benbakelaar

benbakelaar

    Ultimate Contributor

  • Associate Admin
  • PipPipPipPipPipPip
  • 658 posts
  • Gender:Male
  • Location:North Brunswick, NJ
  • Interests:maps, information, technology, scripting, computers
  • United States

apparently this process is called "contour tagging".

http://support.esri....contour tagging
http://www.cartage.o...uter/C/107.html

here is a site/program that mentions it, and compares itself to wintopo pro and r2v.

http://www.terrainmap.com/rm35.html




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

-->