Re: [gdal-dev] very slow sql ogr2ogr conversion

2021-04-28 Thread Hector muro
Hi Neil, I found a similar situation once. Are you using Linux? If so, I think the ogr2ogr MSSQLSpatial driver for Linux does not use BCP (for multiple inserts, which is why the CSV goes so fast). If not, have you tried using the MSSQLSpatial Configuration Options for the command? I don't

Re: [gdal-dev] ogr2ogr project/transform CRS in the same database table

2020-12-02 Thread Hector muro
h loading the Spatialite > extension. The good result would be something like spatialite_version() > (String) = 4.3.0-RC1 or higher. > > > > I suppose you are on Linux. What Linux? What is your GDAL version? How did > you install it? > > > > -Jukka > > > >

Re: [gdal-dev] ogr2ogr project/transform CRS in the same database table

2020-12-02 Thread Hector muro
r `MSSQLSpatial' successful. layer names ignored in combination with -sql. ERROR 1: In ExecuteSQL(): sqlite3_prepare_v2(update 'XXX.xxx' set xxx = ST_AsText(ST_Transform(geometry,4326))): no such function: ST_Transform What am I missing? On Wed, 2 Dec 2020 at 11:19, Hector muro wrote: > Hi,

Re: [gdal-dev] ogr2ogr project/transform CRS in the same database table

2020-12-02 Thread Hector muro
means but SQLite and OGRSQL do not. If you manage to get so far you > would see this error with SQLite dialect: > > > > ERROR 1: In ExecuteSQL(): sqlite3_prepare_v2(select top(1) from > underscore_test): > > no such function: top > > > > -Jukka- > >

Re: [gdal-dev] ogr2ogr project/transform CRS in the same database table

2020-12-02 Thread Hector muro
t; > "$connect_string" > > > > returns just an error? And the same with > > ogrinfo -dialect SQLite -sql "select * from \"crown_site_data\" limit 1" > "$connect_string" > > > > Try also with “-dialect ogrsql” even that dialect

Re: [gdal-dev] ogr2ogr project/transform CRS in the same database table

2020-12-02 Thread Hector muro
nect using the MSSQLSpatial Driver and retrieve info without it. Thanks Hector On Wed, 2 Dec 2020 at 10:29, Rahkonen Jukka (MML) < jukka.rahko...@maanmittauslaitos.fi> wrote: > Hi, > > > > I am not familiar with SQL server but your table name may require > quotation marks " &quo

Re: [gdal-dev] ogr2ogr project/transform CRS in the same database table

2020-12-02 Thread Hector muro
Hi again, I've given your idea a go: ogrinfo -dialect sqlite -sql "update set = ST_AsText(ST_Transform(geometry),4326)" --config MSSQLSPATIAL_USE_GEOMETRY_COLUMNS NO "$connect_string" This connects correctly, as I get this message: INFO: Open of

Re: [gdal-dev] ogr2ogr project/transform CRS in the same database table

2020-12-01 Thread Hector muro
Oh that's a great idea. I have to use SQL Server (not by personal choice) and had given it a go with sqlite as dialect, bur was probably too focused on ogr2ogr. I also didn't know about the "indirect_SQLite" dialect. I will give a try at what you suggest. Thanks for the help :) Hector On

Re: [gdal-dev] ogr2ogr project/transform CRS in the same database table

2020-12-01 Thread Hector muro
Oh, I see. That's great. But what if the Database does not have ST_Transform support? Could we still achieve a similar approach by means of ogr2ogr? (I should have mentioned this in my first email). Thanks again! Hector On Tue, 1 Dec 2020 at 20:14, jratike80 wrote: > Hi, > > No,

[gdal-dev] ogr2ogr project/transform CRS in the same database table

2020-12-01 Thread Hector muro
Hi all, I was wondering if someone knew if it's possible to project or transform within the same table in a database, using ogr2ogr. What I mean is, I have a table with fields: id, id2, geom_wkt_27700 and I would like, using a single command to create an extra column "geom_wkt_4326" for

[gdal-dev] Specify ODBC PATH

2020-08-05 Thread Hector muro
Hi all, I have successfully installed gdal (from source) with the MSSQLSpatial driver in a couple servers (RHEL), but there is one that is resisting and I think it's got to do with the ODBC installation. If I do the following, cat /etc/odbcinst.ini I obtain this: [PostgreSQL] Description=ODBC

Re: [gdal-dev] MSSQLSpatial not using BCP to load

2020-06-30 Thread Hector muro
: > On Mon, 29 Jun 2020 at 15:53, Hector muro wrote: > > > > As a part of a project I need to load quite big geojsons into SQL Server > and I am using ogr2ogr to do so. > > > > Here is an example command I am using: > > > > ogr2ogr -f MSSQLSpatial > &

[gdal-dev] Has ogr2ogr support for BCP Bulk Load on Unix?

2020-06-30 Thread Hector muro
instance it does not use BCP. It instead loads one-by-one and this causes the process to be really slow. SQL Server version: 2017 GDAL version: 3.0.4 Any help/tips will be very appreciated. Thanks Hector Muro ___ gdal-dev mailing list gdal-dev@lists.osgeo

Re: [gdal-dev] MSSQLSpatial not using BCP to load

2020-06-29 Thread Hector muro
e, hence the > > slowness. > > > > What I can't get to understand is how to point gdal to my sql server > > installation. > > > > SQL Server version: 2016 > > GDAL: 3.0.4 > > > > Thanks and regards, > > > > Hector Muro > >

[gdal-dev] MSSQLSpatial not using BCP to load

2020-06-29 Thread Hector muro
tion. SQL Server version: 2016 GDAL: 3.0.4 Thanks and regards, Hector Muro ___ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev