Tag Info

Hot answers tagged

3

If you are running PostGIS 2.0+, you can use the ST_RemoveRepeatedPoints function, so no need to go thru all that trouble of extracting and reconstituting http://postgis.net/docs/manual-2.1/ST_RemoveRepeatedPoints.html UPDATE yourpolygontable SET geom = ST_RemoveRepeatedPoints(geom);


2

ST_ClosestPoint will find the closest point on a linestring. For example, locating a point on a road that is closest to a point-of-interest off to one side: SELECT ST_AsText(ST_ClosestPoint(road, poi)) FROM (SELECT 'LINESTRING (10 10, 20 20)'::geometry AS road, 'POINT (14 10)'::geometry AS poi ) AS f; st_astext -------------- POINT(12 12) (1 row) ...


2

I went through this last year, and using the OpenLayers basemaps for print-ready exports does not seem to work. I think its the basemap tiles that are moving, and not your points... I would recommend, and you will love the result in terms of quality as much as what you learned, to follow the steps @underdark has put together here: A guide to ...


2

For this you need at least version 1.3.2 of Shapely, which was released 2014-05-13. The lines of code you are looking at were added in a commit "Allow LineStrings to take arrays of Points".


1

This is probably answered in Empty geometries in GEOMETRYCOLLECTION which refers also to http://trac.osgeo.org/postgis/wiki/DevWikiEmptyGeometry. A practical use case for many GIS programs like QGIS which can only hold one sort of geometries on a single layer is to make it possible to import attributes into a new layer and initialize it correctly so it can ...


1

Providing you can differentiate between group of points to form a polyline (distance tolerance?), the following works: Find point for which total of distances to other points in the group is maximum. This makes a first point of target polyline (first point in the array) Iterate through the rest of the points to find nearest, add to the array, etc. Convert ...



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