# [postgis-users] Finding Empty Space

Paragon Corporation lr at pcorp.us
Sat Mar 28 15:31:46 PDT 2009

```Bob,
If you are talking about lines, the exterior idea I was talking about
wouldn't quite work I guess since I thought you were talking about interior
holes of a polygon.

What you could do is take the convexhull of the set of your geometries and
then take the point on the surface of the convex hull.  Not sure if that
does what you need.

So something to the effect

SELECT ST_PointOnSurface(ST_ConvexHull(ST_Collect(drawing.the_geom))) ,
drawingid
FROM drawing
GROUP BY drawingid

That would put it on the outer range of the drawing grouping.

Hope that helps,
Regina

_____

From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Bob
Pawley
Sent: Sunday, March 29, 2009 3:55 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] Finding Empty Space

Hi Regine

Yes I want to be able to puit identifiers like #1, #2 etc. in the clear
space. In my world there is always a clear space (think line drawings of
containment tanks, compressors etc), but this space is not always in the
same area of the drawing. The trick is to have the computer identify such
space.

Can you elaborate on "taking the exterior of the covering area" ?

Thanks

Bob

----- Original Message -----
From: Paragon Corporation <mailto:lr at pcorp.us>
To: 'PostGIS Users  <mailto:postgis-users at postgis.refractions.net>
Discussion'
Sent: Saturday, March 28, 2009 11:48 AM
Subject: RE: [postgis-users] Finding Empty Space

Bob,
Not quite clear what you are looking for here.

So are you trying to put your text identifier on a hole in a geometry?  What
if there is no hole?

Also the centroid of a geometry is not guaranteed to lie on the geometry so
even if you turned empty space into non-empty so you can take the centroid
of it, the centroid may not be in the hole.

To get the centroid of a hole, I think you need to turn it into non-hole
(like turning anti-matter into matter).

you can do this by say taking the exterior of the covering area, and then
using ST_Difference.  The result would be the holes turned into geometries

_____

From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Bob
Pawley
Sent: Saturday, March 28, 2009 11:24 PM
To: PostGIS Users Discussion
Subject: [postgis-users] Finding Empty Space

Hi

The expression st_isempty returns a boolean set.

Is there any method of returning the centroid coordinates of an empty space
wihtin a given geometry?

I want to add a text identifier to a geometry without it being lost in the
clutter.

Bob

_____

_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

__________ Information from ESET NOD32 Antivirus, version of virus signature
database 3972 (20090328) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20090328/db48ae63/attachment.html>
```