[Gdal-dev] Quick fix works preliminarily

Grabowski, Hank hgrabows at stk.com
Thu Jan 8 14:17:42 EST 2004


In morphFromESRI there was code that looked like:

    if( pszProjection != NULL && EQUAL(pszProjection,"Albers") )
        GetRoot()->applyRemapper( 
            "PARAMETER", apszAlbersMapping + 0, apszAlbersMapping + 1, 2
);

To read:

    if( pszProjection != NULL)
        GetRoot()->applyRemapper( 
            "PARAMETER", apszAlbersMapping + 0, apszAlbersMapping + 1, 2
);

This appears to help this issue.  Perhaps it is just a bandaid though.
Does not limiting the parameter conversion process to Albers projections
make sense generally?

Hank Grabowski
hgrabowski at stk.com
1-610-578-1000
------------------------------------------------------------------------
----------
Get an opportunity to win an iQue PDA/GPS handheld system by inviting
your friends and colleagues to join the STK user community at
http://www.stk.com/referral. "Share The Knowledge!"


-----Original Message-----
From: Frank Warmerdam [mailto:warmerdam at pobox.com] 
Sent: Thursday, January 08, 2004 2:03 PM
To: gdal-dev at remotesensing.org
Subject: Re: [Gdal-dev] Projection Parameters


Grabowski, Hank wrote:
> Hey Frank,
> 
> I was just using the Validate method in a preliminary pass. 
> Unfortunately if I simply ignore that step and let OGR try and 
> reproject the data anyway, I don't get a valid reprojection.  From 
> what I can tell the importFromESRI function is calling the 
> morphFromESRI function, but it isn't successfully remapping the 
> parameters.  The projection I'm trying to import is a World Mercator 
> projection.  Is there a csv datafile, that I see references to in the 
> code, that I should have installed?  I'm thinking the answer is no, 
> because the IsAliasFor method used in ValidateProjection has all the 
> necessary values.  At one point are these parameters supposed to be 
> swapped or re-interpreted during the morphFromESRI or importFromESRI 
> function?

Hank,

The corresponding aliasing logic in actual use is embedded as code in
the GetProjParm() method.  There, for instance, if Latitude of Origin is
requested but not found, it will also try latitude of center.

I see that the rules in this method don't exactly match the alias list
in the validate code, but likely should.  If you can submit a bug report
with the original ESRI .prj file I can try to track down what is
happening and generalize the logic.

Code that converts to other formats, such as PROJ.4, use GetProjParm()
with the expectation that it will know something about common aliases.

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    | Geospatial Programmer for Rent


_______________________________________________
Gdal-dev mailing list
Gdal-dev at remotesensing.org
http://remotesensing.org/mailman/listinfo/gdal-dev



More information about the Gdal-dev mailing list