[postgis-users] Spatial Analysis? (PostGIS -> Well-Known Text -> JTS)
C F
gis_consultant at hotmail.com
Tue May 21 09:00:43 PDT 2002
Hello,
I'm just starting to look into PostGIS (don't even have it installed yet)
and had a few questions about it if somebody wouldn't mind taking a stab at.
First I'll tell you the requirement I'm after, then give you my ideas.
What I would want is to be able to "cookie cut" (intersect) points, lines,
and polygons from PostGIS layers using a polygon shape and put the results
into a shapefile. For now, I *might* be satisfied with only being able to
do a bounding rectangle intersection since I see that sort of spatial
operation is currently available in PostGIS.
1) It looks like the pgsql2shp utility only takes the entire layer, you
cannot tell it to extract certain extents. Correct?
2) I assume that you can create views of your spatial data in
PostGIS/PostgreSQL.... if so, would a workaround for #1 be to create a view
using one of the spatial operators (something like ~=) and then use
pgsql2shp on that view (if it works on views)?
3) If #1 and #2 are not good how about doing a query and putting it out to
well-known text and then using some other product to convert that to a
shapefile? The problem is, I'm not seeing much available in that
department. It looks like OGR could do it... has anyone done this?
4) Now... if I really wanted to intersect layers with a non-rectangular
polygon, what about using JTS? PostGIS can output features in well-known
text and JTS can read in well-known text... and it has the ability to do
spatial operations. I'm sure you can see where I'm going with this...
PostGIS -> Well-Known Text -> JTS -> Well-Known Text -> Shapefile
Sounds extremely ugly and slow, but I'm curious if anyone has attempted it
(I don't think JTS can do Well-Known Binary).
Any comments would be much appreciated! Thanks.
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
More information about the postgis-users
mailing list