matplotlib / matplotlib/basemap

readshapefile() raises incorrect error msg regarding shpproj and shapelib

Abierto
#285 6 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Lenguaje dominante
Python
Estrellas
817
Forks
395
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

When plotting a shapefile using readshapefile()

`m.readshapefile(shapefile_path, 'roads')`

I received this error message:

`ValueError: shapefile must have lat/lon vertices - it looks like this one has vertices
in map projection coordinates. You can convert the shapefile to geographic
coordinates using the shpproj utility from the shapelib tools
(http://shapelib.maptools.org/shapelib-tools.html)`

However, it appears that the specified module "shapelib" is no longer maintained or available. To add to the confusion, there is a completely different module that also goes by the name "shapelib" available on pypi and github, but that does not contain the functionality suggested above.

In regard to a suggested solution. I found the fix on this site to be useful for converting the shapefile and getting past this readshapefile() error.
http://fascicul.us/convert-display-shapefile-matplotlib.html

However, this conversion sometimes leads to a new error:

`ValueError: readshapefile can only handle 2D shape types`

Which I have yet to find a way to resolve

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza en el punto de entrada readshapefile() e inspecciona la ruta de error que recomienda shpproj de shapelib. Reproduce la conversión indicada y el fallo posterior “only handle 2D shape types”, y determina después si la orientación o el manejo son incorrectos. Se considera terminado cuando el mensaje de error y la orientación sobre la conversión reflejen con precisión las herramientas disponibles y los tipos de shape compatibles.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
data-visualization
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.