[GRASSLIST:4749] Duplicate a Location

Hi All !
   Is there any way to duplicate a location in GRASS57 (including a way to
specify the new names for tthe postgres database names) ?

Thanks.

     D.

-----------------------------------------
Stay ahead of the information curve.
Receive GIS news and jobs on your desktop daily.
Subscribe today to the GIS CafeNews newsletter.
[ http://www10.giscafe.com/nl/newsletter_subscribe.php ]
It's informative and essential.

A location is simply a directory with GRASS mapset directories in it. By
default, it always contains a mapset named PERMANENT. PERMANENT (or other
mapset dirctory) contains GRASS GIS files and a set of text files specifying
projection parameters and extents. All mapsets in a location have the same
projection and default extents. To copy a location and all the stuff in it,
simply copy the directory. If you want to duplicate a location but make it
empty, make a directory with a PERMANENT directory inside, and copy all the
projection files (DEFAULT_WIND, PROJ_INFO, PROJ_UNITS) from the original
LOCATION/PERMANENT director to the new one.

Michael Barton

On 11/9/04 6:32 AM, "DrakeGis" <drakegis@dacafe.com> wrote:

Hi All !
   Is there any way to duplicate a location in GRASS57 (including a way to
specify the new names for tthe postgres database names) ?

Thanks.

     D.

-----------------------------------------
Stay ahead of the information curve.
Receive GIS news and jobs on your desktop daily.
Subscribe today to the GIS CafeNews newsletter.
[ http://www10.giscafe.com/nl/newsletter_subscribe.php ]
It's informative and essential.

____________________
C. Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
PO Box 872402
Arizona State University
Tempe, AZ 85287-2402
USA

Phone: 480-965-6262
Fax: 480-965-7671
www: <www.public.asu.edu/~cmbarton>

Thanks, I knew that I can just copy the files, but by doing that I'm not
creating new tables in my postgres database....
  How can I do that and still have the link between maps and data ?

  D.

A location is simply a directory with GRASS mapset directories in it. By
default, it always contains a mapset named PERMANENT. PERMANENT (or other
mapset dirctory) contains GRASS GIS files and a set of text files
specifying
projection parameters and extents. All mapsets in a location have the same
projection and default extents. To copy a location and all the stuff in
it,
simply copy the directory. If you want to duplicate a location but make it
empty, make a directory with a PERMANENT directory inside, and copy all
the
projection files (DEFAULT_WIND, PROJ_INFO, PROJ_UNITS) from the original
LOCATION/PERMANENT director to the new one.

Michael Barton

On 11/9/04 6:32 AM, "DrakeGis" <drakegis@dacafe.com> wrote:

Hi All !
   Is there any way to duplicate a location in GRASS57 (including a way
to
specify the new names for tthe postgres database names) ?

Thanks.

     D.

-----------------------------------------
Stay ahead of the information curve.
Receive GIS news and jobs on your desktop daily.
Subscribe today to the GIS CafeNews newsletter.
[ http://www10.giscafe.com/nl/newsletter_subscribe.php ]
It's informative and essential.

____________________
C. Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
PO Box 872402
Arizona State University
Tempe, AZ 85287-2402
USA

Phone: 480-965-6262
Fax: 480-965-7671
www: <www.public.asu.edu/~cmbarton>

-----------------------------------------
Stay ahead of the information curve.
Receive GIS news and jobs on your desktop daily.
Subscribe today to the GIS CafeNews newsletter.
[ http://www10.giscafe.com/nl/newsletter_subscribe.php ]
It's informative and essential.

After you have copied your location and all of the files therein, either...

1) it will connect to your postgres database just like before (this is the
most likely as you will have also copied the var file and other similar
files that specify the path to your postgres database) OR

2) you will need to run v.db.connect to re-establish a connection between
your vectors and postgres.

Michael

On 11/10/04 3:05 PM, "DrakeGis" <drakegis@dacafe.com> wrote:

  How can I do that and still have the link between maps and data ?

______________________________
Michael Barton, Professor of Anthropology
School of Human, Evolution and Social Change
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262; fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

So, in order to protect my data from any riskly operation, I should
1) copy my location
2) copy my database
3) in grass relink maps and vectors

Is that rigth ?

  D.

After you have copied your location and all of the files therein,
either...

1) it will connect to your postgres database just like before (this is the
most likely as you will have also copied the var file and other similar
files that specify the path to your postgres database) OR

2) you will need to run v.db.connect to re-establish a connection between
your vectors and postgres.

Michael

On 11/10/04 3:05 PM, "DrakeGis" <drakegis@dacafe.com> wrote:

  How can I do that and still have the link between maps and data ?

______________________________
Michael Barton, Professor of Anthropology
School of Human, Evolution and Social Change
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262; fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

-----------------------------------------
Stay ahead of the information curve.
Receive GIS news and jobs on your desktop daily.
Subscribe today to the GIS CafeNews newsletter.
[ http://www10.giscafe.com/nl/newsletter_subscribe.php ]
It's informative and essential.

Yes.

Michael

On 11/10/04 3:41 PM, "DrakeGis" <drakegis@dacafe.com> wrote:

So, in order to protect my data from any riskly operation, I should
1) copy my location
2) copy my database
3) in grass relink maps and vectors

Is that rigth ?

  D.

After you have copied your location and all of the files therein,
either...

1) it will connect to your postgres database just like before (this is the
most likely as you will have also copied the var file and other similar
files that specify the path to your postgres database) OR

2) you will need to run v.db.connect to re-establish a connection between
your vectors and postgres.

Michael

On 11/10/04 3:05 PM, "DrakeGis" <drakegis@dacafe.com> wrote:

  How can I do that and still have the link between maps and data ?

______________________________
Michael Barton, Professor of Anthropology
School of Human, Evolution and Social Change
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262; fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

-----------------------------------------
Stay ahead of the information curve.
Receive GIS news and jobs on your desktop daily.
Subscribe today to the GIS CafeNews newsletter.
[ http://www10.giscafe.com/nl/newsletter_subscribe.php ]
It's informative and essential.

______________________________
Michael Barton, Professor of Anthropology
School of Human, Evolution and Social Change
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262; fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton