[GRASS-user] Selecting EPSG from ogrinfo output; input from command line

Applying 'ogrinfo -al -so' to a *.gdb/ directory provides these results:

Layer name: CityUGA2017
Geometry: Multi Polygon
Feature Count: 534
Extent: (674051.583302, 86611.416792) - (2518331.287780, 1346099.208507)
Layer SRS WKT:
PROJCRS["NAD83(HARN) / Washington South (ftUS)",
     BASEGEOGCRS["NAD83(HARN)",
         DATUM["NAD83 (High Accuracy Reference Network)",
             ELLIPSOID["GRS 1980",6378137,298.257222101,
                 LENGTHUNIT["metre",1]]],
         PRIMEM["Greenwich",0,
             ANGLEUNIT["degree",0.0174532925199433]],
         ID["EPSG",4152]],
     CONVERSION["SPCS83 Washington South zone (US Survey feet)",
         METHOD["Lambert Conic Conformal (2SP)",
             ID["EPSG",9802]],
         PARAMETER["Latitude of false origin",45.3333333333333,
             ANGLEUNIT["degree",0.0174532925199433],
             ID["EPSG",8821]],
         PARAMETER["Longitude of false origin",-120.5,
             ANGLEUNIT["degree",0.0174532925199433],
             ID["EPSG",8822]],
         PARAMETER["Latitude of 1st standard parallel",47.3333333333333,
             ANGLEUNIT["degree",0.0174532925199433],
             ID["EPSG",8823]],
         PARAMETER["Latitude of 2nd standard parallel",45.8333333333333,
             ANGLEUNIT["degree",0.0174532925199433],
             ID["EPSG",8824]],
         PARAMETER["Easting at false origin",1640416.667,
             LENGTHUNIT["US survey foot",0.304800609601219],
             ID["EPSG",8826]],
         PARAMETER["Northing at false origin",0,
             LENGTHUNIT["US survey foot",0.304800609601219],
             ID["EPSG",8827]]],
     CS[Cartesian,2],
         AXIS["easting (X)",east,
             ORDER[1],
             LENGTHUNIT["US survey foot",0.304800609601219]],
         AXIS["northing (Y)",north,
             ORDER[2],
             LENGTHUNIT["US survey foot",0.304800609601219]],
     USAGE[
         SCOPE["unknown"],
         AREA["USA - Washington - SPCS83 - S"],
         BBOX[45.54,-124.4,47.61,-116.91]],
     ID["EPSG",2927]]
Data axis to CRS axis mapping: 1,2
FID Column = OBJECTID
Geometry Column = Shape
CITY_NM: String (40.0)
UGA_NM: String (64.0)
UGA_NM2: String (64.0)
COUNTY_NM: String (15.0)
GMA: String (3.0)
FIPS_PLC: String (5.0)
INCORP: String (3.0)
ORIGIN: String (29.0)
DATEMOD: Real (0.0)
Shape_Length: Real (0.0)
Shape_Area: Real (0.0)

I've included all output while the projection codes are all at the top. My
questions are:

1.) Which EPSG code do I use to create a new location in which to import
this file? And should this be the first step?

2.) Or, could I use v.in.ogr directly on the command line to import it? When
I tried 'v.in.ogr in=/data/states/Washington/cities/CityUGA.gdb out=cities"
GRASS threw me an error.

TIA,

Rich

On 2020-08-16 4:50 p.m., Rich Shepard wrote:

1.) Which EPSG code do I use to create a new location in which to import
this file? And should this be the first step?

This is EPSG:2927 see: http://epsg.io/2927

-jeff

--
Jeff McKenna
MapServer Consulting and Training Services
co-founder of FOSS4G
http://gatewaygeo.com/

On Sun, 16 Aug 2020, Jeff McKenna wrote:

On 2020-08-16 4:50 p.m., Rich Shepard wrote:

1.) Which EPSG code do I use to create a new location in which to import
this file? And should this be the first step?

This is EPSG:2927 see: http://epsg.io/2927

Jeff,

So, it's the last one and marked 'ID'. That's good to know for other .gdb
data sources.

Thanks very much,

Rich

On Sun, 16 Aug 2020, Jeff McKenna wrote:

This is EPSG:2927 see: http://epsg.io/2927

Jeff, et al.:

Please educate me what I've done incorrectly here.

Using the above EPSG (with /data/grassdata/ as the pwd) I entered:
grass79 -c EPSG:2927 /data/grassdata/Washington/cities/
which is the location I want to create for these data.

Because EPSG:2927 was the ID value when I ran 'ogrinfo -al -so' on
/data/states/Washington/cities/CityUGA.gdb I assumed that the created
location was using the proper CRS. That's apparently not the case:

v.in.ogr in=/data/states/Washington/cities/CityUGA.gdb out=cities ERROR: Projection of dataset does not appear to match current location.

        Location PROJ_UNITS is:
        unit: meter
        units: meters
        meters: 1

        Dataset PROJ_UNITS is:
        unit: U.S. Surveyor's Foot
        units: U.S. Surveyor's Feet
        meters: 0.3048006096012192

        In case of no significant differences in the projection definitions,
        use the -o flag to ignore them and use current location definition.
        Consider generating a new location from the input dataset using the
        'location' parameter.

Same results when out=/data/grassdata/Washington/cities/ and when I cd to
that directory when I run v.in.ogr.

What am I missing?

Stay well,

Rich

On Mon, 17 Aug 2020, Rich Shepard wrote:

Please educate me what I've done incorrectly here.

grass79 -c EPSG:2927 /data/grassdata/Washington/cities/

That's the ultimate destination; the correct new location is
/data/grassdata/wa_cities. This resolves the issue.

Rich