Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Datum <Reseau_Geodesique_Francais_Guyane_1995> not recognised (vector layers) #798

Closed
jebins opened this issue Jul 17, 2020 · 3 comments · Fixed by #813
Closed

[Bug] Datum <Reseau_Geodesique_Francais_Guyane_1995> not recognised (vector layers) #798

jebins opened this issue Jul 17, 2020 · 3 comments · Fixed by #813
Labels
bug Something isn't working

Comments

@jebins
Copy link

jebins commented Jul 17, 2020

Hi,

Describe the bug
Importing a vector layer with the EPSGS:2972 - RGFG95 / UTM zone 22N projection throws an error (with v.import or v.in.ogr).

# French
WARNING: Datum <Reseau_Geodesique_Francais_Guyane_1995> non reconnu par GRASS et aucuns paramètres trouvés
# English
WARNING: Datum <Reseau_Geodesique_Francais_Guyane_1995> not recognized by GRASS and no parameters found

Importing raster layers with exactly the same projection works flawlessly.
Similar issue here: http://osgeo-org.1560.x6.nabble.com/Datum-not-recognized-by-Grass-td5423784.html

To Reproduce
Sample data provided: https://drop.infini.fr/r/pFNqYGPKvT#jXXyqe1Fbz7AAjamBsXnAHSryVNj/VuO+cuPCi5rTCk=
Steps to reproduce the behavior:

  1. Create a new location (tested three different ways):
    • select the EPSG code: 2972 , or...
    • type the Proj4 string: +proj=utm +zone=22 +ellps=GRS80 +units=m +no_defs, or...
    • from the sample proj file provided in the sample data: lines.proj .
  2. Create a new mapset or open the PERMANENT one.
  3. Import the file lines.shp (sample data) in the mapset with v.import or v.in.ogr.

Expected behavior
Vector importation recognizes the EPSG:2972 datum.

System description

  • Operating System: Ubuntu 20.04
  • GRASS GIS version: 7.8.3
  • QGIS 3.10.5 was used to export the sample data.
  • details about further software components:
    version=7.8.3
    date=2020
    revision=exported
    build_date=2020-05-05
    build_platform=x86_64-pc-linux-gnu
    build_off_t_size=8
    libgis_revision=2020-05-05T23:27:51+00:00
    libgis_date=2020-05-05T23:27:51+00:00
    proj=6.3.1
    gdal=3.0.4
    geos=3.8.0
    sqlite=3.31.1

Additional context
g.region -p on EPSG:2972 location:

projection: 1 (UTM)
zone:       22
datum:      ** unknown (default: WGS84) **
ellipsoid:  grs80
north:      565630
south:      544685
west:       137210
east:       156595
nsres:      5
ewres:      5
rows:       4189
cols:       3877
cells:      16240753

ogrinfo on lines.shp:

INFO: Open of `lines.shp'
      using driver `ESRI Shapefile' successful.

Layer name: lines
Metadata:
  DBF_DATE_LAST_UPDATE=2020-07-17
Geometry: Line String
Feature Count: 2
Extent: (347549.897704, 534700.872755) - (364346.005321, 547907.381615)
Layer SRS WKT:
PROJCRS["RGFG95 / UTM zone 22N",
    BASEGEOGCRS["RGFG95",
        DATUM["Reseau Geodesique Francais Guyane 1995",
            ELLIPSOID["GRS 1980",6378137,298.257222101,
                LENGTHUNIT["metre",1]]],
        PRIMEM["Greenwich",0,
            ANGLEUNIT["degree",0.0174532925199433]],
        ID["EPSG",4624]],
    CONVERSION["UTM zone 22N",
        METHOD["Transverse Mercator",
            ID["EPSG",9807]],
        PARAMETER["Latitude of natural origin",0,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8801]],
        PARAMETER["Longitude of natural origin",-51,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8802]],
        PARAMETER["Scale factor at natural origin",0.9996,
            SCALEUNIT["unity",1],
            ID["EPSG",8805]],
        PARAMETER["False easting",500000,
            LENGTHUNIT["metre",1],
            ID["EPSG",8806]],
        PARAMETER["False northing",0,
            LENGTHUNIT["metre",1],
            ID["EPSG",8807]]],
    CS[Cartesian,2],
        AXIS["(E)",east,
            ORDER[1],
            LENGTHUNIT["metre",1]],
        AXIS["(N)",north,
            ORDER[2],
            LENGTHUNIT["metre",1]],
    USAGE[
        SCOPE["unknown"],
        AREA["French Guiana - east of 54°W"],
        BBOX[2.17,-54,8.88,-49.45]],
    ID["EPSG",2972]]
Data axis to CRS axis mapping: 1,2
fid: Real (20.0)

Thanks for any feedback.

@jebins jebins added the bug Something isn't working label Jul 17, 2020
@neteler
Copy link
Member

neteler commented Jul 20, 2020

Using PR #813 I get:

GRASS 7.9.dev (nc_spm_08_grass7):~ > v.import lines.shp out=bla
Importing <lines.shp> ...
Check if OGR layer <lines> contains polygons...
 100%
Creating attribute table for layer <lines>...
Default driver / database set to:
driver: sqlite
database: $GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db
Importing 2 features (OGR layer <lines>)...
 100%
-----------------------------------------------------
Building topology for vector map <bla@PERMANENT>...
Registering primitives...
Reprojecting <bla>...
Reprojecting primitives ...
Building topology for vector map <bla@user1>...
Registering primitives...

i.e., the recognition now appears to work.

@jebins
Copy link
Author

jebins commented Jul 21, 2020

Thank you. I'll test it ASAP.

neteler added a commit that referenced this issue Jul 25, 2020
add Datum: Reseau Geodesique Francais Guyane 1995

fixes #798
neteler added a commit that referenced this issue Jul 25, 2020
add Datum: Reseau Geodesique Francais Guyane 1995

fixes #798
@jebins
Copy link
Author

jebins commented Jul 31, 2020

It works !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants