ftools geometry check

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

ftools geometry check

Borys Jurgiel-2
Hi,

In Spatialite layers, if I digitize a polygon counter-clockwise, the ftools'
geometry validity check says:

Feature $n has incorrect node ordering

Is it intentional, or a bug? It doesn't affect shapefiles.

Cheers,
B.
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: ftools geometry check

a.furieri
On Sun, 31 Oct 2010 14:00:46 +0100, Borys Jurgiel wrote
> Hi,
>
> In Spatialite layers, if I digitize a polygon counter-clockwise, the
> ftools' geometry validity check says:
>
> Feature $n has incorrect node ordering
>
> Is it intentional, or a bug? It doesn't affect shapefiles.
>

Hi Boris,

in OGC-SFS specs there is absolutely no
indication at all concerning the RING's
node ordering (clockwise / counterclockwise).

and this makes full sense, because for OGC
POLYGONs the first RING always is the EXTERIOR
ring, and any other subsequent RING (if present)
has to be interpreted as an INTERIOR ring.

this rule is absolutely clear and unambiguous:
so there is no need at all to enforce a preferred
node-ordering.

AFAIK the nowadays obsolescent SHP format used
a completely different rule:
- the exterior ring has to be clockwise
- any interior ring has to be counterclockwise
- rings relative ordering is not relevant

So I suppose that ftools (incorrectly) checks any
polygon geometry for validity following the
superseded SHP-like rules.

But from the SpatiaLite's own perspective this
makes no sense at all, because node ordering
is absolutely irrelevant in this case.

bye Sandro

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

Re: ftools geometry check

Carson Farmer
Hi all,

I would actually much prefer it if people didn't use the check geometry tool at all :-p It was never really meant to be a long-term tool (I really just created it at the time to be a quick and dirty way to find issues with shapefiles), and I know that Martin and his team have created a much better geometry checker (in C++) that is kicking around somewhere that would be much better suited to most users needs. In actual fact, there is no attempt to follow OGC standards in the ftools geometry validity tool!

@ Martin: What is the status of your geometry checking tool? Is there anyway that this might be incorporated into trunk somehow? I think it would be much better to have something a bit more compliant, stable, and with a few more of the features that have been mentioned in this thread (some of which I think Martin's tool already has).

Regards,

Carson


On 31 October 2010 14:38, <[hidden email]> wrote:
On Sun, 31 Oct 2010 14:00:46 +0100, Borys Jurgiel wrote
> Hi,
>
> In Spatialite layers, if I digitize a polygon counter-clockwise, the
> ftools' geometry validity check says:
>
> Feature $n has incorrect node ordering
>
> Is it intentional, or a bug? It doesn't affect shapefiles.
>

Hi Boris,

in OGC-SFS specs there is absolutely no
indication at all concerning the RING's
node ordering (clockwise / counterclockwise).

and this makes full sense, because for OGC
POLYGONs the first RING always is the EXTERIOR
ring, and any other subsequent RING (if present)
has to be interpreted as an INTERIOR ring.

this rule is absolutely clear and unambiguous:
so there is no need at all to enforce a preferred
node-ordering.

AFAIK the nowadays obsolescent SHP format used
a completely different rule:
- the exterior ring has to be clockwise
- any interior ring has to be counterclockwise
- rings relative ordering is not relevant

So I suppose that ftools (incorrectly) checks any
polygon geometry for validity following the
superseded SHP-like rules.

But from the SpatiaLite's own perspective this
makes no sense at all, because node ordering
is absolutely irrelevant in this case.

bye Sandro




--
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/

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

Re: ftools geometry check

Borys Jurgiel-2

[hidden email]:

> So I suppose that ftools (incorrectly) checks any

> polygon geometry for validity following the

> superseded SHP-like rules.

Oh, I see! So no matter how I digitize the shapefile, it's always saved with the right direction so no error occures. Good to know that I can't force it's direction.


Carson Farmer:

> Hi all,

>

> I would actually much prefer it if people didn't use the check geometry

> tool at all :-p It was never really meant to be a long-term tool (I really

> just created it at the time to be a quick and dirty way to find issues

> with shapefiles), and I know that Martin and his team have created a much

> better geometry checker (in C++) that is kicking around somewhere that

> would be much better suited to most users needs. In actual fact, there is

> no attempt to follow OGC standards in the ftools geometry validity tool!

It's absolutely necessary functionality, so I'm looking forward to see the Martin's tool!


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

Re: ftools geometry check

Jürgen E. Fischer
In reply to this post by Carson Farmer
Hi Carson,

On Sun, 31. Oct 2010 at 15:15:23 +0000, Carson Farmer wrote:

>    I would actually much prefer it if people didn't use the check geometry
>    tool at all :-p It was never really meant to be a long-term tool (I really
>    just created it at the time to be a quick and dirty way to find issues
>    with shapefiles), and I know that Martin and his team have created a much
>    better geometry checker (in C++) that is kicking around somewhere that
>    would be much better suited to most users needs. In actual fact, there is
>    no attempt to follow OGC standards in the ftools geometry validity tool!
>    @ Martin: What is the status of your geometry checking tool? Is there
>    anyway that this might be incorporated into trunk somehow? I think it
>    would be much better to have something a bit more compliant, stable, and
>    with a few more of the features that have been mentioned in this thread
>    (some of which I think Martin's tool already has).

Hm, then we have three.  I made QgsGeometry::validateGeometry(), when I needed
to fix a bunch of polygons and found that the node tool refused to edit broken
geometry at all.


Jürgen

--
Jürgen E. Fischer         norBIT GmbH               Tel. +49-4931-918175-20
Dipl.-Inf. (FH)           Rheinstraße 13            Fax. +49-4931-918175-50
Software Engineer         D-26506 Norden               http://www.norbit.de

--
norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
Rheinstrasse 13, 26506 Norden
GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502

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

Re: ftools geometry check

Carson Farmer


On 31 October 2010 16:04, Jürgen E. <[hidden email]> wrote:
Hi Carson,

On Sun, 31. Oct 2010 at 15:15:23 +0000, Carson Farmer wrote:
>    I would actually much prefer it if people didn't use the check geometry
>    tool at all :-p It was never really meant to be a long-term tool (I really
>    just created it at the time to be a quick and dirty way to find issues
>    with shapefiles), and I know that Martin and his team have created a much
>    better geometry checker (in C++) that is kicking around somewhere that
>    would be much better suited to most users needs. In actual fact, there is
>    no attempt to follow OGC standards in the ftools geometry validity tool!
>    @ Martin: What is the status of your geometry checking tool? Is there
>    anyway that this might be incorporated into trunk somehow? I think it
>    would be much better to have something a bit more compliant, stable, and
>    with a few more of the features that have been mentioned in this thread
>    (some of which I think Martin's tool already has).

Hm, then we have three.  I made QgsGeometry::validateGeometry(), when I needed
to fix a bunch of polygons and found that the node tool refused to edit broken
geometry at all.
Hmm, ok, didn't notice this change. I'll have a look, and see if I can update the geometry validity tool to use this functionality. Thanks for the info Jürgen! Shouldn't be too hard to use this function, plus add some of the suggested features to make the tool a bit more useful.

Carson

--
Jürgen E. Fischer         norBIT GmbH               Tel. +49-4931-918175-20
Dipl.-Inf. (FH)           Rheinstraße 13            Fax. +49-4931-918175-50
Software Engineer         D-26506 Norden               http://www.norbit.de

--
norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
Rheinstrasse 13, 26506 Norden
GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502

_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer



--
Carson J. Q. Farmer
ISSP Doctoral Fellow
National Centre for Geocomputation
National University of Ireland, Maynooth,
http://www.carsonfarmer.com/

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

Re: ftools geometry check

Jürgen E. Fischer
In reply to this post by Jürgen E. Fischer
Hi,

On Sun, 31. Oct 2010 at 17:04:54 +0100, Jürgen E. Fischer wrote:
> Hm, then we have three.  I made QgsGeometry::validateGeometry(), when I needed
> to fix a bunch of polygons and found that the node tool refused to edit broken
> geometry at all.

SEE ALSO: https://trac.osgeo.org/qgis/changeset/12830


Jürgen

--
Jürgen E. Fischer         norBIT GmbH               Tel. +49-4931-918175-20
Dipl.-Inf. (FH)           Rheinstraße 13            Fax. +49-4931-918175-50
Software Engineer         D-26506 Norden               http://www.norbit.de

--
norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
Rheinstrasse 13, 26506 Norden
GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502

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

Re: ftools geometry check

Martin Dobias
In reply to this post by Carson Farmer
On Sun, Oct 31, 2010 at 4:15 PM, Carson Farmer <[hidden email]> wrote:
> @ Martin: What is the status of your geometry checking tool? Is there anyway
> that this might be incorporated into trunk somehow? I think it would be much
> better to have something a bit more compliant, stable, and with a few more
> of the features that have been mentioned in this thread (some of which I
> think Martin's tool already has).

There's a lot of dust lying on top the "topology" plugin which is
supposed to do various checks within one layer and among pairs of
layers. The plugin never reached a productive state and stayed at some
alpha/beta stage due to the lack of time. I have no time nor
motivation to do some work on it in order to make it ready for
inclusion to the trunk. However, if there is anyone interested to
finalize it, I will try to dig up the code and make it available.

Regards
Martin
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: ftools geometry check

Carson Farmer
On 1 November 2010 18:28, Martin Dobias <[hidden email]> wrote:

> On Sun, Oct 31, 2010 at 4:15 PM, Carson Farmer <[hidden email]> wrote:
>> @ Martin: What is the status of your geometry checking tool? Is there anyway
>> that this might be incorporated into trunk somehow? I think it would be much
>> better to have something a bit more compliant, stable, and with a few more
>> of the features that have been mentioned in this thread (some of which I
>> think Martin's tool already has).
>
> There's a lot of dust lying on top the "topology" plugin which is
> supposed to do various checks within one layer and among pairs of
> layers. The plugin never reached a productive state and stayed at some
> alpha/beta stage due to the lack of time. I have no time nor
> motivation to do some work on it in order to make it ready for
> inclusion to the trunk. However, if there is anyone interested to
> finalize it, I will try to dig up the code and make it available.
I completely understand Martin! I'm going to try to fix things up
using Jürgen's changes to QgsGeometry and the validateGeometry
function, so at this stage I don't think I'm interested in your other
stuff. However, it might be nice to dig into it in the future; I seem
to recall some pretty nice features in there. Anyone else with some
time on their hands?

Carson
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: ftools geometry check

Alexander Bruy
Hi,

I think it would be nice to publish this sources. Maybe anyone
else can look at this and improve or adopt for fTools. I'm not
sure about my own time, but I'm interested in this.


On Mon, 1 Nov 2010 22:38:11 +0000
Carson Farmer <[hidden email]> wrote:
> I completely understand Martin! I'm going to try to fix things up
> using Jürgen's changes to QgsGeometry and the validateGeometry
> function, so at this stage I don't think I'm interested in your other
> stuff. However, it might be nice to dig into it in the future; I seem
> to recall some pretty nice features in there. Anyone else with some
> time on their hands?


--
Alexander Bruy
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: ftools geometry check

Martin Dobias
Hi Alexander

On Tue, Nov 2, 2010 at 7:03 PM, Alexander Bruy <[hidden email]> wrote:
> Hi,
>
> I think it would be nice to publish this sources. Maybe anyone
> else can look at this and improve or adopt for fTools. I'm not
> sure about my own time, but I'm interested in this.

It turned out that I have published the code already, just forgotten
about that :-)
You can find the plugin here:
https://github.com/wonder-sk/topol

It doesn't have any special requirements, just copy it to your
src/plugins directory and add the subdir in
src/plucgins/CMakeLists.txt

Martin
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: ftools geometry check

Alexander Bruy
Thanks, Martin

I'll look at it

On Wed, 3 Nov 2010 21:19:07 +0100
Martin Dobias <[hidden email]> wrote:

> Hi Alexander
>
> On Tue, Nov 2, 2010 at 7:03 PM, Alexander Bruy <[hidden email]> wrote:
> > Hi,
> >
> > I think it would be nice to publish this sources. Maybe anyone
> > else can look at this and improve or adopt for fTools. I'm not
> > sure about my own time, but I'm interested in this.
>
> It turned out that I have published the code already, just forgotten
> about that :-)
> You can find the plugin here:
> https://github.com/wonder-sk/topol
>
> It doesn't have any special requirements, just copy it to your
> src/plugins directory and add the subdir in
> src/plucgins/CMakeLists.txt
>
> Martin


--
Alexander Bruy
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer