<div dir="ltr"><div>Dear Roger,<br><br>On Wed, Oct 11, 2017 at 2:36 PM, Roger Bivand <<a href="mailto:Roger.Bivand@nhh.no">Roger.Bivand@nhh.no</a>> wrote:<br>><br>> Dear Markus,<br>><br>> I can't see how to get the same strings out without conditioning,<br><br>with<br><br>ogrDGRASSs <- gsub(" ", "_", trimws(sapply(strsplit(ogrDGRASS, " [(]"), "[", 1)))<br><br>> because for v.in.ogr -f and GDAL >= 2.0, GRASS < 7.3 presents for example:<br>><br>> GML (rw): GML<br>> SQLite (rw): SQLite<br>> ESRI Shapefile (rw): ESRI Shapefile<br>> GeoJSON (rw): GeoJSON<br>><br>> (readOGR used the string following ":" )<br></div><div><br></div><div>The structure of the output of r.in.gdal -f and v.in.ogr -f is</div><div><br></div><div> <short name> (<read/write flags>): <description><br></div><div><br></div><div>readOGR must use the string preceding "(". Anything following ":" is a description which can change any time. Before GDAL 2.0, there was nothing else but the short name for OGR drivers, therefore the short name was used as description.<br></div><div><br>><br>> and >= 7.3:<br>><br>> GML (rw+): Geography Markup Language (GML)<br>> SQLite (rw+): SQLite / Spatialite<br>> ESRI Shapefile (rw+): ESRI Shapefile<br>> GeoJSON (rw+): GeoJSON<br>><br>> where the string after ":" is different.</div><div><br></div><div>the string before the read/write flags, i.e. before "(" is identical.</div><div><br></div><div></div><div>> If we can depend on all GRASS < 7.3 having the same short name position, yes, I could avoid conditioning by changing the string processing to suit >= 7.3 and apply it to all previous; I chose not to modify the string processing for < 7.3 to avoid any problems I can't readily check.<br></div><div><br></div><div>For all versions of GRASS 7 and all versions of GDAL, the short name position has been and continues to be the first position. For v.in.ogr -f, the short name may also appear after ":", but only if there is no long name.<br></div><div><br></div><div>Best regards,</div><div><br></div><div>Markus</div><div><br></div><div>><br>> Best wishes,<br>><br>> Roger<br>><br>><br>> On Wed, 11 Oct 2017, Markus Metz wrote:<br>><br>>> Dear Roger,<br>>><br>>> On Wed, Oct 11, 2017 at 1:41 PM, Roger Bivand <<a href="mailto:Roger.Bivand@nhh.no">Roger.Bivand@nhh.no</a>> wrote:<br>>>><br>>>><br>>>> New version submitted to CRAN; until then:<br>>>><br>>>> install.packages("rgrass7", repos="<a href="http://R-Forge.R-project.org">http://R-Forge.R-project.org</a>")<br>>>><br>>>> should pick up the latest version; #3425 closed. Please report back<br>>><br>>> whether this works ... (conditioning on GRASS version to create comparable<br>>> driver name strings).<br>>><br>>> I don't think there is a need to condition on the GRASS version, see my<br>>> suggestion in #3425<br>>><br>>> Markus M<br>>>><br>>>><br>>>> Roger<br>>>><br>>>><br>>>> On Wed, 11 Oct 2017, Roger Bivand wrote:<br>>>><br>>>>> Thanks for trying to contribute. The GH site is not the rgrass7<br>>><br>>> development site - that is SVN on R-forge (GH is a very preliminary trial<br>>> site for using sf vector representation in R, and maybe raster raster<br>>> representation (or forthcoming stars), instead of sp classes).<br>>>>><br>>>>><br>>>>> GRAS 7.2.2 works OK with the current logic checks; I can reproduce the<br>>><br>>> issue in 7.3 (latest); there is a change in vector/v.in.ogr/main.c<br>>> returning the DriverLongName for GDAL >= 2.0; in GRASS 7.2.2, there is no<br>>> such change. Could the GRASS developer responsible for this obvious<br>>> regression provide an additional flag in v.in.ogr (and v.external,<br>>> v.out.ogr) to permit backwards compatibility? See line 387, needs to change<br>>>>><br>>>>><br>>>>> #if GDAL_VERSION_NUM >= 2000000<br>>>>><br>>>>> to add a !backwards_compatible test too.<br>>>>><br>>>>> I'll hold off trying to fix this in rgrass7 because it is a regression.<br>>><br>>> I can add the backwards_compatibility=TRUE flag to readVECT() once it is<br>>> exposed.<br>>>>><br>>>>><br>>>>> This is:<br>>>>><br>>>>> <a href="https://trac.osgeo.org/grass/ticket/3425">https://trac.osgeo.org/grass/ticket/3425</a><br>>>>><br>>>>> Roger<br>>>>><br>>>>> On Tue, 10 Oct 2017, Ahmadou Dicko wrote:<br>>>>><br>>>>>> In the readVECT function, internally v.in.ogr is used to list the<br>>><br>>> supported<br>>>>>><br>>>>>> vector format and it is compared the format available using rgdal (or<br>>><br>>> sf).<br>>>>>><br>>>>>> However, using v.external instead of v.in.ogr fix this single problem<br>>>>>> because of the way the output is different (in form).<br>>>>>> For example, if you use v.in.ogr you will have to compare<br>>>>><br>>>>><br>>>>> SQLite_/_Spatialite<br>>>>>><br>>>>>><br>>>>>> (GRASS) to SQLite (R) and they are not the same.<br>>>>>><br>>>>>> I tried to send a PR, let me know if it works<br>>>>>><br>>>>>> <a href="https://github.com/rsbivand/rgrass7/pull/1">https://github.com/rsbivand/rgrass7/pull/1</a><br>>>>>><br>>>>>> Best,<br>>>>>><br>>>>>> On Tue, Oct 10, 2017 at 9:29 PM, Helmut Kudrnovsky <<a href="mailto:hellik@web.de">hellik@web.de</a>><br>>><br>>> wrote:<br>>>>>><br>>>>>><br>>>>>>>> Gesendet: Dienstag, 10. Oktober 2017 um 23:24 Uhr<br>>>>>>>> Von: "Ahmadou Dicko" <<a href="mailto:dicko.ahmadou@gmail.com">dicko.ahmadou@gmail.com</a>><br>>>>>>>> An: "Helmut Kudrnovsky" <<a href="mailto:hellik@web.de">hellik@web.de</a>><br>>>>>>>> Cc: "Roger Bivand" <<a href="mailto:Roger.Bivand@nhh.no">Roger.Bivand@nhh.no</a>>, "<a href="mailto:grass-stats@lists.osgeo.org">grass-stats@lists.osgeo.org</a>"<br>>><br>>> <<br>>>>>>><br>>>>>>><br>>>>>>> <a href="mailto:grass-stats@lists.osgeo.org">grass-stats@lists.osgeo.org</a>><br>>>>>>>><br>>>>>>>><br>>>>>>>> Betreff: Re: [GRASS-stats] rgrass7 - SQLite and GML drivers not<br>>><br>>> working<br>>>>>>><br>>>>>>><br>>>>>>> for readVECT<br>>>>>>>><br>>>>>>>><br>>>>>>>><br>>>>>>>> Hi everyone,<br>>>>>>>><br>>>>>>>> I think that using v.external -f (instead of v.in.ogr -f) can fix this<br>>>>>>><br>>>>>>><br>>>>>>> issue (didn't try yet)<br>>>>>>>><br>>>>>>>><br>>>>>>>><br>>>>>>>><br>>>>>>>> execGRASS("v.external", flags = "f", intern = TRUE)<br>>>>>>>> [1] "ARCGEN"         "AVCBin"         "AVCE00"<br>>>>>>>> [4] "AeronavFAA"     "AmigoCloud"     "BNA"<br>>>>>>>> [7] "CAD"            "CSV"            "CSW"<br>>>>>>>> [10] "Carto"          "Cloudant"       "CouchDB"<br>>>>>>>> [13] "DGN"            "DXF"            "EDIGEO"<br>>>>>>>> [16] "ESRI_Shapefile" "ElasticSearch"  "GFT"<br>>>>>>>> [19] "GML"            "GPKG"           "GPSBabel"<br>>>>>>>> [22] "GPSTrackMaker"  "GPX"            "GeoJSON"<br>>>>>>>> [25] "GeoRSS"         "Geoconcept"     "Geomedia"<br>>>>>>>> [28] "HTF"            "HTTP"           "Idrisi"<br>>>>>>>> [31] "JML"            "JPEG2000"       "KML"<br>>>>>>>> [34] "MSSQLSpatial"   "MapInfo_File"   "Memory"<br>>>>>>>> [37] "MySQL"          "ODBC"           "ODS"<br>>>>>>>> [40] "OGR_GMT"        "OGR_GRASS"      "OGR_PDS"<br>>>>>>>> [43] "OGR_SDTS"       "OGR_VRT"        "OSM"<br>>>>>>>> [46] "OpenAir"        "OpenFileGDB"    "PCIDSK"<br>>>>>>>> [49] "PDF"            "PGDUMP"         "PGeo"<br>>>>>>>> [52] "PLSCENES"       "PostgreSQL"     "REC"<br>>>>>>><br>>>>>>><br>>>>>>><br>>>>>>> in a quick check, there is no difference in available formats.<br>>>>>>><br>>>>>>><br>>>>>>><br>>>>>><br>>>>>><br>>>>>><br>>>>>><br>>>>><br>>>>><br>>>><br>>>> --<br>>>> Roger Bivand<br>>>> Department of Economics, Norwegian School of Economics,<br>>>> Helleveien 30, N-5045 Bergen, Norway.<br>>>> voice: +47 55 95 93 55; e-mail: <a href="mailto:Roger.Bivand@nhh.no">Roger.Bivand@nhh.no</a><br>>>> Editor-in-Chief of The R Journal, <a href="https://journal.r-project.org/index.html">https://journal.r-project.org/index.html</a><br>>>> <a href="http://orcid.org/0000-0003-2392-6140">http://orcid.org/0000-0003-2392-6140</a><br>>>> <a href="https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en">https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en</a><br>>>> _______________________________________________<br>>>> grass-stats mailing list<br>>>> <a href="mailto:grass-stats@lists.osgeo.org">grass-stats@lists.osgeo.org</a><br>>>> <a href="https://lists.osgeo.org/mailman/listinfo/grass-stats">https://lists.osgeo.org/mailman/listinfo/grass-stats</a><br>>><br>>><br>><br>> --<br>> Roger Bivand<br>> Department of Economics, Norwegian School of Economics,<br>> Helleveien 30, N-5045 Bergen, Norway.<br>> voice: +47 55 95 93 55; e-mail: <a href="mailto:Roger.Bivand@nhh.no">Roger.Bivand@nhh.no</a><br>> Editor-in-Chief of The R Journal, <a href="https://journal.r-project.org/index.html">https://journal.r-project.org/index.html</a><br>> <a href="http://orcid.org/0000-0003-2392-6140">http://orcid.org/0000-0003-2392-6140</a><br>> <a href="https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en">https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en</a><br></div></div>