[mapguide-internals] Raster Layer Default Extents

Tom Fukushima tom.fukushima at autodesk.com
Mon Mar 5 14:09:10 EST 2007


Hi Frank,

Studio uses the spatial contexts of the feature source to set the layer
preview extents and the extents of the map definition.

To see what your provider is returning for spatial contexts, use the
MapGuide site HTML/mapagent pages
(http://localhost:8008/mapguide/mapagent/index.html).
1) click on Feature in the top left pane
2) click on GetSpatialContexts in the bottom left pane
3) Enter the resource ID of the feature source you are testing
4) Press submit, and enter administrator credentials

The returned XML should look something like the following:
<?xml version="1.0" encoding="UTF-8"?>
<FdoSpatialContextList>
  <ProviderName>OSGeo.GDAL.3.2</ProviderName>
  <SpatialContext IsActive="true">
    <Name>*XY-M*</Name>
    <Description>Arbitrary X-Y Coordinates (Meters)</Description>
    <CoordinateSystemName>*XY-M*</CoordinateSystemName>
 
<CoordinateSystemWkt>LOCAL_CS["*XY-MT*",LOCAL_DATUM["*X-Y*",10000],UNIT[
"Meter", 1],AXIS["X",EAST],AXIS["Y",NORTH]]</CoordinateSystemWkt>
    <ExtentType>Static</ExtentType>
    <Extent>
      <LowerLeftCoordinate>
        <X>-877502.20718000003</X>
        <Y>-1001999.76755</Y>
      </LowerLeftCoordinate>
      <UpperRightCoordinate>
        <X>-875000.22446000006</X>
        <Y>-999999.78983000002</Y>
      </UpperRightCoordinate>
    </Extent>
    <XYTolerance>0.000000</XYTolerance>
    <ZTolerance>0.000000</ZTolerance>
  </SpatialContext>
</FdoSpatialContextList>

The important parts for Studio are the CoordinateSystemWkt and the
Extent.

Tom

-----Original Message-----
From: mapguide-internals-bounces at lists.osgeo.org
[mailto:mapguide-internals-bounces at lists.osgeo.org] On Behalf Of Frank
Warmerdam (External)
Sent: Monday, March 05, 2007 10:22 AM
To: MapGuide Internals Mail List
Subject: [mapguide-internals] Raster Layer Default Extents

Folks,

For several weeks now I have been working towards resolving the problem
where mapguide does not recognise default extents for GDAL based raster
layers.  I have modified the raster provider in trunk (and via local
uncommitted changes in 3.2.x branch) to set the extents returned by the
SpatialContextReader properly.  However, this does not seem to be having
the desired effect in mapguide.

I have essentially confirmed that mapguide is reading back my correct
spatial extents from the spatial context reader, but when creating a new
layer they don't seem to have any effect.  Can anyone comment on why
that might be?

My process was:
  1) Install MapGuide OS 1.1.0 for windows.
  2) Build FDO from source (same tree I used for earlier fdogdal
updates)
  3) Checkout out 3.2.x provider into 3.2.0 fdo tree, patch it, build
and
     install it.
  4) I run mgserver interactively (so I can see extra fprintf's I
embedded
     in my 32x fdo provider confirming I'm using it and it is returning
what
     I expect).
  5) In studio I create a new layer using an existing gdal based data
source.
     I can see via debug output that the spatial context reader is
returning
     the expected values.
  6) But the layer extents are not defaulted such that I see the layer.
  7) If I create a map from that layer, the default map extents are 0,0
to 0,0.

Any thoughts?

The only two files in the fdogdal/Src/Provider directory are available
at:
    http://www.gdal.org/tmp/fdo32x_gdal_patch.zip

if someone would like to try overlaying them on the fdo32x gdal provider
and testing it themselves.  In particular I'd like some confirmation
about what is happening on the mapguide side, since I'm too chicken to
start debugging there. Perhaps I really just need to build mapguide from
source and go whole hog on debugging...

Best regards,
-- 
---------------------------------------+--------------------------------
---------------------------------------+------
I set the clouds in motion - turn up   | Frank Warmerdam,
warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo,
http://osgeo.org

_______________________________________________
mapguide-internals mailing list
mapguide-internals at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-internals



More information about the mapguide-internals mailing list