[mapguide-users] ECW troubleshooting...another potential solution...

Steve G steve.golden at morganhill.ca.gov
Fri Jul 1 16:45:20 EDT 2011


I was recently trying to display a new set of ECW files and came across an
issue and potential solution which I have not found much information
regarding, at least on this forum.  I searched the GDAL forum and found some
information, but haven't been able to find formal documentation to really
verify.  Maybe Frank Warmerdam can elaborate on...So the following is based
on my experiences...maybe this is a known issue, so sorry if I am just the
ignorant soul...

Have you tried to set up a raster feature source with Maestro (i.e. data
connection) as a composite type, loaded all your files, and yet the data
still does not display?  Have you clicked on the "Edit Configuration
Document" to open the xml document and seen the following? (subset of the
entire xml)?:

..
 <gml:boundingBox>
        <gml:pos>-10000000 -10000000</gml:pos>
        <gml:pos>10000000 10000000</gml:pos>
...
<Bounds>
                    <MinX>-10000000</MinX>
                    <MinY>-10000000</MinY>
                    <MaxX>10000000</MaxX>
                    <MaxY>10000000</MaxY>
                  </Bounds>

I noticed this was happening to me when trying to load my ECW files and as a
result none of the rasters were being projected properly nor displayed.  I
thought that all coordinate/projection information was part of the ECW
header information.  In fact there are some tools out there including ECW
Spy and an old Earth Resource Mapping application called ECW Image Header
Editor.  When using these I can clearly see my projection information in the
header.  So, why was that information not being used by MapGuide/GDAL? 
Well, I came to figure out that there can also be an .aux file associated
with the ECW file (I think the same is true for MrSID files).  This is like
a trw for TIFs or prj for shapefiles.  If you have that .aux file in the
same folder (you should have one aux file per raster image with the same
file name) as your rasters and then load the rasters via Maestro, the
bounding boxes will be populated with the correct information.  

Now, the question is, if you don't have the aux file, how do you create it? 
This lead me to my next, not well documented, but solution that works...if
you have ESRI software.  I believe that there maybe some tools that are part
of GDAL that will create .aux files.  It appears that potentially .aux and
.aux.xml are the same thing (see
http://webhelp.esri.com/arcgiSDEsktop/9.3/index.cfm?TopicName=About_auxiliary_files).  

So, I used ArcMap 9.3 using the "Batch Define Coordinate System" which will
create a .aux.xml file.  While the tool is running the dialog box will say
"The dataset already has a projection defined", but it will create the
.aux.xml file.

This is my experience.  Perhaps others have had similar problems with ECWs
(and potentially MrSIDs).  If anyone cares to provide additional comments or
test my theory and post back, please do so.  I can add to the wiki page
(http://trac.osgeo.org/mapguide/wiki/MGOS22GdalProvider) if someone wants to
substantiate my findings...


-Steve

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/ECW-troubleshooting-another-potential-solution-tp6539081p6539081.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list