Hot answers tagged

3

1500x750 is pretty big for a raster. Definitely worth retiling your data. Take a look at ST_Retile function (new in PostGIS 2.2) - http://postgis.net/docs/manual-2.2/RT_Retile.html or if you are using PostGIS 2.1, you can use ST_Tile instead which achieves same purpose on a per row (instead of per table basis) ...


2

The ST_ClusterWithin and ST_ClusterIntersecting functions in PostGIS first collect all input geometries into a Postgres array before doing their processing. Since the size of this array is proving to be a limitation, you can process this dataset only if you can reduce the total size of this array. Some options for doing this: Use a GROUP BY clause to ...


2

You must convert point coordinates to geometry SELECT ST_Within(St_GeomFromText('POINT(-73.883573184 40.751662187)'), ST_GeomFromGeoJSON(d));


2

Use ST_WorldToRasterCoord(), ST_WorldToRasterCoordX() and/or ST_WorldToRasterCoordY().


2

Your original trigger contains an error: CREATE TRIGGER area_calculate **BEFORE** INSERT OR UPDATE ON nutzungen This means that you're triggers calls the function on geom before the geometry is updated. Replace the trigger by calling the following: DROP TRIGGER area_calculate; CREATE TRIGGER area_calculate AFTER INSERT OR UPDATE ON nutzungen FOR EACH ...


2

You have to change 2 things in your query: add an alias 'geom' right after 1, 1, NULL))


2

Check the proj definition stored in the spatial_ref_sys, it should be different from the one used in the proj4js definition. For example, mine is the following: +proj=utm +zone=30 +ellps=intl +towgs84=-87,-98,-121,0,0,0,0 +units=m +no_defs Also epsg.io gives the one with the towgs84 parameters, so I'd change the Proj4js def.


1

You can confirm that the discrepancy is a bug by comparing the results of _ST_DistanceUnCached(geog,geog) to _ST_DistanceTree(geog,geog) What is happening under the covers is that the "tree" algorithm only kicks in when a geometry shows up in a query a couple times in a row. At that point the geometry is cached and a tree built on it, for faster distance ...


1

but this is will not provide me the order and how many times municipalities are crossed. Assuming every row in Rivers table is a linestring with an entire river. Here's a query that will get you how many municipalities are crossed, the subquery t , will get you all the municipalities that each river crosses but yes they will not be in any guaranteed ...


1

I'd check the following: first of all, I'd like to be sure that source data are OK, by comparing them with official/cadastral data I'd try to use the qgis openlayers plugin to check if the transformation to 3857/900913 works properly for both 23031 and 25831 Try to reproject using QGIS, just saving the shapefile with the target srid. If using QGIS works ...


1

Use DB Manager tool (Database > DB Manager > DB Manager) to connect to your PostGIS database and then add manually the tables / views you want to QGIS map canvas. Before clicking DB Manager, you will need to specify connection details to your DB through Layer > Add Layer > Add PostGIS layers...



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