Why not ask your question on the new OpenStreetMap Community Forum?

Hi, I am writing some software to convert contours and produce a contour map, I have downloaded gml data which I have converted to XML, both Osmosis and Splitter reads it correctly, I understand nodes and ways, but I don't get Relations... here is a small extract from my file, this part is for coastline

<?xml version='1.0' encoding='UTF-8'?>
<osm version="0.6" generator="Osmosis 0.43.1">
  <node id="1000000000088199248" version="1" timestamp="2015-06-05T12:12:53:50Z" lat="54.4568954" lon="-3.5692281"/>
  <node id="1000000000088199249" version="1" timestamp="2015-06-05T12:12:53:50Z" lat="54.4570016" lon="-3.5691505"/>
  <node id="1000000000088199250" version="1" timestamp="2015-06-05T12:12:53:50Z" lat="54.4569964" lon="-3.5690654"/>
  <node id="1000000000088199251" version="1" timestamp="2015-06-05T12:12:53:50Z" lat="54.4568735" lon="-3.5689789"/>
  <node id="1000000000088199252" version="1" timestamp="2015-06-05T12:12:53:50Z" lat="54.4567703" lon="-3.5689611"/>
  <node id="1000000000088199253" version="1" timestamp="2015-06-05T12:12:53:50Z" lat="54.456821" lon="-3.5690741"/>
  <node id="1000000000088199254" version="1" timestamp="2015-06-05T12:12:53:50Z" lat="54.4568464" lon="-3.5691275"/>
  <way id="1000000000088199255" version="5" timestamp="2015-06-05T12:12:53:50Z">
    <nd ref="1000000000088199248"/>
    <nd ref="1000000000088199249"/>
    <nd ref="1000000000088199250"/>
    <nd ref="1000000000088199251"/>
    <nd ref="1000000000088199252"/>
    <nd ref="1000000000088199253"/>
    <nd ref="1000000000088199254"/>
    <nd ref="1000000000088199248"/>
    <tag k="natural" v="coastline"/>

When i produce a map from this there is nothing on it, and the map size isn't what I would expect .

asked 06 Jun '15, 15:32

Rossendale%20Gary's gravatar image

Rossendale Gary
accept rate: 20%

edited 07 Jun '15, 07:24

iii's gravatar image


I'm not sure if I understand the point of your question. Which filters did you use on osmosis etc? How do you plan to mix contour lines etc...

Did you read the wiki already? https://wiki.openstreetmap.org/wiki/Contours

(07 Jun '15, 07:28) iii

Okay, I am trying to produce my own contour layer, I am writing the software in C#. I have downloaded the european contour and coastline data which is in gml, I have converted it to xml.

a small file osmosis is happy with, which tells me, I have the main settings in osmosis correct.

    string processCommand = "java";
    string processCommandArgs = _splitter;
    processCommandArgs += "--mixed=true ";
    processCommandArgs += "--mapid=" + Config.GetMapId(TypeOfMap) + " ";
    processCommandArgs += "--description=" + Config.GetMapName(TypeOfMap) + " ";
    processCommandArgs += "--mixed=true ";
    processCommandArgs += "--max-nodes=5000000 ";
    processCommandArgs += "--keep-complete=false ";
    processCommandArgs += "--max-areas=27 ";
    processCommandArgs += PbfDirectory + PbfFile + " ";
    processCommandArgs += "--output-dir=" + OutputDirectory;

That is my osmosis command it works perfectly on small clumps of data I have produced, I think the problem is down to how big some of the ways are, some have over 6,000 nodes on them

(07 Jun '15, 08:08) Rossendale Gary

So you try to extract the coastline only (you call it contours?) This is AFAIK a bit tricky on the geometry level (unclosed polys, multipolygones, ...). So IMHO it's worth to consider using Coastline dump?

(07 Jun '15, 08:32) iii

the downloaded file contains both contours and coastline, I am really after the contours..


The conversions to WSG84 I have done and verified, the problem is somehow I am confusing the splitter. without any meaningful fault report from it. The contours I get are really impressive, it works and it is accurate, the problem I am having is getting all the data through

(07 Jun '15, 09:01) Rossendale Gary

Oops, The xml file was spot on, the problem was in my other code used to generate the content for splitter to use.. I now have wonderful contours

permanent link

answered 09 Jun '15, 05:45

Rossendale%20Gary's gravatar image

Rossendale Gary
accept rate: 20%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 06 Jun '15, 15:32

question was seen: 3,725 times

last updated: 09 Jun '15, 05:45

powered by OSQA