[GRASS-user] overlapping areas seem valid to v.build: why?

Back again with my topological questions :slight_smile:

Two overlapping polygons were imported without cleaning them (-c option in v.in.ogr).
The result are two overlapping areas, correctly built from two overlapping boundaries and their centroids.
If I run v.build to output topological errors, the output is empty. I deduce that the overlapping areas are topologically correct, but the GRASS topological model states that two boundaries should not overlap.

Question: Is the should proposition a suggestions or a rule to state boundary/area validity? From my simple test, it seems that the two areas overlap but yet they’re correctly built (level = 2).

thanks,
giovanni

G. Allegri wrote:

Back again with my topological questions :slight_smile:

Two overlapping polygons were imported without cleaning them (-c option in
v.in.ogr).
The result are two overlapping areas, correctly built from two overlapping
boundaries and their centroids.
If I run v.build to output topological errors, the output is empty. I deduce
that the overlapping areas are topologically correct, but the GRASS
topological model states that two boundaries *should* not overlap.

Question: Is the *should* proposition a suggestions or a rule to state
boundary/area validity? From my simple test, it seems that the two areas
overlap but yet they're correctly built (level = 2).

In some cases, overlapping polygons can be converted to a valid grass
vector, e.g. Landsat tiles (WRS2 coverage). The conditions are that
polygons are only partially overlapping, each polygon has a part that
does not overlap with any other polygon, the centroids are located in
that non-overlapping part, boundaries are not broken at intersections,
and it helps if nodes of boundaries are not not shared with nodes of
boundaries of other areas.

Nevertheless, even though these areas can be maintained in GRASS,
these areas are per definition topologically not clean.

Markus M

thanks,
giovanni

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

Mmm, sorry but I don’t understand it.

The topological correctness (in a general meaning, beyond GRASS) states that two polygons cannot overlap.
GRASS topological model admits overlapping areas (the build tool doesn’t complaint), but some modules produce wrong results with these areas. E.g., v.rast.stats collects data as if one of the areas were clipped and not overlapping. I can explain it better, but it was just an example where GRASS model admits a not clean area, but it silently fails…
So, GRASS is a bit “fuzzy” (should is an arbitrary proposition)… I comment between your answer rows:

In some cases, overlapping polygons can be converted to a valid grass
vector, e.g. Landsat tiles (WRS2 coverage). The conditions are that
polygons are only partially overlapping, each polygon has a part that
does not overlap with any other polygon, the centroids are located in
that non-overlapping part, boundaries are not broken at intersections,
and it helps if nodes of boundaries are not not shared with nodes of
boundaries of other areas.

Overlapping areas are valid vectors, even if they aren’t topologically correct, right?
You say “partially overlapping”. What does it mean? My three polygons overlap almost entirely (it is a synthetic layer for testing), the centroids are located on the not-overlapping regions (i.e. the overlaps aren’t areas, nor have correctly broken boundaries) and v.build still accept them without errors…
I don’t understand where the rules you’re listing are evaluated (and described).

Nevertheless, even though these areas can be maintained in GRASS,
these areas are per definition topologically not clean.

Ok, this confirms that GRASS model isn’t strictly topological. It suggests to be, to guarantee correct results (see the problem with v.rast.stats).

giovanni

Markus M

thanks,
giovanni


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

G. Allegri wrote:

Mmm, sorry but I don't understand it.
The topological correctness (in a general meaning, beyond GRASS) states that
two polygons *cannot* overlap.
GRASS topological model admits overlapping areas (the build tool doesn't
complaint),

Only in special cases when areas were not cleaned, e.g. v.in.ogr -c.
Using the -c flag is not recommended and assumes that topological
cleaning will take place after import. If you continue working with a
not cleaned vector, you're on your own and GRASS assumes you have good
reasons for working with an unclean vector and that you know what you
are doing.

The build tool does not check for overlapping areas (in topological
terms, missing intersections where two boundaries cross each other),
for that you would need to use v.clean tool=break. Building topology
is a bit costly, therefore v.build (Vect_build()) does not check for
all possible violations, and it is recommended to use v.clean for
actual cleaning.

... but some modules produce wrong results with these areas. E.g.,
v.rast.stats collects data as if one of the areas were clipped and not
overlapping. I can explain it better, but it was just an example where GRASS
model admits a not clean area, but it silently fails...

Not surprising. v.rast.stats assumes non-overlapping areas. I guess
that if two areas overlap, the raster output will get the values from
the area processed last. A single cell can only hold one value.

So, GRASS is a bit "fuzzy" (*should* is an arbitrary proposition)... I
comment between your answer rows:

In some cases, overlapping polygons can be converted to a valid grass
vector, e.g. Landsat tiles (WRS2 coverage). The conditions are that
polygons are only partially overlapping, each polygon has a part that
does not overlap with any other polygon, the centroids are located in
that non-overlapping part, boundaries are not broken at intersections,
and it helps if nodes of boundaries are not not shared with nodes of
boundaries of other areas.

Overlapping areas *are* valid vectors, even if they aren't topologically
correct, right?

Overlapping areas are valid non-topological vectors and invalid
topological vectors, I would say.

You say "partially overlapping". What does it mean? My three polygons
overlap almost entirely (it is a synthetic layer for testing), the centroids
are located on the not-overlapping regions (i.e. the overlaps aren't areas,
nor have correctly broken boundaries) and v.build still accept them without
errors...

Almost entirely is not entirely, thus partially :wink:

I don't understand where the rules you're listing are evaluated (and
described).

These rules are my understanding of the GRASS vector library and what
GRASS modules assume when processing vectors.

Nevertheless, even though these areas can be maintained in GRASS,
these areas are per definition topologically not clean.

Yes.

Ok, this confirms that GRASS model isn't strictly topological. It suggests
to be, to guarantee correct results (see the problem with v.rast.stats).

Well, you forced a topologically incorrect sample vector into GRASS,
overriding default settings and skipping the topological cleaning
step. If you did not do topological cleaning, you can not be assured
that the result is topologically clean.

In the case of your test vector, GRASS would be strictly topological
if v.in.ogr would not have the -c flag. Non-topological vectors (e.g.
anything coming from OGR) must be cleaned, otherwise the results is
not guaranteed to be topologically clean... The GRASS model is indeed
strictly topological for areas, but that means that non-topological
polygons must be converted to areas the way v.in.ogr does. Areas are
always constructed assuming topologically correct boundaries.

It seems to me that the confusion arises because you made use of
features that allow you to skip topological cleaning which is not the
default and not recommended.

Markus M

On 30/11/11 14:38, Markus Metz wrote:

It seems to me that the confusion arises because you made use of
features that allow you to skip topological cleaning which is not the
default and not recommended.

Maybe this calls for a v.check.topology module ? Or an option in v.build or v.clean which does that (i.e. just check, not clean) ?

Moritz

I forced the -c flag to understand the side effects of doing it :wink:
It’s a common question in GRASS courses, where people get stuck when I introduce the topology and their mind go to the mass of unclean data they have :slight_smile:

Things are clearer now to me. I was only confused by the fact that my valid not-topologically clean areas were given a LEVEL=2 structure, i.e. a topology was built anyway. But it’s not clean.
Conclusion: a vector topology doesn’t need to be clean to exist.

giovanni

2011/11/30 Markus Metz <markus.metz.giswork@googlemail.com>

G. Allegri wrote:

Mmm, sorry but I don’t understand it.
The topological correctness (in a general meaning, beyond GRASS) states that
two polygons cannot overlap.
GRASS topological model admits overlapping areas (the build tool doesn’t
complaint),

Only in special cases when areas were not cleaned, e.g. v.in.ogr -c.
Using the -c flag is not recommended and assumes that topological
cleaning will take place after import. If you continue working with a
not cleaned vector, you’re on your own and GRASS assumes you have good
reasons for working with an unclean vector and that you know what you
are doing.

The build tool does not check for overlapping areas (in topological
terms, missing intersections where two boundaries cross each other),
for that you would need to use v.clean tool=break. Building topology
is a bit costly, therefore v.build (Vect_build()) does not check for
all possible violations, and it is recommended to use v.clean for
actual cleaning.

… but some modules produce wrong results with these areas. E.g.,

v.rast.stats collects data as if one of the areas were clipped and not
overlapping. I can explain it better, but it was just an example where GRASS
model admits a not clean area, but it silently fails…

Not surprising. v.rast.stats assumes non-overlapping areas. I guess
that if two areas overlap, the raster output will get the values from
the area processed last. A single cell can only hold one value.

So, GRASS is a bit “fuzzy” (should is an arbitrary proposition)… I
comment between your answer rows:

In some cases, overlapping polygons can be converted to a valid grass
vector, e.g. Landsat tiles (WRS2 coverage). The conditions are that
polygons are only partially overlapping, each polygon has a part that
does not overlap with any other polygon, the centroids are located in
that non-overlapping part, boundaries are not broken at intersections,
and it helps if nodes of boundaries are not not shared with nodes of
boundaries of other areas.

Overlapping areas are valid vectors, even if they aren’t topologically
correct, right?

Overlapping areas are valid non-topological vectors and invalid
topological vectors, I would say.

You say “partially overlapping”. What does it mean? My three polygons
overlap almost entirely (it is a synthetic layer for testing), the centroids
are located on the not-overlapping regions (i.e. the overlaps aren’t areas,
nor have correctly broken boundaries) and v.build still accept them without
errors…

Almost entirely is not entirely, thus partially :wink:

I don’t understand where the rules you’re listing are evaluated (and
described).

These rules are my understanding of the GRASS vector library and what
GRASS modules assume when processing vectors.

Nevertheless, even though these areas can be maintained in GRASS,
these areas are per definition topologically not clean.

Yes.

Ok, this confirms that GRASS model isn’t strictly topological. It suggests
to be, to guarantee correct results (see the problem with v.rast.stats).

Well, you forced a topologically incorrect sample vector into GRASS,
overriding default settings and skipping the topological cleaning
step. If you did not do topological cleaning, you can not be assured
that the result is topologically clean.

In the case of your test vector, GRASS would be strictly topological
if v.in.ogr would not have the -c flag. Non-topological vectors (e.g.
anything coming from OGR) must be cleaned, otherwise the results is
not guaranteed to be topologically clean… The GRASS model is indeed
strictly topological for areas, but that means that non-topological
polygons must be converted to areas the way v.in.ogr does. Areas are
always constructed assuming topologically correct boundaries.

It seems to me that the confusion arises because you made use of
features that allow you to skip topological cleaning which is not the
default and not recommended.

Markus M

Moritz Lennert wrote:

On 30/11/11 14:38, Markus Metz wrote:

It seems to me that the confusion arises because you made use of
features that allow you to skip topological cleaning which is not the
default and not recommended.

Maybe this calls for a v.check.topology module ? Or an option in v.build or
v.clean which does that (i.e. just check, not clean) ?

Good idea. I would opt for a new option/flag for v.build, which can
already provide rather detailed diagnostics, e.g. dumping topology.
Something like v.build -e for extended topology checks?

Markus M

By the way, it seems that the official stance is that it is preferred to allow the automatic cleaning of non-topological data sets when they are imported. However, I do want to point out that I have seen many, many instances where this auto-cleaning actually causes problems, rather than fixes them. As a result, I explicitly exclude cleaning on every import I do. If cleaning is required, I manually clean the data with v.clean. In many cases only a subset of the full set of cleaning operations performed automatically by v.in.ogr are needed to fix the data. Personally, I do not think this “auto cleaning” should ever have been made the default operation of the import tool.

On Wed, Nov 30, 2011 at 9:37 AM, Markus Metz <markus.metz.giswork@googlemail.com> wrote:

Moritz Lennert wrote:

On 30/11/11 14:38, Markus Metz wrote:

It seems to me that the confusion arises because you made use of
features that allow you to skip topological cleaning which is not the
default and not recommended.

Maybe this calls for a v.check.topology module ? Or an option in v.build or
v.clean which does that (i.e. just check, not clean) ?

Good idea. I would opt for a new option/flag for v.build, which can
already provide rather detailed diagnostics, e.g. dumping topology.
Something like v.build -e for extended topology checks?

Markus M


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

On 30/11/11 18:37, Markus Metz wrote:

Moritz Lennert wrote:

On 30/11/11 14:38, Markus Metz wrote:

It seems to me that the confusion arises because you made use of
features that allow you to skip topological cleaning which is not the
default and not recommended.

Maybe this calls for a v.check.topology module ? Or an option in v.build or
v.clean which does that (i.e. just check, not clean) ?

Good idea. I would opt for a new option/flag for v.build, which can
already provide rather detailed diagnostics, e.g. dumping topology.
Something like v.build -e for extended topology checks?

+1

Now the question is: which checks should be performed ?

Moritz

Roger André wrote:

By the way, it seems that the official stance is that it is preferred to
allow the automatic cleaning of non-topological data sets when they are
imported. However, I do want to point out that I have seen many, many
instances where this auto-cleaning actually causes problems, rather than
fixes them. As a result, I explicitly exclude cleaning on every import I
do.

I would prefer to get this fixed instead of not cleaning during
import. Can you provide sample data for testing?

If cleaning is required, I manually clean the data with v.clean.

v.clean can not exactly repeat the cleaning done by v.in.ogr.

In
many cases only a subset of the full set of cleaning operations performed
automatically by v.in.ogr are needed to fix the data.

That's right, but there is no way to know this a priori. Checking
would be as costly as actual cleaning.

Markus M

Personally, I do not
think this "auto cleaning" should ever have been made the default operation
of the import tool.
--

On Wed, Nov 30, 2011 at 9:37 AM, Markus Metz
<markus.metz.giswork@googlemail.com> wrote:

Moritz Lennert wrote:
> On 30/11/11 14:38, Markus Metz wrote:
>>
>> It seems to me that the confusion arises because you made use of
>> features that allow you to skip topological cleaning which is not the
>> default and not recommended.
>
>
> Maybe this calls for a v.check.topology module ? Or an option in v.build
> or
> v.clean which does that (i.e. just check, not clean) ?

Good idea. I would opt for a new option/flag for v.build, which can
already provide rather detailed diagnostics, e.g. dumping topology.
Something like v.build -e for extended topology checks?

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

Moritz Lennert wrote:

On 30/11/11 18:37, Markus Metz wrote:

Moritz Lennert wrote:

On 30/11/11 14:38, Markus Metz wrote:

It seems to me that the confusion arises because you made use of
features that allow you to skip topological cleaning which is not the
default and not recommended.

Maybe this calls for a v.check.topology module ? Or an option in v.build
or
v.clean which does that (i.e. just check, not clean) ?

Good idea. I would opt for a new option/flag for v.build, which can
already provide rather detailed diagnostics, e.g. dumping topology.
Something like v.build -e for extended topology checks?

+1

Now the question is: which checks should be performed ?

Existing checks report the number of incorrect boundaries, duplicate
centroids and centroids outside areas. These are quick and easy to
catch.

I would suggest to add new checks
* for intersecting boundaries indicating duplicate boundaries and/or
overlapping areas
* for boundaries and lines of zero length (not sure how much harm
zero length boundaries do but it's safer to have them removed)
* for areas without centroids that are not holes. Areas without
centroids that are not holes are topologically correct but do not make
sense logically.

There are probably special cases not captured with all these checks,
but additional checks could be added later on.

Markus M

Pardon my ignorance,
how is possible to distinguish areas without centroids from holes?
And why it doesn't make sense?

Maris,
just finished converting and cleaning CAD (spaghetti) lines + points
to valid areas.

2011/12/2 Markus Metz <markus.metz.giswork@googlemail.com>:

* for areas without centroids that are not holes. Areas without
centroids that are not holes are topologically correct but do not make
sense logically.

On Fri, Dec 2, 2011 at 12:43 PM, Maris Nartiss <maris.gis@gmail.com> wrote:

Pardon my ignorance,
how is possible to distinguish areas without centroids from holes?
And why it doesn't make sense?

A hole is a nothing in a something. If there is no something all
around the hole there is no hole. IOW, an area without a centroid is a
hole if it is completely surrounded by other areas with centroids,
otherwise that area is not a hole because it shares one or more
boundaries with the outer void. This does not make sense logically
because then there are two indistinguishable voids bordering each
other. These two voids can just as well be combined into one, lest
there is something special about one of the two voids, but that you
could only tell if there is a centroid in one void, rendering it
non-void.

Markus M

Maris,
just finished converting and cleaning CAD (spaghetti) lines + points
to valid areas.

2011/12/2 Markus Metz <markus.metz.giswork@googlemail.com>:

* for areas without centroids that are not holes. Areas without
centroids that are not holes are topologically correct but do not make
sense logically.

Hello,
that makes sense.

Might I suggest to take a look at JTS Topology Suite Technical
Specifications fig. 6 that seems to display most common issues that
could be eliminated with GRASS cleaning tools too.

Maris.

2011/12/2 Markus Metz <markus.metz.giswork@googlemail.com>:

On Fri, Dec 2, 2011 at 12:43 PM, Maris Nartiss <maris.gis@gmail.com> wrote:

Pardon my ignorance,
how is possible to distinguish areas without centroids from holes?
And why it doesn't make sense?

A hole is a nothing in a something. If there is no something all
around the hole there is no hole. IOW, an area without a centroid is a
hole if it is completely surrounded by other areas with centroids,
otherwise that area is not a hole because it shares one or more
boundaries with the outer void. This does not make sense logically
because then there are two indistinguishable voids bordering each
other. These two voids can just as well be combined into one, lest
there is something special about one of the two voids, but that you
could only tell if there is a centroid in one void, rendering it
non-void.

Markus M

Maris,
just finished converting and cleaning CAD (spaghetti) lines + points
to valid areas.

2011/12/2 Markus Metz <markus.metz.giswork@googlemail.com>:

* for areas without centroids that are not holes. Areas without
centroids that are not holes are topologically correct but do not make
sense logically.

On Fri, Dec 2, 2011 at 1:15 PM, Maris Nartiss <maris.gis@gmail.com> wrote:

Hello,
that makes sense.

Might I suggest to take a look at JTS Topology Suite Technical
Specifications fig. 6 that seems to display most common issues that
could be eliminated with GRASS cleaning tools too.

Thanks for the suggestion! Fig. 6 shows what I tried to explain, and some more.

Markus M

Maris.

2011/12/2 Markus Metz <markus.metz.giswork@googlemail.com>:

On Fri, Dec 2, 2011 at 12:43 PM, Maris Nartiss <maris.gis@gmail.com> wrote:

Pardon my ignorance,
how is possible to distinguish areas without centroids from holes?
And why it doesn't make sense?

A hole is a nothing in a something. If there is no something all
around the hole there is no hole. IOW, an area without a centroid is a
hole if it is completely surrounded by other areas with centroids,
otherwise that area is not a hole because it shares one or more
boundaries with the outer void. This does not make sense logically
because then there are two indistinguishable voids bordering each
other. These two voids can just as well be combined into one, lest
there is something special about one of the two voids, but that you
could only tell if there is a centroid in one void, rendering it
non-void.

Markus M

Maris,
just finished converting and cleaning CAD (spaghetti) lines + points
to valid areas.

2011/12/2 Markus Metz <markus.metz.giswork@googlemail.com>:

* for areas without centroids that are not holes. Areas without
centroids that are not holes are topologically correct but do not make
sense logically.

Hi Markus,

My responses are inline.

I would prefer to get this fixed instead of not cleaning during
import. Can you provide sample data for testing?

Why spend time fixing this, unless you intend to eliminate the “-c” flag altogether? It’s not broken as far as I’m concerned. Mentally I view the current “-c” functionality as the correct default mode of operation for v.in.ogr, with the automated cleaning as the optional feature. Since it is an option (as far as I am concerned mentally), the fact that it sometimes doesn’t work is not a problem. When I come across another data set that fails on auto-cleaning, but which can be repaired manually, I will make the data and my workflow available. I’m processing quite a bit of data at the moment, and can’t remember which set of polygons had this problem. There were several and once I came up with a solution that accomplished what I needed I moved on.

v.clean can not exactly repeat the cleaning done by v.in.ogr.

People keep saying that, but no one ever explains how they differ. Can someone please do that? Once that is identified, then my suggestion would be to spend the development time on making that functionality available in v.clean, rather than making changes to the existing auto-clean logic of v.in.ogr.

That’s right, but there is no way to know this a priori. Checking
would be as costly as actual cleaning.

Which is why I skip the automated cleaning. I don’t need a black box to try to figure out what needs to be done. I appreciate that the cleaning option is available and sometimes I use it. Many times it works well. Other times the cost of allowing all of those tools to run (many of which are unnecessary) is simply unacceptable.

By the way, from some of the comments I’ve seen on the GRASS Dev list in response to this, it seems to be a much more contentious issue than it needs to be. No one, least of all me, is arguing against the beauty of GRASS’s topological data model. For me it is the only reason I use GRASS. It allows me to clean many of the really, really dirty sets of shapefile data that I receive from commercial vendors. However, there also seems to be a strong expressed bias against other GIS systems which use a simple geometry model. Please don’t allow discussions on technical functionality to devolve into this. GRASS is not the only solution out there and tools like v.in.ogr are a great example of the foresight and thoughtfulness of the GRASS dev team in accommodating the interaction with these other systems. When I read something like, “Well if you don’t care about the quality of your data, go use another GIS system.” I then seriously consider looking at the new PostGIS topological model, for example, for reasons that have NOTHING to do with the technical capability of either system.

Thanks for all your hard work and commitment to this project,

Roger

Markus M

Personally, I do not
think this “auto cleaning” should ever have been made the default operation
of the import tool.

On Wed, Nov 30, 2011 at 9:37 AM, Markus Metz
<markus.metz.giswork@googlemail.com> wrote:

Moritz Lennert wrote:

On 30/11/11 14:38, Markus Metz wrote:

It seems to me that the confusion arises because you made use of
features that allow you to skip topological cleaning which is not the
default and not recommended.

Maybe this calls for a v.check.topology module ? Or an option in v.build
or
v.clean which does that (i.e. just check, not clean) ?

Good idea. I would opt for a new option/flag for v.build, which can
already provide rather detailed diagnostics, e.g. dumping topology.
Something like v.build -e for extended topology checks?

Markus M


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

be a strong expressed bias against other GIS systems which use a simple
geometry model.

It was certainly not my intention to suggest that GRASS
is the only "proper" GIS.

Different GIS have different design philosophies.
Thus, they fit different use cases. I myself use
more than one.

Please don't allow discussions on technical
functionality to devolve into this.

You asked for opinions on a topic that goes well
beyond the technicalities of "v.in.ogr".
Please see my notes further down.

When I read something like, "Well if you don't care about the
quality of your data, go use another GIS system." I then seriously
consider looking at the new PostGIS topological model, for example, for reasons
that have NOTHING to do with the technical capability of either system.

Having been part of the GRASS development team for a long time
now, and having spent some time on improving v.in.ogr/v.out.ogr
myself in the past, allow me to sum up:

Without topological correctness (according to the GRASS
data model, not PostGIS' or anybody else's), options for processing
polygonal data in GRASS are severely limited. And it will
not be possible to correctly manage complex polygons with
islands/holes in them. Thus the man page for "v.in.ogr" states:

-c
    Do not clean polygons (not recommended)

So in fact you are asking for a modification to one of the most
frequently used modules in GRASS that will *revert* the
default behavior on which a lot of users (including myself) and
shell scripts written by users to automate data analysis have
come to rely.

Using data with unchecked topology is possible via "v.external".
This module builds a pseudo topology that may be good enough in
many cases. It works particularly well in GRASS 7.

Thanks for all your hard work and commitment to this project,

You are welcome. Thanks for your input.

Best,

Ben

Roger
--

> Markus M
>
> > Personally, I do not
> > think this "auto cleaning" should ever have been made the default
> operation
> > of the import tool.
> > --
> >
> >
> > On Wed, Nov 30, 2011 at 9:37 AM, Markus Metz
> > <markus.metz.giswork@googlemail.com> wrote:
> >>
> >> Moritz Lennert wrote:
> >> > On 30/11/11 14:38, Markus Metz wrote:
> >> >>
> >> >> It seems to me that the confusion arises because you made use of
> >> >> features that allow you to skip topological cleaning which is not the
> >> >> default and not recommended.
> >> >
> >> >
> >> > Maybe this calls for a v.check.topology module ? Or an option in
> v.build
> >> > or
> >> > v.clean which does that (i.e. just check, not clean) ?
> >>
> >> Good idea. I would opt for a new option/flag for v.build, which can
> >> already provide rather detailed diagnostics, e.g. dumping topology.
> >> Something like v.build -e for extended topology checks?
> >>
> >> Markus M
> >> _______________________________________________
> >> grass-user mailing list
> >> grass-user@lists.osgeo.org
> >> http://lists.osgeo.org/mailman/listinfo/grass-user
> >
> >
>

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

Benjamin Ducke wrote:

Using data with unchecked topology is possible via "v.external".
This module builds a pseudo topology that may be good enough in
many cases. It works particularly well in GRASS 7.

Good point. In this case we could remove the -c flag for v.in.ogr in
trunk and always convert simple feature polygons to topological areas.
Supporting arguments would be that compared to GRASS 6, topology in
GRASS 7 is more robust, uses less resources, cleaning functions are
often faster, also use less resources, and vector topology including
cleaning functions is according to the bug tracker bug-free, AFAICT.

Markus M

Thanks for all your hard work and commitment to this project,

You are welcome. Thanks for your input.

Best,

Ben

Roger
--

> Markus M
>
> > Personally, I do not
> > think this "auto cleaning" should ever have been made the default
> operation
> > of the import tool.
> > --
> >
> >
> > On Wed, Nov 30, 2011 at 9:37 AM, Markus Metz
> > <markus.metz.giswork@googlemail.com> wrote:
> >>
> >> Moritz Lennert wrote:
> >> > On 30/11/11 14:38, Markus Metz wrote:
> >> >>
> >> >> It seems to me that the confusion arises because you made use of
> >> >> features that allow you to skip topological cleaning which is not the
> >> >> default and not recommended.
> >> >
> >> >
> >> > Maybe this calls for a v.check.topology module ? Or an option in
> v.build
> >> > or
> >> > v.clean which does that (i.e. just check, not clean) ?
> >>
> >> Good idea. I would opt for a new option/flag for v.build, which can
> >> already provide rather detailed diagnostics, e.g. dumping topology.
> >> Something like v.build -e for extended topology checks?
> >>
> >> Markus M
> >> _______________________________________________
> >> grass-user mailing list
> >> grass-user@lists.osgeo.org
> >> http://lists.osgeo.org/mailman/listinfo/grass-user
> >
> >
>

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

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

Hi Roger,

I know you want to stop the discussion, just some last remarks,
including some for my motivation why I think topological cleaning
during import is absolutely necessary.

Roger André wrote:

Hi Markus,

My responses are inline.

I would prefer to get this fixed instead of not cleaning during
import. Can you provide sample data for testing?

Why spend time *fixing* this, unless you intend to eliminate the "-c" flag
altogether?

Because 1) import modules *must* work and produce healthy output which
for v.in.ogr means converting polygons to topological areas, 2) users
must be able to rely on the proper functioning of the default
behaviour (which includes topological cleaning for v.in.ogr) 1) I do
intend to eliminate the -c flag altogether (no topology-related bugs
reported in the bug tracker).

It's not broken as far as I'm concerned. Mentally I view the
current "-c" functionality as the correct default mode of operation for
v.in.ogr, with the automated cleaning as the optional feature. Since it is
an option (as far as I am concerned mentally), the fact that it sometimes
doesn't work is not a problem. When I come across another data set that
fails on auto-cleaning, but which can be repaired manually, I will make the
data and my workflow available.

That would be great! I sort of collect difficult datasets, but do not
have one that makes v.in.ogr in GRASS 7 fail. An exception is the
import of several large layers at once and storing them in one single
GRASS vector, that may exceed hardware resources (although GRASS 7
performs magnitudes better in this regard than GRASS 6).

Markus M

v.clean can not exactly repeat the cleaning done by v.in.ogr.

People keep saying that, but no one ever explains how they differ. Can
someone please do that? Once that is identified, then my suggestion would
be to spend the development time on making that functionality available in
v.clean, rather than making changes to the existing auto-clean logic of
v.in.ogr.

That's right, but there is no way to know this a priori. Checking
would be as costly as actual cleaning.

Which is why I skip the automated cleaning. I don't need a black box to try
to figure out what needs to be done. I appreciate that the cleaning option
is available and sometimes I use it. Many times it works well. Other times
the cost of allowing all of those tools to run (many of which are
unnecessary) is simply unacceptable.

By the way, from some of the comments I've seen on the GRASS Dev list in
response to this, it seems to be a much more contentious issue than it needs
to be. No one, least of all me, is arguing against the beauty of GRASS's
topological data model. For me it is the only reason I use GRASS. It
allows me to clean many of the really, really dirty sets of shapefile data
that I receive from commercial vendors. However, there also seems to be a
strong expressed bias against other GIS systems which use a simple geometry
model. Please don't allow discussions on technical functionality to devolve
into this. GRASS is not the only solution out there and tools like v.in.ogr
are a great example of the foresight and thoughtfulness of the GRASS dev
team in accommodating the interaction with these other systems. When I read
something like, "Well if you don't care about the quality of your data, go
use another GIS system." I then seriously consider looking at the new
PostGIS topological model, for example, for reasons that have NOTHING to do
with the technical capability of either system.

Thanks for all your hard work and commitment to this project,

Roger
--

Markus M

> Personally, I do not
> think this "auto cleaning" should ever have been made the default
> operation
> of the import tool.
> --
>
>
> On Wed, Nov 30, 2011 at 9:37 AM, Markus Metz
> <markus.metz.giswork@googlemail.com> wrote:
>>
>> Moritz Lennert wrote:
>> > On 30/11/11 14:38, Markus Metz wrote:
>> >>
>> >> It seems to me that the confusion arises because you made use of
>> >> features that allow you to skip topological cleaning which is not
>> >> the
>> >> default and not recommended.
>> >
>> >
>> > Maybe this calls for a v.check.topology module ? Or an option in
>> > v.build
>> > or
>> > v.clean which does that (i.e. just check, not clean) ?
>>
>> Good idea. I would opt for a new option/flag for v.build, which can
>> already provide rather detailed diagnostics, e.g. dumping topology.
>> Something like v.build -e for extended topology checks?
>>
>> Markus M
>> _______________________________________________
>> grass-user mailing list
>> grass-user@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/grass-user
>
>

+1

If we remove -c, we can also get rid of the confusing
separate topology build paths (one default and one
for "-c") in the v.in.ogr source code.

In addition, polygon cleaning in v.in.ogr is based on
the original information in the unmodified OGR data
source. It seems to me that this is the one point in
the processing chain at which topologically correct
areas can be produced with maximum accuracy. A later
run of v.clean will not have access to the original
data structures in the OGR data source and might thus
produce less good results (I think this point has been
raised before).

So from a user point of view, getting rid of "-c" in
GRASS 7 would remove another source of uncertainty.

Ben

--
Benjamin Ducke
{*} Geospatial Consultant
{*} GIS Developer
  
  benducke AT fastmail.fm

On Saturday, December 03, 2011 4:03 PM, "Markus Metz"
<markus.metz.giswork@googlemail.com> wrote:

Benjamin Ducke wrote:
>
> Using data with unchecked topology is possible via "v.external".
> This module builds a pseudo topology that may be good enough in
> many cases. It works particularly well in GRASS 7.

Good point. In this case we could remove the -c flag for v.in.ogr in
trunk and always convert simple feature polygons to topological areas.
Supporting arguments would be that compared to GRASS 6, topology in
GRASS 7 is more robust, uses less resources, cleaning functions are
often faster, also use less resources, and vector topology including
cleaning functions is according to the bug tracker bug-free, AFAICT.

Markus M
>
>>
>> Thanks for all your hard work and commitment to this project,
>
> You are welcome. Thanks for your input.
>
> Best,
>
> Ben
>
>>
>> Roger
>> --
>>
>>
>>
>> > Markus M
>> >
>> > > Personally, I do not
>> > > think this "auto cleaning" should ever have been made the default
>> > operation
>> > > of the import tool.
>> > > --
>> > >
>> > >
>> > > On Wed, Nov 30, 2011 at 9:37 AM, Markus Metz
>> > > <markus.metz.giswork@googlemail.com> wrote:
>> > >>
>> > >> Moritz Lennert wrote:
>> > >> > On 30/11/11 14:38, Markus Metz wrote:
>> > >> >>
>> > >> >> It seems to me that the confusion arises because you made use of
>> > >> >> features that allow you to skip topological cleaning which is not the
>> > >> >> default and not recommended.
>> > >> >
>> > >> >
>> > >> > Maybe this calls for a v.check.topology module ? Or an option in
>> > v.build
>> > >> > or
>> > >> > v.clean which does that (i.e. just check, not clean) ?
>> > >>
>> > >> Good idea. I would opt for a new option/flag for v.build, which can
>> > >> already provide rather detailed diagnostics, e.g. dumping topology.
>> > >> Something like v.build -e for extended topology checks?
>> > >>
>> > >> Markus M
>> > >> _______________________________________________
>> > >> grass-user mailing list
>> > >> grass-user@lists.osgeo.org
>> > >> http://lists.osgeo.org/mailman/listinfo/grass-user
>> > >
>> > >
>> >
>>
>> _______________________________________________
>> grass-user mailing list
>> grass-user@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/grass-user
>>
> _______________________________________________
> grass-user mailing list
> grass-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user