[GRASSLIST:10402] Re: importing projection info with v.in.ogr

Maciek Sieczka werchowyna at epf.pl
Sun Feb 19 05:55:34 EST 2006


On Fri, 17 Feb 2006 11:25:15 -0500
"Chris Fonnesbeck" <fonnesbeck at gmail.com> wrote:

> When I import a shapefile using v.in.ogr:
> 
> v.in.ogr dsn=./ layer=cntbnd location=florida out=counties

Command output please (copy/paste).

> It seems to recognize the information in the .prj file, and imports
> the layer correctly. However, I notice that it does not create a
> PRJ_INFO file

Do you mean PROJ_INFO?

It is stored only in the PERMANENT mapset of your location. It aplies
to the whole location.

>, so subsequent importing of the layer into another
> location with v.proj is impossible.

v.proj is supposed to be run in the _destination_ location. Both input
and output and input locations must have their valid PROJ_INFO in
PERMANENT mapset for v.proj to work. You can edit the PROJ_INFO
manually or using g.proj command (note: g.proj might be buggy in grass
6.0 & 6.0.1, the fix will be present in 6.0.2; you could build 6.0
branch from CVS if you can't wait for a release).

> It seems strange that the
> projection information does not get explicitly imported into the new
> location; am I doing something wrong?

I don't understand.

> It seems like a roundabout way, in any case, to import a shapefile of
> a different projection into an existing project. Is there any way of
> doing this directly, rather than having to create a new location with
> v.in.ogr, then move the layer into the current project with v.layer?

What's "v.layer"?

You can reproject shapefiles outside Grass with ogr2ogr.

Maciek

--------------------
W polskim Internecie s? setki milion?w stron. My przekazujemy Tobie tylko najlepsze z nich!
http://katalog.panoramainternetu.pl/




More information about the grass-user mailing list