[mapguide-users] GDAL Raster FDO Question

Dave Boyle dave at daveboyle.co.uk
Sun May 1 11:20:13 EDT 2011


Hi All,

 

Managed to get the GDAL Raster Layer I've been asking for help with working!
Really surprised that nobody came to help? Perhaps because of the new
Maestro 3 release that you all seem so preoccupied with? Or maybe because I
used the dreaded licence word in my post ! lol

 

Anyway the solution for me was to change the schema version for the GDAL
layer from 1.1.3 to 1.1.1 in Maestro. I found that the co-ordinate system
for the layer needs to be defined in the definition for the layer in
addition to the configuration document, may be just the same as an override
not sure. The configuration document just needs to be parseable and contain
the links to the GTiffs. I'm not sure if the georeference data is being read
from the configuration document, or the gtiffs themselves but I'm final
getting tiles rendered out.

 

They are slightly different to the autodesk raster tiles in terms of
filesize and they look a bit different, less washed out but maybe not as
quite as well smoothed.

 

Can someone maybe tell me how I can adjust the settings of how gd renders
out these tiles? The look sufficiently different to the old ones for me to
need to render the whole lot out again which would take some time.

 

Perhaps adjusting GDAL version may affect but not sure I want to mess too
much as far too much time spent already.

 

Ive also noticed some errors when rendering out the tiles, like this :

 

Error: Out of memory.

        bad allocation

StackTrace:

  - MgTileServiceHandler.ProcessOperation() line 83 file
c:\builds\mg22win32\mgdev\server\src\services\tile\TileServiceHandler.cpp

  - MgOpGetTile.Execute() line 150 file
c:\builds\mg22win32\mgdev\server\src\services\tile\OpGetTile.cpp

  - MgServerTileService.GetTile() line 259 file
c:\builds\mg22win32\mgdev\server\src\services\tile\ServerTileService.cpp

  - MgServerRenderingService.RenderTile() line 265 file
c:\builds\mg22win32\mgdev\server\src\services\rendering\ServerRenderingServi
ce.cpp

 

Perhaps someone with more mapguide experience could help?

 

Dave

 

 

 

From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Dave Boyle
Sent: 30 April 2011 19:06
To: 'MapGuide Users Mail List'
Subject: RE: [mapguide-users] GDAL Raster FDO Question

 

It seems mgserver.exe doesn't try to read any of the tif files in layer
(checked what files it accesses using filemon from sysinternals suite).

 

Mapguide Log this to the Error log  when trying to browse a map that
contains the layer with the php viewer :

 

<2011-04-30T18:44:24> 3564       Ajax Viewer       195.10.241.11     Author

Error: Failed to stylize layer: OSData_Street_Map

        An exception occurred in FDO component.

        The property 'Raster' does not exist in class 'default:default'.

StackTrace:

  - MgMappingUtil.StylizeLayers() line 831 file
c:\builds\mg22win32\mgdev\server\src\services\mapping\MappingUtil.cpp

 

And the console output is :

 

(####) Unable to process the operation.

 

### seems to be random.

 

 

 

From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Dave Boyle
Sent: 30 April 2011 15:35
To: mapguide-users at lists.osgeo.org
Subject: [mapguide-users] GDAL Raster FDO Question

 

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: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Dave Boyle
Sent: 26 April 2011 16:24
To: mapguide-users at lists.osgeo.org
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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20110501/7b01b9c2/attachment.html


More information about the mapguide-users mailing list