[GRASS-user] converting LAT/LON coordinates to X/Y coordinates

Hello,

I am trying to batch convert Lat/Lon coordinates of several hundred points
into XY coordinates.
Would this be possible using ogr2ogr or similar?

Please see a sample of input (ukoa navigation text file).
Columns 1-9 are “Line” name, 23-25 “point” name, 26-46 lat/lon.

I can easily manipulate the columns position if needed.

regards,
Sid

H2600…1…2…3…4…5…6…7…8
SO81-006A 1657265058.15S1254029.94E 0.0 0.0
SO81-006A 1680265107.44S1254011.76E 0.0 0.0
SO81-006A 1710265119.64S1253948.03E 0.0 0.0
SO81-006A 1740265131.74S1253924.45E 0.0 0.0
SO81-006A 1770265143.94S1253900.73E 0.0 0.0
SO81-006A 1800265156.04S1253837.04E 0.0 0.0
SO81-006A 1830265208.24S1253813.43E 0.0 0.0
SO81-006A 1860265220.45S1253749.74E 0.0 0.0
SO81-006A 1890265232.55S1253726.05E 0.0 0.0
SO81-006A 1920265244.75S1253702.43E 0.0 0.0

···

On 12 October 2013 04:46, Mark Seibel <mseibel@gmail.com> wrote:

Hi.

I would like to know if there is a way to convert a shapefile defined with Lat/Lon into a shapefile defined with X and Y.

One could setup a lat/long location and an xy location and project from one to another in GRASS.

Alternatively, one can use gdal’s ogr2ogr command to reproject the shapefile at the command line outside of GRASS, if the goal is to simply reproject a shapefile.

Mark

···

For jobs like this you can use the cs2cs tool (part of the proj4 package) to convert coordinate pairs from one CRS to another. You can see some examples on the wiki page [1]
(Note: The coordinates below do not look like Lon/Lat)

[1] http://trac.osgeo.org/proj/wiki/man_cs2cs

On 14/10/2013 06:26, Szilard Albert wrote:

Hello,

I am trying to batch convert Lat/Lon coordinates of several hundred points
into XY coordinates.
Would this be possible using ogr2ogr or similar?

Please see a sample of input (ukoa navigation text file).
Columns 1-9 are “Line” name, 23-25 “point” name, 26-46 lat/lon.

I can easily manipulate the columns position if needed.

regards,
Sid

H2600…1…2…3…4…5…6…7…8
SO81-006A 1657265058.15S1254029.94E 0.0 0.0
SO81-006A 1680265107.44S1254011.76E 0.0 0.0
SO81-006A 1710265119.64S1253948.03E 0.0 0.0
SO81-006A 1740265131.74S1253924.45E 0.0 0.0
SO81-006A 1770265143.94S1253900.73E 0.0 0.0
SO81-006A 1800265156.04S1253837.04E 0.0 0.0
SO81-006A 1830265208.24S1253813.43E 0.0 0.0
SO81-006A 1860265220.45S1253749.74E 0.0 0.0
SO81-006A 1890265232.55S1253726.05E 0.0 0.0
SO81-006A 1920265244.75S1253702.43E 0.0 0.0

On 12 October 2013 04:46, Mark Seibel <mseibel@gmail.com> wrote:

Hi.

I would like to know if there is a way to convert a shapefile defined with Lat/Lon into a shapefile defined with X and Y.

One could setup a lat/long location and an xy location and project from one to another in GRASS.

Alternatively, one can use gdal’s ogr2ogr command to reproject the shapefile at the command line outside of GRASS, if the goal is to simply reproject a shapefile.

Mark

This mail was received via Mail-SeCure System.

_______________________________________________
grass-user mailing list
[grass-user@lists.osgeo.org](mailto:grass-user@lists.osgeo.org)
[http://lists.osgeo.org/mailman/listinfo/grass-user](http://lists.osgeo.org/mailman/listinfo/grass-user)
This mail was received via Mail-SeCure System.

-- 
Micha Silver
GIS Consulting
052-3665918
[http://www.surfaces.co.il](http://www.surfaces.co.il)

Micha Silver wrote:

For jobs like this you can use the cs2cs tool (part of the proj4 package) to
convert coordinate pairs from one CRS to another. You can see some examples
on the wiki page [1] (Note: The coordinates below do not look like Lon/Lat)

[1] http://trac.osgeo.org/proj/wiki/man_cs2cs

GRASS GIS' "m.proj" is also fit for the task I think. It is charachterised as
a cs2cs frontend: <http://grass.osgeo.org/grass64/manuals/m.proj.html&gt;\.

Nikos

[rest deleted]

hi,

if you’re working with shapefiles (that you mentioned in your first mail) the best solution for you is using a map reprojection. you can follow the following steps that you can see in the wiki: [1]
[1] http://grasswiki.osgeo.org/wiki/Map_Reprojection (you’d need v.proj)

regards,
Levente

···

2013/10/14 Nikos Alexandris <nik@nikosalexandris.net>

Micha Silver wrote:

For jobs like this you can use the cs2cs tool (part of the proj4 package) to
convert coordinate pairs from one CRS to another. You can see some examples
on the wiki page [1] (Note: The coordinates below do not look like Lon/Lat)

[1] http://trac.osgeo.org/proj/wiki/man_cs2cs

GRASS GIS’ “m.proj” is also fit for the task I think. It is charachterised as
a cs2cs frontend: <http://grass.osgeo.org/grass64/manuals/m.proj.html>.

Nikos

[rest deleted]


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user