[gdal-dev] GDAL question
Peter P
pepanpeter at gmail.com
Thu Apr 29 02:03:54 PDT 2021
When I use in cmd: ogrinfo -so PG:"dbname='test' host='127.0.0.1'
port='5432' user='user1' password='password1'" table1
Output is:
Layer name: table1
Geometry: Unknown (any)
Feature Count: 8
Extend: (...,...) - (....,...)
Layer SRS WKT:
(unknown)
FID Column = Id
Geometry Column = TestGeometry
Name = String (0.0)
Why is Geometry and Layer SRS WKT values Unknown? I using correct EPSG:3857.
It is bad or why ogr2ogr not put SRS to postgresql?
If run this command without -so
feature is correct
OGRFeature(table1):1
Name(String) = testName
POLYGON ((.....))
When I do update, so syntax is in cmd?: ogrinfo PG:"dbname='test'
host='127.0.0.1'
port='5432' user='user1' password='password1'" -sql "UPDATE table1 SET
Name='name2', TestGeometry='{"type": "Feature", "geometry": ....' WHERE
Id='1'"
In column geometry put geojson file or how?
jratike80 wrote
> Hi,
>
> You can't update with ogr2ogr. Use ogrinfo instead. I believe that you
> will
> find good examples from gis.stackexchange
> https://gis.stackexchange.com/search?q=ogrinfo+update
>
> -Jukka Rahkonen-
>
>
> Peter P wrote
>> It is works, Thanks
>>
>> Now I trying update row.
>> In SQL will be: /UPDATE "table1" SET "TestGeometry"=.... WHERE "Name" =
>> 'testname'/
>> How is this possible in ogr2ogr? I use -update, -append not work...
>
>
>
>
>
> --
> Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at .osgeo
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
More information about the gdal-dev
mailing list