Re: [GRASS-user] error when importing soil grids data into GRASS

2021-12-07 Thread Laura Poggio
Hi Veronica,
thanks for pointing this out. The projection should be defined in the VRTs
of Soilgrids 2.0 and normally it should be recognised in GRASS-GIS. I have
been using the same files you mentioned. We will look into the issue and
let you know.

Thanks
Laura

On Wed, 8 Dec 2021 at 01:31, Veronica Andreo  wrote:

> Hi Markus,
>
> thanks for your answer :)
>
> El mar., 7 dic. 2021 14:43, Markus Neteler  escribió:
>
>> Hi Vero,
>>
>> On Tue, Dec 7, 2021 at 6:12 PM Veronica Andreo 
>> wrote:
>> >
>> > Dear all,
>> >
>> > I'm trying to import soil grids data for south america into grass gis
>> by means of r.import and the vsicurl driver and I'm facing different errors
>> according to the soilgrid version I use. See below:
>> >
>> > Fist attempt:
>> >
>> > gdalinfo /vsicurl/
>> https://files.isric.org/soilgrids/latest/data/ocd/ocd_0-5cm_mean.vrt
>> > Driver: VRT/Virtual Raster
>> > Files: /vsicurl/
>> https://files.isric.org/soilgrids/latest/data/ocd/ocd_0-5cm_mean.vrt
>> >/vsicurl/
>> https://files.isric.org/soilgrids/latest/data/ocd/ocd_0-5cm_mean.vrt.ovr
>> >/vsicurl/
>> https://files.isric.org/soilgrids/latest/data/ocd/./ocd_0-5cm_mean/tileSG-018-027/tileSG-018-027_2-4.tif
>> >/vsicurl/
>> https://files.isric.org/soilgrids/latest/data/ocd/./ocd_0-5cm_mean/tileSG-018-027/tileSG-018-027_1-1.tif
>> > ...
>> > Size is 159246, 58034
>> > Coordinate System is:
>> > PROJCRS["Interrupted_Goode_Homolosine",
>>
>> This is the problem.
>>
>
> Any idea why it's not recognized? I see it is in PROJ and as you show
> gdalwarp works. Is it something GRASS related?
>
> Here my workaround:
>>
>> ### ocd
>> # PROJCRS["Interrupted_Goode_Homolosine" ... :-(
>> # requires a trick - r.import still fails
>> eval `g.region -g`
>> gdalwarp -t_srs epsg:4326 -te $w $s $e $n ocd/ocd_0-5cm_mean.vrt
>> ocd_0_5cm_mean_epsg4326.tif -co COMPRESS=LZW
>>
>
> Anyway replacing ocd/ocd_0-5cm_mean.vrt by /vsicurl/
> https://files.isric.org/soilgrids/latest/data/ocd/ocd_0-5cm_mean.vrt in
> your workaround does the trick, takes a while, but does it. Thanks a LOT
> for the hint!!
>
> @Luí­s Moreira de Sousa  would it be
> possible to provide the version 2.0 with the projection defined? Or
> additionally in the easy to use epsg 4326 as an alternative for lazy people
> like me? :)
>
> Vero
> ___
> grass-user mailing list
> grass-user@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
>
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] error when importing soil grids data into GRASS

2021-12-07 Thread Veronica Andreo
Hi Markus,

thanks for your answer :)

El mar., 7 dic. 2021 14:43, Markus Neteler  escribió:

> Hi Vero,
>
> On Tue, Dec 7, 2021 at 6:12 PM Veronica Andreo 
> wrote:
> >
> > Dear all,
> >
> > I'm trying to import soil grids data for south america into grass gis by
> means of r.import and the vsicurl driver and I'm facing different errors
> according to the soilgrid version I use. See below:
> >
> > Fist attempt:
> >
> > gdalinfo /vsicurl/
> https://files.isric.org/soilgrids/latest/data/ocd/ocd_0-5cm_mean.vrt
> > Driver: VRT/Virtual Raster
> > Files: /vsicurl/
> https://files.isric.org/soilgrids/latest/data/ocd/ocd_0-5cm_mean.vrt
> >/vsicurl/
> https://files.isric.org/soilgrids/latest/data/ocd/ocd_0-5cm_mean.vrt.ovr
> >/vsicurl/
> https://files.isric.org/soilgrids/latest/data/ocd/./ocd_0-5cm_mean/tileSG-018-027/tileSG-018-027_2-4.tif
> >/vsicurl/
> https://files.isric.org/soilgrids/latest/data/ocd/./ocd_0-5cm_mean/tileSG-018-027/tileSG-018-027_1-1.tif
> > ...
> > Size is 159246, 58034
> > Coordinate System is:
> > PROJCRS["Interrupted_Goode_Homolosine",
>
> This is the problem.
>

Any idea why it's not recognized? I see it is in PROJ and as you show
gdalwarp works. Is it something GRASS related?

Here my workaround:
>
> ### ocd
> # PROJCRS["Interrupted_Goode_Homolosine" ... :-(
> # requires a trick - r.import still fails
> eval `g.region -g`
> gdalwarp -t_srs epsg:4326 -te $w $s $e $n ocd/ocd_0-5cm_mean.vrt
> ocd_0_5cm_mean_epsg4326.tif -co COMPRESS=LZW
>

Anyway replacing ocd/ocd_0-5cm_mean.vrt by /vsicurl/
https://files.isric.org/soilgrids/latest/data/ocd/ocd_0-5cm_mean.vrt in
your workaround does the trick, takes a while, but does it. Thanks a LOT
for the hint!!

@Luí­s Moreira de Sousa  would it be possible
to provide the version 2.0 with the projection defined? Or additionally in
the easy to use epsg 4326 as an alternative for lazy people like me? :)

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


Re: [GRASS-user] Grass Graphic Model v.net.distance Not Accepting point layer in From or To fields

2021-12-07 Thread Joshua Geoghegan
Apologies, I’ll take a look today.

Regards,


[MPS]

JOSHUA GEOGHEGAN | GIS Specialist
Email: 
joshua.geoghe...@mornpen.vic.gov.au
Phone: 03 5950 1321
Private Bag 1000, Rosebud VIC 3939 | 90 Besgrove Street, Rosebud VIC 3939
Follow us on social media!
[mornpen.vic.gov.au][Facebook][Instagram][Twitter]
[Latest News]
Mornington Peninsula Shire acknowledges and pays respect to the Bunurong/Boon 
Wurrung people,
the Traditional Custodians of these lands and waters.
We are committed to carbon neutrality.

From: Moritz Lennert 
Sent: Tuesday, 7 December 2021 6:16 PM
To: Joshua Geoghegan ; 
grass-user@lists.osgeo.org
Subject: RE: [GRASS-user] Grass Graphic Model v.net.distance Not Accepting 
point layer in From or To fields

Hi Josh,

I sent you a reply:

https://lists.osgeo.org/pipermail/grass-user/2021-December/082742.html

I don't think you sent anything since then.

Moritz
Le 5 décembre 2021 21:50:54 GMT+00:00, Joshua Geoghegan 
mailto:joshua.geoghe...@mornpen.vic.gov.au>>
 a écrit :
Hi Moritz,

I was wondering if you got a chance to see my reply with my current Grass 
workflow.
Hope it makes sense.

Regards,



JOSHUA GEOGHEGAN | GIS Specialist
Email: 
joshua.geoghe...@mornpen.vic.gov.au
Phone: 03 5950 1321
Private Bag 1000, Rosebud VIC 3939 | 90 Besgrove Street, Rosebud VIC 3939
Follow us on social media!


Mornington Peninsula Shire acknowledges and pays respect to the Bunurong/Boon 
Wurrung people,
the Traditional Custodians of these lands and waters.
We are committed to carbon neutrality.

From: Joshua Geoghegan
Sent: Friday, 26 November 2021 1:57 PM
To: Moritz Lennert 
mailto:mlenn...@club.worldonline.be>>; 
grass-user@lists.osgeo.org
Subject: RE: [GRASS-user] Grass Graphic Model v.net.distance Not Accepting 
point layer in From or To fields

Hi Moritz,

Does the below make sense?
Perhaps I have connected the point and line vectors incorrectly?

Regards,

Josh



JOSHUA GEOGHEGAN | GIS Specialist
Email: 
joshua.geoghe...@mornpen.vic.gov.au
Phone: 03 5950 1321
Private Bag 1000, Rosebud VIC 3939 | 90 Besgrove Street, Rosebud VIC 3939
Follow us on social media!


Mornington Peninsula Shire acknowledges and pays respect to the Bunurong/Boon 
Wurrung people,
the Traditional Custodians of these lands and waters.
We are committed to carbon neutrality.

From: Joshua Geoghegan
Sent: Wednesday, 24 November 2021 10:24 AM
To: Moritz Lennert 
mailto:mlenn...@club.worldonline.be>>; 
grass-user@lists.osgeo.org
Subject: RE: [GRASS-user] Grass Graphic Model v.net.distance Not Accepting 
point layer in From or To fields


Hi Moritz,



When I set it to layer 2 (which is the point layer I connected) and close the 
v.net.distance dialog, and reopen it I see the form reload and it switches back 
to 1.

I also try to create the where clause and now it says no table linked to layer 
2 even though I linked it with v.db.connect.



I tried connecting the attribute table to the same vector for the points, as 
well as trying connecting to the linked point/network vector.

Am I missing a step perhaps? Is the attribute table coming straight from the 
shapefile I am importing?





Below are the steps up until v.net.distance, with my network being cleaned up 
beforehand.

The highlighted section is where I import the points up until the 
v.net.distance.



I probably don’t need the v.db.addtable. That was there so I could populate the 
distance for each route but I guess v.net.distance outputs that.

It still didn’t work when I removed that.



Hopefully that makes sense.





Regards,



JOSHUA GEOGHEGAN | GIS Specialist | MORNINGTON PENINSULA SHIRE

Phone: 03 5950 1321

Email: 
joshua.geoghe...@mornpen.vic.gov.au

Private Bag 1000, Rosebud VIC 3939 | 90 Besgrove Street, Rosebud VIC 3939

www.mornpen.vic.gov.au | Twitter @MornPenShire | 
Facebook @MornPenShire



Mornington Peninsula Shire acknowledges and pays respect to the Bunurong/Boon 
Wurrung people,

the Traditional Custodians of these lands and waters.

-Original Message-
From: Moritz Lennert 
mailto:mlenn...@club.worldonline.be>>
Sent: Tuesday, 23 November 2021 6:07 PM
To: Joshua Geoghegan 
mailto:joshua.geoghe...@mornpen.vic.g

Re: [GRASS-user] error when importing soil grids data into GRASS

2021-12-07 Thread Markus Neteler
Hi Vero,

On Tue, Dec 7, 2021 at 6:12 PM Veronica Andreo  wrote:
>
> Dear all,
>
> I'm trying to import soil grids data for south america into grass gis by 
> means of r.import and the vsicurl driver and I'm facing different errors 
> according to the soilgrid version I use. See below:
>
> Fist attempt:
>
> gdalinfo 
> /vsicurl/https://files.isric.org/soilgrids/latest/data/ocd/ocd_0-5cm_mean.vrt
> Driver: VRT/Virtual Raster
> Files: 
> /vsicurl/https://files.isric.org/soilgrids/latest/data/ocd/ocd_0-5cm_mean.vrt
>
> /vsicurl/https://files.isric.org/soilgrids/latest/data/ocd/ocd_0-5cm_mean.vrt.ovr
>
> /vsicurl/https://files.isric.org/soilgrids/latest/data/ocd/./ocd_0-5cm_mean/tileSG-018-027/tileSG-018-027_2-4.tif
>
> /vsicurl/https://files.isric.org/soilgrids/latest/data/ocd/./ocd_0-5cm_mean/tileSG-018-027/tileSG-018-027_1-1.tif
> ...
> Size is 159246, 58034
> Coordinate System is:
> PROJCRS["Interrupted_Goode_Homolosine",


This is the problem.

Here my workaround:

### ocd
# PROJCRS["Interrupted_Goode_Homolosine" ... :-(
# requires a trick - r.import still fails
eval `g.region -g`
gdalwarp -t_srs epsg:4326 -te $w $s $e $n ocd/ocd_0-5cm_mean.vrt
ocd_0_5cm_mean_epsg4326.tif -co COMPRESS=LZW

r.import input=ocd_0_5cm_mean_epsg4326.tif output=ocd_0_5cm_mean extent=region
r.colors ocd_0_5cm_mean color=bgyr

HTH,
Markus
___
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] error when importing soil grids data into GRASS

2021-12-07 Thread Veronica Andreo
Dear all,

I'm trying to import soil grids data for south america into grass gis by
means of r.import and the vsicurl driver and I'm facing different errors
according to the soilgrid version I use. See below:

Fist attempt:

gdalinfo /vsicurl/
https://files.isric.org/soilgrids/latest/data/ocd/ocd_0-5cm_mean.vrt
Driver: VRT/Virtual Raster
Files: /vsicurl/
https://files.isric.org/soilgrids/latest/data/ocd/ocd_0-5cm_mean.vrt
   /vsicurl/
https://files.isric.org/soilgrids/latest/data/ocd/ocd_0-5cm_mean.vrt.ovr
   /vsicurl/
https://files.isric.org/soilgrids/latest/data/ocd/./ocd_0-5cm_mean/tileSG-018-027/tileSG-018-027_2-4.tif
   /vsicurl/
https://files.isric.org/soilgrids/latest/data/ocd/./ocd_0-5cm_mean/tileSG-018-027/tileSG-018-027_1-1.tif
...
Size is 159246, 58034
Coordinate System is:
PROJCRS["Interrupted_Goode_Homolosine",
BASEGEOGCRS["GCS_WGS_1984 ellipse",
DATUM["World Geodetic System 1984",
ELLIPSOID["WGS 84",6378137,298.257223563,
LENGTHUNIT["metre",1]],
ID["EPSG",6326]],
PRIMEM["Greenwich",0,
ANGLEUNIT["Degree",0.0174532925199433]]],
CONVERSION["unnamed",
METHOD["Interrupted Goode Homolosine"]],
CS[Cartesian,2],
AXIS["(E)",east,
ORDER[1],
LENGTHUNIT["metre",1,
ID["EPSG",9001]]],
AXIS["(N)",north,
ORDER[2],
LENGTHUNIT["metre",1,
ID["EPSG",9001

r.import input="/vsicurl/
https://files.isric.org/soilgrids/latest/data/ocd/ocd_0-5cm_mean.vrt";
output=ocd_0_5cm_mean extent=region
...
Selected PROJ pipeline:
+proj=pipeline +step +proj=unitconvert +xy_in=deg +xy_out=rad +step
+proj=igh +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84

Reproyectado primitivas...
Construyendo topología para el mapa vectorial
...
Registrando primitivas...
Construyendo áreas.
 100%
Adjuntando islas...
 100%
Adjuntando centróides...
 100%
Importando mapa ráster ...
ERROR 4: `/vsicurl/
https://files.isric.org/soilgrids/latest/data/ocd/./ocd_0-5cm_mean/tileSG-022-030/tileSG-022-030_2-3.tif'
not recognized as a supported file format.
ERROR: Unable to read row 11740
ERROR: Unable to import GDAL dataset
   https://files.isric.org/soilgrids/latest/data/ocd/ocd_0-5cm_mean.vrt>

Second attempt, newer dataset soilgrids 2.0 pre-release

r.import input="/vsicurl/
https://storage.googleapis.com/isric-share-soilgrids/pre-release/wv1500/wv1500_0-5cm_mean.tif";
output=wv1500_0_5cm_mean extent=region
Warning 1: /vsicurl/
https://storage.googleapis.com/isric-share-soilgrids/pre-release/wv1500/wv1500_0-5cm_mean.tif:
This file used to have optimizations in its layout, but those have been, at
least partly, invalidated by later changes
ADVERTENCIA: Actualizando el sistema de referencia espacial con la
 definición proj4 incrustada.
...
Selected PROJ pipeline:
+proj=pipeline +step +proj=unitconvert +xy_in=deg +xy_out=rad +step
+proj=igh +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84

Reproyectado primitivas...
Construyendo topología para el mapa vectorial
...
Registrando primitivas...
Construyendo áreas.
 100%
Adjuntando islas...
 100%
Adjuntando centróides...
 100%
Warning 1: /vsicurl/
https://storage.googleapis.com/isric-share-soilgrids/pre-release/wv1500/wv1500_0-5cm_mean.tif:
This file used to have optimizations in its layout, but those have been, at
least partly, invalidated by later changes
ADVERTENCIA: Actualizando el sistema de referencia espacial con la
 definición proj4 incrustada.
Importando mapa ráster ...
 100%
Removiendo vector 
Removiendo vector 
Estimated target resolution for input band :
0.0022003864773300253
Reprojecting ...
ADVERTENCIA: proj_create() failed for '(null)'
ERROR: Unable to initialize coordinate transformation
ERROR: Unable to to reproject raster 

It imports the raster but fails at re-projection... CRS is unknown in the
tif

gdalinfo /vsicurl/
https://storage.googleapis.com/isric-share-soilgrids/pre-release/wv1500/wv1500_0-5cm_mean.tif
Warning 1: /vsicurl/
https://storage.googleapis.com/isric-share-soilgrids/pre-release/wv1500/wv1500_0-5cm_mean.tif:
This file used to have optimizations in its layout, but those have been, at
least partly, invalidated by later changes
Driver: GTiff/GeoTIFF
Files: /vsicurl/
https://storage.googleapis.com/isric-share-soilgrids/pre-release/wv1500/wv1500_0-5cm_mean.tif
Size is 159246, 58034
Coordinate System is:
PROJCRS["unknown",
BASEGEOGCRS["unknown",
DATUM["World Geodetic System 1984",
ELLIPSOID["WGS 84",6378137,298.257223563,
LENGTHUNIT["metre",1]],
ID["EPSG",6326]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8901]]],
CONVERSION["unknown",
METHOD["Interrupted Goode Homolosine"],
PARAMETER["Longitude of natural origin",0,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8802]],
...

Any