<HTML dir=ltr><HEAD><TITLE>Re: [postgis-users] Getting dimensions of polygon sides</TITLE>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.2900.3354" name=GENERATOR></HEAD>
<BODY>
<DIV id=idOWAReplyText38492 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>Bruce,</FONT></DIV>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>Yes that is what I was thinking.  I was going to create another geometry field which is a point which represents the exact location I want the annotation placed.  I was using quantum for the below snapshots and I think it just places it at the centroid of the line.  I looked at it in ArcPad which is what will be used in the field and it seems to do more or less the same too although I think it auto angles so I may go with instead of centroid - just another line translated 90 degrees some x amount to the right to maintain the angularness of the text.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>Now if only I can remember my highschool trig.   What you are saying makes perfect sense though so I'm sure I will be able to figure out the functional steps with a little bit of thinking.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>Thanks,</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>Regina</FONT></DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> postgis-users-bounces@postgis.refractions.net on behalf of Bruce Rindahl<BR><B>Sent:</B> Thu 6/12/2008 1:03 PM<BR><B>To:</B> PostGIS Users Discussion<BR><B>Subject:</B> Re: [postgis-users] Getting dimensions of polygon sides<BR></FONT><BR></DIV>
<DIV>
<P><FONT size=2>Obe, Regina wrote:<BR>> Anyrate my new problem:  This whole exercise just made me realize they<BR>> must have put these polygons together with the constituent linework of<BR>> the edges.  Because if I look at the abutting parcels those extra dims<BR>> represent sides of those smaller parcels.  My simplify solution works<BR>> great if you are just looking at one parcel, but when you look at<BR>> abutters - it shall we say, looks crowded.  So my thought is to put the<BR>> position of my length annotation inside each parcel it represents.<BR>><BR>> I'm lost how to do that.  So basically jimmy the ST_Centroid(the_geom)<BR>> of my above such that it always sits inside the parcel boundary.<BR>><BR>> Thanks,<BR>> Regina<BR>>  <BR>I am not sure how you are placing the annotation, but this could be<BR>interesting....<BR><BR>Looking at the aftersimplify.png, you have the length of each line<BR>segment (and the segment itself).  The center point of each segment is<BR>easy.  Now you need to define a line segment offset by the text height<BR>of your annotation and translate it INSIDE the polygon.  The you draw<BR>(label?, annotate? ....) the text along that line.  If you first update<BR>the polygon with forceRHR() then INSIDE is always to the right of the<BR>line segment.  You can easily get the azmith of the linesegment from the<BR>start and end points, add 90 degrees and compute the x and y values for<BR>the translate() function.  This should be basic high school trig - ;-) .<BR><BR>Is this what you are thinking of?<BR><BR>Bruce<BR>_______________________________________________<BR>postgis-users mailing list<BR>postgis-users@postgis.refractions.net<BR><A href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</A><BR></FONT></P></DIV></BODY></HTML>
<HTML><BODY><P><hr size=1></P>
<P><STRONG>
The substance of this message, including any attachments, may be confidential, legally privileged and/or exempt from disclosure pursuant to Massachusetts law. It is intended solely for the addressee. If you received this in error, please contact the sender and delete the material from any computer.
</STRONG></P></BODY></HTML>

<P><hr size=1></P>
<P><STRONG><font size="2" color="339900"> Help make the earth a greener place. If at all possible resist printing this email and join us in saving paper. </p> <p> </font></STRONG></P>