On Fri, Jan 27, 2012 at 11:57 PM, Yang <[email protected]> wrote:
> currently we use FilterFactory2.dwithin(geo1, point, distance, units) to
> lookup the features within a radius of "distance" from "point"
>
> but the features in the collection are represented using lat-long,
> so if FilterFactory2 treats them just as a flat 2-D coordinate system, the
> distance computed at higher latitude is going to be higher than
> real distance. so the above lookup actually looks up not a circle, but an
> ellipse.
>
>
> it seems that to do a real circle lookup, we need dwithin to accept a
> function as parameter, instead of distance. right? but given the current
> geotools code, is there a way to achieve circle lookup?
>
Interface wise, it would just have to respect the unit of measure and
internally do the proper distance calculations.
However doing a proper calculation internally is definitely not easy, and
the point is not the only geometry we
care about, dwithin must work for any type of reference geometry.
There are some ideas on how to handle the issue here:
http://jira.codehaus.org/browse/GEOT-1170
http://jira.codehaus.org/browse/GEOS-937
The solution is not immediate to implement, so far no funding or
contribution
showed up to address the problem
Cheers
Andrea
--
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 962313
mob: +39 339 8844549
http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf
-------------------------------------------------------
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users