Discussion:
[mapguide-users] Incorrect numbers displayed when using Selection Panel mapguide 3.0
BMason
2018-03-27 18:02:27 UTC
Permalink
Our temperature data is in a shapefiles and sdf files and is in float format
and stored with only 2 decimals, for example 10.77 but when viewing the
data using the selection panel we see 10.7799999999. Could someone please
provide an example for how to display the data with only 2 decimal places? I
understand this is possible using extensions with the feature source.
Hopefully there is a fix for this soon so no actions would be needed.
thanks!



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
Jackie Ng
2018-03-28 13:11:43 UTC
Permalink
Does the FDO expression ROUND(PROPERTY, 2) work for you?

- Jackie



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
BMason
2018-03-30 15:08:05 UTC
Permalink
Hi Jackie, I managed to create a new calculated property using the Round
function and can preview the new field in the unmanaged shapefile feature
source. So I think I am on the right track. But when I view the associated
map layer for the unmanaged shapefile I don't see the new field added. And
if I try to make a new layer, I don't see any layer properties/ fields at
all. The layer properties visible in viewer are completely grayed out.
Will this process only work for managed resources? Will the new properties
show up in an existing layer or do I need to create a new layer? thanks



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
BMason
2018-04-04 16:37:29 UTC
Permalink
Hello all, does anyone know if using the expression editor to round decimals
in a shapefile will only work with managed resources and not unmanaged data
resources? I can see a new field added when using the preview for an
unmanaged resource but I cannot see any attributes when I make a new map
layer. Is this a bug or just a limitation of mapguide? Is this problem only
with shapefiles?
thanks



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
Jackie Ng
2018-04-05 02:58:51 UTC
Permalink
This (new attributes not picked up) sounds like a bug somewhere, not sure
where.

Do you have solid steps for reproducing this problem?

- Jackie



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
BMason
2018-04-05 18:52:11 UTC
Permalink
Yes, I believe that I have solid steps for reproducing this problem. I have
tried several times. Just try it with any unmanaged shapefile as a data
resource. A new field is created using a calculation. You can see it by
using a preview of the data resource. But if you view the existing layer
for that data resource, the field does not exist. Also if you create a new
layer that points to the data resource, no attributes display. They are all
grayed out. Maybe I am doing something wrong. Please let me know if you
can use the round function and display the results in a new layer using an
unmanaged resource.
Brad



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
GordonL
2018-05-02 15:22:29 UTC
Permalink
I have been seeing this issue with SQL Server data sources. I am researching
to see how to reproduce consistently.




--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
GordonL
2018-05-02 15:26:31 UTC
Permalink
To follow up: It is not a FUSION issue. The MAPAGENT is returning the
incorrect values from the QUERYMAPFEATURES.

<Loading Image...>





--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
Benoit Begin
2018-05-03 12:13:56 UTC
Permalink
Hi Gorgon,

I believe FDO in general has some quirks with floating point precision. This
might be related to an issue I reported here:
https://trac.osgeo.org/fdo/ticket/929

I remember having similar issues back in my C++ days. Going from a floating
type to a string type would have quirky decimal values under certain
circumstances.

I can confirm, however, that we haven't encountered this issue using the C#
API for both FDO and Mapguide to display values. So the display issue is
likely located somewhere within the MapAgent code itself.

Ben



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
GordonL
2018-04-05 19:24:23 UTC
Permalink
Brad, when creating the layer, you need to pick the correct Feature Class -
don't use the original, but the one you newly created.

<Loading Image...>



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
Loading...