[mapserver-users] How to deal with floating point exception?

Rahkonen Jukka Jukka.Rahkonen at mmmtike.fi
Thu Oct 20 07:05:07 PDT 2011


Hi,

It seems to be WFS so you can write a standard ogc:Intersects filter with your point.  That will be more flexible to because it will be easy to turn it to use DWithin (you will need it immediately when you want to find point features) or some other filter, as well as to use polygons or linestrings as reference geometry, and it will work also with other WFS servers.
I remember you used the same "point as a BBOX" with WMS GetFeatureInfo. I think it is a nice trick even it is not standard and will probably not work with any other WMS server softwares. I hope it would rather be documented than corrected if it is not badly against WMS standard.

If your current problem is because of having 14 digits in the coordinate values then perhaps you could cut and round the values a bit?  I do not believe your users are really clicking on the map with that accuracy.

-Jukka Rahkonen-

________________________________
JIAJIA WANG wrote:


> Hi Thomas,

The reason that I set minx=max and miny=maxy is because actually I want to get only the feature info of that point but not BBOX...
I know this is not the exact way to do it. But I thought it's much easier to do things like this. And it works fine...

JJ


On Thu, Oct 20, 2011 at 6:47 PM, thomas bonfort <thomas.bonfort at gmail.com<mailto:thomas.bonfort at gmail.com>> wrote:
your bounding box is invalid as minx=maxx and miny=maxy. please open a
ticket for this as mapserver should return an error message, and not
fail with an exception.

--
thomas

On Thu, Oct 20, 2011 at 04:39, jjwang <jaja0506 at gmail.com<mailto:jaja0506 at gmail.com>> wrote:
> I got an floating point exception when I tried to run the mapserv.
>
> *./mapserv -nh
> "QUERY_STRING=map=/images/mapserv_map_files/BR_WFS.map&request=GetFeature&service=WFS&version=1.1.0&typename=nsw&BBOX=153.50183890072711,-28.163052299741643,153.50183890072711,-28.163052299741643&outputformat=stateonly"
> Content-type: text/html
>
> Floating point exception*
>
> I found this was caused by the longitude value I provided
> '153.50183890072711'. If I make a little change of the value, for example
> change it to '153.50183890072701', it will works fine. But obviously, it's
> not a solution to my problem.
>
> Any ideas on this issue?
>
> JJ
>
> --
> View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-deal-with-floating-point-exception-tp6911285p6911285.html
> Sent from the Mapserver - User mailing list archive at Nabble.com.
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>




More information about the MapServer-users mailing list