Projecting GCS Australian 1984 to WGS 1984 UTM (or similar) to get units of meters?


I am currently trying to run a kernel density analysis and need to change the co-ordinate system to a UTM measurement in order to set some meaningful biological constraints to my seabird data (eg, Search Area and cell size output). The best out come i am wanting is to set these in meters.

Currently my data is point data (XY or .CSV) and set in GCS_Australian_1984. I have been trying to change GCS_Australian_1984 to WGS 1984 UTM zone 12s (not sure if this an appropriate conversion in terms of file comparability) and when i run the “project” tool in data management i keep getting an error that says “table name is invalid” and “The project method cannot do a datum transformation”.

My data is located in an area of W: 110 N: -6 S: -21.5 E: 131 (Timor Sea(Southern Hemishpere))

Is there any way or a recommendation, that i can transform my data into a format where kernel density analysis will give meters and not SQUARE_MAP_UNITS, this is not very meaningful to me.

Ps This is a good summary of what i am trying to achieve (http://www.youtube.com/watch?v=P3GP-IiQ-0Q) at 5 minutes and 16 sec and using arcmap 10.1

SOLUTION

For any one having similar issues with getting your kernel density values (Search area or cell size out put) into biological terms then here is how to do it.

If you have point data add it as X and Y data under your “normal” co-ordinate system. File > add data > add XY data.

Then right click on the layer that was just imported. A tab will appear, select data > Export data > a box will appear select the file directory and export as a shape file.

then import this shape file back into arcmap 10.1 and change the co-ordinate system to UTM and save. this can be done in the data management tab in the arctool box and is under projections and transformations, select the project tool.

then run your kernel density with the transformed shape file. The option area units should be “ungreyed” select your units and done.

NOTE: XY data can not be transformed into UTMs it has to be changed into a shape file and reimported.

Which UTM zone 32N with prefix should I use in Rhineland-Palatinate (Germany)?


I would like to store and use GIS-Data in Rhineland-Palatinate (Germany). The coordinate System should be UTM 32N with 32 as prefix (false easting = 32,500,000; not 500,000).

I looked at EPSG 4647 [ETRS89 / UTM zone 32N (zE-N)].
But I’m confused because EPSG says:

Scope: Used in Schleswig-Holstein.

Information Source: Landesvermessungsamt Schleswig-Holstein.

Which UTM 32N coordinate system (EPSG-code) should use in Rhineland-Palatinate?

EDIT:

I will convert a large database from Gauss-Krueger to UTM. The database (and the new coordinate system) will be used for many years. We will exchange data with other (UTM with and without prefix, Gauss-Kueger).

Since 4647 to refers to Schleswig-Holstein I am not sure whether 4647 is good for us. But there are no other EPSG codes with zone prefix.

QGIS v2. Convert longitude/latitude to UTM projection-Zone 51J – Southern hemisphere [duplicate]


This question already has an answer here:

How can I convert LIDAR based measurement to UTM coordinate?


I have lidar based measurement with azimuth elevation and range, I would like to convert this data to UTM coordinate. I know the position of the lidar in UTM coordinate system, so I developed the following code in Matlab

LOS = [cosd(ele)*sind(azi); cosd(ele)*cosd(azi); sind(ele)]
% 

R1 = [cosd(yaw), -sind(yaw), 0 ;...
      sind(yaw), cosd(yaw) , 0;...
      0     , 0      , 1];

R2 = [1,  0     ,  0     ;...
      0,  cosd(pitch),  sind(pitch); ...
      0, -sind(pitch),  cosd(pitch) ];

R3 = [cosd(roll)  , 0 , -sind(roll);...
      0       , 1 , 0     ;...
      sind(roll) , 0 , cosd(roll) ];

LOS2 = [LOS'*RR]

x=LOS2(1)*range+OFF2(1)
y=LOS2(2)*range+OFF2(2)
z=LOS2(3)*range+OFF2(3)

But I am not quiet sure that the rotation matrix is good. Am I gooing in the right path?

How to reproject a vector layer in QGIS?


I have some shape file which is in UTM. I wanted them to convert to Decimal Degrees in QGIS.

Thanks.

Test of ORACLE DB functions converting lat-long to utm and mgrs with real data known to be correct?


I have rewritten some Delphi function to ORACLE DB functions for converting from lat-long to utm and mgrs.
Anyone care to validate the output with real data they know is correct?

package specification:

create or replace package gedaco as 
    function MGRS(lat in number, Lon in number,  a in number, InverseFlattening in number,  
                  Coding in number,  Digits in number) return varchar2;
    Function MGRSLatZone(lat in number) return varchar2;
    function SquareID(UTMzn in number, Northing in number, Easting in number, 
                      Coding in number) return varchar2;
    function UTM(lat in number, Lon in number, a in number, InverseFlattening in number)
                                return varchar2;
    Function UTMX(UTMs in varchar2) return number;
    Function UTMY(UTMs in varchar2) return number;
    function UTMZone(lat in number, Lon in number) return number;
end gedaco;

package body:

create or replace package body gedaco as 

function MGRS(lat in number, Lon in number,  a in number, InverseFlattening in number,
              Coding in number,  Digits in number) return varchar2 is 
  result varchar2(32);
  UTMs1 varchar2(32);
  E1 number;
  N1 number;
  Zn number;
  Lzn varchar2(32);
  Sq varchar2(32);
begin
  UTMs1 := UTM(lat, Lon, a, InverseFlattening) ;
  E1 := UTMX(UTMs1);
  N1 := UTMY(UTMs1);
  Zn := UTMZone(lat, Lon);
  Lzn := MGRSLatZone(lat);
  Sq := SquareID(Zn, N1, E1, Coding);
  result := replace(
      to_char(Zn,'00') || LZn || Sq || 
     to_char(round(E1 - 100000 * trunc(E1/100000)),'00000') || 
     to_char(round(N1 - 100000 * trunc(N1/100000)),'00000')

      ,' ', '');
  return result;
end MGRS;


Function MGRSLatZone(lat in number) return varchar2 is 
    result varchar2(1);
      GridZones CONSTANT varchar2(20) := 'CDEFGHJKLMNPQRSTUVW';
begin
  If (lat >= 72) Then Result := 'X';
  Else Result := substr(GridZones, Trunc((lat + 88) / 8), 1);
  End If;
  return result;
end MGRSLatZone;

function SquareID(UTMzn in number, Northing in number, Easting in number, 
                  Coding in number) return varchar2 is
    result varchar2(32);
    N number;
    E number;
    ZoneSet number;
    Col varchar2(32);
    Rov varchar2(32);
    Col1 CONSTANT varchar2(20) := 'ABCDEFGH';
    Col2 CONSTANT varchar2(20) := 'JKLMNPQR';
    Col3 CONSTANT varchar2(20) := 'STUVWXYZ' ;
    Row1 CONSTANT varchar2(20) := 'ABCDEFGHJKLMNPQRSTUV';
    Row2 CONSTANT varchar2(20) := 'FGHJKLMNPQRSTUVABCDE';
    Row3 CONSTANT varchar2(20) := 'LMNPQRSTUVABCDEFGHJK';
    Row4 CONSTANT varchar2(20) := 'RSTUVABCDEFGHJKLMNPQ';   
begin
  N := Trunc(Northing / 100000);
  N := N - 20 * Trunc(N / 20);
  E := Trunc(Easting / 100000);
  ZoneSet := UTMzn - 6 * Trunc(UTMzn / 6);
  If ((ZoneSet = 1) Or (ZoneSet = 4)) Then
     Col := SubStr(Col1, E, 1);
  End If;
  If ((ZoneSet = 2) Or (ZoneSet = 5)) Then
     Col := SubStr(Col2, E, 1);
  End If;
  If ((ZoneSet = 3) Or (ZoneSet = 0)) Then
     Col := SubStr(Col3, E, 1);
  End If;

  ZoneSet := ZoneSet - 2 * Trunc(ZoneSet / 2);
  If ((Coding = 1) And (ZoneSet = 1)) Then
    Rov := SubStr(Row1, N + 1, 1);
  End If;
  If ((Coding = 1) And (ZoneSet = 0)) Then
    Rov := SubStr(Row2, N + 1, 1);
  End If;
  If ((Coding = 2) And (ZoneSet = 1)) Then
    Rov := SubStr(Row3, N + 1, 1);
  End If;
  If ((Coding = 2) And (ZoneSet = 0)) Then
    Rov := SubStr(Row4, N + 1, 1);
  End If;

  Result:= Col || Rov;
  return result;
end SquareId;


function UTM(lat in number, Lon in number, a in number, InverseFlattening in number)
  return varchar2
  is result varchar2(320);
  ZoneWidth CONSTANT number := 6;
  CentralScaleFactor CONSTANT number := 0.9996;
  Zone1CentralMeridian CONSTANT number := -177;
  Zone0WestMeridian number;
  Zone0CentralMeridian number;
  FalseEasting CONSTANT number := 500000;

  Pi number;
  SemiMajorAxis number;
  Flattening number; Eccent2 number; Eccent4 number; Eccent6 number;
  A0 number; A2 number; A4 number; A6 number;
  LatRad  number;
  LonRad  number;
  Sin1Lat  number; Sin2Lat  number; Sin4Lat  number; Sin6Lat  number;
  Rho  number;
  Nu  number;
  Psi  number; Psi2  number; Psi3  number; Psi4   number;
  CosLat  number; CosLat2  number; CosLat3  number; CosLat4  number; CosLat5   number;
  CosLat6  number; CosLat7    number;
  TanLat  number; TanLat2  number; TanLat4  number; TanLat6    number;
  DifLon  number; DifLon2  number; DifLon3  number; DifLon4  number; DifLon5   number;
  DifLon6 number; DifLon7  number; DifLon8   number;
  DistOverMeridian    number;
  Zone  number;
  CentralMeridian  Integer;
  East1  number; East2  number; East3  number; East4  number;
  North1  number; North2  number; North3  number; North4  number;
  X  number;
  Y  number;
  Hemi  varchar2(1);
  FalseNorthing  number;

begin
Zone0WestMeridian := Zone1CentralMeridian - (1.5 * ZoneWidth);
Zone0CentralMeridian := Zone0WestMeridian + ZoneWidth / 2;
Pi := 3.141592653589793238462643383279502884197169399375105820974944592307816406;


SemiMajorAxis := 1000 * a  ;

Flattening := 1.0 / InverseFlattening   ;
Eccent2 := 2.0 * Flattening - (Flattening * Flattening);
Eccent4 := Eccent2 * Eccent2   ;
Eccent6 := Eccent2 * Eccent4 ;
A0 := 1 - (Eccent2 / 4.0) - ((3 * Eccent4) / 64.0) - ((5.0 * Eccent6) / 256.0);
A2 := (3.0 / 8.0) * (Eccent2 + (Eccent4 / 4.0) + ((15.0 * Eccent6) / 128.0)) ;
A4 := (15 / 256) * (Eccent4 + ((3.0 * Eccent6) / 4.0));
A6 := (35.0 * Eccent6) / 3072.0 ;
  --  ' Parameters to radians
    LatRad := lat / 180 * Pi;
    LonRad := Lon / 180 * Pi ;


  --  'Sin of latitude and its multiples
    Sin1Lat := sIn(LatRad) ;
    Sin2Lat := sIn(2 * LatRad) ;
    Sin4Lat := sIn(4 * LatRad);
    Sin6Lat := sIn(6 * LatRad);

  --  'Meridian Distance
    DistOverMeridian := SemiMajorAxis * 
                        (A0 * LatRad - A2 * Sin2Lat + A4 * Sin4Lat - A6 * Sin6Lat);


  --  'Radii of Curvature
    Rho := SemiMajorAxis * (1 - Eccent2) /Power( (1 - 
           (Eccent2 * Sin1Lat * Sin1Lat)) , 1.5);
    Nu := SemiMajorAxis /Power( (1 - (Eccent2 * Sin1Lat * Sin1Lat)) , 0.5);
    Psi := Nu / Rho  ;
    Psi2 := Psi * Psi ;
    Psi3 := Psi * Psi2;
    Psi4 := Psi * Psi3  ;

  --  'Powers of cos latitude
    CosLat := Cos(LatRad);
    CosLat2 := CosLat * CosLat  ;
    CosLat3 := CosLat * CosLat2 ;
    CosLat4 := CosLat * CosLat3 ;
    CosLat5 := CosLat * CosLat4 ;
    CosLat6 := CosLat * CosLat5 ;
    CosLat7 := CosLat * CosLat6 ;


--    'Powers of tan latitude
    TanLat := Tan(LatRad) ;
    TanLat2 := TanLat * TanLat ;
    TanLat4 := TanLat2 * TanLat2  ;
    TanLat6 := TanLat2 * TanLat4  ;

 --   'Zone
 --   'Zone := Int((Lon - Zone0WestMeridian) / ZoneWidth)
    Zone := UTMZone(lat, Lon)   ;



    CentralMeridian := Trunc((Zone * ZoneWidth) + Zone0CentralMeridian ) ;
    DifLon := (Lon - CentralMeridian) / 180 * Pi    ;
    DifLon2 := DifLon * DifLon  ;
    DifLon3 := DifLon * DifLon2 ;
    DifLon4 := DifLon * DifLon3 ;
    DifLon5 := DifLon * DifLon4 ;
    DifLon6 := DifLon * DifLon5 ;
    DifLon7 := DifLon * DifLon6 ;
    DifLon8 := DifLon * DifLon7 ;

    East1 := DifLon * CosLat  ;
    East2 := DifLon3 * CosLat3 * (Psi - TanLat2) / 6.0;
    East3 := DifLon5 * CosLat5 * (4.0 * Psi3 * (1.0 - 6.0 * TanLat2) + Psi2 * 
    (1.0 + 8.0 * TanLat2) -Psi * (2.0 * TanLat2) + TanLat4) / 120.0;
    East4 := DifLon7 * CosLat7 * (61.0 - 479.0 * TanLat2 + 179.0 * TanLat4 - TanLat6) 
    / 5040.0  ;
    X := CentralScaleFactor * Nu * (East1 + East2 + East3 + East4) + FalseEasting  ;

    If (lat >= 0) Then
      Hemi := 'N';
      FalseNorthing := 0;
    Else
      Hemi := 'S';
      FalseNorthing := 10000000;
    end if;

    North1 := Sin1Lat * DifLon2 * CosLat / 2.0 ;
    North2 := Sin1Lat * DifLon4 * CosLat3 * (4.0 * Psi2 + Psi - TanLat2) / 24.0 ;
    North3 := Sin1Lat * DifLon6 * CosLat5 * (8.0 * Psi4 * (11.0 - 24.0 * TanLat2)
              - 28.0 * Psi3 * (1.0 - 6.0 * TanLat2) +
     Psi2 * (1.0 - 32.0 * TanLat2) - Psi * (2.0 * TanLat2) + TanLat4) / 720;
    North4 := Sin1Lat * DifLon8 * CosLat7 * (1385 - 3111 * TanLat2 + 543 * 
              TanLat4 - TanLat6) / 40320.0 ;
    Y := CentralScaleFactor * (DistOverMeridian + Nu *
         (North1 + North2 + North3 + North4)) + FalseNorthing;

  Result := Zone || Hemi || ' ' || 
            to_char(round(X, 3),'0000000.000') || 
            to_char(round(Y, 3),'0000000.000');
  return result;
End UTM;


Function UTMX(UTMs in varchar2) return number
    is result number;
begin
  Result := to_number(substr(UTMs, 6, 11));
  return result;
End UTMX;


Function UTMY(UTMs in varchar2) return number
    is result number;
begin
  Result := to_number(substr(UTMs, 18, 11));
  return result;
End UTMY;


function UTMZone(lat in number, Lon in number) return number is
  result number;
  UTMZone number;
  e number;
  d number;
  ZoneWidth CONSTANT number := 6;
  Zone1CentralMeridian CONSTANT number := -177;
  Zone0WestMeridian number;
begin
  Zone0WestMeridian := Zone1CentralMeridian - (1.5 * ZoneWidth);
  d:=ZoneWidth;

   UTMZone := Trunc((lon - Zone0WestMeridian) / d);
    --Special Cases for Norway & Svalbard
    CASE 
    WHEN (lat > 55) AND (UTMZone = 31) AND (lat < 64) AND (lon >  2) THEN UTMZone := 32;
    WHEN (lat > 71) AND (UTMZone = 32) AND (lon <  9) THEN UTMZone := 31;
    WHEN (lat > 71) AND (UTMZone = 32) AND (lon >  8) THEN UTMZone := 33;
    WHEN (lat > 71) AND (UTMZone = 34) AND (lon < 21) THEN UTMZone := 33;
    WHEN (lat > 71) AND (UTMZone = 34) AND (lon > 20) THEN UTMZone := 35; 
    WHEN (lat > 71) AND (UTMZone = 36) AND (lon < 33) THEN UTMZone := 35;
    WHEN (lat > 71) AND (UTMZone = 36) AND (lon > 32) THEN UTMZone := 37;
    ELSE UTMZone := UTMZone;  
    END CASE;

  Result := UTMZone;
  return result;
end UTMZone;

end gedaco;

Function is used MGRS(:latitude, :longitude, 6378.137, 298.2572236, 1, 5)
for WGS84 with 5 digits precision.
list of datums:

Datum           Radius          InverseFlattening
'WGS84',        6378.137,       298.2572236
'NAD27',        6378.2064,      294.9786982
'NAD83',        6378.137,       298.2572221
'WGS66',        6378.145,       298.25
'GRS67',        6378.16,        298.2472
'IAU68',        6378.16,        298.2472
'WGS72',        6378.135,       298.26
'Clarke66',     6378.2064,      294.9786982
'GRS80',        6378.137,       298.2572221
'Krasovsky',    6378.2064,      298.3
'Bessel',       6377.397155,    299.1528128

Just to be completely specific, I have of course done some random checks with Earth Point, but I am asking for someone to control my functions with a sustainable amount of data.
A proper reply to my question can simply be test with 10 000 records without errors found, and if errors are found I am of course interested in the location not calculated correctly if that is possible.

Shapefile point coordinates to lonlat


I’m currently trying to parse a shapefile (http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf) with c++.
While I have no problems parsing all the data I need, there is a problem with the coordinates. I got a description file for the data, which states that the used projection is “ETRS89 (Ellipsoid: GRS80), UTM (Zone 33)”.

I need all points to be in lon/lat format. I spent the whole day googling around to find a solution for this problem, but there doesn’t seem to be one.

data example:

33354891.477852, 6060028.67074774
        ^               ^
       X (E)           Y (N)

Is there any library for converting projection transformation in php?


I would like to transform data from lat/long ETRS89 to y/x UTM ETRS89 through php.

Any idea?

utm coordinates feet to meters [on hold]


I have UTM coordinates (NAD83 Zone 16) that are in feet. How do I convert them to meters? Ultimately, I need to convert these coordinates to NAD83 Illinois East State Plane CORS96.

How do I change from lat/long to a metric coordinate system in GRASS?


Yes, it’s yet another transformation question.

I am working with ASTER DEM data, which is LatLong WGS84. I want to process the DEM map into an STL file for use in a CFD simulation. The script I am using to accomplish this requires metric coordinates, though.

Here’s what my ASTER DEM mosaic looks like:

enter image description here

I have created a new location in GRASS and chosen UTM with the etrs89 datum and grs80 spheroid. (I don’t know if this is the correct choice.) Following these instructions, I created a mosaic of some ASTER tiles using gdalwarp:

gdalwarp -t_srs "+proj=utm +zone=32 +datum=etrs89" -r bilinear -dstnodata -9999 -co "TILED=YES" AST_DEM.vrt AST_DEM_Rhein_Main.tif

and managed to successfully import them.

(EDIT: It would appear that proj4 does not support ETRS89 as a datum:

$ proj -ld
__datum_id__ __ellipse___ __definition/comments______________________________
       WGS84 WGS84        towgs84=0,0,0
      GGRS87 GRS80        towgs84=-199.87,74.79,246.62
                          Greek_Geodetic_Reference_System_1987
       NAD83 GRS80        towgs84=0,0,0
                          North_American_Datum_1983
       NAD27 clrk66       nadgrids=conus,ntv1_can.dat
                          North_American_Datum_1927
     potsdam bessel       towgs84=606.0,23.0,413.0
                          Potsdam Rauenberg 1950 DHDN
    carthage clark80      towgs84=-263.0,6.0,431.0
                          Carthage 1934 Tunisia
hermannskogel bessel       towgs84=653.0,-212.0,449.0
                          Hermannskogel
       ire65 modif_airy   towgs84=482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15
                          Ireland 1965

Apparently proj doesn’t fail with an error if it doesn’t recognize a parameter, it just silently proceeds without warning the user, even if the result is inaccurate. Caveat emptor!)

I have a couple of problems with the result. First, when I imported the resulting mosaic, GRASS complained that it didn’t recognized the datum:

r.in.gdal input=/home/sfbosch/Documents/Quelle/OpenFOAM/GIS/ASTER/Data/AST_DEM_Rhein_Main.tif output=AST_DEM_Rhein_Main --overwrite
WARNING: Datum <unknown> not recognised by GRASS and no parameters found
Projection of input dataset and current location appear to match
r.in.gdal complete. Raster map <AST_DEM_Rhein_Main> created.

Next, the mosaic obviously looks quite, well, warped:

UTM

I expected some change with the reprojection, but nothing that stark; could this be due to the non-existent (in proj4) datum? I am having trouble recognizing the topographical landmarks I had picked out for myself. Finally, I had been using OpenStreetMap data, and now it won’t import because the projections don’t match:

ERROR: Projection of dataset does not appear to match current location.

GRASS LOCATION PROJ_INFO is:
name: Universal Transverse Mercator
proj: utm
zone: 32
no_defs: defined
datum: etrs89
ellps: grs80
towgs84: 0.000,0.000,0.000

Import dataset PROJ_INFO is:
name: Lat/Lon
proj: ll
datum: wgs84
ellps: wgs84
no_defs: defined

You can use the -o flag to v.in.ogr to override this projection check.
Consider generating a new location with 'location' parameter from input data set.

I tried it with the override, but ended up with a layer that wasn’t visible. I’ve since learned that I also need to reproject the vector layers with v.proj.

Really, all I want is to work with metric coordinates; it almost doesn’t matter which system, the topography is the important part. Was there something wrong with my gdalwarp approach? Am I making this too complicated? What’s the best way to accomplish what I want?

Question and Answer is proudly powered by WordPress.
Theme "The Fundamentals of Graphic Design" by Arjuna
Icons by FamFamFam