Hello,
I am trying to read NGA Digital Nautical Charts (VPF/VRF format) into
Mapnik. To do so, I am attempting to create a datasource using the OGDI
driver through the ogr plugin. I have built Mapnik in Ubuntu 8.10 (and
9.04) with debug on and with ogr support. Upon importing Mapnik, I receive
confirmation of the ogr plugin's existence. I am able to run ogrinfo on the
DNC data source and receive a list of layers using the following command:
ogrinfo gltp:/vrf/home/<user>/dnc/dnc13/a1316120
One of the layers listed is:
11: coa...@ecr(*)_line (Line String)
In order to create the data source in Mapnik, I am attempting the following:
lyr = mapnik.Layer('test', "+proj=latlong +datum=WGS84")
lyr.datasource = mapnik.Ogr(file='/home/<user>/dnc/dnc13/a1316120',
layer='coa...@ecr(*)_line')
This gives a runtime error indicating line 299 in mapnik/__init__.py
(return CreateDatasource(keywords))
Without being at all certain of its correctness, I also attempted to call
CreateDatasource directly with the following:
lyr.datasource = mapnik.CreateDatasource(type='ogr',
file=/home/<user>/dnc/dnc13/a1316120', layer='coa...@ecr(*)_line')
This returns the following:
ArgumentError: Python argument types in
mapnik._mapnik.CreateDatasource() did not match C++ signature:
CreateDatasource(boost::python::dict)
I am able to use ogr2ogr to convert the DNC to a shapefile and then import
that into Mapnik, but I would greatly prefer to not have to go through that
step. Any suggestions or insight anyone may have about this or reading
Digital Nautical Charts in general would be appreciated.
-- Ryan
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users