Re: [gdal-dev] How to drop a raster layer from GeoPackage?

2017-08-22 Thread Even Rouault
On mardi 22 août 2017 13:03:44 CEST Dmitry Baryshnikov wrote:
> Is it the bug of gdalmanage that this utility cannot delete raster layer
> from geopackage?

gdalmanage delete is to delete a dataset, not a raster layer. The concept of 
raster layer 
doesn't really exist in the GDAL abstraction. The closest we have is 
subdatasets.

Actually perhaps the GPKG driver could be improved so it implements the 
Delete() method of 
GDALDriver and recognizes subdataset names, to implement deletion of only the 
raster layer 
pointed by the subddataset name

So gdalmanage delete GPKG:my.gpkg:raster_layer would work then

> 
> Best regards,
>  Dmitry
> 
> 22.08.17 12:49, Even Rouault пишет:
> > On mardi 22 août 2017 09:42:40 CEST Rahkonen Jukka (MML) wrote:
> > > Hi,
> > > 
> > > 
> > > 
> > > There is an interesting question in gis.stackexchange about how to
> > 
> > remove a
> > 
> > > raster layer from GeoPackage
> > 
> > https://gis.stackexchange.com/questions/252782/remove-a-raster-from-geopac
> > k
> > 
> > > age.
> > > 
> > > 
> > > 
> > > I had a try and gdalmanage did not have any effect on the GeoPackage
> > > 
> > > database but the workflow with ogrinfo works for me. Are there any other
> > > 
> > > alternatives?
> > 
> > The manual ogrinfo way is the only one using GDAL utilities.
> > 
> > We should probably extend the -sql "DELLAYER:" syntax to work with
> > raster tables as well. Actually I see we currently also catch "DROP
> > TABLE " to drop the table and remove links in other tables in the
> > vector case (so with th same effect as DELLAYER:x). Would you mind
> > creating an enhancement ticket about that ?
> > 
> > There's ongoing work on the QGIS side (dev version only I guess) to
> > offer in the DBManager a way to delete raster layers (issuing the SQL
> > requests under the hood)
> > 
> > Even
> > 
> > 
> > Spatialys - Geospatial professional services
> > 
> > http://www.spatialys.com
> > 
> > 
> > 
> > ___
> > gdal-dev mailing list
> > gdal-dev@lists.osgeo.org
> > https://lists.osgeo.org/mailman/listinfo/gdal-dev


-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] How to drop a raster layer from GeoPackage?

2017-08-22 Thread Dmitry Baryshnikov
Is it the bug of gdalmanage that this utility cannot delete raster layer 
from geopackage?


Best regards,
Dmitry

22.08.17 12:49, Even Rouault пишет:


On mardi 22 août 2017 09:42:40 CEST Rahkonen Jukka (MML) wrote:

> Hi,

>

> There is an interesting question in gis.stackexchange about how to 
remove a


> raster layer from GeoPackage

> 
https://gis.stackexchange.com/questions/252782/remove-a-raster-from-geopack


> age.

>

> I had a try and gdalmanage did not have any effect on the GeoPackage

> database but the workflow with ogrinfo works for me. Are there any other

> alternatives?

The manual ogrinfo way is the only one using GDAL utilities.

We should probably extend the -sql "DELLAYER:" syntax to work with 
raster tables as well. Actually I see we currently also catch "DROP 
TABLE " to drop the table and remove links in other tables in the 
vector case (so with th same effect as DELLAYER:x). Would you mind 
creating an enhancement ticket about that ?


There's ongoing work on the QGIS side (dev version only I guess) to 
offer in the DBManager a way to delete raster layers (issuing the SQL 
requests under the hood)


Even

--

Spatialys - Geospatial professional services

http://www.spatialys.com



___
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

Re: [gdal-dev] How to drop a raster layer from GeoPackage?

2017-08-22 Thread Even Rouault
On mardi 22 août 2017 09:42:40 CEST Rahkonen Jukka (MML) wrote:
> Hi,
> 
> There is an interesting question in gis.stackexchange about how to remove a
> raster layer from GeoPackage
> https://gis.stackexchange.com/questions/252782/remove-a-raster-from-geopack
> age.
> 
> I had a try and gdalmanage did not have any effect on the GeoPackage
> database but the workflow with ogrinfo works for me. Are there any other
> alternatives?

The manual ogrinfo way is the only one using GDAL utilities.

We should probably extend the -sql "DELLAYER:" syntax to work with raster 
tables as 
well. Actually I see we currently also catch "DROP TABLE " to drop the 
table and remove 
links in other tables in the vector case (so with th same effect as 
DELLAYER:x). Would 
you mind creating an enhancement ticket about that ?

There's ongoing work on the QGIS side (dev version only I guess) to offer in 
the DBManager a 
way to delete raster layers (issuing the SQL requests under the hood)

Even


-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] How to drop a raster layer from GeoPackage?

2017-08-22 Thread Rahkonen Jukka (MML)
Hi,

There is an interesting question in gis.stackexchange about how to remove a 
raster layer from GeoPackage 
https://gis.stackexchange.com/questions/252782/remove-a-raster-from-geopackage.

I had a try and gdalmanage did not have any effect on the GeoPackage database 
but the workflow with ogrinfo works for me. Are there any other alternatives?

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