Appending map to another with GRASS 7

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Appending map to another with GRASS 7

simogeo
Hi list,

I experience some difficulties related to v.patch and category / attributes when merging vector maps together.

I've read the following thread : osgeo-org.1560.x6.nabble.com/Appending-a-map-to-another-td5176882.html and proceeded the way Markus dis explained it. FI 'm working with grass70.

Point I :
As Tommaso said (in mentioned thread), I noticed that the v.category option=sum to change the categories   doesn't seem to be needed because grass reclass it automatically. Is this correct ?


Point II

More problematic, opening attributes table, I can see the following cats :

10003 30006 60009 70013 90017 120021

And v.category input=poly_iso option=print layer=1 id=1-50 will return same values

but displaying it on the map shows both boundaries and areas - And retrieving attributes on click will only work on areas. On the image below, I have 3 areas (sometimes it is 2).

Problem

And exporting with v.out.ogr says that features without category were skipped - here 3 (on a total of 6).


I use v.patch in a loop and do as follow :

v.patch -a -e input=network_poly_id${result}_1000m output=${polyName} --overwrite
v.patch -a -e input=network_poly_id${result}_700m output=${polyName} --overwrite
v.patch -a -e input=network_poly_id${result}_300m output=${polyName} --overwrite

Thanks for your help. I'm struggling with that !
Reply | Threaded
Open this post in threaded view
|

Re: Appending map to another with GRASS 7

simogeo
For information, it seems that creating not one but 3 layers make this work correctly :

v.patch -a -e input=network_poly_id${result}_1000m output=${polyName}_1000m --overwrite
v.patch -a -e input=network_poly_id${result}_700m output=${polyName}_700m --overwrite
v.patch -a -e input=network_poly_id${result}_300m output=${polyName}_300m --overwrite

This sound like a bug, no ? I assume that because some polygons have same centroid, GRASS get lost. Could it be the cause ?

Should I report it as bug or not ?
Reply | Threaded
Open this post in threaded view
|

Re: Appending map to another with GRASS 7

Markus Neteler
On Fri, Jun 5, 2015 at 9:22 AM, simogeo <[hidden email]> wrote:
> For information, it seems that creating not one but 3 layers make this work
> correctly :
...
> This sound like a bug, no ? I assume that because some polygons have same
> centroid, GRASS get lost. Could it be the cause ?
>
> Should I report it as bug or not ?

While I am not sure if this a bug, please open a ticket for it along
with an example (ideally for the North Carolina dataset). If related
sample data need to be used in your example, you may export them with
v.pack and attach to the ticket.

Markus
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: Appending map to another with GRASS 7

simogeo
Hi Markus,

Thanks for your reply. Actually,I investigated a bit more and I realized that this is probably because of GRASS topological model.

As you can see, some of my generated polygons overlaps others - and some centroids may be contained into others polygons (on same vector map). I guess, GRASS doesn't like much this situation (could you confirm ?).

Anyway, any precision would be appreciated to understand better.


If you still think it could be a bug. I'll find time for reporting it. Thanks again.




On Sun, Jun 7, 2015 at 10:38 PM, Markus Neteler [via OSGeo.org] <[hidden email]> wrote:
On Fri, Jun 5, 2015 at 9:22 AM, simogeo <[hidden email]> wrote:
> For information, it seems that creating not one but 3 layers make this work
> correctly :
...
> This sound like a bug, no ? I assume that because some polygons have same
> centroid, GRASS get lost. Could it be the cause ?
>
> Should I report it as bug or not ?

While I am not sure if this a bug, please open a ticket for it along
with an example (ideally for the North Carolina dataset). If related
sample data need to be used in your example, you may export them with
v.pack and attach to the ticket.

Markus
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user



If you reply to this email, your message will be added to the discussion below:
http://osgeo-org.1560.x6.nabble.com/Appending-map-to-another-with-GRASS-7-tp5209201p5209651.html
To unsubscribe from Appending map to another with GRASS 7, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Appending map to another with GRASS 7

Markus Neteler
On Mon, Jun 8, 2015 at 10:48 AM, simogeo <[hidden email]> wrote:
> Hi Markus,
>
> Thanks for your reply. Actually,I investigated a bit more and I realized
> that this is probably because of GRASS topological model.
>
> As you can see, some of my generated polygons overlaps others - and some
> centroids may be contained into others polygons (on same vector map). I
> guess, GRASS doesn't like much this situation (could you confirm ?).

Well, it depends on what you need.
In http://osgeo-org.1560.x6.nabble.com/file/n5209201/v.png I don't see
needed overlaps unless the areas are stacked like the towers of
Hanoi...

> Anyway, any precision would be appreciated to understand better.

Here is a simple "landing page"
http://grasswiki.osgeo.org/wiki/Vector_topology

with some intro and which points to various other subtopics.

> If you still think it could be a bug. I'll find time for reporting it.

Honestly, the issue is not yet clear to me. But perhaps you can look
at the material first.

Markus
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: Appending map to another with GRASS 7

simogeo
Markus Neteler wrote
Well, it depends on what you need.
In http://osgeo-org.1560.x6.nabble.com/file/n5209201/v.png I don't see
needed overlaps unless the areas are stacked like the towers of
Hanoi...
Indeed, they are like towers of Hanoi....
The given link below related to Vector topology is explicit enough :

 >> Boundaries should not cross each other (i.e., boundaries which would cross must be split at their intersection to form distict boundaries)

Still, the behavior is a bit strange since on the (top) right of the image, 2 polygons appear to be well-formed - and it should not, as polygons on the (bottom) right side.

I hope I'll have some more opportunities to run my script on other data, I'll be watchful !
Thanks again.