[GRASS-user] Date import: setting projection units

   Trying to import an OpenFileGDB with the following parameters:

Layer name: WQStandards_BeneficialUseDesignations
Geometry: Multi Line String
Feature Count: 764329
Extent: (607675.393548, 81930.638752) - (2554273.406512, 1355726.104279)
Layer SRS WKT:
PROJCS["NAD_1983_HARN_StatePlane_Washington_South_FIPS_4602_Feet",
     GEOGCS["GCS_North_American_1983_HARN",
         DATUM["NAD83_High_Accuracy_Reference_Network",
             SPHEROID["GRS_1980",6378137.0,298.257222101]],
         PRIMEM["Greenwich",0.0],
         UNIT["Degree",0.0174532925199433]],
     PROJECTION["Lambert_Conformal_Conic_2SP"],
     PARAMETER["False_Easting",1640416.666666667],
     PARAMETER["False_Northing",0.0],
     PARAMETER["Central_Meridian",-120.5],
     PARAMETER["Standard_Parallel_1",45.83333333333334],
     PARAMETER["Standard_Parallel_2",47.33333333333334],
     PARAMETER["Latitude_Of_Origin",45.33333333333334],
     UNIT["Foot_US",0.3048006096012192]]

   I created a new location (Washington-LCC):

name: unnamed
proj: lcc
lat_1: 45.83
lat_2: 47.33
lat_0: 23
lon_0: -120.5
x_0: 0.1640416
y_0: 0
no_defs: defined
datum: nad83harn
ellps: grs80
towgs84: 0.000,0.000,0.000

but the units are meters, not feet. I don't see where I can specify
projection units when creating the location. Do I edit the
PERMANENT/PROJ_UNITS file?

TIA,

Rich

Rich Shepard wrote

Trying to import an OpenFileGDB with the following parameters:

Layer name: WQStandards_BeneficialUseDesignations
Geometry: Multi Line String
Feature Count: 764329
Extent: (607675.393548, 81930.638752) - (2554273.406512, 1355726.104279)
Layer SRS WKT:
PROJCS["NAD_1983_HARN_StatePlane_Washington_South_FIPS_4602_Feet",
     GEOGCS["GCS_North_American_1983_HARN",
         DATUM["NAD83_High_Accuracy_Reference_Network",
             SPHEROID["GRS_1980",6378137.0,298.257222101]],
         PRIMEM["Greenwich",0.0],
         UNIT["Degree",0.0174532925199433]],
     PROJECTION["Lambert_Conformal_Conic_2SP"],
     PARAMETER["False_Easting",1640416.666666667],
     PARAMETER["False_Northing",0.0],
     PARAMETER["Central_Meridian",-120.5],
     PARAMETER["Standard_Parallel_1",45.83333333333334],
     PARAMETER["Standard_Parallel_2",47.33333333333334],
     PARAMETER["Latitude_Of_Origin",45.33333333333334],
     UNIT["Foot_US",0.3048006096012192]]

   I created a new location (Washington-LCC):

name: unnamed
proj: lcc
lat_1: 45.83
lat_2: 47.33
lat_0: 23
lon_0: -120.5
x_0: 0.1640416
y_0: 0
no_defs: defined
datum: nad83harn
ellps: grs80
towgs84: 0.000,0.000,0.000

but the units are meters, not feet. I don't see where I can specify
projection units when creating the location. Do I edit the
PERMANENT/PROJ_UNITS file?

TIA,

Rich

_______________________________________________
grass-user mailing list

grass-user@.osgeo

https://lists.osgeo.org/mailman/listinfo/grass-user

You can define a GRASS location also by a proj4 string.

Have a look at

https://epsg.io/102749

how the proj4 string may look for your data

-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html

Rich Shepard wrote

Trying to import an OpenFileGDB with the following parameters:

Layer name: WQStandards_BeneficialUseDesignations
Geometry: Multi Line String
Feature Count: 764329
Extent: (607675.393548, 81930.638752) - (2554273.406512, 1355726.104279)
Layer SRS WKT:
PROJCS["NAD_1983_HARN_StatePlane_Washington_South_FIPS_4602_Feet",
     GEOGCS["GCS_North_American_1983_HARN",
         DATUM["NAD83_High_Accuracy_Reference_Network",
             SPHEROID["GRS_1980",6378137.0,298.257222101]],
         PRIMEM["Greenwich",0.0],
         UNIT["Degree",0.0174532925199433]],
     PROJECTION["Lambert_Conformal_Conic_2SP"],
     PARAMETER["False_Easting",1640416.666666667],
     PARAMETER["False_Northing",0.0],
     PARAMETER["Central_Meridian",-120.5],
     PARAMETER["Standard_Parallel_1",45.83333333333334],
     PARAMETER["Standard_Parallel_2",47.33333333333334],
     PARAMETER["Latitude_Of_Origin",45.33333333333334],
     UNIT["Foot_US",0.3048006096012192]]

   I created a new location (Washington-LCC):

name: unnamed
proj: lcc
lat_1: 45.83
lat_2: 47.33
lat_0: 23
lon_0: -120.5
x_0: 0.1640416
y_0: 0
no_defs: defined
datum: nad83harn
ellps: grs80
towgs84: 0.000,0.000,0.000

but the units are meters, not feet. I don't see where I can specify
projection units when creating the location. Do I edit the
PERMANENT/PROJ_UNITS file?

TIA,

Rich

_______________________________________________
grass-user mailing list

grass-user@.osgeo

https://lists.osgeo.org/mailman/listinfo/grass-user

Another possibility is to let GRASS define the correct location parameters
by the dataset itself.

-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html

On Wed, 27 Sep 2017, Helmut Kudrnovsky wrote:

Another possibility is to let GRASS define the correct location parameters
by the dataset itself.

Helmut,

   I would prefer this but was not sure which coordinate-setting option
supports this for an OpenFileGDB directory.

Thanks,

Rich

On Wed, 27 Sep 2017, Helmut Kudrnovsky wrote:

You can define a GRASS location also by a proj4 string.

Have a look at

https://epsg.io/102749

how the proj4 string may look for your data

Helmut,

   Thank you. I should learn how to find and use a proj4 string.

Much appreciated,

Rich

Rich Shepard wrote

On Wed, 27 Sep 2017, Helmut Kudrnovsky wrote:

Another possibility is to let GRASS define the correct location
parameters
by the dataset itself.

Helmut,

   I would prefer this but was not sure which coordinate-setting option
supports this for an OpenFileGDB directory.

it seems that OpenFileGDB directory isn't recognized. you could file an
enhancement ticket for this.

a quick workaround with ogrinfo and grep. :slight_smile:

tested with an example fgdb downloaded somewhere from the net.

check the layers in the fgdb:
---
ogrinfo RH_SampleData.gdb
INFO: Open of `RH_SampleData.gdb'
      using driver `FileGDB' successful.
1: Route (None)
2: Centerline_Sequence (None)
3: AADT (None)
4: Access_Control (None)
5: Base_Thickness (None)
6: Crashes (None)
7: F_System (None)
8: Speed_Limit (None)
9: Redline__ATTACH (None)
10: Centerline (3D Multi Line String)
11: Calibration_Point (3D Measured Point)
12: Redline (Multi Line String)
13: LRSN_MilePoint (3D Measured Multi Line String)
14: LRSE_Access_Control (3D Measured Multi Line String)
15: LRSE_Crashes (3D Measured Point)
16: LRSE_Speed_Limit (3D Measured Multi Line String)
17: LRSE_Functional_Class (3D Measured Multi Line String)
18: LRSI_MilePoint_Intersections (Point)
19: LRSN_RefMarker (3D Measured Multi Line String)
20: LRSE_Base_Thickness (3D Measured Multi Line String)
21: LRSE_AADT (3D Measured Multi Line String)
---
check the srs from one of the layers:
---
ogrinfo RH_SampleData.gdb LRSE_Crashes -al -so
INFO: Open of `RH_SampleData.gdb'
      using driver `FileGDB' successful.

Layer name: LRSE_Crashes
Geometry: 3D Measured Point
Feature Count: 14646
Extent: (215341.513300, 4712138.869500) - (360295.772500, 4806029.751300)
Layer SRS WKT:
PROJCS["NAD83 / UTM zone 18N",
    GEOGCS["NAD83",
        DATUM["North_American_Datum_1983",
            SPHEROID["GRS 1980",6378137,298.257222101,
                AUTHORITY["EPSG","7019"]],
            TOWGS84[0,0,0,0,0,0,0],
            AUTHORITY["EPSG","6269"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.0174532925199433,
            AUTHORITY["EPSG","9122"]],
        AUTHORITY["EPSG","4269"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-75],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AXIS["Easting",EAST],
    AXIS["Northing",NORTH],
    AUTHORITY["EPSG","26918"]]
FID Column = OBJECTID
Geometry Column = SHAPE
ROUTEID: String (12.0)
MEASURE: Real (0.0)
DISTANCE: Real (0.0)
CASE_NUMBER: String (255.0)
CASE_YEAR: Real (0.0)
REFERENCE_MARKER: String (12.0)
ACCIDENT_DATE: DateTime (0.0)
ROAD_SYSTEM: String (2.0) DEFAULT 'ab'
NUMBER_FATALITIES: Real (0.0)
NUMBER_INJURIES: Real (0.0)
REPORTABLE: String (1.0)
POLICE_DEPARTMENT: String (5.0)
INTERSECTION_NUMBER: String (2.0)
MUNICIPALITY: String (2.0)
NUMBER_VEHICLES: Real (0.0)
ACCIDENT_TYPE: String (2.0)
LOCATION: String (1.0)
TRAFFIC_CONTROL: String (2.0)
LIGHT_CONDITION: String (1.0)
WEATHER: String (1.0)
ROAD_CHARACTER: String (1.0)
ROAD_SURFACE_CONDITION: String (1.0)
COLLISION_TYPE: String (2.0)
PEDESTRIAN_LOCATION: String (1.0)
PEDESTRIAN_ACTION: String (2.0)
EXTENT_OF_INJURIES: String (5.0)
REGION_COUNTY: String (2.0)
LOW_NODE: String (5.0)
HIGH_NODE: String (5.0)
ACCIDENT_TIME: DateTime (0.0)
REPORTING_AGENCY: String (100.0)
OFFICER_BUILDING_NUMBER: String (5.0)
DMV_ACCIDENT_CLASSIFICATION: String (1.0)
LOCATION_ERROR_CODE: String (3.0)
COMM_VEH_ACC_IND: String (1.0)
HIGHWAY_IND: String (1.0)
INTERSECTION_IND: String (1.0)
UTM_NORTHING: Real (0.0)
UTM_EASTING: Real (0.0)
REL_ACC_VEH: String (50.0)
CRASH_SEVERITY: Real (0.0)
FROMDATE: DateTime (0.0)
TODATE: DateTime (0.0)
TEST_DOMAIN: Integer(Int16) (0.0)
EVENT_ID: String (50.0)
LocError: String (100.0)
---
grep the srs info into a text file
----
ogrinfo RH_SampleData.gdb LRSE_Crashes -al -so | grep -A22 -B0 PROJCS >
my.prj
---
and in the GRASS start up wizard choose:

Read projection and datum terms from a Well Known Text (WKT).prj file.

all done.

-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html

Helmut Kudrnovsky wrote

---
grep the srs info into a text file
----
ogrinfo RH_SampleData.gdb LRSE_Crashes -al -so | grep -A22 -B0 PROJCS >
my.prj

testepsg my.prj

to validate if it's a correct WKT.

-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html

On Thu, Sep 28, 2017 at 3:38 PM, Helmut Kudrnovsky <hellik@web.de> wrote:

Rich Shepard wrote

On Wed, 27 Sep 2017, Helmut Kudrnovsky wrote:

Another possibility is to let GRASS define the correct location
parameters
by the dataset itself.

Helmut,

I would prefer this but was not sure which coordinate-setting option
supports this for an OpenFileGDB directory.

it seems that OpenFileGDB directory isn’t recognized. you could file an
enhancement ticket for this.

a quick workaround with ogrinfo and grep. :slight_smile:

tested with an example fgdb downloaded somewhere from the net.

check the layers in the fgdb:

ogrinfo RH_SampleData.gdb
INFO: Open of RH_SampleData.gdb' using driver FileGDB’ successful.
1: Route (None)
2: Centerline_Sequence (None)
3: AADT (None)
4: Access_Control (None)
5: Base_Thickness (None)
6: Crashes (None)
7: F_System (None)
8: Speed_Limit (None)
9: Redline__ATTACH (None)
10: Centerline (3D Multi Line String)
11: Calibration_Point (3D Measured Point)
12: Redline (Multi Line String)
13: LRSN_MilePoint (3D Measured Multi Line String)
14: LRSE_Access_Control (3D Measured Multi Line String)
15: LRSE_Crashes (3D Measured Point)
16: LRSE_Speed_Limit (3D Measured Multi Line String)
17: LRSE_Functional_Class (3D Measured Multi Line String)
18: LRSI_MilePoint_Intersections (Point)
19: LRSN_RefMarker (3D Measured Multi Line String)
20: LRSE_Base_Thickness (3D Measured Multi Line String)
21: LRSE_AADT (3D Measured Multi Line String)

check the srs from one of the layers:

ogrinfo RH_SampleData.gdb LRSE_Crashes -al -so
INFO: Open of RH_SampleData.gdb' using driver FileGDB’ successful.

Layer name: LRSE_Crashes
Geometry: 3D Measured Point
Feature Count: 14646
Extent: (215341.513300, 4712138.869500) - (360295.772500, 4806029.751300)
Layer SRS WKT:
PROJCS[“NAD83 / UTM zone 18N”,
GEOGCS[“NAD83”,
DATUM[“North_American_Datum_1983”,
SPHEROID[“GRS 1980”,6378137,298.257222101,
AUTHORITY[“EPSG”,“7019”]],
TOWGS84[0,0,0,0,0,0,0],
AUTHORITY[“EPSG”,“6269”]],
PRIMEM[“Greenwich”,0,
AUTHORITY[“EPSG”,“8901”]],
UNIT[“degree”,0.0174532925199433,
AUTHORITY[“EPSG”,“9122”]],
AUTHORITY[“EPSG”,“4269”]],
PROJECTION[“Transverse_Mercator”],
PARAMETER[“latitude_of_origin”,0],
PARAMETER[“central_meridian”,-75],
PARAMETER[“scale_factor”,0.9996],
PARAMETER[“false_easting”,500000],
PARAMETER[“false_northing”,0],
UNIT[“metre”,1,
AUTHORITY[“EPSG”,“9001”]],
AXIS[“Easting”,EAST],
AXIS[“Northing”,NORTH],
AUTHORITY[“EPSG”,“26918”]]
FID Column = OBJECTID
Geometry Column = SHAPE
ROUTEID: String (12.0)
MEASURE: Real (0.0)
DISTANCE: Real (0.0)
CASE_NUMBER: String (255.0)
CASE_YEAR: Real (0.0)
REFERENCE_MARKER: String (12.0)
ACCIDENT_DATE: DateTime (0.0)
ROAD_SYSTEM: String (2.0) DEFAULT ‘ab’
NUMBER_FATALITIES: Real (0.0)
NUMBER_INJURIES: Real (0.0)
REPORTABLE: String (1.0)
POLICE_DEPARTMENT: String (5.0)
INTERSECTION_NUMBER: String (2.0)
MUNICIPALITY: String (2.0)
NUMBER_VEHICLES: Real (0.0)
ACCIDENT_TYPE: String (2.0)
LOCATION: String (1.0)
TRAFFIC_CONTROL: String (2.0)
LIGHT_CONDITION: String (1.0)
WEATHER: String (1.0)
ROAD_CHARACTER: String (1.0)
ROAD_SURFACE_CONDITION: String (1.0)
COLLISION_TYPE: String (2.0)
PEDESTRIAN_LOCATION: String (1.0)
PEDESTRIAN_ACTION: String (2.0)
EXTENT_OF_INJURIES: String (5.0)
REGION_COUNTY: String (2.0)
LOW_NODE: String (5.0)
HIGH_NODE: String (5.0)
ACCIDENT_TIME: DateTime (0.0)
REPORTING_AGENCY: String (100.0)
OFFICER_BUILDING_NUMBER: String (5.0)
DMV_ACCIDENT_CLASSIFICATION: String (1.0)
LOCATION_ERROR_CODE: String (3.0)
COMM_VEH_ACC_IND: String (1.0)
HIGHWAY_IND: String (1.0)
INTERSECTION_IND: String (1.0)
UTM_NORTHING: Real (0.0)
UTM_EASTING: Real (0.0)
REL_ACC_VEH: String (50.0)
CRASH_SEVERITY: Real (0.0)
FROMDATE: DateTime (0.0)
TODATE: DateTime (0.0)
TEST_DOMAIN: Integer(Int16) (0.0)
EVENT_ID: String (50.0)
LocError: String (100.0)

grep the srs info into a text file

ogrinfo RH_SampleData.gdb LRSE_Crashes -al -so | grep -A22 -B0 PROJCS >
my.prj

and in the GRASS start up wizard choose:

Read projection and datum terms from a Well Known Text (WKT).prj file.

all done.

Shorter version:

v.in.ogr input=RH_SampleData.gdb layer=LRSE_Crashes output=LRSE_Crashes location=name_of_new_location

Markus M


best regards
Helmut

Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html


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

On Thu, 28 Sep 2017, Markus Metz wrote:

Shorter version:

v.in.ogr input=RH_SampleData.gdb layer=LRSE_Crashes output=LRSE_Crashes
location=name_of_new_location

Markus,

   I used this direct method and created a new location. Thank you very much!
It worked like a charm.

Best regards,

Rich