[GRASS-user] creating new geometry from pre-existing lines and points

Hi everyone,

First--I want to thank everyone on this list. I've installed a lot of
new tools in the last month (including a new OS, ubuntu) and got up and
running very fast because of help received here. Thank you again!

Second--another question (of course). I have a vector (polygon) layer
and there is a hole (no surface). I want to turn that hole into a
polygon using the existing lines and points around it. I thought I could
use v.digit for this but I did a very poor job. Perhaps there is a
particular v.digit technique or another tool I should use?

Also (and this relates to a previous question of mine) if I have
imported a postGIS vector layer via v.in.ogr, does that create a
permanent link so that edits via v.digit are then written back to the
SQL database? Or do I need to somehow tell it to update?

thank you again,
-david

On Wed, 2008-01-30 at 19:32 +0200, David Epstein wrote:

Hi everyone,

First--I want to thank everyone on this list. I've installed a lot of
new tools in the last month (including a new OS, ubuntu) and got up and
running very fast because of help received here. Thank you again!

Second--another question (of course). I have a vector (polygon) layer
and there is a hole (no surface). I want to turn that hole into a
polygon using the existing lines and points around it. I thought I could
use v.digit for this but I did a very poor job. Perhaps there is a
particular v.digit technique or another tool I should use?

I didn't tried it yet... (cause I need the islands in my work
currently!) but here is a "copy-paste" from the v.extract man page:

Remove islands from polygon map

       v.extract in=map_with_islands out=maps_without_islands
list=1-99999
       # and/or
       v.extract -d in=map_with_islands out=maps_without_islands

Also (and this relates to a previous question of mine) if I have
imported a postGIS vector layer via v.in.ogr, does that create a
permanent link so that edits via v.digit are then written back to the
SQL database? Or do I need to somehow tell it to update?

thank you again,
-david

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

--
Nikos Alexandris
.
Department of Remote Sensing & Landscape Information Systems
Faculty of Forestry & Environmental Sciences, Albert-Ludwigs-University Freiburg
.
Tel. +49 (0) 761 203 3697 / Fax. +49 (0) 761 203 3701 / Skype: Nikos.Alexandris
.
Address: Tennenbacher str. 4, D-79106 Freiburg i. Br., Germany

Hi Nikos,

Thank you for that suggestion. Indeed, I did NOT realize that v.extract
was used to create new geometry in a layer. However, I too need some of
the islands (is there a technical difference between island, hole, and
missing polygon?).

There is a single missing polygon that I now have attribute data for and
I want to create the polygon (from the existing points and lines) and
fill-in the related attribute fields.

I imagined some sort of interactive process of clicking on the relevant
bounding elements and *presto* the polygon would jump into existence. I
tried this in v.digit but was not able to get the desired result.

This is a really basic step that people do several times a day, right?

-david

Hi!

On Wed, 2008-01-30 at 23:52 +0200, David Epstein wrote:

Hi Nikos,

Thank you for that suggestion. Indeed, I did NOT realize that v.extract
was used to create new geometry in a layer. However, I too need some of
the islands (is there a technical difference between island, hole, and
missing polygon?).

I am not sure!

Would be nice to have a kind of GRASS-GIS lexicon with (basic and
non-basic) definitions!

* island... I suppose are small poylgons within larger ones

* holes... just "nothing" within larger polygons

* missing polygon... ?

There is a single missing polygon that I now have attribute data for and
I want to create the polygon (from the existing points and lines) and
fill-in the related attribute fields.

I imagined some sort of interactive process of clicking on the relevant
bounding elements and *presto* the polygon would jump into existence. I
tried this in v.digit but was not able to get the desired result.

If you just need to quickly correct a small number of polygons try with
the "fresh-baked" QGIS (r0.9.2.rc1), which works as a GRASS frontend.

1. you need to add in your /etc/apt/sources.list following source:
deb http://ppa.launchpad.net/timlinux/ubuntu gutsy main

2. sudo aptitude update && sudo aptitude upgrade

--- if not already installed... "sudo apt-get install qgis
qgis-plugin-grass"---

3. Load GRASS plugin

4. Open your GRASS mapset within QGIS

5. Load your vector (polygon) file

6. Play with the tools... ( I have seen the new digitising tools... must
be really what you are looking for!) and edit your polygons.

*** You need first to "right click" on your vector layer and "save as
shapefile" -- Then you can edit.

This is a really basic step that people do several times a day, right?

-david

I'm sorry to interrupt Your advanced discussion, but if there are just
some "holes" that are required to be converted to polygons, then why
not use v.digit? Simply digitising new centroid inside a hole
(enclosed from other polygon boundaries) will turn hole into polygon.

WBR,
Maris.

2008/1/31, Nikos Alexandris <nikos.alexandris@felis.uni-freiburg.de>:

Hi!

On Wed, 2008-01-30 at 23:52 +0200, David Epstein wrote:
> Hi Nikos,
>
> Thank you for that suggestion. Indeed, I did NOT realize that v.extract
> was used to create new geometry in a layer. However, I too need some of
> the islands (is there a technical difference between island, hole, and
> missing polygon?).

I am not sure!

Would be nice to have a kind of GRASS-GIS lexicon with (basic and
non-basic) definitions!

* island... I suppose are small poylgons within larger ones

* holes... just "nothing" within larger polygons

* missing polygon... ?

>
> There is a single missing polygon that I now have attribute data for and
> I want to create the polygon (from the existing points and lines) and
> fill-in the related attribute fields.
>
> I imagined some sort of interactive process of clicking on the relevant
> bounding elements and *presto* the polygon would jump into existence. I
> tried this in v.digit but was not able to get the desired result.

If you just need to quickly correct a small number of polygons try with
the "fresh-baked" QGIS (r0.9.2.rc1), which works as a GRASS frontend.

1. you need to add in your /etc/apt/sources.list following source:
deb http://ppa.launchpad.net/timlinux/ubuntu gutsy main

2. sudo aptitude update && sudo aptitude upgrade

--- if not already installed... "sudo apt-get install qgis
qgis-plugin-grass"---

3. Load GRASS plugin

4. Open your GRASS mapset within QGIS

5. Load your vector (polygon) file

6. Play with the tools... ( I have seen the new digitising tools... must
be really what you are looking for!) and edit your polygons.

*** You need first to "right click" on your vector layer and "save as
shapefile" -- Then you can edit.

>
> This is a really basic step that people do several times a day, right?
>
> -david

On Jan 31, 2008 12:51 AM, Nikos Alexandris
<nikos.alexandris@felis.uni-freiburg.de> wrote:

On Wed, 2008-01-30 at 23:52 +0200, David Epstein wrote:
> ... (is there a technical difference between island, hole, and missing polygon?).

Would be nice to have a kind of GRASS-GIS lexicon with (basic and
non-basic) definitions!

The natural place for this is the programmer's manual:

http://download.osgeo.org/grass/grass6_progman/
-> Related Pages
   -> GRASS 6 Vector Architecture

Indded, it could be improved there (file lib/vector/vectorlib.dox in SVN).

See also
http://grass.osgeo.org/grass63/manuals/html63_user/vectorintro.html
-> Vector model and topology

Documentation contributions are MOST welcome.

Markus

On Thu, 2008-01-31 at 09:00 +0200, Maris Nartiss wrote:

I'm sorry to interrupt Your advanced discussion, but if there are just
some "holes" that are required to be converted to polygons, then why
not use v.digit? Simply digitising new centroid inside a hole
(enclosed from other polygon boundaries) will turn hole into polygon.

Yes,

it is simple(r). And there is no need to "save as shapefile" and
re-import in GRASS the modified vector file.

WBR,
Maris.

2008/1/31, Nikos Alexandris <nikos.alexandris@felis.uni-freiburg.de>:
> Hi!
>
> On Wed, 2008-01-30 at 23:52 +0200, David Epstein wrote:
> > Hi Nikos,
> >
> > Thank you for that suggestion. Indeed, I did NOT realize that v.extract
> > was used to create new geometry in a layer. However, I too need some of
> > the islands (is there a technical difference between island, hole, and
> > missing polygon?).
>
> I am not sure!
>
> Would be nice to have a kind of GRASS-GIS lexicon with (basic and
> non-basic) definitions!
>
> * island... I suppose are small poylgons within larger ones
>
> * holes... just "nothing" within larger polygons
>
> * missing polygon... ?
>
> >
> > There is a single missing polygon that I now have attribute data for and
> > I want to create the polygon (from the existing points and lines) and
> > fill-in the related attribute fields.
> >
> > I imagined some sort of interactive process of clicking on the relevant
> > bounding elements and *presto* the polygon would jump into existence. I
> > tried this in v.digit but was not able to get the desired result.
>
> If you just need to quickly correct a small number of polygons try with
> the "fresh-baked" QGIS (r0.9.2.rc1), which works as a GRASS frontend.
>
> 1. you need to add in your /etc/apt/sources.list following source:
> deb http://ppa.launchpad.net/timlinux/ubuntu gutsy main
>
> 2. sudo aptitude update && sudo aptitude upgrade
>
> --- if not already installed... "sudo apt-get install qgis
> qgis-plugin-grass"---
>
> 3. Load GRASS plugin
>
> 4. Open your GRASS mapset within QGIS
>
> 5. Load your vector (polygon) file
>
> 6. Play with the tools... ( I have seen the new digitising tools... must
> be really what you are looking for!) and edit your polygons.
>
> *** You need first to "right click" on your vector layer and "save as
> shapefile" -- Then you can edit.

7. Re-import in GRASS with v.in.ogr

>
>
>
> >
> > This is a really basic step that people do several times a day, right?
> >
> > -david
>
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

--
Nikos Alexandris
.
Department of Remote Sensing & Landscape Information Systems
Faculty of Forestry & Environmental Sciences, Albert-Ludwigs-University Freiburg
.
Tel. +49 (0) 761 203 3697 / Fax. +49 (0) 761 203 3701 / Skype: Nikos.Alexandris
.
Address: Tennenbacher str. 4, D-79106 Freiburg i. Br., Germany

On 30/01/08 18:32, David Epstein wrote:

Also (and this relates to a previous question of mine) if I have
imported a postGIS vector layer via v.in.ogr, does that create a
permanent link so that edits via v.digit are then written back to the
SQL database? Or do I need to somehow tell it to update?

v.in.ogr imports the layer into GRASS as GRASS format, so there is no more link to the geometry elements contained in your postgis table.

You can just link a postgis layer into v.external, but then it is "read-only".

If you want to work directly on the geometry in a PostGIS layer, you will have to use QGIS, uDig or gvSIG.

Moritz

On Jan 31, 2008 12:51 AM, Nikos Alexandris
<nikos.alexandris@felis.uni-freiburg.de> wrote:

On Wed, 2008-01-30 at 23:52 +0200, David Epstein wrote:
> ... (is there a technical difference between island, hole, and missing polygon?).

Would be nice to have a kind of GRASS-GIS lexicon with (basic and
non-basic) definitions!

Is there a universal definition of a vector island? Or is an island solely
dependent on the context in which it is found?

Documentation contributions are MOST welcome.

+1

~ Eric.