See MSSQLSpatial - Microsoft SQL Server Spatial Database — GDAL
documentation
https://gdal.org/drivers/vector/mssqlspatial.html
The MS SQL Spatial driver passes SQL statements directly to MS SQL by
default, rather than evaluating them internally when using the ExecuteSQL()
call on the
*Lähettäjä:* Hector muro
> *Lähetetty:* keskiviikko 2. joulukuuta 2020 13.46
> *Vastaanottaja:* Rahkonen Jukka (MML) >
> *Kopio:* gdal-dev@lists.osgeo.org
> *Aihe:* Re: [gdal-dev] ogr2ogr project/transform CRS in the same database
> table
>
>
>
How did you
install it?
-Jukka
Lähettäjä: Hector muro
Lähetetty: keskiviikko 2. joulukuuta 2020 13.46
Vastaanottaja: Rahkonen Jukka (MML)
Kopio: gdal-dev@lists.osgeo.org
Aihe: Re: [gdal-dev] ogr2ogr project/transform CRS in the same database table
Hi again,
Okey, I think I got it. And you were r
e3_prepare_v2(select top(1) from
>> underscore_test):
>>
>> no such function: top
>>
>>
>>
>> -Jukka-
>>
>>
>>
>>
>>
>>
>>
>> *Lähettäjä:* Hector muro
>> *Lähetetty:* keskiviikko 2. joulukuuta 2020 13
;
>
>
>
>
>
> *Lähettäjä:* Hector muro
> *Lähetetty:* keskiviikko 2. joulukuuta 2020 13.02
> *Vastaanottaja:* Rahkonen Jukka (MML) >
> *Kopio:* gdal-dev@lists.osgeo.org
> *Aihe:* Re: [gdal-dev] ogr2ogr project/transform CRS in the same database
> table
>
>
>
: keskiviikko 2. joulukuuta 2020 13.02
Vastaanottaja: Rahkonen Jukka (MML)
Kopio: gdal-dev@lists.osgeo.org
Aihe: Re: [gdal-dev] ogr2ogr project/transform CRS in the same database table
Hi,
Sorry, no, I meant that, using the flag dialect returns an error of "Table not
found", but using the
does not have those ST_
> functions that you need.
>
>
>
> -Jukka-
>
>
>
>
>
>
>
>
>
>
>
>
>
> *Lähettäjä:* Hector muro
> *Lähetetty:* keskiviikko 2. joulukuuta 2020 12.37
> *Vastaanottaja:* Rahkonen Jukka (MML) >
server but your table name may require quotation
marks " " and they require escaping with \ so that they do not close the SQL
statement. Try
-sql "update \"table_name\" set …. "
Simple test to verify if the problem is caused by the unquoted table name is to
run ogrinfo wi
t; and they require escaping with \ so that they do not
> close the SQL statement. Try
>
> -sql "update \"table_name\" set …. "
>
>
>
> Simple test to verify if the problem is caused by the unquoted table name
> is to run ogrinfo with
>
> -sq
unquoted table name is to
run ogrinfo with
-sql "select * from table_name limit 1".
-Jukka-
Lähettäjä: Hector muro
Lähetetty: keskiviikko 2. joulukuuta 2020 12.13
Vastaanottaja: Rahkonen Jukka (MML)
Kopio: gdal-dev@lists.osgeo.org
Aihe: Re: [gdal-dev] ogr2ogr project/transform
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
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
I would say that it is best to still use ogrinfo. You did not tell what is
your database so I can't tell the exact recipe for you but you will learn
it. You need to know that there are different SQL dialects for GDAL: OGR
SQL, SQLite, indirect_SQLite, and the native SQL for your database. They
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,
Hi,
No, unfortunately it is not possible with one ogr2ogr command.
You need two commands and you must use ogrinfo. Here an example about adding
another geometry column and populating it with EPSG:3857 version of original
EPSG:4326 geometries.
ogrinfo PG:"host=localhost port=5432 dbname=test
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
16 matches
Mail list logo