This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

How to correctly import ASTER data (contours) into a PostGIS database

1

I've got a tile-server up and running on an Ubuntu 12.04 VM (I followed this guide exactly to create this: http://switch2osm.org/serving-tiles/manually-building-a-tile-server-12-04/)

I tried to add contours following the https://wiki.openstreetmap.org/wiki/Contours guide.

I downloaded the area of interest as ASTER Global Digital Elevation Model V002 data and imported this into the database as described - no errors were encountered during this process.

I then added the styles and layers listed under the "For mapnik version 2.1 the xml changed a little bit, so I added this in osm.xml" section into my osm.xml file.

Now I cannot render any tiles. If I remove the added stuff from the osm.xml file then it all works again. (This is repeatable).

If I run the tile server interactively via the console with the command renderd -f -c /usr/local/etc/renderd.conf then errors parsing the sql in the style rules appear:

column "way" does not exist.

Which it doesn't - the script "import_ASTGTM2.sh" on the contours page does not include this column - the contours table has the columns gid, Id, height and geometry.

The deprecated script for importing the SRTM3 data DOES contain this column so I'm guessing it's an oversight in the ASTER script? I have no idea how to adapt it though to include this column.

asked 07 Jun '13, 02:55

Tangotonyb's gravatar image

Tangotonyb
51337
accept rate: 0%

edited 07 Jun '13, 16:29

1

There's a bit of the "manually building a tile server" guide that says "We’ll run it interctively first...". That causes renderd output to appear interactively instead of in a system log file /var/log/syslog.

Perhaps try that and edit your question to include any errors listd in there, if you see any?

(07 Jun '13, 09:21) SomeoneElse ♦
1

Thanks - good call I should have seen that - question updated.

(07 Jun '13, 09:48) Tangotonyb

One Answer:

4

In the Aster script, the column is named 'geometry' instead of way. Change the script or Mapnik postgis request accordingly.

answered 08 Jun '13, 19:06

yvecai's gravatar image

yvecai
1.5k1226
accept rate: 9%

2

Thankyou - works nicely

(09 Jun '13, 17:25) Tangotonyb
1

Have added a note to the talk page of the wiki page contours. If someone here can, please add this info to the relevant section of the manual.

(09 Jun '13, 20:23) aseerel4c26 ♦

Speaking entirely personally, I'd be worried that doing this would overcomplicate the "manually-building-a-tile-server-12-04" page. A "minutely mapnik" section of that would probably be a higher priority.

(20 Jun '13, 13:10) SomeoneElse ♦

Source code available on GitHub .