NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

OSM experts,

Thanks for your time. I'm experimenting with building maps from US NHD data and have encountered a problem that only comes up when I split my osm files with splitter. I'm using the latest svn version of it and mkgmap. Here's the short version:

(1) Use ogr2osm with a suitable translation file to convert NHDFlowline.shp -> NHDFlowline.osm and NHDWaterbody.shp -> NHDWaterbody.osm

(2) Use sed to add dummy database fields so that these osm files are acceptable to osmosis.

(3) Use osmosis to delete nodes that aren't used by ways in these files, eg

osmosis --rx NHDWaterbody.osm --tf accept-way natural=water,natural=wetland,landuse=reservoir,man_made=reservoir,leisure=swimming_pool --used-node  --wx NHDWaterbody.filtered.osm

(4) Run splitter:

splitter --split-file=areas.list --mapid=20000000 --max-nodes=2400000  NHDFlowline.filtered.osm NHDWaterbody.filtered.osm

(5) Run mkgmap (with loads of options that aren't relevant, experimentation shows).

In the case of the subbassin I'm experimenting with, two of the three tiles have large, spurious, angular lakes. I've put a screenshot from from qlandkartegt at link text for the time being.

If it helps any, one large angular water area is given the name that belongs to a lake near, but not touching the edge of the tile containing that spurious lake. Another clue, perhaps, is that between the actual lake of that name and the spurious region in the adjoining tile is a lake the straddles the two tiles, but appears in neither.

Further possible hints:

(1) mkgmap can actually handle this modest amount of data without splitting. Just using mkgmap, I don't get the spurious water area when building a map from the two filtered osm files.

(2) I can split either NHDFlowline.filtered.osm or the NHDWaterbody.filtered.osm file using the areas.list file generated when splitting them together, and the mkgmap results are good.

Thanks for any pointers!

asked 24 Mar '12, 04:40

Utea's gravatar image

accept rate: 0%

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]( "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: 24 Mar '12, 04:40

question was seen: 2,194 times

last updated: 24 Mar '12, 04:40

NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum