Spatial queries plugin should ignore very small intersections

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

Spatial queries plugin should ignore very small intersections

Andreas Neumann-4
Hi,

I am starting to use the "spatial query" plugin and came across a
problem where there are very small intersections I want to ignore.

As an example I am testing parcels and buildings for intersection.
However, the input data is not perfect and I get parcels selected where
there is only a very small intersection between an edge of a building
(e.g. less than a square meter). Therefore I get parcels selected that I
really don't want to be selected.

Could the plugin be extended so that only geometries will be selected
where there is a user-definable minimum intersection area (in case one
is tests polygons against polygons) or a minimum intersection length (in
case one is testing lines against polygons).

I may be able to fund work on it if someone is able to work on it.

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

Re: Spatial queries plugin should ignore very small intersections

Régis Haubourg
Hi Andreas,
+1 for me.  
Tolerance threshold should be square units ( area) for polygon - polygons intersects,  and simple units  (length) for line-polygon intersections.

Beyond that, I had in mind to fund a GUI and performance evolution of spatial query tool. It is not very fast, and user interface is really hard to understand for simple users. And it is the first feature I use to help newcomers to understand GIS tools capacities.
It also often fails when using non shp formats, or having bad geometries. We should couple this tool with a geometry cleaning tool, raising a list of errors and automated corrections made. So means adding a clean option to 'check geometry' tool.

Régis
Reply | Threaded
Open this post in threaded view
|

Re: Spatial queries plugin should ignore very small intersections

Andreas Neumann-4
Am 06.01.2013 11:09, schrieb Régis Haubourg:
> Hi Andreas,
> +1 for me.  
> Tolerance threshold should be square units ( area) for polygon - polygons
> intersects,  and simple units  (length) for line-polygon intersections.

yes

> Beyond that, I had in mind to fund a GUI and performance evolution of
> spatial query tool. It is not very fast, and user interface is really hard
> to understand for simple users. And it is the first feature I use to help
> newcomers to understand GIS tools capacities.
> It also often fails when using non shp formats, or having bad geometries. We
> should couple this tool with a geometry cleaning tool, raising a list of
> errors and automated corrections made. So means adding a clean option to
> 'check geometry' tool.

true - there is a geometry validation tool to detect these invalid
geometries but no cleaning tools available.

So how do we proceed here. Do you want to start writing a specification
for improving the spatial query plugin and the cleaning tools?

In my opinion it also should be a core tool in QGIS, not a plugin. These
spatial queries are really core GIS functions, not optional extensions.

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

Re: Spatial queries plugin should ignore very small intersections

Nathan Woodrow
On Sun, Jan 6, 2013 at 8:20 PM, Andreas Neumann <[hidden email]> wrote:
In my opinion it also should be a core tool in QGIS, not a plugin. These
spatial queries are really core GIS functions, not optional extensions.

I agree this one of the reasons that I brought up the topic of moving code plugins to core features a couple of days ago.

- Nathan 


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

Re: Spatial queries plugin should ignore very small intersections

Régis Haubourg
OK for starting specifications. A good start could be a Arcgis - QGIS comparison to find missing features. I really like small graphics to help user understand what the tool is doing. I put that on my list. If you already have proposals, let's post drafts here, and then finalise in a redmine ticket or in the wiki.

OK with Nathan to go to core C++ rewriting.

Maybe we should ask what is the global roadmap for vector menu tools. Most of actions in the menu are part of ftools. Do we start replacing them one by one by C++ core actions, or do we have a global plan to rebuild thoses actions, and have them in sync with sextante algorithms.

PSC members, do you have plans for it already?

Cleaning geometry is now part of geos I remember. But it does not act like arcgis 'repair geometry'. I haven't tested it yet. It creates polygon intersections when finding auto intersections. Did anybody tried it?
Régis
Reply | Threaded
Open this post in threaded view
|

Re: Spatial queries plugin should ignore very small intersections

Alexander Bruy
On Sun, 6 Jan 2013 04:43:10 -0800 (PST)
Régis Haubourg <[hidden email]> wrote:

> Maybe we should ask what is the global roadmap for vector menu tools. Most
> of actions in the menu are part of ftools. Do we start replacing them one by
> one by C++ core actions, or do we have a global plan to rebuild thoses
> actions, and have them in sync with sextante algorithms.

AFAIK, some geoprocessing functions from fTools also available in QGIS
analysis library. But they needs review and optimization. C++
implementation still slow with relatively large datasets.

--
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: Spatial queries plugin should ignore very small intersections

pcav
In reply to this post by Andreas Neumann-4
Il 06/01/2013 11:20, Andreas Neumann ha scritto:

> true - there is a geometry validation tool to detect these invalid
> geometries but no cleaning tools available.

We (Faunalia, thanks to Regione Toscana support) are making a cleaning tool using
liblwgeom from PostGIS, and sextante. We still have minor packaging problems (we
would like to have liblwgeom in osgeo4w), but for the rest the tool should be working.
All the best.
--
Paolo Cavallini - Faunalia
www.faunalia.eu
Full contact details at www.faunalia.eu/pc
Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: Spatial queries plugin should ignore very small intersections

pcav
In reply to this post by Régis Haubourg
Il 06/01/2013 13:43, Régis Haubourg ha scritto:

> OK for starting specifications. A good start could be a Arcgis - QGIS
> comparison to find missing features. I really like small graphics to help
> user understand what the tool is doing. I put that on my list. If you
> already have proposals, let's post drafts here, and then finalise in a
> redmine ticket or in the wiki.
>
> OK with Nathan to go to core C++ rewriting.
>
> Maybe we should ask what is the global roadmap for vector menu tools. Most
> of actions in the menu are part of ftools. Do we start replacing them one by
> one by C++ core actions, or do we have a global plan to rebuild thoses
> actions, and have them in sync with sextante algorithms.
>
> PSC members, do you have plans for it already?
>
> Cleaning geometry is now part of geos I remember. But it does not act like
> arcgis 'repair geometry'. I haven't tested it yet. It creates polygon
> intersections when finding auto intersections. Did anybody tried it?

We (Faunalia) are making a cleaning tool using liblwgeom from PostGIS, and sextante.
We still have minor packaging problems (we would like to have liblwgeom in osgeo4w),
but for the rest the tool should be working.
All the best.

--
Paolo Cavallini - Faunalia
www.faunalia.eu
Full contact details at www.faunalia.eu/pc
Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: Spatial queries plugin should ignore very small intersections

Régis Haubourg

Paolo Cavallini wrote
We (Faunalia) are making a cleaning tool using liblwgeom from PostGIS, and sextante.
That's good news Paolo !
How does it work? Is it automagical like in ArcGis or more like a Grass topo build where user has to choose snapping threshold?
régis
Reply | Threaded
Open this post in threaded view
|

Re: Spatial queries plugin should ignore very small intersections

Sandro Santilli-2
On Mon, Jan 07, 2013 at 01:51:10AM -0800, Régis Haubourg wrote:
>
>
> Paolo Cavallini wrote
> > We (Faunalia) are making a cleaning tool using liblwgeom from PostGIS, and
> > sextante.
>
> That's good news Paolo !
> How does it work? Is it automagical like in ArcGis or more like a Grass topo
> build where user has to choose snapping threshold?

No snapping, it simply turns invalid representations into valid ones.
There's no "cleaning" (tolerance based) performed.

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

Re: Spatial queries plugin should ignore very small intersections

Régis Haubourg
Thanks Sandro,
so that means that you get multi polygons with very small polygons created when a auto-intersection is cleaned. I prefer that since it does not destroys existing node. I think qe should add another tool after the 'makevalide' tool to clean those artefacts based on a surface threshold. This is really hard to achieve for common end user, and those artefacts can be really numerous if datasets are not clean.  They also will make it harder to edit a polygon manually, and will slow down spatial intersections.

Anybody else needs such a tool?
Reply | Threaded
Open this post in threaded view
|

Re: Spatial queries plugin should ignore very small intersections

Bernhard Ströbl
I made an eliminate tool (similar to ESRI's eliminate). It dissolves
common boundaries of selected polygons and adjacent polygons with either
largest area or largest common boundary. If you have multi polygons you
would need to transform them into single polygons beforehand. The
eliminate tool is part of fTools in current master.

Bernhard

Am 07.01.2013 11:18, schrieb Régis Haubourg:

> Thanks Sandro,
> so that means that you get multi polygons with very small polygons created
> when a auto-intersection is cleaned. I prefer that since it does not
> destroys existing node. I think qe should add another tool after the
> 'makevalide' tool to clean those artefacts based on a surface threshold.
> This is really hard to achieve for common end user, and those artefacts can
> be really numerous if datasets are not clean.  They also will make it harder
> to edit a polygon manually, and will slow down spatial intersections.
>
> Anybody else needs such a tool?
>
>
>
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: Spatial queries plugin should ignore very small intersections

pcav
In reply to this post by Sandro Santilli-2
Il 07/01/2013 11:08, Sandro Santilli ha scritto:

> No snapping, it simply turns invalid representations into valid ones.
> There's no "cleaning" (tolerance based) performed.

we can do this with another command; the two may be chained into a sextante "cleanup"
model.

--
Paolo Cavallini - Faunalia
www.faunalia.eu
Full contact details at www.faunalia.eu/pc
Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: Spatial queries plugin should ignore very small intersections

Régis Haubourg
Hi,
I initiated a first wiki page to discuss specifications for that tool here :
http://hub.qgis.org/wiki/quantum-gis/Spatial-query-tool

I first wrote an analysis of Arcgis10 equivalent tool.
Feel free to contribute!
Regards