[postgis-users] PostGIS and Section lines
Dylan Beaudette
dylan.beaudette at gmail.com
Fri Jan 26 12:06:43 PST 2007
On Friday 26 January 2007 09:06, Bruce Rindahl wrote:
> -----Original Message-----
> From: Bill Thoen [mailto:bthoen at gisnet.com]
> Sent: Friday, January 26, 2007 9:59 AM
> To: rindahl at lrcwe.com; PostGIS Users Discussion
> Subject: Re: [postgis-users] PostGIS and Section lines
>
> >In the easy cases, you'll be able to find the closest point to corner of
> >the minimum bounding rectangle (which you get from envelope() I guess)
> >by testing each point's distance to the four points of the enclosing
> >rectangle. But as you probably know, there are "triangular" sections and
> >other pathological oddities (especially near rivers and at the survey
> >borders). So you'll have to make sure you have four DIFFERENT corner
> >points when you identify your section corners.
>
> I am aware of these problems and will have to handle these separately. I
> was looking for help on the looping routine to fine the easy cases.
>
> >I think you've got the right algorithm... do you just need to know how
> >to create a line by copying points from a subset of your section polygon
> >(while also translating each point's X-coordinate by -500 ft in the case
> >of the east line)?
>
> I think I have a handle on this. If I know the NE point and the SE point
> then the east line is:
> line_substring(....,line_locate_point(....,NE),line_locate_point(....,SE))
> where .... is ExteriorRing(GeometryN(the_geom,1)). The translate function
> takes care of moving all the points to the east.
>
> This is really clean but I don't know yet how it will handle polygons coded
> in the wrong direction and how I will handle when the first vertex and the
> last vertex are the same corner.
>
> Thanks for the ideas. When this is accomplished I will document it as I
> think others will use it.
>
> Bruce
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
Hi guys, I tackled this problem a couple of months ago with a mixed
PostGIS/Python approach. In my case I was trying to convert 1/4 of 1/4
section data into real world coordinates. I ended up locating the centroids
of all 1/4 and 1/4 of 1/4 sections and writing these to a postgis table - for
lookup later on.
I can post my code if others are interested.
Cheers,
--
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341
More information about the postgis-users
mailing list