Re: Mapping in python? Transforming shapefile so that basemap can read them?
C Barr Leigh wrote: I'm trying to get started with plotting maps in python. I need to read "shape files" (.shp) and make maps. There seem to be many efforts but none is complete? I'm looking for suggestions and troubleshooting. The basemap package is obviously at an impressive stage and comes with some data: http://www.scipy.org/Cookbook/Matplotlib/Maps but it cannot read shapefiles when their coordinates are not in geographic projection. min are in a lambert, so the readshapefile fails. Apparently there is a utility that can convert a .shp file to lat/lon coordinates, but it fails for me. “You can convert the shapefile to geographic - coordinates using the shpproj utility from the shapelib tools - (http://shapelib.maptools.org/shapelib-tools.html)" For me, this gives: “unable to process projection, exiting...” Someone else has already mentioned GDAL which is actually the raster part of the GDAL/OGR duo; OGR is the vector toolset which understands shapefiles. There are a couple of other packages possibly worth exploring: - Thuban (http://thuban.intevation.org) - GRASS(http://grass.itc.it/) - Shapelib (http://shapelib.maptools.org/) - FWTools (http://fwtools.maptools.org/) Shapefiles, except for the coordinate system support included in ESRI's more recent products, are documented in a publicly accessible PDF which googling for "ESRI shapefile" should find. -- - Andrew I MacIntyre "These thoughts are mine alone..." E-mail: andy...@bullseye.apana.org.au (pref) | Snail: PO Box 370 andy...@pcug.org.au (alt) |Belconnen ACT 2616 Web:http://www.andymac.org/ |Australia -- http://mail.python.org/mailman/listinfo/python-list
Re: Mapping in python? Transforming shapefile so that basemap can read them?
On Sep 11, 7:22 pm, C Barr Leigh wrote: > I'm trying to get started with plotting maps in python. I need to read > "shape files" (.shp) and make maps. There seem to be many efforts but > none is complete? I'm looking for suggestions and troubleshooting. > > The basemap package is obviously at an impressive stage and comes with > some data:http://www.scipy.org/Cookbook/Matplotlib/Maps > > but it cannot read shapefiles when their coordinates are not in > geographic projection. min are in a lambert, so the readshapefile > fails. > > Apparently there is a utility that can convert a .shp file to lat/lon > coordinates, but it fails for me. “You can convert the shapefile to > geographic - coordinates using the shpproj utility from the shapelib > tools - (http://shapelib.maptools.org/shapelib-tools.html)" > For me, this gives: > “unable to process projection, exiting...” > > Has anyone overcome these problems? > > Thanks! > Chris Not sure - but perhaps the GDAL? -- http://mail.python.org/mailman/listinfo/python-list
Mapping in python? Transforming shapefile so that basemap can read them?
I'm trying to get started with plotting maps in python. I need to read "shape files" (.shp) and make maps. There seem to be many efforts but none is complete? I'm looking for suggestions and troubleshooting. The basemap package is obviously at an impressive stage and comes with some data: http://www.scipy.org/Cookbook/Matplotlib/Maps but it cannot read shapefiles when their coordinates are not in geographic projection. min are in a lambert, so the readshapefile fails. Apparently there is a utility that can convert a .shp file to lat/lon coordinates, but it fails for me. “You can convert the shapefile to geographic - coordinates using the shpproj utility from the shapelib tools - (http://shapelib.maptools.org/shapelib-tools.html)" For me, this gives: “unable to process projection, exiting...” Has anyone overcome these problems? Thanks! Chris -- http://mail.python.org/mailman/listinfo/python-list