[gdal-dev] gdal_utils on conda-forge

2021-07-02 Thread Joseph H. Kennedy
Hi All,

Are there any current plans/efforts underway to provide gdal_utils on
conda-forge?

If so, fantastic! Any way I can help?

If not, I'd be happy to set up the conda-forge recipe and maintain it.
Would that be acceptable and is there anyone else I should add (or wants to
be added) as a maintainer? If/when I set up the recipe, I'll also reach out
to the @conda-forge/gdal team on github and see if any of them want to be
listed as well.

Thanks,

Joe

Joseph H Kennedy
Research Software Engineer
Alaska Satellite Facility
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] gdal_translate - unable to process srs definition....

2021-07-02 Thread Travis Kirstine
Not sure but your error " Failed to process SRS definition: ESPG:32612 "
looks like a typo - should it be EPSG:32612

Regards

On Fri, 2 Jul 2021 at 14:06, Hill, David Foster 
wrote:

> Hi.
>
> gdal_translate was working great for me for the past two weeks. I would do
> commands like:
>
>
> —>fin="/nfs/depot/cce_u1/hill/dfh/op_snowmodel/wy_snowmodel/ctl_files/wo_assim/$STAMP.nc"
>
> —>fout="/nfs/depot/cce_u1/hill/dfh/op_snowmodel/wy_snowmodel/ctl_files/wo_assim/$STAMP.tif"
> —>gdal_translate -of GTiff -a_srs EPSG:32612 $fin $fout
>
> from a bash script.
>
> Now, it is not working. I get errors like:
>
> —>Failed to process SRS definition: ESPG:32612
>
> I don’t understand what happened. The version is: GDAL 1.11.4, released
> 2016/01/25
>
> When I did printenv, I did not find that GDAL_DATA was set. So, I set it
> with this:
>
> —>export GDAL_DATA=/usr/share/gdal
>
> And, I now see that when I re-do printenv. But, I keep getting the same
> error? I have spent a lot of time looking for help online and can’t find
> anything other than making sure gdal_data is correctly set, which it now is.
>
> Regards,
>
>
> ---
> David F. Hill
> Professor
> Civil and Construction Engineering
> Oregon State University
> 220 Owen Hall
> Corvallis, OR 97331
> 541.737.4939
> david.h...@oregonstate.edu
> http://www.engr.oregonstate.edu/~dfh
> ---
>
>
>
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] gdal_translate - unable to process srs definition....

2021-07-02 Thread Hill, David Foster
Hi.

gdal_translate was working great for me for the past two weeks. I would do 
commands like:

—>fin="/nfs/depot/cce_u1/hill/dfh/op_snowmodel/wy_snowmodel/ctl_files/wo_assim/$STAMP.nc"
—>fout="/nfs/depot/cce_u1/hill/dfh/op_snowmodel/wy_snowmodel/ctl_files/wo_assim/$STAMP.tif"
—>gdal_translate -of GTiff -a_srs EPSG:32612 $fin $fout

from a bash script.

Now, it is not working. I get errors like:

—>Failed to process SRS definition: ESPG:32612

I don’t understand what happened. The version is: GDAL 1.11.4, released 
2016/01/25

When I did printenv, I did not find that GDAL_DATA was set. So, I set it with 
this:

—>export GDAL_DATA=/usr/share/gdal

And, I now see that when I re-do printenv. But, I keep getting the same error? 
I have spent a lot of time looking for help online and can’t find anything 
other than making sure gdal_data is correctly set, which it now is.

Regards,


---
David F. Hill
Professor
Civil and Construction Engineering
Oregon State University
220 Owen Hall
Corvallis, OR 97331
541.737.4939
david.h...@oregonstate.edu
http://www.engr.oregonstate.edu/~dfh
---





smime.p7s
Description: S/MIME cryptographic signature
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Setting roles in PostGIS connection

2021-07-02 Thread Even Rouault

Pekka,

I suspect you use "ogr2ogr -f PostgreSQL PG:."

If you use rather "ogr2ogr -update PG:" you should be able to use 
-doo (not sure the SET ROLE will work properly in that context though)


Even

Le 02/07/2021 à 08:52, Pekka Sarkola a écrit :

Hi!

We have a PostGIS database with login roles and group roles (like 
"admins", "editors" and "viewers"). We have defined that only "admins" 
can create new schemas and tables (among other privileges). My problem 
is that I'd like to use ogr2ogr to bulk load some data to a PostGIS 
database using ogr2ogr with a certain login role with "admins" role.


It seems that it is not possible to define roles in PostgreSQL 
connection parameters (my first try) or in PostgreSQL driver options.
I tried to use PREDUDE_STATEMENTS like: "-doo "PRELUDE_STATEMENTS=SET 
ROLE admins", but got warning "Warning 1: -doo ignored when creating 
the output datasource."


Any solutions or suggestions?

There is also similar case in QGIS: Supporting "set role" when 
connecting to a postgres database - 
https://github.com/qgis/QGIS/issues/42763 



Versions: GDAL 3.0.4, released 2020/01/28, PostgreSQL 12.7, PostGIS 3.1

Rgs,

Pekka

Pekka Sarkola
Gispo Oy
pekka.sark...@gispo.fi - GSM +358 
40 725 2042
www.gispo.fi – www.paikkatieto.com 




___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


--
http://www.spatialys.com
My software is free, but my time generally not.

___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Setting roles in PostGIS connection

2021-07-02 Thread Rahkonen Jukka (MML)
Hi again,

GDAL is using the standand libpg-connect 
https://www.postgresql.org/docs/12/libpq-connect.html and that does not have 
support for defining roles during connect.

Do I understand right that your user "Joe" does not have direct CREATEDB 
privileges but gets them through the admins role? And because CREATEDB has a 
special handling https://www.postgresql.org/docs/current/role-membership.html 
there is no other way to let Joe to create db that through SET ROLE ADMINS.

Making GDAL to support 
"-doo "PRELUDE_STATEMENTS=SET ROLE admins"
feels like a good idea but I have no idea about how difficult it would be to 
implement.

-Jukka Rahkonen-



-Alkuperäinen viesti-
Lähettäjä: Rahkonen Jukka (MML) 
Lähetetty: perjantai 2. heinäkuuta 2021 14.40
Vastaanottaja: 'gdal-dev@lists.osgeo.org' 
Aihe: Re: Setting roles in PostGIS connection

Hi,

I wonder if writing the output into pgdump 
https://gdal.org/drivers/vector/pgdump.html and editing the SQL a bit could be 
used as a workaround. 

-Jukka Rahkonen-

Pekka Sarkola wrote:

> Hi!

> We have a PostGIS database with login roles and group roles (like 
> "admins", "editors" and "viewers"). We have defined that only "admins" 
> can create new schemas and tables (among other privileges). My problem 
> is that I'd like to use ogr2ogr to bulk load some data to a PostGIS 
> database using ogr2ogr with a certain login role with "admins" role.

> It seems that it is not possible to define roles in PostgreSQL 
> connection parameters (my first try) or in PostgreSQL driver options.

> I tried to use PREDUDE_STATEMENTS like: "-doo "PRELUDE_STATEMENTS=SET 
> ROLE admins", but got warning "Warning 1: -doo ignored when creating 
> the output datasource."

> Any solutions or suggestions?

> There is also similar case in QGIS: Supporting "set role" when 
> connecting to a postgres database - 
> https://github.com/qgis/QGIS/issues/42763

> Versions: GDAL 3.0.4, released 2020/01/28, PostgreSQL 12.7, PostGIS 
> 3.1

> Rgs,

> Pekka
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Setting roles in PostGIS connection

2021-07-02 Thread Rahkonen Jukka (MML)
Hi,

I wonder if writing the output into pgdump 
https://gdal.org/drivers/vector/pgdump.html and editing the SQL a bit could be 
used as a workaround. 

-Jukka Rahkonen-

Pekka Sarkola wrote:

> Hi!

> We have a PostGIS database with login roles and group roles (like "admins",
> "editors" and "viewers"). We have defined that only "admins" can create new
> schemas and tables (among other privileges). My problem is that I'd like to
> use ogr2ogr to bulk load some data to a PostGIS database using ogr2ogr
> with a certain login role with "admins" role.

> It seems that it is not possible to define roles in PostgreSQL connection
> parameters (my first try) or in PostgreSQL driver options.

> I tried to use PREDUDE_STATEMENTS like: "-doo "PRELUDE_STATEMENTS=SET ROLE
> admins", but got warning "Warning 1: -doo ignored when creating the output
> datasource."

> Any solutions or suggestions?

> There is also similar case in QGIS: Supporting "set role" when connecting
> to a postgres database - https://github.com/qgis/QGIS/issues/42763

> Versions: GDAL 3.0.4, released 2020/01/28, PostgreSQL 12.7, PostGIS 3.1

> Rgs,

> Pekka
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


[gdal-dev] Setting roles in PostGIS connection

2021-07-02 Thread Pekka Sarkola
Hi!

We have a PostGIS database with login roles and group roles (like "admins",
"editors" and "viewers"). We have defined that only "admins" can create new
schemas and tables (among other privileges). My problem is that I'd like to
use ogr2ogr to bulk load some data to a PostGIS database using ogr2ogr
with a certain login role with "admins" role.

It seems that it is not possible to define roles in PostgreSQL connection
parameters (my first try) or in PostgreSQL driver options.

I tried to use PREDUDE_STATEMENTS like: "-doo "PRELUDE_STATEMENTS=SET ROLE
admins", but got warning "Warning 1: -doo ignored when creating the output
datasource."

Any solutions or suggestions?

There is also similar case in QGIS: Supporting "set role" when connecting
to a postgres database - https://github.com/qgis/QGIS/issues/42763

Versions: GDAL 3.0.4, released 2020/01/28, PostgreSQL 12.7, PostGIS 3.1

Rgs,

Pekka

Pekka Sarkola
Gispo Oy
pekka.sark...@gispo.fi   - GSM +358 40 725 2042
www.gispo.fi – www.paikkatieto.com
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev