[Gdal-dev] PROJ.4 warping string ignored
Mateusz Loskot
mateusz at loskot.net
Wed Oct 24 19:05:21 EDT 2007
Seth,
I found that your command is wrong.
The OGR is correct, but you need to use +nadgrids=@null trick to
overwrite ellipsoid issue.
It is well explained in PROJ.4 FAQ:
http://proj.maptools.org/faq.html (Changing Ellipsoid...)
Seth Price wrote:
> Sorry if I'm being impatient. Any news on this bug?
> Thanks,
> Seth
>
>
> On Oct 23, 2007, at 9:18 AM, Mateusz Loskot wrote:
>
>> Seth Price wrote:
>>> Thanks for the response. Although I don't claim to know what I'm doing,
>>> I'm trying to define a sphere (not the normal ellipsoid).
>>
>> Seth,
>>
>> Ah, right. I've missed the b semi-axis parameter.
>>
>>> I'm copying
>>> the instructions from this page, the PROJ.4 parameters are at the bottom
>>> in the 'Update 4' text:
>>> http://cfis.savagexi.com/articles/2006/05/03/google-maps-deconstructed
>>>
>>> Also, it doesn't make sense that I'm defining the same parameters,
>>> because if I directly use the proj utility, the output is different:
>>>
>>> proj +proj=merc +datum=WGS84 +units=m -r << EOF
>>> ? 46 -90
>>> ? EOF
>>> -10018754.17 5749599.55
>>>
>>> proj +proj=merc +latts=0 +lon0=0 +k=1.0 +x0=0 +y0=0 +a=6378137.0
>>> +b=6378137.0 +units=m -r << EOF
>>> ? 46 -90
>>> ? EOF
>>> -10018754.17 5780349.22
>>>
>>> I think that gdalwarp is confusing the two commands because the image is
>>> shifted the same amount as the difference of these two coordinates.
>>
>> Yes, your assumptions seem to be correct.
>>
>> I've checked the code, and construction of spatial reference system
>> object (OGRSpatialReference class) ignores your a and b parameters,
>> recognizes proj=merc name and uses default ellipsoid.
>> IOW, according to my understanding, handling custom PROJ.4 definition
>> that uses standard projection name is not supported.
>>
>> Let's wait for Frank's comment.
>>
>> Cheers
>> --
>> Mateusz Loskot
>> http://mateusz.loskot.net
>
>
--
Mateusz Loskot
http://mateusz.loskot.net
More information about the Gdal-dev
mailing list