Re: [gdal-dev] Fw: Building GDAL with ECW support

2021-02-05 Thread Pteroglossus via gdal-dev
Regarding the compilation of GRASS: pointing to my existing install of GDAL 
prior the compiling process did not work. So I followed Richard's advice and 
restarted the whole process of compiling GDAL, without the --prefix, then 
configured and compiled GRASS, and it worked!

I mean I was able to start GRASS GIS, but it won't import my .ecw:

"r.import input=/media/k/Data/Data/Perso/Carto/SCAN50_2012.ecw 
output=SCAN50_2012
ERROR: Unable to open datasource 

ERROR: Unable to open datasource 

ERROR: Unable to read GDAL dataset 
"

+ an additional Dialog Box :"Unable to determine number of raster bands"

Gdalinfo is however able to get info from the file and gdal_translate to 
convert it, which necessarily means my installation has worked!

Any ideas?

Regards,
Kevin___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Fw: Building GDAL with ECW support

2021-02-05 Thread Pteroglossus via gdal-dev
Hi Lars, thanks you for the link. I was able to reduce the file's size to 1.2 
GB. I should have reread Richard's early messages, he did mention JPEG 
compression and YCBCR colors. I used:

k@k-GS60-6QE:~$ gdal_translate -co COMPRESS=JPEG -co PHOTOMETRIC=YCBCR -co 
TILED=YES /media/k/Data/Data/Perso/Carto/SCAN50_2012.ecw SCAN50_2012.tif
Input file size is 75000, 95000
0...10...20...30...40...50...60...70...80...90...100 - done.

I did however lose all the colors on the map after the conversion (see 
[screenshot](https://pasteboard.co/JN1JAYF.png)), and the drop in is quite 
flagrant.

Here is the output of gdalinfo for both files if it can help:

k@k-GS60-6QE:/media/k/Data/Data/Perso/Carto$ gdalinfo ./SCAN50_2012.ecw
Driver: ECW/ERDAS Compressed Wavelets (SDK 5.5)
Files: ./SCAN50_2012.ecw
Size is 75000, 95000
Origin = (75000.000,675000.000)
Pixel Size = (5.000,-5.000)
Metadata:
COLORSPACE=RGB
COMPRESSION_RATE_TARGET=10
VERSION=2
Corner Coordinates:
Upper Left ( 75000.000, 675000.000)
Lower Left ( 75000.000, 20.000)
Upper Right ( 45.000, 675000.000)
Lower Right ( 45.000, 20.000)
Center ( 262500.000, 437500.000)
Band 1 Block=256x256 Type=Byte, ColorInterp=Red
Description = Red
Overviews: 37500x47500, 18750x23750, 9375x11875, 4687x5937, 2343x2968, 
1171x1484, 585x742, 292x371, 146x185
Band 2 Block=256x256 Type=Byte, ColorInterp=Green
Description = Green
Overviews: 37500x47500, 18750x23750, 9375x11875, 4687x5937, 2343x2968, 
1171x1484, 585x742, 292x371, 146x185
Band 3 Block=256x256 Type=Byte, ColorInterp=Blue
Description = Blue
Overviews: 37500x47500, 18750x23750, 9375x11875, 4687x5937, 2343x2968, 
1171x1484, 585x742, 292x371, 146x185

k@k-GS60-6QE:/media/k/Data/Data/Perso/Carto$ gdalinfo ./SCAN50_2012.tif
Driver: GTiff/GeoTIFF
Files: ./SCAN50_2012.tif
Size is 75000, 95000
Origin = (75000.000,675000.000)
Pixel Size = (5.000,-5.000)
Metadata:
COLORSPACE=RGB
COMPRESSION_RATE_TARGET=10
VERSION=2
Image Structure Metadata:
COMPRESSION=YCbCr JPEG
INTERLEAVE=PIXEL
SOURCE_COLOR_SPACE=YCbCr
Corner Coordinates:
Upper Left ( 75000.000, 675000.000)
Lower Left ( 75000.000, 20.000)
Upper Right ( 45.000, 675000.000)
Lower Right ( 45.000, 20.000)
Center ( 262500.000, 437500.000)
Band 1 Block=256x256 Type=Byte, ColorInterp=Red
Description = Red
Band 2 Block=256x256 Type=Byte, ColorInterp=Green
Description = Green
Band 3 Block=256x256 Type=Byte, ColorInterp=Blue
Description = Blue___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] gdalbuildvrt files not recognized

2021-02-05 Thread Jean-Roc Morreale (ml)
Yep, it is easier to build your process with a listing step that you'll
feed to gdalbuildvrt. For example, on our win10 env it works with
tamas' gisinternal build with cmd but not with the conda build and cmd
:)

Le vendredi 05 février 2021 à 08:58 -0700, Richard Greenwood a écrit :
> I think that wildcard expansion has been an on and off problem with
> some of the GDAL utilities on Windows. If you Google "gdalbuildvrt
> wildcard expansion" you'll find at least three tickets, the most
> recent of which is:
> https://github.com/OSGeo/gdal/issues/1749
> I think the safest and easiest is to use a file list if you're on
> Windows.
> 
> 
> On Fri, Feb 5, 2021 at 3:51 AM Mateusz Loskot 
> wrote:
> > On Thu, 4 Feb 2021 at 23:22, Simon Shak 
> > wrote:
> > > 
> > > However, your suggestion to check the filelist.txt file has found
> > the error.  Somehow a trailing space was before the CRLF and caused
> > it to not recognize the file.
> > 
> > There also could be an issue if there are spaces in file names.
> > I don't know if gdalbuildvrt can handle those on all platforms.
> > 
> > Best regards,
> > -- 
> > Mateusz Loskot, http://mateusz.loskot.net
> > ___
> > 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 mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] gdalbuildvrt files not recognized

2021-02-05 Thread Richard Greenwood
I think that wildcard expansion has been an on and off problem with some of
the GDAL utilities on Windows. If you Google "gdalbuildvrt wildcard
expansion" you'll find at least three tickets, the most recent of which is:
https://github.com/OSGeo/gdal/issues/1749
I think the safest and easiest is to use a file list if you're on Windows.


On Fri, Feb 5, 2021 at 3:51 AM Mateusz Loskot  wrote:

> On Thu, 4 Feb 2021 at 23:22, Simon Shak  wrote:
> >
> > However, your suggestion to check the filelist.txt file has found the
> error.  Somehow a trailing space was before the CRLF and caused it to not
> recognize the file.
>
> There also could be an issue if there are spaces in file names.
> I don't know if gdalbuildvrt can handle those on all platforms.
>
> Best regards,
> --
> Mateusz Loskot, http://mateusz.loskot.net
> ___
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>


-- 
Richard W. Greenwood, PLS
www.greenwoodmap.com
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Problems with ArcGIS image server and WMS minidriver

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

Got it by having a look at 
https://github.com/OSGeo/gdal/blob/master/gdal/frmts/wms/minidriver_arcgis_server.cpp
// Assume map service if exportImage is not explicitly requested.

I just had to edit the server url in my XML file into this
https://image.discomap.eea.europa.eu/arcgis/rest/services/GioLand/HRIM_HR_TrueColour_2018/ImageServer/exportImage?

-Jukka-


Lähettäjä: Rahkonen Jukka (MML)
Lähetetty: perjantai 5. helmikuuta 2021 17.04
Vastaanottaja: 'gdal-dev@lists.osgeo.org' 
Aihe: Problems with ArcGIS image server and WMS minidriver

Hi,

I almost managed to read data from this URL but not quite
https://image.discomap.eea.europa.eu/arcgis/rest/services/GioLand/HRIM_HR_TrueColour_2018/ImageServer/exportImage?f=image&bbox=-3493783.68885884%2C3191895.64564654%2C5001886.25692533%2C11496874.31511627&size=512%2C512&imageSR=3857&bboxSR=3857&format=png8&layers=&transparent=false&time=

The service capabilities are coming from the server
https://image.discomap.eea.europa.eu/arcgis/rest/services/GioLand/HRIM_HR_TrueColour_2018/ImageServer?f=json&pretty=true

However, GDAL requests do not work for me

gdalinfo 
"https://image.discomap.eea.europa.eu/arcgis/rest/services/GioLand/HRIM_HR_TrueColour_2018/ImageServer?f=json&pretty=true";
or
gdal_translate 
"https://image.discomap.eea.europa.eu/arcgis/rest/services/GioLand/HRIM_HR_TrueColour_2018/ImageServer?f=json&pretty=true";
 out.xml -of WMS

The error is
ERROR 4: `C:\TEMP\file.dat' not recognized as a supported file format.
For me it seems that file.dat was never written.
BTW, how on earth I can select the temporary folder? c:\temp is not good at all 
for my work computer.

Then I wrote the XML file by hand by using 
https://github.com/OSGeo/gdal/blob/master/gdal/frmts/wms/frmt_ags_arcgisonline.xml
 as an example. What fails now it that GDAL is generating request as

https://image.discomap.eea.europa.eu/arcgis/rest/services/GioLand/HRIM_HR_TrueColour_2018/ImageServer/export?f=image&bbox=-3493783.68885884%2C3191895.64564654%2C5001886.25692533%2C11496874.31511627&size=512%2C512&imageSR=3857&bboxSR=3857&format=png8&layers=&transparent=false&time=

However, that server delivers data from /exportImage? , not from /export?.

Can anybody suggest a simple workaround for changing those urls to point into 
exportImage?


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


[gdal-dev] Problems with ArcGIS image server and WMS minidriver

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

I almost managed to read data from this URL but not quite
https://image.discomap.eea.europa.eu/arcgis/rest/services/GioLand/HRIM_HR_TrueColour_2018/ImageServer/exportImage?f=image&bbox=-3493783.68885884%2C3191895.64564654%2C5001886.25692533%2C11496874.31511627&size=512%2C512&imageSR=3857&bboxSR=3857&format=png8&layers=&transparent=false&time=

The service capabilities are coming from the server
https://image.discomap.eea.europa.eu/arcgis/rest/services/GioLand/HRIM_HR_TrueColour_2018/ImageServer?f=json&pretty=true

However, GDAL requests do not work for me

gdalinfo 
"https://image.discomap.eea.europa.eu/arcgis/rest/services/GioLand/HRIM_HR_TrueColour_2018/ImageServer?f=json&pretty=true";
or
gdal_translate 
"https://image.discomap.eea.europa.eu/arcgis/rest/services/GioLand/HRIM_HR_TrueColour_2018/ImageServer?f=json&pretty=true";
 out.xml -of WMS

The error is
ERROR 4: `C:\TEMP\file.dat' not recognized as a supported file format.
For me it seems that file.dat was never written.
BTW, how on earth I can select the temporary folder? c:\temp is not good at all 
for my work computer.

Then I wrote the XML file by hand by using 
https://github.com/OSGeo/gdal/blob/master/gdal/frmts/wms/frmt_ags_arcgisonline.xml
 as an example. What fails now it that GDAL is generating request as

https://image.discomap.eea.europa.eu/arcgis/rest/services/GioLand/HRIM_HR_TrueColour_2018/ImageServer/export?f=image&bbox=-3493783.68885884%2C3191895.64564654%2C5001886.25692533%2C11496874.31511627&size=512%2C512&imageSR=3857&bboxSR=3857&format=png8&layers=&transparent=false&time=

However, that server delivers data from /exportImage? , not from /export?.

Can anybody suggest a simple workaround for changing those urls to point into 
exportImage?


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


[gdal-dev] how to use the -ct option in ogr2ogr

2021-02-05 Thread Karsten Tebling

Hello,

i'm struggling with how to use the -ct option in ogr2ogr and could need 
some help.


i copied a NTv2.gsb to osgeo4w64/share/proj and edited the proj.db by 
inserting a new row in the grid_transformation-table. using this 
transformation in qgis works. however when i try to use it in ogr2ogr 
with the same data i always get "failed to reproject feature (geometry 
probably out of source or destination srs). no known way to write 
feature with geometry 'none'". here is my code:


ogr2ogr -s_srs "EPSG:31468" -t_srs "EPSG:25833" -dim XYZ -ct 
"+proj=pipeline +step +inv +proj=tmerc +lat_0=0 +lon_0=12 +k=1 
+x_0=450 +y_0=0 +ellps=bessel +step +proj=hgridshift 
+grids=NTv2LSBB_LSA.gsb +step +proj=utm +zone=33 +ellps=GRS80" -f DXF 
punkte_25833.dxf punkte_31468.dxf


i'm using the latest qgis-ltr and osgeo4w shell

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


Re: [gdal-dev] Fwd: ogr2ogr crash attempting to drop table in filegdb

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

I think I would rename the columns and drop tables with other tools then, or 
create the database right from the beginning. If you write fgb you probably has 
some ESRI programs available. I guess you have already considered to switch to 
GeoPackage but you have some reason for not doing so.

-Jukka Rahkonen-

Lähettäjä: Jan Heckman 
Lähetetty: perjantai 5. helmikuuta 2021 16.10
Vastaanottaja: Rahkonen Jukka (MML) 
Kopio: gdal 
Aihe: Re: [gdal-dev] Fwd: ogr2ogr crash attempting to drop table in filegdb

However, ogrinfo does no better.
It refuses to rename a table (filegdb) and crashes on drop table.
Jan

On Fri, Feb 5, 2021 at 11:43 AM jratike80 
mailto:jukka.rahko...@maanmittauslaitos.fi>>
 wrote:
Hi,

SQL in ogr2ogr is only for SELECT. For any other purpose use ogrinfo.
An example:

ogrinfo -sql "alter table point_p rename column test to foo" point.gpkg
-dialect sqlite

-Jukka Rahkonen-


janhec wrote
> Dear list,
>
> About the filegdb driver
> Attempting:
> ogr2ogr -f FILEGDB test.gdb bag2101.gdb -update -sql "drop table
> standplaats"
> crashed ogr2ogr (obtained from gisinternals.com,
> gdal-302-1928-x64-core.msi
> etc) with a heap corruption. (VS: Unhandled exception at
> 0x7FFE1C6EF099
> (ntdll.dll) in ogr2ogr.exe: 0xC374: A heap has been corrupted
> (parameters: 0x7FFE1C7587F0).)
> The table does get dropped.
>
> The table was inserted from a shapefile using:
> ogr2ogr --config shape_encoding "UTF-8" --config FGDB_BULK_LOAD YES
> -append
> -f "filegdb" bag2101.gdb sta.shp -nln standplaats -sql "select identifica
> as identificatie,hfdadresid as hoofdadresid,* from sta", and displays
> properly in Qgis.
>
> So the filegdb driver appears to be properly installed.
>
> Also,  I could not get column renaming to work. Using dialects filegdb and
> OGR SQL,
> ogr2ogr -f FILEGDB test.gdb test.gdb -update -sql "alter table vbo_actueel
> rename column oppervlakt to oppervlakte"  -dialect "FILEGDB"
> gives ERROR 1: Failed at executing 'alter table vbo_actueel rename column
> oppervlakt to oppervlakte' (An invalid SQL statement was used.);
> using -dialect SQLITE, I get
> ERROR 1: In ExecuteSQL(): sqlite3_prepare_v2(Alter table vbo_actueel
> rename
> column oppervlakt to oppervlakte): no such table: vbo_actueel
> whereas ogrinfo clearly states the table exists.
>
> I am trying to clear my arcgis ties preferring Qgis and for reasons of
> cost, but sometimes I do need to provide data in filegdb format.
>
> Thanks in advance for any advice,
> Jan
>
> PS. I do not add the shapefile for reference, since that version of this
> mail got "rejected by the owner" for being about 1500 bytes in size.
>
> ___
> gdal-dev mailing list

> gdal-dev@.osgeo

> https://lists.osgeo.org/mailman/listinfo/gdal-dev





--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
___
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] Fwd: ogr2ogr crash attempting to drop table in filegdb

2021-02-05 Thread Jan Heckman
However, ogrinfo does no better.
It refuses to rename a table (filegdb) and crashes on drop table.
Jan

On Fri, Feb 5, 2021 at 11:43 AM jratike80 <
jukka.rahko...@maanmittauslaitos.fi> wrote:

> Hi,
>
> SQL in ogr2ogr is only for SELECT. For any other purpose use ogrinfo.
> An example:
>
> ogrinfo -sql "alter table point_p rename column test to foo" point.gpkg
> -dialect sqlite
>
> -Jukka Rahkonen-
>
>
> janhec wrote
> > Dear list,
> >
> > About the filegdb driver
> > Attempting:
> > ogr2ogr -f FILEGDB test.gdb bag2101.gdb -update -sql "drop table
> > standplaats"
> > crashed ogr2ogr (obtained from gisinternals.com,
> > gdal-302-1928-x64-core.msi
> > etc) with a heap corruption. (VS: Unhandled exception at
> > 0x7FFE1C6EF099
> > (ntdll.dll) in ogr2ogr.exe: 0xC374: A heap has been corrupted
> > (parameters: 0x7FFE1C7587F0).)
> > The table does get dropped.
> >
> > The table was inserted from a shapefile using:
> > ogr2ogr --config shape_encoding "UTF-8" --config FGDB_BULK_LOAD YES
> > -append
> > -f "filegdb" bag2101.gdb sta.shp -nln standplaats -sql "select identifica
> > as identificatie,hfdadresid as hoofdadresid,* from sta", and displays
> > properly in Qgis.
> >
> > So the filegdb driver appears to be properly installed.
> >
> > Also,  I could not get column renaming to work. Using dialects filegdb
> and
> > OGR SQL,
> > ogr2ogr -f FILEGDB test.gdb test.gdb -update -sql "alter table
> vbo_actueel
> > rename column oppervlakt to oppervlakte"  -dialect "FILEGDB"
> > gives ERROR 1: Failed at executing 'alter table vbo_actueel rename column
> > oppervlakt to oppervlakte' (An invalid SQL statement was used.);
> > using -dialect SQLITE, I get
> > ERROR 1: In ExecuteSQL(): sqlite3_prepare_v2(Alter table vbo_actueel
> > rename
> > column oppervlakt to oppervlakte): no such table: vbo_actueel
> > whereas ogrinfo clearly states the table exists.
> >
> > I am trying to clear my arcgis ties preferring Qgis and for reasons of
> > cost, but sometimes I do need to provide data in filegdb format.
> >
> > Thanks in advance for any advice,
> > Jan
> >
> > PS. I do not add the shapefile for reference, since that version of this
> > mail got "rejected by the owner" for being about 1500 bytes in size.
> >
> > ___
> > gdal-dev mailing list
>
> > gdal-dev@.osgeo
>
> > https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
>
>
>
>
> --
> Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
> ___
> 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] Fwd: ogr2ogr crash attempting to drop table in filegdb

2021-02-05 Thread Jan Heckman
Hi Jukka,
Shame on me. Had just found out.
thanks,
Jan

On Fri, Feb 5, 2021 at 11:43 AM jratike80 <
jukka.rahko...@maanmittauslaitos.fi> wrote:

> Hi,
>
> SQL in ogr2ogr is only for SELECT. For any other purpose use ogrinfo.
> An example:
>
> ogrinfo -sql "alter table point_p rename column test to foo" point.gpkg
> -dialect sqlite
>
> -Jukka Rahkonen-
>
>
> janhec wrote
> > Dear list,
> >
> > About the filegdb driver
> > Attempting:
> > ogr2ogr -f FILEGDB test.gdb bag2101.gdb -update -sql "drop table
> > standplaats"
> > crashed ogr2ogr (obtained from gisinternals.com,
> > gdal-302-1928-x64-core.msi
> > etc) with a heap corruption. (VS: Unhandled exception at
> > 0x7FFE1C6EF099
> > (ntdll.dll) in ogr2ogr.exe: 0xC374: A heap has been corrupted
> > (parameters: 0x7FFE1C7587F0).)
> > The table does get dropped.
> >
> > The table was inserted from a shapefile using:
> > ogr2ogr --config shape_encoding "UTF-8" --config FGDB_BULK_LOAD YES
> > -append
> > -f "filegdb" bag2101.gdb sta.shp -nln standplaats -sql "select identifica
> > as identificatie,hfdadresid as hoofdadresid,* from sta", and displays
> > properly in Qgis.
> >
> > So the filegdb driver appears to be properly installed.
> >
> > Also,  I could not get column renaming to work. Using dialects filegdb
> and
> > OGR SQL,
> > ogr2ogr -f FILEGDB test.gdb test.gdb -update -sql "alter table
> vbo_actueel
> > rename column oppervlakt to oppervlakte"  -dialect "FILEGDB"
> > gives ERROR 1: Failed at executing 'alter table vbo_actueel rename column
> > oppervlakt to oppervlakte' (An invalid SQL statement was used.);
> > using -dialect SQLITE, I get
> > ERROR 1: In ExecuteSQL(): sqlite3_prepare_v2(Alter table vbo_actueel
> > rename
> > column oppervlakt to oppervlakte): no such table: vbo_actueel
> > whereas ogrinfo clearly states the table exists.
> >
> > I am trying to clear my arcgis ties preferring Qgis and for reasons of
> > cost, but sometimes I do need to provide data in filegdb format.
> >
> > Thanks in advance for any advice,
> > Jan
> >
> > PS. I do not add the shapefile for reference, since that version of this
> > mail got "rejected by the owner" for being about 1500 bytes in size.
> >
> > ___
> > gdal-dev mailing list
>
> > gdal-dev@.osgeo
>
> > https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
>
>
>
>
> --
> Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
> ___
> 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] gdalbuildvrt files not recognized

2021-02-05 Thread Mateusz Loskot
On Thu, 4 Feb 2021 at 23:22, Simon Shak  wrote:
>
> However, your suggestion to check the filelist.txt file has found the error.  
> Somehow a trailing space was before the CRLF and caused it to not recognize 
> the file.

There also could be an issue if there are spaces in file names.
I don't know if gdalbuildvrt can handle those on all platforms.

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev


Re: [gdal-dev] Fwd: ogr2ogr crash attempting to drop table in filegdb

2021-02-05 Thread jratike80
Hi,

SQL in ogr2ogr is only for SELECT. For any other purpose use ogrinfo.
An example:

ogrinfo -sql "alter table point_p rename column test to foo" point.gpkg
-dialect sqlite

-Jukka Rahkonen-


janhec wrote
> Dear list,
> 
> About the filegdb driver
> Attempting:
> ogr2ogr -f FILEGDB test.gdb bag2101.gdb -update -sql "drop table
> standplaats"
> crashed ogr2ogr (obtained from gisinternals.com,
> gdal-302-1928-x64-core.msi
> etc) with a heap corruption. (VS: Unhandled exception at
> 0x7FFE1C6EF099
> (ntdll.dll) in ogr2ogr.exe: 0xC374: A heap has been corrupted
> (parameters: 0x7FFE1C7587F0).)
> The table does get dropped.
> 
> The table was inserted from a shapefile using:
> ogr2ogr --config shape_encoding "UTF-8" --config FGDB_BULK_LOAD YES
> -append
> -f "filegdb" bag2101.gdb sta.shp -nln standplaats -sql "select identifica
> as identificatie,hfdadresid as hoofdadresid,* from sta", and displays
> properly in Qgis.
> 
> So the filegdb driver appears to be properly installed.
> 
> Also,  I could not get column renaming to work. Using dialects filegdb and
> OGR SQL,
> ogr2ogr -f FILEGDB test.gdb test.gdb -update -sql "alter table vbo_actueel
> rename column oppervlakt to oppervlakte"  -dialect "FILEGDB"
> gives ERROR 1: Failed at executing 'alter table vbo_actueel rename column
> oppervlakt to oppervlakte' (An invalid SQL statement was used.);
> using -dialect SQLITE, I get
> ERROR 1: In ExecuteSQL(): sqlite3_prepare_v2(Alter table vbo_actueel
> rename
> column oppervlakt to oppervlakte): no such table: vbo_actueel
> whereas ogrinfo clearly states the table exists.
> 
> I am trying to clear my arcgis ties preferring Qgis and for reasons of
> cost, but sometimes I do need to provide data in filegdb format.
> 
> Thanks in advance for any advice,
> Jan
> 
> PS. I do not add the shapefile for reference, since that version of this
> mail got "rejected by the owner" for being about 1500 bytes in size.
> 
> ___
> gdal-dev mailing list

> gdal-dev@.osgeo

> https://lists.osgeo.org/mailman/listinfo/gdal-dev





--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev