[mapguide-internals] MapGuide seems to check the extent of each table/view with a geometry column

Zac Spitzer zac.spitzer at gmail.com
Thu Nov 14 04:59:06 PST 2013


is this a provider specific question? i.e. FDO?

Oracle for example uses the extents from the SDO_GEOM_METADATA tables



On Thu, Nov 14, 2013 at 9:25 PM, Gabriele Monfardini
<monfardini at ldpgis.it>wrote:

> Hi all,
>
> I've recently seen a strange behavior using Ajax viewer and Mapguide 2.4.
> We are using OGRProvider with a recompiled libgdal to support
> PostgreSQL/Postgis.
>
> In my database there is a quite complicated view with a geometry column,
> which is needed to export some data in a very specific workflow.
> This view has a well defined SRID and is not used in any MapGuide layer.
>
> When I start Ajax viewer on a simple map that uses some other tables from
> the same db, the viewer seems to hang for a lot of time.
> What happens is that apparently MapGuide is issuing a SELECT
> Extent('geometry') on all tables with a geometry columns.
> When the extenct is done against the problematic view the database work for
> a minute to respond to the query.
> Apparently MapGuide waits for the result before serving the initial map
> view.
>
> Some questions:
>
> 1. Is it true that MapGuide tries to find the extent of all the tables? And
> if it's true, why? Maybe to acquire some metadata or to validate the
> feature source?
> 2. Is it a libOGR provider specific behavior or not?
> 3. Is there any way to prevent MapGuide from issuing this kind of query
> alltogether or to limit them to the tables/views really used in the map?
>
> I've found a simple and brutal workaround.
>
> Apparently MapGuide issues the query only if the table has a valid SRID,
> and check the SRID in the table public.geometry_columns.
> So I've set in public.geometry_columns the SRID to -1 for that view (which
> is the SRID for "unknown coordinate system" in PostGIS 1.x) and the problem
> disappeared.
>
> This workaround works only for Postgis 1.x since in PostGIS 2
> public.geometry_columns is a view that reports the value of the SRID
> directly from the table.
>
> Any comments?
>
> -----
> Gabriele Monfardini
> LdP Progetti GIS
> email: monfardini at ldpgis.it
> _______________________________________________
> mapguide-internals mailing list
> mapguide-internals at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
>



-- 
Zac Spitzer
+61 405 847 168


More information about the mapguide-internals mailing list