[mapserver-users] problem with scientific notation in WFS field output

mapgeek dmail at digitalics.com
Wed Jan 28 22:46:00 EST 2009


Background: I have an integer field in a map layer where every record
contains exactly 8 digits. The WFS output for this field is getting
converted into scientific notation, but the number is missing 2 significant
digits at the end (ones and tens). A number like 20010822 is getting
converted into 2.00108e+007, which is the equivalent of 20010800. 

Problem: When I do greater-than or less-than WFS filters on that field, I
lose the ability to query the last two digits. It treats 20010822 as if it
were 20010800. 

Desired Solution: I need to be able to apply greater-than and less-than
filters on that integer field and get the correct results. I do NOT
particularly care if the field values are correctly displayed in the WFS
output, as long as the results are filtered. That said, I suspect that
solving the display will fix the filtering. 

More Background: 
-- I need to do WFS filter encoding with a date. Date filtering is
unsupported, so I am trying to work around it by representing the date as a
sortable integer. 
-- I am connecting to an SDE view. I have changed the date field in the view
to be an integer field in the 8 digit format of YYYYMMDD. 
-- Any number you construct in this format should be less than records in
the future and greater than records in the past. I want to use these
integers as the literal in PropertyIsLessThan or PropertyIsGreaterThan
filters to create before and after queries.
-- Aside from the problems described above, it going well so far. By losing
the last 2 digits, however, I can only get as detailed as months, and lose
resolution of days. Other than that, the plan seems to work. 
-- I have historical features dating back hundreds of years, so a 4 digit
year is required. 


My environment is MS4W 2.2.6 (can upgrade if needed). I am connecting to an
SDE 9.2 spatial view running on Oracle. 

thanks, David

-- 
View this message in context: http://n2.nabble.com/problem-with-scientific-notation-in-WFS-field-output-tp2236793p2236793.html
Sent from the Mapserver - User mailing list archive at Nabble.com.



More information about the mapserver-users mailing list