[OpenLayers-Users] Utilize DWITHIN spatial filter in OpenLayers

smilectt smilelizy at gmail.com
Mon Jan 6 14:38:06 PST 2014



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




Phil Scadden 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

> Users at .osgeo

> http://lists.osgeo.org/mailman/listinfo/openlayers-users


Phil Scadden 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

> Users at .osgeo

> http://lists.osgeo.org/mailman/listinfo/openlayers-users


Phil Scadden 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

> Users at .osgeo

> http://lists.osgeo.org/mailman/listinfo/openlayers-users





--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Utilize-DWITHIN-spatial-filter-in-OpenLayers-tp5096493p5096647.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list