10
If your point is located here:
it's encoded as WKB which stands for Well Known Binary.
The exact same point, expressed as WKT (for Well Know Text, which is more human readable) is: 'POINT (30.3504317999999991 50.4503695000000008)'
Please see https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry
and https://portal.ogc.org/files/?...
7
You should use ST_Translate for this intent https://postgis.net/docs/ST_Translate.html
UPDATE your_table
SET your_geom_column_name = ST_Translate(your_geom_column_name, 4, 4);
Be aware 4 are units from your geometry projection. Would be better if meters instead of degrees as 4 degrees something like hundred of kilometres...
4
You may choose:
to use GDAL using ogrmerge.py like here but with setting a destination target not a file but your database compare to this example https://twitter.com/ThomasG77/status/1362118505819176966 See ogrmerge doc
looping with bash doing something like below (not exact as it depends from your own table structure)
psql -c "CREATE TABLE ...
3
My take on the spatial data component of MSSQL Server echoes the documentation - basic spatial capabilities, and anything more complex is handled by 3rd parties.
What this means to us is that MSSQL Server can handle some basic Spatial SQL functions that get a bit of information from an overlapping polygon, a quick distance or area of few features, etc.
It ...
2
In a PostGIS database, I create a new table and add as layer the sample in QGIS
CREATE TABLE to_delete AS
SELECT 1, ST_SetSrid(ST_GeomFromText('MULTIPOLYGON(((349749.532007553 5575769.14298604,349777.370999882 5575792.32299964,349792.406197559 5575794.8902163, 349749.532007553 5575769.14298604)))'), 3857) AS geom;
Due to comment feedback by @user30184
It ...
2
You can specify the name of the tale inside a Geopackage:
ogr2ogr -f "PostgreSQL" "PG:database" -t_srs EPSG:3035 -overwrite -lco \
GEOMETRY_NAME=geom -nln "corine.corine12_vec" \
U2018_CLC2012_V2020_20u1.gpkg NAME_OF_LAYER
So for example for the U2018_CLC2012_V2020_20u1 layer:
ogr2ogr -f "PostgreSQL" "PG:...
2
Spatial algorithms such as buffer are complex, with a lot of moving parts. It only takes one inefficient design decision or data structure to reduce performance. Conversely, sometimes it's possible to find a different approach that can improve performance dramatically.
The PostGIS buffer code (which originates in JTS/GEOS) has some optimizations which ...
1
In the end creating an instance of QgsVectorLayerExporter and passing it the desired geometry type helped.
con_string = """dbname='gis' host='localhost' port='25432' user='qgis' password='qgis'
key='id' table="public"."my_layer_new" (geom)"""
exporter = QgsVectorLayerExporter(con_string, 'postgres', fields=...
Only top voted, non community-wiki answers of a minimum length are eligible
Related Tags
postgis × 7952postgresql × 2482
qgis × 1180
geoserver × 478
sql × 447
pgrouting × 403
raster × 352
openstreetmap × 352
python × 285
polygon × 257
coordinate-system × 252
shapefile × 240
geometry × 225
postgis-2.0 × 196
gdal × 171
openlayers-2 × 170
intersection × 165
ogr2ogr × 158
linestring × 148
geojson × 147
query × 138
point × 134
distance × 128
osm2pgsql × 125
srid × 110