[postgis-users] Getting dimensions of polygon sides

Obe, Regina robe.dnd at cityofboston.gov
Thu Jun 12 11:03:15 PDT 2008


Bruce,
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.
 
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.
 
Thanks,
Regina

________________________________

From: postgis-users-bounces at postgis.refractions.net on behalf of Bruce Rindahl
Sent: Thu 6/12/2008 1:03 PM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] Getting dimensions of polygon sides



Obe, Regina wrote:
> Anyrate my new problem:  This whole exercise just made me realize they
> must have put these polygons together with the constituent linework of
> the edges.  Because if I look at the abutting parcels those extra dims
> represent sides of those smaller parcels.  My simplify solution works
> great if you are just looking at one parcel, but when you look at
> abutters - it shall we say, looks crowded.  So my thought is to put the
> position of my length annotation inside each parcel it represents.
>
> I'm lost how to do that.  So basically jimmy the ST_Centroid(the_geom)
> of my above such that it always sits inside the parcel boundary.
>
> Thanks,
> Regina
>  
I am not sure how you are placing the annotation, but this could be
interesting....

Looking at the aftersimplify.png, you have the length of each line
segment (and the segment itself).  The center point of each segment is
easy.  Now you need to define a line segment offset by the text height
of your annotation and translate it INSIDE the polygon.  The you draw
(label?, annotate? ....) the text along that line.  If you first update
the polygon with forceRHR() then INSIDE is always to the right of the
line segment.  You can easily get the azmith of the linesegment from the
start and end points, add 90 degrees and compute the x and y values for
the translate() function.  This should be basic high school trig - ;-) .

Is this what you are thinking of?

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




-----------------------------------------
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080612/3217b346/attachment.html>


More information about the postgis-users mailing list