[GRASS-user] Manually Defining Location

   I have tried several times to use the location wizard without success.

   These files were exported from ArcGIS as shapefiles and they seem to have
different projections from what the location wizard expects. Perhaps I need
custom proj4 strings to create the locations. Following is the contents of a
representative .prj file:

GEOGCS["GCS_North_American_1927",
DATUM["D_North_American_1927",
SPHEROID["Clarke_1866",6378206.4,294.9786982]],
PRIMEM["Greenwich",0.0],
UNIT["Degree",0.0174532925199433]],
PROJECTION["Transverse_Mercator"],
PARAMETER["False_Easting",500000.0],
PARAMETER["False_Northing",-2000000.0],
PARAMETER["Central_Meridian",-115.583333],
PARAMETER["Scale_Factor",0.9999],
PARAMETER["Latitude_Of_Origin",34.75],
UNIT["Foot_US",0.3048006096012192]]

   Notice there are two units in this guy: degrees and US Feet.

   When I specify Transverse Mercator (tmerc) and NAD27 the creation attempt
fails because it expects units to be meters and sees US feet.

   What should I do to create a location for these maps?

Rich

On Fri, 20 May 2011, Rich Shepard wrote:

GEOGCS["GCS_North_American_1927",
DATUM["D_North_American_1927",
SPHEROID["Clarke_1866",6378206.4,294.9786982]],
PRIMEM["Greenwich",0.0],
UNIT["Degree",0.0174532925199433]],

   I now understand that the above is angular units. However, the problem
that the location wizard wants local units in meters for tmerc, nad27 rather
than US feet remains.

Rich

Rich,

I'm not convinced that's a valid wkt description of the coordinate
system you want.

If I convert that to proj.4, I get

+proj=longlat +ellps=clrk66 +datum=NAD27 +no_defs

which is clearly wrong.

If I use the GRASS location wizard and point it to that wkt, it thinks it is

+proj=longlat
+no_defs
+a=6378206.4
+rf=294.9786982
+towgs84=-22.000,157.000,176.000

which is also clearly wrong.

If I try to manually make a proj.4 string from that wkt, I come up with this:

+proj=tmerc +lat_0=34.75 +lon_0=-115.583333 +k=0.9999
+x_0=152400.3048006096 +y_0=-609601.21920243837 +ellps=clrk66
+datum=NAD27 +units=us-ft +no_defs

Check my numbers there because maybe I did something wrong. When I
use that proj.4 to convert your coordinates, the results are

cs2cs -f %0.6f +proj=tmerc +lat_0=34.75 +lon_0=-115.583333 +k=0.9999
+x_0=152400.3048006096 +y_0=-609601.21920243837 +ellps=clrk66
+datum=NAD27 +units=us-ft +no_defs +to +init=epsg:4326
371801.76 427253.14
-116.051661 41.414985 0.000000

which is SW of

41.87 N, -115.43 W

but I understand that you think you should be NW of that point....
Don't know if this helps or just adds confusion.

Bryan

On Fri, May 20, 2011 at 15:50, Rich Shepard <rshepard@appl-ecosys.com> wrote:

On Fri, 20 May 2011, Rich Shepard wrote:

GEOGCS["GCS_North_American_1927",
DATUM["D_North_American_1927",
SPHEROID["Clarke_1866",6378206.4,294.9786982]],
PRIMEM["Greenwich",0.0],
UNIT["Degree",0.0174532925199433]],

I now understand that the above is angular units. However, the problem
that the location wizard wants local units in meters for tmerc, nad27 rather
than US feet remains.

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

On Fri, 20 May 2011, Bryan Keith wrote:

I'm not convinced that's a valid wkt description of the coordinate
system you want.

Bryan,

   I'm not addressing those unknown points here; these are necessary maps
from the client's ArcGIS I need to import to GRASS for terrain and
hydrological modeling.

but I understand that you think you should be NW of that point.... Don't
know if this helps or just adds confusion.

   The latter, I'm afraid.

   I will, over the weekend, read the proj4 site to figure out how to take
the values from the .prj file (as posted in my message originating this
thread) and see if that works to import the maps using v.in.ogr or the GUI
wizard.

Thanks,

Rich

On Fri, 20 May 2011, Bryan Keith wrote:

I'm not convinced that's a valid wkt description of the coordinate system
you want.

Bryan,

   Let me back up and ask the question from a different point.

   Here's the WKT from one of the maps:

PROJCS["Project",
GEOGCS["GCS_North_American_1927",
DATUM["D_North_American_1927",
SPHEROID["Clarke_1866",6378206.4,294.9786982]],
PRIMEM["Greenwich",0.0],
UNIT["Degree",0.0174532925199433]],
PROJECTION["Transverse_Mercator"],
PARAMETER["False_Easting",500000.0],
PARAMETER["False_Northing",-2000000.0],
PARAMETER["Central_Meridian",-115.583333],
PARAMETER["Scale_Factor",0.9999],
PARAMETER["Latitude_Of_Origin",34.75],
UNIT["Foot_US",0.3048006096012192]]

   From this I created this proj4 description:

+proj=tmerc +datum=nad27 +ellipse=clrk66 +a=6378206.4 +b=294.9786982
+x_0=500000.0 +y_0=-2000000.0 +k_0=0.9999 +lat_0=34.75 +lon_0=-115.583333
+no_defs +units=us-ft

Is this an accurate description to use in creating the location? Does the
order matter?

Rich

On Fri, May 20, 2011 at 17:12, Rich Shepard <rshepard@appl-ecosys.com> wrote:

On Fri, 20 May 2011, Bryan Keith wrote:

I'm not convinced that's a valid wkt description of the coordinate system
you want.

Bryan,

Let me back up and ask the question from a different point.

Here's the WKT from one of the maps:

PROJCS["Project",
GEOGCS["GCS_North_American_1927",
DATUM["D_North_American_1927",
SPHEROID["Clarke_1866",6378206.4,294.9786982]],
PRIMEM["Greenwich",0.0],
UNIT["Degree",0.0174532925199433]],
PROJECTION["Transverse_Mercator"],
PARAMETER["False_Easting",500000.0],
PARAMETER["False_Northing",-2000000.0],
PARAMETER["Central_Meridian",-115.583333],
PARAMETER["Scale_Factor",0.9999],
PARAMETER["Latitude_Of_Origin",34.75],
UNIT["Foot_US",0.3048006096012192]]

From this I created this proj4 description:

+proj=tmerc +datum=nad27 +ellipse=clrk66 +a=6378206.4 +b=294.9786982
+x_0=500000.0 +y_0=-2000000.0 +k_0=0.9999 +lat_0=34.75 +lon_0=-115.583333
+no_defs +units=us-ft

Is this an accurate description to use in creating the location? Does the
order matter?

Well, let's see how this differs from when I tried to do the same thing:

+proj=tmerc +lat_0=34.75 +lon_0=-115.583333 +k=0.9999
+x_0=152400.3048006096 +y_0=-609601.21920243837 +ellps=clrk66
+datum=NAD27 +units=us-ft +no_defs

I think a and b are defined by the ellipsoid. Are the a and b you
specified the same as what clrk66 uses? I don't know. If you specify
both the ellipsoid and a and b, what takes precedence? I don't know.
Everything else looks the same except for x and y, the false easting
and false northing. In proj.4 those are always specified in meters
while in the wkt definition, I think those numbers are in the
projection units. That's why I changed the numbers

0.3048006096012192 * 500000

152400.30480060959

0.3048006096012192 * -2000000

-609601.21920243837

If you use your proj.4 string, does your data end up in the correct location?

To answer your other question, I don't think the order matters. These
proj.4 questions are outside my area of expertise.

Bryan

Rich

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

On Mon, 23 May 2011, Bryan Keith wrote:

I think a and b are defined by the ellipsoid. Are the a and b you
specified the same as what clrk66 uses?

Bryan,

   Yes, they are. I do not know if they need to be explicitly specified or
are incorporated with the Clark ellipsoid.

Everything else looks the same except for x and y, the false easting and
false northing. In proj.4 those are always specified in meters while in
the wkt definition, I think those numbers are in the projection units. That's why I changed the numbers

0.3048006096012192 * 500000

152400.30480060959

0.3048006096012192 * -2000000

-609601.21920243837

   Aha! I did not make the connection that x and y need to be in meters since
that's the default for units.

   I'll give this a try -- probably from the command line -- and report
results.

Thanks,

Rich

On Mon, 23 May 2011, Rich Shepard wrote:

I'll give this a try -- probably from the command line -- and report
results.

Bryan,

   Oops! Cannot create location without the GUI; at least, I don't know how
to do this. Regardless, specifying the proj4 options seems to work. I won't
know for certain until I reproject all these maps and overlay them on maps I
know are locationally correct.

Thanks for your help,

Rich

Hi,

2011/5/23 Rich Shepard <rshepard@appl-ecosys.com>:

Oops! Cannot create location without the GUI; at least, I don't know how
to do this. Regardless, specifying the proj4 options seems to work. I won't

in GRASS 7 it's possible, see

grass70 -text

grass70 [-h | -help | --help] [-v | --version] [-c | -c geofile | -c EPSG:code]
    [-text | -gui]
    [[[<GISDBASE>/]<LOCATION_NAME>/]<MAPSET>]
...
   -c create given database, location or
mapset if it doesn't exist
...

Martin

--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa

On Mon, 23 May 2011, Martin Landa wrote:

in GRASS 7 it's possible, see

   Thanks, Martin. I'm using 6.5svn.

Rich

On Mon, May 23, 2011 at 7:34 PM, Rich Shepard <rshepard@appl-ecosys.com> wrote:

On Mon, 23 May 2011, Martin Landa wrote:

in GRASS 7 it's possible, see

Thanks, Martin. I'm using 6.5svn.

Please check
http://grass.osgeo.org/wiki/Addons#GRASS_create_location_scripts

Markus

On 23/05/11 23:57, Markus Neteler wrote:

On Mon, May 23, 2011 at 7:34 PM, Rich Shepard<rshepard@appl-ecosys.com> wrote:

On Mon, 23 May 2011, Martin Landa wrote:

in GRASS 7 it's possible, see

  Thanks, Martin. I'm using 6.5svn.

Please check
http://grass.osgeo.org/wiki/Addons#GRASS_create_location_scripts

Or just go into an existing location and the use g.proj -c location=.

Moritz