[postgis-users] Rép: Re: Removing tiny polygons

2014-01-27 Thread Hugues François
Hello, In your case, ST_GeometryType() really returns `ST_Polygon' ? You can have a table with several rows, each one containing a geometry. This geometry can ne a simple one (single entity) or a multi one. Hugues Tom McCallum a écrit : Ok, really silly question now, how can a polygon field

Re: [postgis-users] Removing tiny polygons

2014-01-27 Thread Astrid Bjørnerød
Is there anyone you have written some sql-code for removing the small polygons onto one of the neighbor-polygons ? Any stabil functions for this task? Astrid -Opprinnelig melding- Fra: postgis-users-boun...@lists.osgeo.org [mailto:postgis-users-boun...@lists.osgeo.org] På vegne av Tom M

Re: [postgis-users] Removing tiny polygons

2014-01-27 Thread Mike Toews
On 28 January 2014 09:29, Tom McCallum wrote: > Ok, really silly question now, how can a polygon field contain what looks > like multiple polygons. > > So I have a Shapefile of GB but its only got 3 polygons in, according to > PostGis, but there are lots of small island polygons as well which are

Re: [postgis-users] Removing tiny polygons

2014-01-27 Thread Tom McCallum
Ok, really silly question now, how can a polygon field contain what looks like multiple polygons. So I have a Shapefile of GB but its only got 3 polygons in, according to PostGis, but there are lots of small island polygons as well which are not attached to any of the main land masses, so I

Re: [postgis-users] Removing tiny polygons

2014-01-27 Thread Tom McCallum
Thanks Morten. I wanted the first case, so that helps. On Mon, 27 Jan 2014 19:15:18 -, Morten Sickel wrote: It depends on what you mean with "remove" - do you want to just have the large polygons without the area that is covered by the small ones or do you want to add the area of the s

Re: [postgis-users] Removing tiny polygons

2014-01-27 Thread Morten Sickel
It depends on what you mean with "remove" - do you want to just have the large polygons without the area that is covered by the small ones or do you want to add the area of the small polygons onto one or more of the larges? (e.g. how one typically wants to handle shiver polygons) In the first case

[postgis-users] Removing tiny polygons

2014-01-27 Thread Tom McCallum
Hi all, If I have a polygon geometry field which seems to be made up of a large number of tiny polygons and some larger ones, what is the best way to remove polygons below a certain size? Would I need to preprocess this and save in a new table/record or can I dynamically do it? Thanks T

Re: [postgis-users] Rép: Re: Getting boundary of set of polygons

2014-01-27 Thread Tom McCallum
I kind of gave up on that, it seemed to work better just sending straight through simplify (my objective was to reduce the load time). Everytime I tried one of the suggestions I ended up with one tiny polygon and none of the others seemed to be represented. I think the underlying geometry m

[postgis-users] Rép: Re: Getting boundary of set of polygons

2014-01-27 Thread Hugues François
I hope you'll tell us your final choice ! In your last query you need to add a pair of bracket to get only geometries from dump. Syntax is : (st_dump(geom)).geom. Hug Tom McCallum a écrit : Thanks for all your replies, not quite there but got some ideas. On Mon, 27 Jan 2014 13:51:26 -

Re: [postgis-users] Getting boundary of set of polygons

2014-01-27 Thread Tom McCallum
Thanks for all your replies, not quite there but got some ideas. On Mon, 27 Jan 2014 13:51:26 -, Rémi Cura wrote: You could use convex or concav envelop. You can also union the geometries (eventually simplifying by neg buffer then pos buffer) That's if you want precise boundary. If you ju

Re: [postgis-users] Getting boundary of set of polygons

2014-01-27 Thread Rémi Cura
You could use convex or concav envelop. You can also union the geometries (eventually simplifying by neg buffer then pos buffer) That's if you want precise boundary. If you just need bbox ... Cheers, Rémi-C 2014-01-27 Hugues François > Hello, > > On my side, I often use > st_buildarea(st_exteri

Re: [postgis-users] Getting boundary of set of polygons

2014-01-27 Thread Hugues François
Hello, On my side, I often use st_buildarea(st_exteriorring((st_dump(geom)).geom)). And if I want to keep a single object for the original one, I union or collect them regarding their gid. HTH Hugues. -Original Message- From: postgis-users-boun...@lists.osgeo.org [mailto:postgis-

Re: [postgis-users] Getting boundary of set of polygons

2014-01-27 Thread Tom McCallum
St_MakePolygon does not take a multilinestring. ST_BuildArea looked possible, but it gives me back lots of little areas and not a single boundary for the whole set. It looks as though ST_Dump with ST_MakePolygon may be useful but am still trying to get the right form something like ST_Make

Re: [postgis-users] Getting boundary of set of polygons

2014-01-27 Thread Nicolas Ribot
Hi, You should try st_makePolygon, or st_buildArea depending on the result you want (keeping holes or removing them). Nicolas On 27 January 2014 13:32, Tom McCallum wrote: > Hello all, > > I am trying to get the boundary of a geometry(polygon) field in postgis > (multiple polygons in this fi

[postgis-users] Getting boundary of set of polygons

2014-01-27 Thread Tom McCallum
Hello all, I am trying to get the boundary of a geometry(polygon) field in postgis (multiple polygons in this field). I have this so far: ST_BOUNDARY(ST_COLLECT(wkb_geometry)) which outputs MultilineString. I need to convert this to a polygon. I have tried all sorts of things from ST_DU

Re: [postgis-users] ubuntu: package conflict

2014-01-27 Thread Angelos Tzotsos
Hi all, I did the same test to backport gdal to current version in precise and had the same results: dh-python missing. So we stay with 1.10 for OSGeoLive. Cheers, Angelos On 01/27/2014 09:30 AM, Denis Rouzaud wrote: Hi, Thanks Brian for your reply. I asked Christoph Berg (maintainer for P