Mapguide 2.5 and FDO 3.4

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

Mapguide 2.5 and FDO 3.4

Ivan Miličević-3
Hello,

Does anyone know is Mapguide 2.5 compatible with FDO 3.4?

I'm struggling with this BUG (a huge blocker, TBH) http://trac.osgeo.org/fdo/ticket/864

Thank you.
_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Mapguide 2.5 and FDO 3.4

Jackie Ng
MapGuide 2.5 is not compatible with FDO 3.4. It is compatible with FDO 3.8.

- Jackie
Reply | Threaded
Open this post in threaded view
|

Re: Mapguide 2.5 and FDO 3.4

Srecko Lipovsek
In reply to this post by Ivan Miličević-3
Yes, this http://trac.osgeo.org/fdo/ticket/864 is still huge blocker on MG from version 2.4 till last version.

I'm testing right now on MG 2.5.2 and when using OR in layer filter, problem is still there.
Problem exists in diferent locations where MG access database (map rendering, tooltip, selection).

SQL Profiler show wrong queries passed from MG (layer filter should be always in brackets, but it is not).

Unit tests probably pass when there are small datasets. Problem is at bigger table.
It is not only MS SQL issue, but also PostGis, MySql, ...

How can I help to solve this problem? I can prepare some test data.
Reply | Threaded
Open this post in threaded view
|

Re: Mapguide 2.5 and FDO 3.4

Jackie Ng
That's what we need for anything. A solid piece of test data that can reproduce the problem.

- Jackie
Reply | Threaded
Open this post in threaded view
|

Re: Mapguide 2.5 and FDO 3.4

Jackie Ng
In reply to this post by Srecko Lipovsek
That's what we need for anything. A solid piece of test data that can reproduce the problem.

- Jackie
Reply | Threaded
Open this post in threaded view
|

Re: Mapguide 2.5 and FDO 3.4

Srecko Lipovsek
Ok,
Here is test data: TestData_864.zip (530 MB)
- MS SQL 2008 R2 Database
- MGP

Layer buildings with OR filter: type = 'Bank' OR type = 'Shop' OR type = 'business'
- testing map render (seems OK, need to check profiler results CPU, Reads, ...)
- testing selection (selection does'n work on right feature but selection renders some other feature)
- testing tooltip (tooltip doesnt work right, but shows data from some other feature, look at tooltip text, alyays the same)

Also need to test filter in theme rule.

This is wrong query from profiler when requesting tooltip data on this layer with filter:
SELECT  "A"."geometry","A"."primaryindex","A"."name","A"."osm_id","A"."type" FROM "dbo"."buildings" AS "A" WHERE A."type"=N'Bank' OR A."type"=N'Shop' OR A."type"=N'business' AND A.[geometry].STIntersects(@P1)=1
Reply | Threaded
Open this post in threaded view
|

Re: Mapguide 2.5 and FDO 3.4

Jackie Ng
Try this patched provider (64-bit):

http://download.osgeo.org/mapguide/patches/fdo3.9_ticket864/SQLServerSpatialProvider_x64_ticket864.zip

Buildings layer selects fine with this patch. However, something is wrong with that landuse layer that I don't think is related to this particular issue. Even unfiltered landuse has selectability problems.

- Jackie
Reply | Threaded
Open this post in threaded view
|

Re: Mapguide 2.5 and FDO 3.4

Srecko Lipovsek
Ok,

Looks and works great.
Landuse layer also work great. It shoud have fill color aplied in layer style, because layer does not fully fill entire area ...

Also tested at some other layers and works great.

Notice at MS SQL Profiler, that parenthesis are removed in filters:
http://trac.osgeo.org/fdo/ticket/889

Does PostGIS and MySQL Provider also use its own FdoIFilterProcessor implementation?

Thanks Jackie, you rock!
Reply | Threaded
Open this post in threaded view
|

Re: Mapguide 2.5 and FDO 3.4

Ivan Miličević-3
In reply to this post by Jackie Ng
Hello Jackie,

Can you build 32bit version?

Thank you.

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Jackie Ng
Sent: Sunday, May 11, 2014 11:44 AM
To: [hidden email]
Subject: Re: [mapguide-users] Mapguide 2.5 and FDO 3.4

Try this patched provider (64-bit):

http://download.osgeo.org/mapguide/patches/fdo3.9_ticket864/SQLServerSpatialProvider_x64_ticket864.zip

Buildings layer selects fine with this patch. However, something is wrong with that landuse layer that I don't think is related to this particular issue. Even unfiltered landuse has selectability problems.

- Jackie



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Mapguide-2-5-and-FDO-3-4-tp5138527p5139632.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Mapguide 2.5 and FDO 3.4

Jackie Ng
Reply | Threaded
Open this post in threaded view
|

Re: Mapguide 2.5 and FDO 3.4

Ivan Miličević-3
Thank you!

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Jackie Ng
Sent: Monday, May 12, 2014 1:09 PM
To: [hidden email]
Subject: Re: [mapguide-users] Mapguide 2.5 and FDO 3.4

Uploaded:
http://download.osgeo.org/mapguide/patches/fdo3.9_ticket864/SQLServerSpatialProvider_x86_ticket864.zip

- Jackie



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Mapguide-2-5-and-FDO-3-4-tp5138527p5139746.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Mapguide 2.5 and FDO 3.4

Jackie Ng
In reply to this post by Srecko Lipovsek
To my knowledge, the PostGIS and MySQL providers use the FdoIFilterProcessor implementation in the GenericRdbms core

Try these updated providers which roll in a fix for 889 as well:

32-bit: http://download.osgeo.org/mapguide/patches/fdo3.9_ticket864/SQLServerSpatialProvider_x86_ticket_864_and_889.zip

64-bit: http://download.osgeo.org/mapguide/patches/fdo3.9_ticket864/SQLServerSpatialProvider_x64_ticket_864_and_889.zip

You should see parentheses being applied now.

- Jackie
Reply | Threaded
Open this post in threaded view
|

Re: Mapguide 2.5 and FDO 3.4

Srecko Lipovsek
Ok,

Seems like OK. Parentheses are now OK too.

Just another thing, probably not have anything with this, but it is probably consequence of comparing strings while rendering layer theme items.

While testing filter in theme rule condition I notice that lower / upper cases in condition filter are probably not handled.

Example:
Layer Filter text (type = 'bank' OR type = 'sHOp' or type = 'busineSS' or type = 'ParKinG' or type = 'supermarkeT') return data from SQL regardless lower/upper cases.

Theme rule condition example filter in UPPER case (type = 'BANK' OR type = 'SHOP') don't render them, because text in DB is in lower case.

It is litle bit confusing, SQL return data regardless upper/lower case, while theme condition dont render them if thre is not perfect match.
Reply | Threaded
Open this post in threaded view
|

Re: Mapguide 2.5 and FDO 3.4

Jackie Ng
If you trace the SQL statements, do you see the string literals being modified when going from FDO Filter to SQL?

- Jackie
Reply | Threaded
Open this post in threaded view
|

Re: Mapguide 2.5 and FDO 3.4

Srecko Lipovsek
No, strings are not modified, they are the same as specified in filter ...

SQL return data regardless lower/upper case, but theme rule condition don't ...

Here is example, SQL return data, but no condition is used ...

<?xml version="1.0"?>
<LayerDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="2.4.0" xsi:noNamespaceSchemaLocation="LayerDefinition-2.4.0.xsd">
  <VectorLayerDefinition>
    <ResourceId>Library://00_test_864/DataConnection.FeatureSource</ResourceId>
    <Watermarks />
    <FeatureName>Default:buildings</FeatureName>
    <FeatureNameType>FeatureClass</FeatureNameType>
    <Filter>type = 'bank' OR type = 'sHOp' or type = 'busineSS' or type = 'ParKinG' or type = 'supermarkeT'</Filter>
    <PropertyMapping>
      <Name>name</Name>
      <Value>name</Value>
    </PropertyMapping>
    <PropertyMapping>
      <Name>osm_id</Name>
      <Value>osm_id</Value>
    </PropertyMapping>
    <PropertyMapping>
      <Name>type</Name>
      <Value>type</Value>
    </PropertyMapping>
    <Geometry>Geometry</Geometry>
    <ToolTip>Concat(name, '\ntype: ' , type)</ToolTip>
    <VectorScaleRange>
      <AreaTypeStyle>
        <AreaRule>
          <LegendLabel>filter</LegendLabel>
          <Filter>type = 'BanK' OR type = 'ShoP' or type = 'BusinesS'</Filter>
          <AreaSymbolization2D>
            <Fill>
              <FillPattern>Solid</FillPattern>
              <ForegroundColor>FFFF0000</ForegroundColor>
              <BackgroundColor>FFFF0000</BackgroundColor>
            </Fill>
            <Stroke>
              <LineStyle>Solid</LineStyle>
              <Thickness>1</Thickness>
              <Color>ff000000</Color>
              <Unit>Points</Unit>
              <SizeContext>MappingUnits</SizeContext>
            </Stroke>
          </AreaSymbolization2D>
        </AreaRule>
        <AreaRule>
          <LegendLabel>filter1</LegendLabel>
          <Filter>type = 'ParkinG' or type = 'SupermarkeT'</Filter>
          <AreaSymbolization2D>
            <Fill>
              <FillPattern>Solid</FillPattern>
              <ForegroundColor>FF008000</ForegroundColor>
              <BackgroundColor>FF008000</BackgroundColor>
            </Fill>
            <Stroke>
              <LineStyle>Solid</LineStyle>
              <Thickness>1</Thickness>
              <Color>ff000000</Color>
              <Unit>Points</Unit>
              <SizeContext>MappingUnits</SizeContext>
            </Stroke>
          </AreaSymbolization2D>
        </AreaRule>
        <AreaRule>
          <LegendLabel>default</LegendLabel>
          <Filter />
          <AreaSymbolization2D>
            <Fill>
              <FillPattern>Solid</FillPattern>
              <ForegroundColor>ffffffff</ForegroundColor>
              <BackgroundColor>ffffffff</BackgroundColor>
            </Fill>
            <Stroke>
              <LineStyle>Solid</LineStyle>
              <Thickness>1</Thickness>
              <Color>ff000000</Color>
              <Unit>Points</Unit>
              <SizeContext>MappingUnits</SizeContext>
            </Stroke>
          </AreaSymbolization2D>
        </AreaRule>
      </AreaTypeStyle>
    </VectorScaleRange>
  </VectorLayerDefinition>
</LayerDefinition>
Reply | Threaded
Open this post in threaded view
|

Re: Mapguide 2.5 and FDO 3.4

resident_root
In reply to this post by Srecko Lipovsek
Hi, i am trying to patch my Mapguide 2.5.2 64bits instalation but i can't. I tried this:
I put SQLServerSpatialProvider.dll from this link (that appears works for you): http://download.osgeo.org/mapguide/patches/fdo3.9_ticket864/SQLServerSpatialProvider_x64_ticket864.zip in Fdo folder (i maked backup of the original dll), then rigth on new dll, clic Properties->Unblock (cause Windows blocks dll from unknows sources), i restarted Mapguide Service, dont work, i put 3.9 instead of 3.8 on providers.xml, i restarted Mapguide service, dont work, i changed the ownership of the dll to SYSTEM like the other libraries in Fdo folder, i restarted Mapguide Service, dont work, is Mapguide 2.5.2 working with this 3.9 Fdo library?.

I tried with this one too:
http://download.osgeo.org/mapguide/patches/fdo3.9_ticket864/SQLServerSpatialProvider_x64_ticket_864_and_889.zip i got same result. Mapguide throws a error open FeatureSource from SQLServer and GetCapabilities throws Unknow error. Thank you for your help.
Reply | Threaded
Open this post in threaded view
|

Re: Mapguide 2.5 and FDO 3.4

Srecko Lipovsek
Hi FDO 3.9 is not compatible with MG 2.5.This patched version is for upcoming release of MG 2.6 ...
Reply | Threaded
Open this post in threaded view
|

Re: Mapguide 2.5 and FDO 3.4

resident_root
Thank you for your response, but it is working now!, i just installed .Net framework 4.5 and Visual C++ 2012 libraries, then I downloaded the Fdo 3.9 rc1 libraries for SQL Server from osgeo.org server and I put it on Fdo folder, finally I put the pach from Jackie in Fdo folder, I changed the providers.XML from 3.8 to 3.9, I restarted the mapguide service and I tested the layer filter, the OR filters from sql server FeatureSource works well.