Hi All,

 

I'm still struggling with this problem. I think I have made some progress
but I'm still getting blank tiles rendered out by mapguide.

 

Heres what I have tried so far.

 

Set up a virtual machine and installed the 60 day trial of Mapguide
Enterprise and loaded my Repositories folder for the old installation where
the trial licence had expired (thankfully I had backed up before moving back
to Mapguide O/S)

 

Extracted the config.xml file from the Autodesk.Raster based data sources
(Feature Object)

 

I can now see that there is some extra info in the xml:

 

<Georeference>

                <InsertionPointX>445000</InsertionPointX>

                <InsertionPointY>1205000</InsertionPointY>

                <ResolutionX>1</ResolutionX>

                <ResolutionY>1</ResolutionY>

                <RotationX>0</RotationX>

                <RotationY>0</RotationY>

                <ResolutionUnit></ResolutionUnit>

</Georeference>

 

And doing some more research made me try loading the images into the server
while running mapguide as an application by stopping the service, and then
doing something like:

 

cd C:\MapGuide\Server\bin

set cpl_debug=on

mgserver run

 

then if I load a tiff image from the old store using the editor in Mapguide
Maestro, using a tiff from the folder that also contains the tfw's I get
this output from mapguide and then save it I get:

 

GDAL: GDALOpen(C:\Tiffs\hp40ne.tif, this=12762E50) succeeds as GTiff.

 

Output from the console. Then the following appears in the XML definition
for the feature source

 

<?xml version="1.0" encoding="utf-8"?>

<FeatureSource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xsi:noNamespaceSchemaLocation="FeatureSource-1.0.0.xsd">

  <Provider>OSGeo.Gdal</Provider>

  <Parameter>

    <Name>DefaultRasterFileLocation</Name>

    <Value>%MG_DATA_PATH_ALIAS[Tiffs]%hp40ne.tif</Value>

  </Parameter>

</FeatureSource>

 

But the configuration document remains blank?

 

 

If I load the attached XML using the 'Edit configuration document' button
and saveit seems to get accepted. Although every time I save anything I get
a grumble about 

 

Warning - OSGeo.MapGuide.MaestroAPI.FeatureSource: Spatial context extent
appears to be invalid (or default)

 

I just cant figure out why my tiles are all rendering out blank?

 

Please help I've spent so much time and am running out of ideas.

 

Cheers,

Dave

 

 

From: [email protected]
[mailto:[email protected]] On Behalf Of Dave Boyle
Sent: 26 April 2011 16:24
To: [email protected]
Subject: [mapguide-users] GDAL Raster FDO Question

 

Hi All,

 

I'm relatively new to Mapguide but have been getting on okay and have had
some good results. There are some areas that I'm struggling with though and
I'm hoping someone can help. Basically I was struggling to get layer up and
running that use tif's with associated tfw geo-referencing files in
Mapguide, so I switched to the trial version of Mapguide Enterprise and was
able to import a large number of tifs and tfws all from one folder on the
server. I then used Maestro to render out tiles for the various zoom levels
and the results were quite good if a little time consuming and labour
intensive for the server.

 

The trouble is that the liscence has now expired on the Enterpise trial and
we have had to revert back to Mapguide O/S as we don't currently have the
budget for a full licence. This means I'm back to trying to achieve a
similar solution with GDAL FDO which I'm sure is achievable. So far I've
managed to import  a bunch of tif's into a GDAL FDO Data source using the
rasterconfig.php file that I got from the osgeo website. I've then gone on
to substitute the Autodesk Raster Data Source with the GDAL FDO. Maestro
does list the tif files that are now in the GDAL data source but this takes
an age, and any tiles rendered out are just blank.

 

Can someone please point me in the right direction? I think it's the tfw's /
georerencing files that are missing from the equation.

 

Regards,

Dave

<?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: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>5000.000000 5000.000000</gml:pos>
				<gml:pos>660000.000000 1225000.000000</gml:pos>
			</gml:boundingBox>
		</gml:validArea>
		<gml:baseCRS xlink:href="http://fdo.osgeo.org/crs#default_cartesian"/>
		<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"; targetNamespace="http://fdo.osgeo.org/schemas/feature/default"; xmlns:fdo="http://fdo.osgeo.org/schemas"; xmlns:gml="http://www.opengis.net/gml"; xmlns:default="http://fdo.osgeo.org/schemas/feature/default"; elementFormDefault="qualified" attributeFormDefault="unqualified">
		<xs:annotation>
			<xs:documentation>This is the default schema</xs:documentation>
		</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:complexContent>
				<xs:extension base="gml:AbstractFeatureType">
					<xs:sequence>
						<xs:element name="FeatId">
							<xs:annotation>
								<xs:documentation/>
							</xs:annotation>
							<xs:simpleType>
								<xs:restriction base="xs:string">
									<xs:maxLength value="256"/>
								</xs:restriction>
							</xs:simpleType>
						</xs:element>
						<xs:element name="Raster" type="fdo:RasterPropertyType" fdo:defaultImageXSize="200" fdo:defaultImageYSize="200" fdo:srsName="Default">
							<xs:annotation>
							<xs:appinfo source="http://fdo.osgeo.org/schemas";>
								<fdo:DefaultDataModel dataModelType="Unknown" dataType="Unknown" organization="Row" bitsPerPixel="32" tileSizeX="128" tileSizeY="128"/>
							</xs:appinfo>
							</xs:annotation>
						</xs:element>
					</xs:sequence>
				</xs:extension>
			</xs:complexContent>
		</xs:complexType>
	</xs:schema>
	<SchemaMapping provider="Autodesk.Raster.3.5" name="default" xmlns="http://www.autodesk.com/isd/fdo/RasterFileProvider";>
		<complexType name="defaultType">
			<RasterDefinition name="Raster">
				<Location name="C:\OS_Street_Map/data/">
					<Feature name="C:\OS_Street_Map/data/\hp40ne.tif">
						<Band name="RGB" number="1">
						<Image name="hp40ne.tif" frame="1">
							<Georeference>
								<InsertionPointX>445000</InsertionPointX>
								<InsertionPointY>1205000</InsertionPointY>
								<ResolutionX>1</ResolutionX>
								<ResolutionY>1</ResolutionY>
								<RotationX>0</RotationX>
								<RotationY>0</RotationY>
								<ResolutionUnit></ResolutionUnit>
							</Georeference>
							<Bounds>
								<MinX>445000</MinX>
								<MinY>1205000</MinY>
								<MaxX>450000</MaxX>
								<MaxY>1210000</MaxY>
							</Bounds>
						</Image>
						</Band>
					</Feature>
				</Location>
			</RasterDefinition>
		</complexType>
	</SchemaMapping>
</fdo:DataStore>
_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users

Reply via email to