Closed GoogleCodeExporter closed 9 years ago
I reviewed the proposal. In general it looks good and very useful. Couple of
remarks/questions:
- the first set of changes are in SpatialSearchPanel.js baseclass search()
function
- changing the default from INTERSECTS to DWITHIN is strictly IMO not related
to BUFFER search. This may affect existing apps that use the SearchByDrawPanel
(which uses default) unexpectedly. Solution is to always set the
spatialFilterType but this should be a separate ticket/issue. BUFFER will still
work I guess without the change of default.
- configure units in SearchByFeaturePanel config instead of hardcoded 'm'
(will be default)
- I would still like to keep WITHIN so we will have 4 filter types: INTERSECTS,
WITHIN, BUFFER and CONTAINS with WITHIN as before.
-perhaps a more user-friendly name for BUFFER like WITHIN DISTANCE unless
BUFFER is the common GIS-folks term (I have no ArcGIS background!).
Let's proceed. This type of functions are the icing on the cake, making Heron
very useful as a GIS tool!
Original comment by jus...@gmail.com
on 5 Aug 2014 at 10:48
Great! The buffer is really useful for my users already, and its functionality
is something that was missing from almost all geoext-based (and open source)
viewers (although it was included in early argis products as arcims viewer of
2004, ouch).
Some comments:
- the first set of changes are in SpatialSearchPanel.js baseclass search()
function
Thanks, i missed that, and now i can switch to an unmodified heron.js file
- changing the default from INTERSECTS to DWITHIN is strictly IMO not related
to BUFFER search. This may affect existing apps that use the SearchByDrawPanel
(which uses default) unexpectedly. Solution is to always set the
spatialFilterType but this should be a separate ticket/issue. BUFFER will still
work I guess without the change of default.
You´re right. I set the default for practical reasons, principally about
sending always the distance parameter. The tests i made after that show me that
at least in geoserver clients distance is ignored when inserted in the request
and the filter is othen than dwithin, and is also filtered in the request made
by heron.
- configure units in SearchByFeaturePanel config instead of hardcoded 'm'
(will be default)
I agree. I hardcoded the units because of lack of programming skills!(more or
less like my english skills)I didn´t figure how to interact with panel config.
- I would still like to keep WITHIN so we will have 4 filter types: INTERSECTS,
WITHIN, BUFFER and CONTAINS with WITHIN as before.
I think i don´t understand how WITHIN works. Isn´t like DWITHIN with
distance=0?
-perhaps a more user-friendly name for BUFFER like WITHIN DISTANCE unless
BUFFER is the common GIS-folks term (I have no ArcGIS background!).
I agree. I used BUFFER because my users are used to the denomination. BTW,
although the names are pretty self-explanatory, i would recommend adding them
to the language file so we can have a translation. I imagine some of the
spanish users wandering what "WITHIN DISTANCE" means.
Original comment by 486.m...@gmail.com
on 5 Aug 2014 at 1:14
Hi I integrated your code, made some what I think improvements. You can try the
example at
http://lib.heron-mc.org/heron/latest/examples/multisearchcenternl ('meters'
projection)
- units: made configurable, default is 'meter' (this is the standard, not 'm').
HOWEVER, there is an issue with GeoServer and DWITHIN that it ignores the units
attr and will always take the layer units:
http://osgeo-org.1560.x6.nabble.com/DWITHIN-is-picking-up-too-many-points-td3791
488.html. See the problem in WGS84 example:
http://lib.heron-mc.org/heron/latest/examples/multisearchcenter taking deegrees.
- added i18N for strings like BUFFER etc
- only add distance and units to WFS Filter for DWITHIN
- not implemented: a visualization of extending buffers in the source
geometries (challenging)
I am still wondering if DWITHIN is really the same as BUFFER (in the ESRI
sense). For a POINT ok, but not sure how this behaves with LINESTRINGS and
POLYGONS.
Hopefully others find this feature useful and could test.
Original comment by jus...@gmail.com
on 6 Aug 2014 at 3:44
The GeoServer 'DWITHIN units" issue is here:
http://jira.codehaus.org/browse/GEOS-937
Did some more thinking about Buffer. Though the current setup is useful, I
don't think it deserves to be called buffer (yet). For several reasons I think
it would be better to regard Buffer as an intermediate step that will generate
a new Layer, whose geometries can then be used for a WFS search, even using
either CONTAINS, WITHIN or INTERSECTS with the Buffer. Also the Buffer could
then be used also within the 'Search by Draw",maybe an even more common Buffer
use case.
To implement, Buffer creation could/should be done client-side. This has the
following advantages:
- no server-side issues for non-metric projections
- easier to visualize
- easier to reuse
The library JSTS, a JavaScript port of the well-established Java JTS library as
used in GeoServer via GeoTools, seems a good candidate:
https://github.com/bjornharrtell/jsts with a Buffer example:
http://bjornharrtell.github.io/jsts/examples/buffer.html
I propose that if the current DWITHIN implementation satisfies your use cases
we may close this issue. I can then open a new issue for a
general/visual/client-side Buffer implementation for both "search by draw" and
"search by feature". Anyone willing to fund such an advanced function?
Original comment by jus...@gmail.com
on 7 Aug 2014 at 10:17
I agree with closing the issue, and also about the denomination (distance
within or its tranlation seems more appropiate).
Thank you for the good work!
Original comment by 486.m...@gmail.com
on 7 Aug 2014 at 1:02
Ok, closing this issue and opening issue 398 for geneirc Buffer implementation.
Original comment by jus...@gmail.com
on 7 Aug 2014 at 4:10
Original issue reported on code.google.com by
486.m...@gmail.com
on 23 Jul 2014 at 3:38Attachments: