[GRASS-user] Stranges things after importing a shapefile

Νίκος Νίκος
Tue Nov 10 10:21:25 EST 2009


Felix Schalck wrote:
> While still working on my huge map of Europe, I've noticed many
> differences between the original shapefile and the grass vector layer
> created after import.

This (probably) means that grass (i.e. v.clean) did its job and
corrected topological errors in the shapefile (?).

> To visualize the problem, I took two
> Screenshots:
> -First one is from gqis 1.01, showing the raw
> shapefile:
> http://img214.imageshack.us/img214/4884/qgis.png
>  -Second one from grass 6.4RC5, showing the imported vector
> layer:
> http://img4.imageshack.us/img4/8462/grassgis.png
> Notice how many areas seem broken in the grass layer, and how
> entire parts of large rivers (take the rhine, for an example) are
> missing.

Not so easy to see the differences. Maybe you could (next time)
highlight them somehow.

> The initial shapefile was patched together (from a few hundred nasa
> swbd tiles) using Markus Neteler's script (Thanks again Markus !), and
> seem to produce good results, at least in Qgis. The import command I
> used was: v.in.ogr -z -o dsn=/DATA/swbd/shp/tiles/coastlines.shp
> output=coastlines I somehow had to override the projection, because
> grass doesn't seem to recognize the projection of the shapefile -
> although both are of the same WSG84 LAT/LON proj.
> 
> My question is: what went wrong ?

Maybe nothing went wrong ;-). Check the original shape(s) there where
you can locate differences. Are there open polygons for example?

> Perhaps there is an import step I'm
> missing, since once the 'clean' command finishes, I get an awful lot
> of areas without a centroid; I don't know. But it would be nice, for
> sure, if grass could just translate the shapefile, as it is, and allow
> me to export a *complete* vector map to inkscape.

If its only for visualisation purposes, I think you can avoid v.clean.
Use: v.in.ogr with the flag "-c   Do not clean polygons (not
recommended)".

Or maybe v.external?

Nikos



More information about the grass-user mailing list