As part of my involvment with the ever expanding OpenStreetMap project, I’ve been importing VMAP0 into shapefile format, so that we can use it to render the new Mapnik powered slippy map, which gets better each day.
The first step is to get hold of the VMAP0 data, which can be downloaded from here. The format is pretty strange and requires some special tools to deal with it.
OGR2OGR can import from vmap into into a variety of formats including shapfile and postgis. But, you need to have the OGDI library installed. Next, compile the OGDI library. I had to set my TOPDIR variable to allow compiling. To do this, add this line to .bashrc:
export TOPDIR=”/usr/src/ogdi-3.1.5/”
Where /usr/src/ogdi-3.1.5/ is the path to the extracted OGDI tarball that you just downloaded.
Now configure using:
./configure –with-zlib –with-proj
make
make install
Next, rebuild GDAL to include OGDI:
./configure –with-proj –with-zlib –with-expat
So now the necessery libraries are installed and we are ready to investigate the VMAP data.
Mikel blogged about this a while ago and there is quite a bit of documentation out there that I have linked to at the bottom of this post.
Use this command to extract information about the vmap0 data:
# ogrinfo gltp:/vrf/home/nick/vmap0/dl/v0sas/vmaplv0/sasaus
GLTP is the protocol used the access the data, “vrf” is the format of the data and the rest is the absoloute path to the data. You must use an absoloute path or dissaster will ensue.
ogrinfo should produce output like this:
# ogrinfo gltp:/vrf/home/nick/vmap0/dl/v0sas/vmaplv0/sasaus
ERROR 4: OGDI Driver doesn’t support update.
Had to open data source read-only.
INFO: Open of `gltp:/vrf/home/nick/vmap0/dl/v0sas/vmaplv0/sasaus’
using driver `OGDI’ successful.
1: libref@libref(*)_line (Line String)
2: libreft@libref(*)_text (Point)
3: tileref@tileref(*)_area (Polygon)
4: tilereft@tileref(*)_text (Point)
5: polbndp@bnd(*)_point (Point)
..
..
This is a listing of the availabel data sets. Now chose the required dataset and extract it into a shapefile using something like:
# ogr2ogr v0sas-coastl.shp gltp:/vrf/home/nick/vmap0/dl/v0sas/vmaplv0/sasaus ‘coastl@bnd(*)_line’
This command will extract the data from coastl@bnd(*)_line into a shapefile called v0sas-coastl.shp.
Some useful links:
I have all of these converted as shapefiles and rendering under mapserver if you want.
See:
http://maps.civicactions.net
– a
All I can see in terms of boundaries is:
Do you have file for the rest of the world?