[GRASS-user] Encountering an error importing shapefiles with v.in.ogr

Maciej Sieczka tutey at o2.pl
Mon Mar 19 14:19:56 EDT 2007


Thomas Adams wrote:
> List:
> 
> I am using GRASS 6.2.1 and I (sometimes) encounter an error importing a
> shapefile with v.in.ogr. The vector boundaries import fine, but gis.m
> crashes. I can re-start gis.m and load the vector file that I just
> *attempted* to import and it displays fine. However, I get a warning:
> 
> Cannot display areas, topology not available.

This might mean that v.in.ogr failed (eg. a segmenation fault) at work,
while such errors are not printed to the tcl/tk GUI output. Please try
to run the same v.in.ogr command from the command line. Let us know if
there is any error printed, which was missing in GUI.

> I am virtually certain that I was able to successfully import this and
> other shapefiles in previous versions of GRASS (GRASS 4.x & GRASS 5.x).
> The shapefiles files include the *.dbf, *.shp, and *.shx files, which I
> think, should be enough. If I import shapefiles from the US National
> Atlas (created by the USGS), I have no problems. It seems that with all
> shapefiles generated by my office using ArcGIS 9.0, I have this problem.
> 
> Does anyone have suggestions as to what could be going on?

To check whether there is a possible error in your shapefile, inspect
the ogrinfo -al -so output, try to open it in QGIS, OpenEV or else. Any
oddities? Does ogr2ogr dump.shp your_input.shp work? Does it create a
copy or maybe something you would not expect?

Can you put a problematic sample somewhere for dowload?

Cheers,
Maciek




More information about the grass-user mailing list