[postgis-users] PostGIS Capabilities

Jong S. Lee jonglee1 at uiuc.edu
Thu Feb 19 13:50:19 PST 2004


Paul Ramsey wrote:

>
> On Thursday, February 19, 2004, at 02:03 AM, Chris Haste wrote:
>
>> Given an irregular closed polygon can we perform SQL statements along 
>> the lines of "give me all the points that reside within the polygon?
>
>
> SELECT POINTS FROM MYTABLE WHERE 
> CONTAINS(GEOMETRYFROMTEXT('POLYGON(..)', SRID), POINTS)
>
>
>>  Given the same polygon can we obtain all the lines that intersect 
>> the polygon?
>
>
> SELECT LINES FROM MYTABLE WHERE NOT 
> DISJOINT(GEOMETRYFROMTEXT('POLYGON(..)', SRID), LINES)
>
>
>>  For the above are the coordinates of the intersection points 
>> calculated and obtainable?
>
>
> SELECT INTERSECTION(LINES, GEOMETRYFROMTEXT('POLYGON(..)',SRID)) FROM 
> MYTABLE WHERE NOT DISJOINT(GEOMETRYFROMTEXT('POLYGON(..)', SRID), LINES)
>
>
>>  Can we obtain all the points within a certain radius of a specified 
>> points?
>
>
> SELECT * FROM MYTABLE WHERE 
> DISTANCE(POINTS,GEOMETRYFROMTEXT('POINT(..)',SRID)) > RADIUS
>
>> Can we obtain all the lines that reside entirely (without 
>> intersecting the boundary) within a circle or an ellipse?
>
>
> If you construct the circle or ellipse into a polygon that 
> approximates the shape, you can use the WITHIN() or CONTAINS() 
> functions for a strict test of containment.
>
>> Is it possible to specify the segments of a polygon as being either a 
>> straight line, a rhumb line or a great circle? This is necessary to 
>> avoid problems to do with the curvature of the earth.
>
>
> No. You can calculate length_spheroid() directly on the spheroid, but 
> that is the only geodetic function we have so far.
>
>>  
>
>      Paul Ramsey
>      Refractions Research
>      Email: pramsey at refractions.net
>      Phone: (250) 885-0632


Wow... Amazing PostGIS!!

Question:     How to select points on the line?  For example, how to 
select the bridges on the highway?

Jong.

-- 
Jong Sung Lee, Graduate Research Assistant
Department of Urban and Regional Planning
University of Illinois at Urbana-Champaign
111 Temple Hoyne Buell Hall
611 East Loredo Taft Dr.
Champaign, IL  61820

Tel:(217)244-6564 
E-mail:jonglee1 at uiuc.edu




More information about the postgis-users mailing list