<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16809" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=526192322-28032009>Bob,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=526192322-28032009>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.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=526192322-28032009></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=526192322-28032009>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.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=526192322-28032009></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=526192322-28032009>So something to the effect</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=526192322-28032009></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=526192322-28032009>SELECT
ST_PointOnSurface(ST_ConvexHull(ST_Collect(drawing.the_geom))) ,
drawingid</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=526192322-28032009>FROM drawing</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=526192322-28032009>GROUP BY drawingid</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=526192322-28032009></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=526192322-28032009>That would put it on the outer range of the drawing
grouping. </SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=526192322-28032009></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=526192322-28032009>Hope that helps,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=526192322-28032009>Regina</SPAN></FONT></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B>
postgis-users-bounces@postgis.refractions.net
[mailto:postgis-users-bounces@postgis.refractions.net] <B>On Behalf Of </B>Bob
Pawley<BR><B>Sent:</B> Sunday, March 29, 2009 3:55 PM<BR><B>To:</B> PostGIS
Users Discussion<BR><B>Subject:</B> Re: [postgis-users] Finding Empty
Space<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT face=Arial size=2>Hi Regine</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Can you elaborate on "taking the exterior of the
covering area" ?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Bob</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=lr@pcorp.us href="mailto:lr@pcorp.us">Paragon Corporation</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=postgis-users@postgis.refractions.net
href="mailto:postgis-users@postgis.refractions.net">'PostGIS Users
Discussion'</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Saturday, March 28, 2009 11:48
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> RE: [postgis-users] Finding
Empty Space</DIV>
<DIV><BR></DIV>
<DIV dir=ltr align=left><SPAN class=916404318-28032009><FONT face=Arial
color=#0000ff size=2>Bob,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=916404318-28032009><FONT face=Arial
color=#0000ff size=2>Not quite clear what you are looking for
here.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=916404318-28032009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=916404318-28032009><FONT face=Arial
color=#0000ff size=2>So are you trying to put your text identifier on a hole
in a geometry? What if there is no hole?</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=916404318-28032009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=916404318-28032009><FONT face=Arial
color=#0000ff size=2>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.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=916404318-28032009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=916404318-28032009><FONT face=Arial
color=#0000ff size=2>To get the centroid of a hole, I think you need to turn
it into non-hole (like turning anti-matter into matter).</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=916404318-28032009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=916404318-28032009><FONT face=Arial
color=#0000ff size=2>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</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=916404318-28032009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=916404318-28032009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B>
postgis-users-bounces@postgis.refractions.net
[mailto:postgis-users-bounces@postgis.refractions.net] <B>On Behalf Of </B>Bob
Pawley<BR><B>Sent:</B> Saturday, March 28, 2009 11:24 PM<BR><B>To:</B> PostGIS
Users Discussion<BR><B>Subject:</B> [postgis-users] Finding Empty
Space<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>Hi</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The expression st_isempty returns
a boolean set.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Is there any method of returning the centroid
coordinates of an empty space wihtin a given geometry?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I want to add a text identifier to a
geometry without it being lost in the clutter.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Bob</FONT></DIV></FONT></DIV>
<P>
<HR>
<P></P>_______________________________________________<BR>postgis-users
mailing
list<BR>postgis-users@postgis.refractions.net<BR>http://postgis.refractions.net/mailman/listinfo/postgis-users<BR></BLOCKQUOTE><BR><BR>__________
Information from ESET NOD32 Antivirus, version of virus signature database 3972
(20090328) __________<BR><BR>The message was checked by ESET NOD32
Antivirus.<BR><BR><A
href="http://www.eset.com">http://www.eset.com</A><BR></BODY></HTML>