[GRASS-user] Using shapefiles

Hi!
I have used GRASS for analysing raster data before, and found it very useful. Howeve, I am at a loss at what the best way to import a shapefile and display it. I have tried a simple shapefile (<800 polygons), and the import stage takes a long time ( 6.0.1), close to 10 minutes. Is there a step-by-step guide on how to quickly import a shapefile (whose extent you don’t know), and display it?

Cheers!
jose

I haven't tried this, but you might find v.in.ogr works for you.

Tyler

On 24-Jun-06, at 3:10 PM, Jose Gomez-Dans wrote:

Hi!
I have used GRASS for analysing raster data before, and found it very useful. Howeve, I am at a loss at what the best way to import a shapefile and display it. I have tried a simple shapefile (<800 polygons), and the import stage takes a long time ( 6.0.1), close to 10 minutes. Is there a step-by-step guide on how to quickly import a shapefile (whose extent you don't know), and display it?

Cheers!
jose
_______________________________________________
grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser

Hello Jose,

On Sun, 25 Jun 2006 00:10:07 +0200 "Jose Gomez-Dans"
<jgomezdans@gmail.com> wrote:

Hi!
I have used GRASS for analysing raster data before, and found it very
useful. Howeve, I am at a loss at what the best way to import a
shapefile and display it. I have tried a simple shapefile (<800
polygons), and the import stage takes a long time (6.0.1), close to
10 minutes. Is there a step-by-step guide on how to quickly import a
shapefile (whose extent you don't know), and display it?

As Tyler also mentioned, v.in.ogr will help.

For read-only-support you could give v.external a try, which only
"links" the shapefile into your mapset. However, you cannot do any
modifocations using this "linked" data.

Best
  Stephan

--
GDF Hannover - Solutions for spatial data analysis and remote sensing
Hannover Office - Mengendamm 16d - D-30177 Hannover
Internet: www.gdf-hannover.de - Email: holl@gdf-hannover.de
Phone : ++49-(0)511.39088507 - Fax: ++49-(0)511.39088508

Jose Gomez-Dans wrote:

I have tried a simple shapefile (<800 polygons), and the import stage
takes a long time (6.0.1), close to 10 minutes. Is there a
step-by-step guide on how to quickly import a shapefile (whose extent
you don't know), and display it?

re. "quickly"

v.in.ogr may take a long time if the data contains long complicated
polylines. Once in GRASS format v.split can be used to break the lines
to something smaller. v.in.ogr hasn't got this yet.

http://freegis.org/cgi-bin/viewcvs.cgi/grass6/doc/vector/TODO

v.in.ogr
--------
It would be useful to split long boundaries to smaller
pieces. Otherwise cleaning process can become very slow because
bounding box of long boundaries can overlap large part of the map (for
example outline around all areas) and cleaning process is checking
intersection with all boundaries falling in the bounding box.

generic:
v.in.ogr dsn=mapname.shp out=mapname
g.region v=mapname
d.vect mapname type=area

Hamish

Hi Hamish, Stephen and Tyler,
Thanks for your reply.

On 6/26/06, Hamish <hamish_nospam@yahoo.com> wrote:

generic:
v.in.ogr dsn=mapname.shp out=mapname
g.region v=mapname
d.vect mapname type=area

OK, I forgot to mention that I indeed used v.in.ogr (I know of no other way of importing shapefiles into GRASS, so I thought that this wasn’t needed). Apparently, it is a known problem that files take so long to load up.

Thanks all for your replies.
Jose