[OpenLayers-Users] Utilize DWITHIN spatial filter in OpenLayers

smilectt smilelizy at gmail.com
Mon Jan 6 14:36:54 PST 2014


It depends on how precise and how general you want to be. Crudely, you
can divide the distance in meters
by 1860*60 (1 minute (latitude on sphere) = 1 nautical ml = 1.86km). Not
going to be accurate in mid/high latitudes. Better is convert point to
meters, create another point  maxDIS away in meters, convert that point
back to lat/long and then calculate maxDIS from pythag.

Thanks for your reply.
Sorry For my dumbness.
Yeah, I understand we can do some rough conversion here if precision is not
an issue.

But about the solution you mentioned convert point to meters. Not sure how
to do that, could you give me some hint?

Thanks : )

Sincerely Yours
Tingting Cao


On 6 January 2014 15:05, Phil Scadden [via OSGeo.org] <
ml-node+s1560n5096494h38 at n6.nabble.com> wrote:

> On 6/01/2014 4:28 p.m., smilectt wrote:
> > Some other topics mentioned the geoserver does not support specify the
> > distanceUnits and in fact the  maxDis is the degree distance to the
> center point.
> You got it. Actually, maxDis will be interpreted as being in the units
> of layers you are querying. If the native spatial reference is in
> degrees, then it will be interpreted as degrees.
> > I didn't quite get it, does the degree distance mean the
> longitude/latitude
> > degree differences with the point we are comparing?
> Yes.
> > but how can I fix it that I can filter them according to the value
> expressed
> > in meters (as it makes more sense)
> It depends on how precise and how general you want to be. Crudely, you
> can divide the distance in meters
> by 1860*60 (1 minute (latitude on sphere) = 1 nautical ml = 1.86km). Not
> going to be accurate in mid/high latitudes. Better is convert point to
> meters, create another point  maxDIS away in meters, convert that point
> back to lat/long and then calculate maxDIS from pythag.
>
>
> Notice: This email and any attachments are confidential.
> If received in error please destroy and immediately notify us.
> Do not copy or disclose the contents.
>
> _______________________________________________
> Users mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=5096494&i=0>
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://osgeo-org.1560.x6.nabble.com/Utilize-DWITHIN-spatial-filter-in-OpenLayers-tp5096493p5096494.html
>  To unsubscribe from Utilize DWITHIN spatial filter in OpenLayers, click
> here<http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5096493&code=c21pbGVsaXp5QGdtYWlsLmNvbXw1MDk2NDkzfC0xODg0NDM1OTkz>
> .
> NAML<http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Utilize-DWITHIN-spatial-filter-in-OpenLayers-tp5096493p5096646.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20140106/207c6c0f/attachment.html>


More information about the Users mailing list