[mapguide-users] Exmple of Gdal index xml

Gary Morin gary.morin at keygis.co.uk
Wed Oct 10 12:58:01 EDT 2007


Hi 

I'm back in the office and I have been doing more research into the problem
I'm getting with configuration files. I have repeated the problem on other
MGOS servers.

I have tracked the problem down to being releated to the bounds specfied in
schemamapping for each image. If I remove the bounds tag(s) and also change
the name in sechmemapping away from defualt tag the config file will work.
It also works if I replace the bounds with Georeference tag to a degree,
although I have not got the positioning correctly.

Below I have included the schema that fails and one that partially works.

Regards

Gary



Sample produces using bounds that gives and error, if

<?xml version="1.0" encoding="UTF-8"?>
<fdo:DataStore xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:gml="http://www.opengis.net/gml"
xmlns:fdo="http://fdo.osgeo.org/schemas"
xmlns:fds="http://fdo.osgeo.org/schemas/fds">
    <gml:DerivedCRS gml:id="Default">
        <gml:metaDataProperty>
            <gml:GenericMetaData>
                <fdo:SCExtentType>dynamic</fdo:SCExtentType>
                <fdo:XYTolerance>0.001000</fdo:XYTolerance>
                <fdo:ZTolerance>0.001000</fdo:ZTolerance>
            </gml:GenericMetaData>
        </gml:metaDataProperty>
        <gml:remarks>System generated default FDO Spatial
Context</gml:remarks>
        <gml:srsName>Default</gml:srsName>
        <gml:validArea>
            <gml:boundingBox>
                <gml:pos>394999.25242 424999.31774</gml:pos>
                <gml:pos>425000.48226 455000.56758</gml:pos>
            </gml:boundingBox>
        </gml:validArea>
        <gml:baseCRS>
            <fdo:WKTCRS gml:id="Default">
                <gml:srsName>Default</gml:srsName>
 
<fdo:WKT>LOCAL_CS["*XY-MT*",LOCAL_DATUM["*X-Y*",10000],UNIT["Meter",
1],AXIS["X",EAST],AXIS["Y",NORTH]]</fdo:WKT>
            </fdo:WKTCRS>
        </gml:baseCRS>
        <gml:definedByConversion
xlink:href="http://fdo.osgeo.org/coord_conversions#identity"/>
        <gml:derivedCRSType
codeSpace="http://fdo.osgeo.org/crs_types">geographic</gml:derivedCRSType>
        <gml:usesCS xlink:href="http://fdo.osgeo.org/cs#default_cartesian"/>
    </gml:DerivedCRS>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fdo="http://fdo.osgeo.org/schemas"
xmlns:gml="http://www.opengis.net/gml"
xmlns:default="http://fdo.osgeo.org/schemas/feature/default"
targetNamespace="http://fdo.osgeo.org/schemas/feature/default"
elementFormDefault="qualified" attributeFormDefault="unqualified">
        <xs:annotation>
            <xs:appinfo source="http://fdo.osgeo.org/schemas"/>
        </xs:annotation>
        <xs:element name="default" type="default:defaultType"
abstract="false" substitutionGroup="gml:_Feature">
            <xs:key name="defaultKey">
                <xs:selector xpath=".//default"/>
                <xs:field xpath="FeatId"/>
            </xs:key>
        </xs:element>
        <xs:complexType name="defaultType" abstract="false"
fdo:hasGeometry="false">
            <xs:annotation>
                <xs:appinfo source="http://fdo.osgeo.org/schemas"/>
            </xs:annotation>
            <xs:complexContent>
                <xs:extension base="gml:AbstractFeatureType">
                    <xs:sequence>
                        <xs:element name="FeatId">
                            <xs:annotation>
                                <xs:appinfo
source="http://fdo.osgeo.org/schemas"/>
                            </xs:annotation>
                            <xs:simpleType>
                                <xs:restriction base="xs:string">
                                    <xs:maxLength value="256"/>
                                </xs:restriction>
                            </xs:simpleType>
                        </xs:element>
                        <xs:element name="Image"
type="fdo:RasterPropertyType" fdo:defaultImageXSize="1024"
fdo:defaultImageYSize="1024" fdo:srsName="Default">
                            <xs:annotation>
                                <xs:appinfo
source="http://fdo.osgeo.org/schemas">
                                    <fdo:DefaultDataModel
dataModelType="Bitonal" dataType="Unknown" organization="Pixel"
bitsPerPixel="1" tileSizeX="256" tileSizeY="256"/>
                                </xs:appinfo>
                            </xs:annotation>
                        </xs:element>
                    </xs:sequence>
                </xs:extension>
            </xs:complexContent>
        </xs:complexType>
    </xs:schema>
    <SchemaMapping xmlns="http://fdogrfp.osgeo.org/schemas"
provider="OSGeo.Gdal.3.2" name="default">
        <complexType name="defaultType">
            <complexType name="RasterTypeType">
                <RasterDefinition name="images">
                    <Location name="D:\Projects\MGDemo\Raster\">
                        <Feature name="Sd93ne.tif">
                            <Band name="RGB" number="1">
                                <Image frame="1" name="Sd93ne.tif">
                                    <Bounds>
                                        <MinX>394999.25242</MinX>
                                        <MinY>434999.31774</MinY>
                                        <MaxX>400000.50226</MaxX>
                                        <MaxY>440000.56758</MaxY>
                                    </Bounds>
                                </Image>
                            </Band>
                        </Feature>
                    </Location>
                </RasterDefinition>
            </complexType>
        </complexType>
    </SchemaMapping>
</fdo:DataStore>

 
Sample of config that partially works

<?xml version="1.0" encoding="UTF-8"?>
<fdo:DataStore xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:gml="http://www.opengis.net/gml"
xmlns:fdo="http://fdo.osgeo.org/schemas"
xmlns:fds="http://fdo.osgeo.org/schemas/fds">
    <gml:DerivedCRS gml:id="Default">
        <gml:metaDataProperty>
            <gml:GenericMetaData>
                <fdo:SCExtentType>dynamic</fdo:SCExtentType>
                <fdo:XYTolerance>0.001000</fdo:XYTolerance>
                <fdo:ZTolerance>0.001000</fdo:ZTolerance>
            </gml:GenericMetaData>
        </gml:metaDataProperty>
        <gml:remarks>System generated default FDO Spatial
Context</gml:remarks>
        <gml:srsName>Default</gml:srsName>
        <gml:validArea>
            <gml:boundingBox>
                <gml:pos>394999.0 430000.0</gml:pos>
                <gml:pos>405000.0 450000.0</gml:pos>
            </gml:boundingBox>
        </gml:validArea>
        <gml:baseCRS>
            <fdo:WKTCRS gml:id="Default">
                <gml:srsName>Default</gml:srsName>
 
<fdo:WKT>LOCAL_CS["*XY-MT*",LOCAL_DATUM["*X-Y*",10000],UNIT["Meter",
1],AXIS["X",EAST],AXIS["Y",NORTH]]</fdo:WKT>
            </fdo:WKTCRS>
        </gml:baseCRS>
        <gml:definedByConversion
xlink:href="http://fdo.osgeo.org/coord_conversions#identity"/>
        <gml:derivedCRSType
codeSpace="http://fdo.osgeo.org/crs_types">geographic</gml:derivedCRSType>
        <gml:usesCS xlink:href="http://fdo.osgeo.org/cs#default_cartesian"/>
    </gml:DerivedCRS>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fdo="http://fdo.osgeo.org/schemas"
xmlns:gml="http://www.opengis.net/gml"
xmlns:default="http://fdo.osgeo.org/schemas/feature/default"
targetNamespace="http://fdo.osgeo.org/schemas/feature/default"
elementFormDefault="qualified" attributeFormDefault="unqualified">
        <xs:annotation>
            <xs:appinfo source="http://fdo.osgeo.org/schemas"/>
        </xs:annotation>
        <xs:element name="default" type="default:defaultType"
abstract="false" substitutionGroup="gml:_Feature">
            <xs:key name="defaultKey">
                <xs:selector xpath=".//default"/>
                <xs:field xpath="FeatId"/>
            </xs:key>
        </xs:element>
        <xs:complexType name="defaultType" abstract="false"
fdo:hasGeometry="false">
            <xs:annotation>
                <xs:appinfo source="http://fdo.osgeo.org/schemas"/>
            </xs:annotation>
            <xs:complexContent>
                <xs:extension base="gml:AbstractFeatureType">
                    <xs:sequence>
                        <xs:element name="FeatId">
                            <xs:annotation>
                                <xs:appinfo
source="http://fdo.osgeo.org/schemas"/>
                            </xs:annotation>
                            <xs:simpleType>
                                <xs:restriction base="xs:string">
                                    <xs:maxLength value="256"/>
                                </xs:restriction>
                            </xs:simpleType>
                        </xs:element>
                        <xs:element name="Image"
type="fdo:RasterPropertyType" fdo:defaultImageXSize="1024"
fdo:defaultImageYSize="1024" fdo:srsName="Default">
                            <xs:annotation>
                                <xs:appinfo
source="http://fdo.osgeo.org/schemas">
                                    <fdo:DefaultDataModel
dataModelType="Bitonal" dataType="Unknown" organization="Pixel"
bitsPerPixel="1" tileSizeX="256" tileSizeY="256"/>
                                </xs:appinfo>
                            </xs:annotation>
                        </xs:element>
                    </xs:sequence>
                </xs:extension>
            </xs:complexContent>
        </xs:complexType>
    </xs:schema>
    <SchemaMapping xmlns="http://fdogrfp.osgeo.org/schemas"
provider="OSGeo.Gdal.3.2" name="Raster">
        <complexType name="defaultType">
            <complexType name="rasterTypeType">
                <RasterDefinition name="images">
                    <Location name="D:\Projects\MGDemo\Raster\">
                        <Feature name="Sd93ne.tif">
                            <Band name="RGB" number="1">
                                <Image frame="1" name="Sd93ne.tif">
                                <Georeference> 
 
<InsertionPointX>394999.57000</InsertionPointX> 
 
<InsertionPointY>440000.25000</InsertionPointY> 
                                   <ResolutionX>0.635160</ResolutionX> 
                                   <ResolutionY>0.635160</ResolutionY> 
                                   <RotationX>0</RotationX> 
                                   <RotationY>0</RotationY> 
                                 </Georeference> 
                                </Image>
                            </Band>
                        </Feature>
                    </Location>
                </RasterDefinition>
            </complexType>                
        </complexType>
    </SchemaMapping>
</fdo:DataStore>







-----Original Message-----
From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Jason Birch
Sent: 04 October 2007 20:11
To: MapGuide Users Mail List
Subject: RE: [mapguide-users] Exmple of Gdal index xml


Understood.  I can't see anything wrong with that latest config file
though.  It almost seems like your server isn't sending the entire
config to Studio.  Can you try creating a layer without testing the data
source and see if it works?

Also maybe try stopping/restarting the MapGuide the server and
restarting studio?

Jason

-----Original Message-----
From: Gary Morin
Subject: RE: [mapguide-users] Exmple of Gdal index xml

If I delete the configuration file the feature source works okay and the
contents can be displayed. However as soon as I upload the generated
configuration file I get the same errors as before.

As we may be working with many images it would make sense to optimize
the configuration.

Thanks for your assistance
_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users



More information about the mapguide-users mailing list