<div dir="ltr"><br><br>On Sat, Feb 9, 2019 at 12:05 PM Markus Neteler <<a href="mailto:neteler@osgeo.org">neteler@osgeo.org</a>> wrote:<br>><br>> (adding grass-dev)<br>><br>> On Sat, Feb 9, 2019 at 11:14 AM Markus Neteler <<a href="mailto:neteler@osgeo.org">neteler@osgeo.org</a>> wrote:<br>> > On Sat, Feb 9, 2019 at 10:57 AM Helmut Kudrnovsky <<a href="mailto:hellik@web.de">hellik@web.de</a>> wrote:<br>> > ><br>> > > >Just the GRASS GIS logics (still) prevent from accepting a .prj file as<br>> > > input.<br>> > ><br>> > > at least in the GUI and the location wizzard you can use a .prj-file to<br>> > > create a new location.<br>> ><br>> > Yes but not on the beloved command line:<br>> ><br>> > grass77 -c bla.prj  ~/grassdata/mylocation<br>> > Starting GRASS GIS...<br>> > Creating new GRASS GIS location <mylocation>...<br>> > ERROR: ERROR 4: `bla.prj' not recognized as a supported file format.<br>> > ERROR: Unable to read georeferenced file <bla.prj> using GDAL library<br><div><br></div><div>g.proj wkt=bla.prj -p</div><div>works</div><div><br></div><div></div><div>></div>> I checked further and found a difference between g.proj and<br>> gdalsrsinfo opening files:<br>><br>> general/g.proj/input.c, line 271 :<br>> (inofficially: <a href="https://github.com/GRASS-GIS/grass-ci/blob/master/general/g.proj/input.c#L271">https://github.com/GRASS-GIS/grass-ci/blob/master/general/g.proj/input.c#L271</a>)<br>><br>>         if ((gdal_ds = GDALOpen(geofile, GA_ReadOnly))) {<br>><br>> apps/gdalsrsinfo.cpp, line 306<br>> <a href="https://github.com/OSGeo/gdal/blob/master/gdal/apps/gdalsrsinfo.cpp#L306">https://github.com/OSGeo/gdal/blob/master/gdal/apps/gdalsrsinfo.cpp#L306</a><br>><br>>     poGDALDS = static_cast<GDALDataset *>(GDALOpenEx( pszInput, 0,<br>> nullptr, nullptr, nullptr ));<br>><br>> It seems that GDALOpenEx() is more flexible concerning the input (it<br>> exists since GDAL 2.0):<br>> <a href="https://www.gdal.org/classGDALDataset.html#a9cb8585d0b3c16726b08e25bcc94274a">https://www.gdal.org/classGDALDataset.html#a9cb8585d0b3c16726b08e25bcc94274a</a><br>><br><div>> Perhaps g.proj should be updated accordingly?</div><div><br></div><div>Easy to implement, please open a ticket such that it does not get forgotten.</div><div><br></div><div>Markus M<br></div>><br>> Markus<br>> _______________________________________________<br>> grass-user mailing list<br>> <a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>> <a href="https://lists.osgeo.org/mailman/listinfo/grass-user">https://lists.osgeo.org/mailman/listinfo/grass-user</a></div>