[R-sig-Geo] convUL: wrong for Southern hemisphere

Agustin Lobo Agustin.Lobo at ija.csic.es
Sat Nov 3 15:05:45 CET 2007


But negative latitude indicates Southern Hemisphere and negative
longitude indicates West of Greenwich, this is standard and correct.
Thus, just by having negative latitudes, the correct UTMY should
be calculated. Note that if +zone is omitted, the correct 19 zone
is calculated, hence accepting and correctly interpreting the negative
longitudes (+zone is provided for forcing coordinates according to another
zone, which is useful when you are working in 2 zones and decide
to have coordinates as for one single zone, otherwise +zone is not 
required).  The same should be done for the negative latitudes and
calculate the correct UTMY in the Southern Hemisphere.

Anyway, +south solves the problem for spTransform, thanks a lot:

 > tomas1sp
            coordinates V1         V2 V3     V4 V5     V6
1 (-66.6065, -14.8974)  1   Manguito 14 53.846 66 36.393
2 (-66.6475, -14.7857)  2 CampoBEllo 14 47.141 66 38.852
3 (-66.6633, -14.8128)  3 SanAntonio 14 48.771 66 39.801
4 (-66.6939, -14.8583)  4 Pto.Mendez 14 51.498 66 41.634
5 (-66.7367, -14.9731)  5     LaCRuz 14 58.385 66 44.204

 > spTransform(tomas1sp, CRS("+proj=utm +zone=19 +ellps=WGS84 +south"))
         coordinates V1         V2 V3     V4 V5     V6
1 (757501, 8351630)  1   Manguito 14 53.846 66 36.393
2 (753220, 8364050)  2 CampoBEllo 14 47.141 66 38.852
3 (751485, 8361060)  3 SanAntonio 14 48.771 66 39.801
4 (748144, 8356070)  4 Pto.Mendez 14 51.498 66 41.634
5 (743404, 8343410)  5     LaCRuz 14 58.385 66 44.204

(no solution for convUL(), though, just to mention it)

Agus


Roger Bivand escribió:
> On Sat, 3 Nov 2007, Agustin Lobo wrote:
> 
>> Dear list,
>>
>> For negative latitudes (Southern hemisphere), convUL yields negative UTM
>> coordinates as
>> for Northern hemisphere, instead of positive UTMY coordinates for the
>> South.  I don't see any option for modifying this behavior, is it?
>> The same is true for spTransform, can't fnd the way of stating that
>> the utm zone is in the Southern hemisphere (which should not be
>> required, because of the negative latitude)
>> spTransform(tomas1sp, CRS("+proj=utm +zone=19 +ellps=WGS84"))
>> yields negative UTMY coordinates and
>> spTransform(tomas1sp, CRS("+proj=utm +zone=-19 +ellps=WGS84"))
> 
> Well, it is an error. It is not accepted that a negative zone number is 
> what is needed to add the y offset. In PROJ.4 notation, you simply add 
> +south to the definition:
> 
>> library(rgdal)
>> CRS("+init=epsg:32719")
> CRS arguments:
>  +init=epsg:32719 +proj=utm +zone=19 +south +ellps=WGS84 +datum=WGS84
> +units=m +no_defs +towgs84=0,0,0
> 
> Details at:
> 
> http://www.remotesensing.org/geotiff/proj_list/transverse_mercator.html
> 
> Other notations may vary, but just assuming that minus indicates south 
> is overoptimistic.
> 
> Roger
> 
>> an error
>>
>> Agus
>>
>>
> 

-- 
Dr. Agustin Lobo
Institut de Ciencies de la Terra "Jaume Almera" (CSIC)
LLuis Sole Sabaris s/n
08028 Barcelona
Spain
Tel. 34 934095410
Fax. 34 934110012
email: Agustin.Lobo at ija.csic.es
http://www.ija.csic.es/gt/obster




More information about the R-sig-Geo mailing list