6

Run the command with -d switch https://postgis.net/docs/using_postgis_dbmanagement.html#shp2pgsql_usage -d Drops the database table before creating a new table with the data in the Shape file. for overwriting the table that you have created with your previous trials. The first error message tries to help ERROR: relation "geo_br" already exists.


4

Use ST_OrientedEnvelope Returns a mimimum rotated rectangle enclosing a geometry. select ST_OrientedEnvelope(geom) from ok_ak_riks


3

I have experienced similar issues, where data that is perfectly fine according to PostGIS and QGIS (tested with ST_MakeValid in PostGIS, and by loading the data in QGIS and running QGIS's geometry validity checker), still couldn't be loaded reliable in ArcGIS. Note that the data in my case was stored in WGS 1984 (SRID 4326) "geometry" storage (so ...


3

There are many ways to get the desired result, the main thing is to understand what steps will lead you to the right result! The main thing is all - the Idea, Method, Process, Result and Emotions! In general, the Idea is in your fantasy (representation) and is as follows:: We are looking for the most important point that will help us build a inscribed ...


2

So my colleague came up with this solution. It works great for small areas, but I'd like to find a solution for millions of shapes across an entire country. I can see the ST_UNION here causing a blockage in this respect. The ST_BUFFER is just to close out thin slithers. SELECT ST_DIFFERENCE(foo.geom, bar.geom) FROM (SELECT ST_CONVEXHULL(ST_COLLECT(shape::...


2

\d raster_columns describes the table that stores information about rasters, to find out about a specific raster you would query that table, something like: select * from raster_columns where r_table_name = 'name';


2

As @Vince mentions in comments, the key here is to include all non-matching rows from the joined relation in the result; this is trivially solved using a LEFT|RIGHT|FULL [OUTER] JOIN, where the thus denoted relation(s) will pass all (unfiltered) rows to the result set, with or without fulfilled match condition. In the result set, 1:n matches will be ...


1

Since you only want to download data from healthsites anyway: Go to https://healthsites.io/map Download all healthsite data in this World.zip (last update at : ...) --> click on "World.zip" to download that file.


1

Here's a solution that makes use of the fact that in PostGIS running ST_Difference on two intersecting LineStrings (or MultiLineStrings) has the effect of noding the first line. So it's possible to loop over every line in the table, and difference it with the collection of lines that intersect it, to effectively node it. The noded line is computed as a ...


1

this code will fill the gaps and holes in the polygons. adjust according to your data SELECT id, ST_Collect(ST_MakePolygon(geom)) As geom FROM ( SELECT gid, ST_ExteriorRing((ST_Dump(geom)).geom) As geom FROM layer ) s GROUP BY id


1

Well, it looks like a really complicated question. I don't think that there is an optimum algorithm, but maybe you can find one that fits your particular needs. For exemple, if your polygons can be concave, it will be way more difficult (the blue rectangle would be the answer?): So you should look at the specificities (only convexe polygon?) of your problem,...


1

You have several hidden questions embedded within this broad one but it is possible to edit data in GeoServer from ArcMap (with a Production Mapping license) via WFS-T. The ArcMap Help has a page on Data editing with WFS-T services: Production Mapping provides a way to consume WFS data, perform edit operations, and publish the resulting changes to the ...


1

I had the same problem and used the shp2pgsql-gui.exe that you can find at C:\Program Files\PostgreSQL\9.6\bin\postgisgui, it works fine.


1

I realize this is quite old but just came across the same issue and wanted to share a solution. Strictly speaking John Powell is right – it can't be the same format because it needs to be converted on import to a PostGIS-supported form. However, using ogr2ogr you have some control over how this happens: Something like $ ogr2ogr -f "PostgreSQL" &...


Only top voted, non community-wiki answers of a minimum length are eligible