[GRASS-user] Topology built on demand

How can I build a topology in grass with priority order on demand?

I need to build a topology for my Spatial Data Structure. My structure has several sfs layers, but to validate my data I need to build a topology with several classes and according to a priority.

This means that I want to insert my sfs layers into one topology structure in grass on demand.

For instance, first I need to insert vegetation layers and later, insert hydrography layers and so on…

Is it possible to make this on grass?

Hi Luiz,

It either very simple to answer your question or a quite difficult to answer based on the information your provided.

The simple answer would be: Yes, of course this is possible in GRASS, thanks to it\s topological vector model! But that is probably not the answer you are after :wink:

In order to give you suggestions on what to do however, we would need more information on what you actually want to achieve.

Furthermore, I am afraid not everybody is familiar with the terms you use (at least I am not):

What is you “spatial data structure”? Is that a set of thematic shape files? Several land cover types from one land cover dataset?

What are sfs layers?

What do you mean by “on demand” or “hierarchy”? Do you actually want to “snap” your hydrography data (and so on) to the vegetation data?

Is there any (spatial) relation between the layers in your “spatial data structure” at the moment?

Could you provide us with some examples?

Cheers

Stefan

···

How can I build a topology in grass with priority order on demand?

I need to build a topology for my Spatial Data Structure. My structure has several sfs layers, but to validate my data I need to build a topology with several classes and according to a priority.

This means that I want to insert my sfs layers into one topology structure in grass on demand.

For instance, first I need to insert vegetation layers and later, insert hydrography layers and so on…

Is it possible to make this on grass?

Hi Stefan,
Thanks for your answer.
Let me clarify the terms I’ve used.
Our Spatial Data Structure is a set of 382 classes that are separated in 13 categories (e.g hydrography, vegetation and so on…).
Each category has a set of classes. In this email you can see a small extract of the hydrography category.

In the case shown in the picture it is possible to see that objects (features ) of the class called Recife (Reef in english) must be inside the objects (features) of the class Massa_Dagua (Water polygons). The same happens to the class called Ilha (Island in english). It’s objects must be inside the objects from the class Massa_Dagua.

This means that, those classes (reef, island, water polygons) must form one topology. When I edit the reefs I must guarantee that no overlaps will be formed between reefs and water polygons. This means that I need to move together reefs and water polygons vertexes.

We have a QGIS plugin called DSGTools that creates a PostGIS databases according to our structure, but PostGIS topology is still quite slow and I can’t deliver topology tools for my users using it.

This way, I want to append my PostGIS layers into one GRASS topology (importing into GRASS) to be able to edit my vectors according to what is determined in our Spatial Data Documentation (unfortunately it is everything in Portuguese, but if you want, you can take a look on it here http://www.geoportal.eb.mil.br/images/PDF/ET_EDGV_Vs_2_1_3.pdf).

So, this is my problem. I hope you can understand better now.

Thanks in advance!
Regards,
Luiz Claudio.

···

2016-09-22 16:52 GMT-03:00 Blumentrath, Stefan <Stefan.Blumentrath@nina.no>:

Hi Luiz,

It either very simple to answer your question or a quite difficult to answer based on the information your provided.

The simple answer would be: Yes, of course this is possible in GRASS, thanks to it\s topological vector model! But that is probably not the answer you are after :wink:

In order to give you suggestions on what to do however, we would need more information on what you actually want to achieve.

Furthermore, I am afraid not everybody is familiar with the terms you use (at least I am not):

What is you “spatial data structure”? Is that a set of thematic shape files? Several land cover types from one land cover dataset?

What are sfs layers?

What do you mean by “on demand” or “hierarchy”? Do you actually want to “snap” your hydrography data (and so on) to the vegetation data?

Is there any (spatial) relation between the layers in your “spatial data structure” at the moment?

Could you provide us with some examples?

Cheers

Stefan

From: grass-user [mailto:grass-user-bounces@lists.osgeo.org] On Behalf Of Luiz Andrade
Sent: 21. september 2016 14:44
To: grass-user@lists.osgeo.org
Subject: [GRASS-user] Topology built on demand

How can I build a topology in grass with priority order on demand?

I need to build a topology for my Spatial Data Structure. My structure has several sfs layers, but to validate my data I need to build a topology with several classes and according to a priority.

This means that I want to insert my sfs layers into one topology structure in grass on demand.

For instance, first I need to insert vegetation layers and later, insert hydrography layers and so on…

Is it possible to make this on grass?

Hei Luiz,

If I understood correctly, what you are in principle after is a topologically correct landcover map, right? That should not be a problem.

But it would be quite difficult to make sure that a reef area is surrounded by water area. In the topology you could run checks for allowed combinations of neighboring land cover / habitat types (v.to.db and some SQL). But preventing incorrect digitization in this regards will be challenging.

Assuming that your users are familiar with QGIS you might want to have a look at this: https://www.youtube.com/watch?v=AubBmm3kL2E

This video demonstrates editing GRASS vector topology with the QGIS-GRASS-7-plugin.

But Topology comes at a cost. The time required for building the topology increases with the number of features and primitives non-linear…

How many polygons do you have in your map now, and how many do you expect to get…

Kind regards,

Stefan

(attachments)

image001.png

···

Hi Stefan,

Thanks for your answer.

Let me clarify the terms I’ve used.

Our Spatial Data Structure is a set of 382 classes that are separated in 13 categories (e.g hydrography, vegetation and so on…).

Each category has a set of classes. In this email you can see a small extract of the hydrography category.

In the case shown in the picture it is possible to see that objects (features ) of the class called Recife (Reef in english) must be inside the objects (features) of the class Massa_Dagua (Water polygons). The same happens to the class called Ilha (Island in english). It’s objects must be inside the objects from the class Massa_Dagua.

This means that, those classes (reef, island, water polygons) must form one topology. When I edit the reefs I must guarantee that no overlaps will be formed between reefs and water polygons. This means that I need to move together reefs and water polygons vertexes.

We have a QGIS plugin called DSGTools that creates a PostGIS databases according to our structure, but PostGIS topology is still quite slow and I can’t deliver topology tools for my users using it.

This way, I want to append my PostGIS layers into one GRASS topology (importing into GRASS) to be able to edit my vectors according to what is determined in our Spatial Data Documentation (unfortunately it is everything in Portuguese, but if you want, you can take a look on it here http://www.geoportal.eb.mil.br/images/PDF/ET_EDGV_Vs_2_1_3.pdf).

So, this is my problem. I hope you can understand better now.

Thanks in advance!

Regards,

Luiz Claudio.

cid:ii_iteu4kz31_15753be71d895656

2016-09-22 16:52 GMT-03:00 Blumentrath, Stefan <Stefan.Blumentrath@nina.no>:

Hi Luiz,

It either very simple to answer your question or a quite difficult to answer based on the information your provided.

The simple answer would be: Yes, of course this is possible in GRASS, thanks to it\s topological vector model! But that is probably not the answer you are after :wink:

In order to give you suggestions on what to do however, we would need more information on what you actually want to achieve.

Furthermore, I am afraid not everybody is familiar with the terms you use (at least I am not):

What is you “spatial data structure”? Is that a set of thematic shape files? Several land cover types from one land cover dataset?

What are sfs layers?

What do you mean by “on demand” or “hierarchy”? Do you actually want to “snap” your hydrography data (and so on) to the vegetation data?

Is there any (spatial) relation between the layers in your “spatial data structure” at the moment?

Could you provide us with some examples?

Cheers

Stefan

From: grass-user [mailto:grass-user-bounces@lists.osgeo.org] On Behalf Of Luiz Andrade
Sent: 21. september 2016 14:44
To: grass-user@lists.osgeo.org
Subject: [GRASS-user] Topology built on demand

How can I build a topology in grass with priority order on demand?

I need to build a topology for my Spatial Data Structure. My structure has several sfs layers, but to validate my data I need to build a topology with several classes and according to a priority.

This means that I want to insert my sfs layers into one topology structure in grass on demand.

For instance, first I need to insert vegetation layers and later, insert hydrography layers and so on…

Is it possible to make this on grass?

Hi Stefan,
I’ve already seem that video. But in the video, we create the layers into the vector map as we are digitizing.
In my case we produce data in PostGIS databases. This way I need to build the topology after the data is in mine PostGIS server.

I was able to make some tests with this:
v.in.ogr input=“PG:host=localhost dbname=mydata user=postgres password=mypass” layer=vegetation,water,etc output=mytopology

The key was the parameter “layer” passing several of my layers to be imported in one vector map.

Questions with this approach:
1 - Is there a way to import new PostGIS layers into “mytopology” vector map? If yes, how can I do that? The idea is to insert layers as needed into “mythology” vector map.

2 - How is the priority order defined to perform the snap in v.in.ogr? I suppose the priority is in the same order used in the layer parameter (vegetation,water,etc), meaning that the vegetation will be inserted and the water will be snapped to the vegetation and so forth. Is this correct?

3 - When using QGIS to topologically edit the grass layers present in “mytopology” I can only see the modification in the other layers after committing the changes. Is there a way to change that?

Thanks!

Regards,
Luiz Andrade

(attachments)

image001.png

···

2016-09-28 18:12 GMT-03:00 Blumentrath, Stefan <Stefan.Blumentrath@nina.no>:

Hei Luiz,

If I understood correctly, what you are in principle after is a topologically correct landcover map, right? That should not be a problem.

But it would be quite difficult to make sure that a reef area is surrounded by water area. In the topology you could run checks for allowed combinations of neighboring land cover / habitat types (v.to.db and some SQL). But preventing incorrect digitization in this regards will be challenging.

Assuming that your users are familiar with QGIS you might want to have a look at this: https://www.youtube.com/watch?v=AubBmm3kL2E

This video demonstrates editing GRASS vector topology with the QGIS-GRASS-7-plugin.

But Topology comes at a cost. The time required for building the topology increases with the number of features and primitives non-linear…

How many polygons do you have in your map now, and how many do you expect to get…

Kind regards,

Stefan

From: Luiz Andrade [mailto:lcoandrade@gmail.com]
Sent: 22. september 2016 23:16
To: Blumentrath, Stefan <Stefan.Blumentrath@nina.no>
Cc: grass-user@lists.osgeo.org
Subject: Re: [GRASS-user] Topology built on demand

Hi Stefan,

Thanks for your answer.

Let me clarify the terms I’ve used.

Our Spatial Data Structure is a set of 382 classes that are separated in 13 categories (e.g hydrography, vegetation and so on…).

Each category has a set of classes. In this email you can see a small extract of the hydrography category.

In the case shown in the picture it is possible to see that objects (features ) of the class called Recife (Reef in english) must be inside the objects (features) of the class Massa_Dagua (Water polygons). The same happens to the class called Ilha (Island in english). It’s objects must be inside the objects from the class Massa_Dagua.

This means that, those classes (reef, island, water polygons) must form one topology. When I edit the reefs I must guarantee that no overlaps will be formed between reefs and water polygons. This means that I need to move together reefs and water polygons vertexes.

We have a QGIS plugin called DSGTools that creates a PostGIS databases according to our structure, but PostGIS topology is still quite slow and I can’t deliver topology tools for my users using it.

This way, I want to append my PostGIS layers into one GRASS topology (importing into GRASS) to be able to edit my vectors according to what is determined in our Spatial Data Documentation (unfortunately it is everything in Portuguese, but if you want, you can take a look on it here http://www.geoportal.eb.mil.br/images/PDF/ET_EDGV_Vs_2_1_3.pdf).

So, this is my problem. I hope you can understand better now.

Thanks in advance!

Regards,

Luiz Claudio.

cid:ii_iteu4kz31_15753be71d895656

2016-09-22 16:52 GMT-03:00 Blumentrath, Stefan <Stefan.Blumentrath@nina.no>:

Hi Luiz,

It either very simple to answer your question or a quite difficult to answer based on the information your provided.

The simple answer would be: Yes, of course this is possible in GRASS, thanks to it\s topological vector model! But that is probably not the answer you are after :wink:

In order to give you suggestions on what to do however, we would need more information on what you actually want to achieve.

Furthermore, I am afraid not everybody is familiar with the terms you use (at least I am not):

What is you “spatial data structure”? Is that a set of thematic shape files? Several land cover types from one land cover dataset?

What are sfs layers?

What do you mean by “on demand” or “hierarchy”? Do you actually want to “snap” your hydrography data (and so on) to the vegetation data?

Is there any (spatial) relation between the layers in your “spatial data structure” at the moment?

Could you provide us with some examples?

Cheers

Stefan

From: grass-user [mailto:grass-user-bounces@lists.osgeo.org] On Behalf Of Luiz Andrade
Sent: 21. september 2016 14:44
To: grass-user@lists.osgeo.org
Subject: [GRASS-user] Topology built on demand

How can I build a topology in grass with priority order on demand?

I need to build a topology for my Spatial Data Structure. My structure has several sfs layers, but to validate my data I need to build a topology with several classes and according to a priority.

This means that I want to insert my sfs layers into one topology structure in grass on demand.

For instance, first I need to insert vegetation layers and later, insert hydrography layers and so on…

Is it possible to make this on grass?