On Mar 18, 2011, at 4:00 AM, Philip Howarth wrote:

> I want to add a track from a gpx file to a map.
> 
> To get started I followed the usage info in the trac documentation - but hit 
> a problem immediately.
>  It seems that the Expat library is required:
> 
> >>> mapnik.Ogr(file='c:/test.gpx')
> 
> Traceback (most recent call last):
>   File "<pyshell#1>", line 1, in <module>
>     mapnik.Ogr(file='c:/test.gpx')
>   File "C:\Program Files 
> (x86)\mapnik-0.7.1\python\2.6\site-packages\mapnik\__init__.py", line 419, in 
> Ogr 
>      return CreateDatasource(keywords)
> RuntimeError: OGR/GPX driver has not been built with read support. Expat 
> library required
> >>> 


Hi Philip. I think that the Windows binaries statically link the GDAL/OGR 
library, and the build that was made clearly does not support Expat. So, I 
think on windows your only option is to install a new version of GDAL/OGR to 
convert that .gpx file into something like a shapefile beforehand.

The dependency chain for GDAL/OGR is quite large so it is understandable, that 
Artem, who provides the Mapnik binaries, skipping building GDAL/OGR with Expat 
support.

> 
> I can run ogrinfo from the command line OK.
> 
> I am running under Windows7 (64 bit) with python 2.6 and mapnik 0.7.1: 
> >>> sys.version
> '2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)]'>>> 
> import mapnik
> >>> mapnik.mapnik_version()
> 701
> >>>
> 
> I am able to render from postgis without problem.  
> 
> I'm somewhat out of my depth here - any help appreciated!
> 
>         Philip
> 
> -- 
> Philip Howarth
> Cambridge UK
> email: [email protected]
> _______________________________________________
> Mapnik-users mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/mapnik-users

_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to