[postgis-users] View area
strk at refractions.net
strk at refractions.net
Thu Feb 17 00:18:17 PST 2005
On Wed, Feb 16, 2005 at 12:35:49PM -0700, Sean M. Montague wrote:
> The first statement works, and the 2nd does not.
>
> SELECT intersection(the_geom, intersection.the_geom)
> As the_geom
> >From counties
> WHERE the_geom && intersection.the_geom;
>
> SELECT intersection(the_geom, PolygonFromText(('3117737 1623703, 3117737
> 1692442, 3192501 1692442, 3192501 1623703, 3117738 1623703'),2332))
> AS the_geom
> FROM counties
> WHERE the_geom && PolygonFromText(('3117737 1623703, 3117737 1692442,
> 3192501 1692442, 3192501 1623703, 3117738 1623703'),2332);
PolygonFromText() still takes a WKT representation, what you're using
is invalid. You need the POLYGON tag:
PolygonFromText('POLYGON((....))', 2332);
--strk;
>
> ////////
> I've tried both:
>
> PolygonFromText(('3117737 1623703, 3117737 1692442, 3192501 1692442,
> 3192501 1623703, 3117738 1623703'),2332)
> &
> PolygonFromText(LINESTRING'(3117737 1623703, 3117737 1692442, 3192501
> 1692442, 3192501 1623703, 3117738 1623703)',2332)
>
> Examples are hard to come by, so I am not sure what the exact syntax
> should be. Shouldn't I be able to replace intersection.the_geom with
> any valid polygon? Why do I get "ERROR: couldnt parse objects in
> GEOMETRY"?
>
>
> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Sean
> M. Montague
> Sent: Wednesday, February 16, 2005 11:55 AM
> To: PostGIS Users Discussion
> Subject: RE: [postgis-users] View area
>
> I'm not I understand what you mean by '*small* sql file'. I'm using php
> to query the database, and the select statement I sent is the only sql
> statement I've used so far. I've tried a different approach. I created
> a polygon in ArcView and imported it into PostGIS. The poly has about
> the same coordinates as the BOX3D. Below is the statement and it works
> perfectly.
>
> SELECT AsSVG(intersection(the_geom, intersection.the_geom),0,8)
> As the_geom
> >From counties
> WHERE the_geom && intersection.the_geom;
>
> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of
> strk at refractions.net
> Sent: Wednesday, February 16, 2005 10:38 AM
> To: PostGIS Users Discussion
> Subject: Re: [postgis-users] View area
>
> On Wed, Feb 16, 2005 at 10:23:30AM -0700, Sean M. Montague wrote:
> > Strk, I really appreciate your help. My geometries return valid, 't'.
> > I've imported a new shape file, Colorado counties in StatePlane NAD83.
> > Below is the full SQL statement I'm usisg. I can send you the SQL
> file
> > for importing the table or the shape file itself if it'll help.
>
> What would help is a *small* sql file containing a query like:
>
> SELECT intersection('MULTIPOLYGON(((....)))', setSRID(...));
>
> and giving unespected results.
>
> Note that a intersection operation can return a collection of
> points and triangles, depending on relation between the two geometries.
>
> Also, make sure the SRID of geometries match .
>
> --strk;
>
> >
> > SELECT AsSVG(intersection(the_geom, setSRID('BOX3D(2705381 1688914,
> > 2915183 1534212)'::box3d, 2332)),0,8)
> > AS the_geom
> > FROM counties
> > WHERE the_geom && setSRID('BOX3D(2705381 1688914, 2915183
> > 1534212)'::box3d, 2332);
> >
> >
> > -----Original Message-----
> > From: postgis-users-bounces at postgis.refractions.net
> > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of
> > strk at refractions.net
> > Sent: Wednesday, February 16, 2005 10:07 AM
> > To: PostGIS Users Discussion
> > Subject: Re: [postgis-users] View area
> >
> > On Wed, Feb 16, 2005 at 10:00:45AM -0700, Sean M. Montague wrote:
> > > I found a web site that said the version shipped with postgreSQL 8.0
> > > installer had problems and linked to a windows installer for PostGIS
> > > 0.9.1. So I reloaded it, which is the version below. I did get an
> > > improvement, I think, but still have problems with intersection. I
> > > actually got polygons, but they don't resemble what actually exists.
> > > Looks like they've been generalized into triangles, and some points
> > were
> > > still returned.
> > >
> > > POSTGIS="0.9.1" GEOS="2.1.1" PROJ="Rel. 4.4.9, 29 Oct 2004"
> USE_STATS
> > > DBPROC="0.0.1" RELPROC="0.0.1"
> >
> > Are you input geometries valid - check isvalid() ?
> > Can you reproduce the *bug* with a single, full contained
> > ( and possibly small ) sql script so I can take a look at it ?
> > --strk;
> >
> > >
> > >
> > > -----Original Message-----
> > > From: postgis-users-bounces at postgis.refractions.net
> > > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of
> > > strk at refractions.net
> > > Sent: Wednesday, February 16, 2005 1:23 AM
> > > To: PostGIS Users Discussion
> > > Subject: Re: [postgis-users] View area
> > >
> > > On Tue, Feb 15, 2005 at 01:42:35PM -0700, Sean M. Montague wrote:
> > > > I'm using postgreSQL 8.0.1 win32 version and whichever postGIS
> comes
> > > > with it, 0.9.1 I think. My input geometries are multi-part
> polygons
> > > > imported from a shape file. Every state is its own multi-part
> poly,
> > > > regardless of the number of individual polys, at least as a shape
> > > file,
> > > > not sure how postGIS handles this. I'm also not sure what GEOS
> I'm
> > > > using. Is this an add-on installed separately?
> > >
> > > If intersection is working it's probably installed by the package
> > > you got. Check output of SELECT postgis_full_version() to find
> > > out the version.
> > >
> > > --strk;
> > >
> > > >
> > > > --Sean
> > > >
> > > > -----Original Message-----
> > > > From: postgis-users-bounces at postgis.refractions.net
> > > > [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf
> Of
> > > > strk at refractions.net
> > > > Sent: Tuesday, February 15, 2005 1:33 PM
> > > > To: PostGIS Users Discussion
> > > > Subject: Re: [postgis-users] View area
> > > >
> > > > On Tue, Feb 15, 2005 at 12:37:25PM -0700, Sean M. Montague wrote:
> > > > > I've investigated what the relationship of the points is to the
> > > > original
> > > > > poly layer, and they are not the vertices, at least not all of
> > them.
> > > > > The original layer is the coast of south east Alaska with about
> 25
> > > > > islands. The points may be some of the vertices perhaps, they
> do
> > > lie
> > > > on
> > > > > the coasts. The summary() returns 556 "Object 0 is a POINT()"
> and
> > 1
> > > > > "Object 0 is a LINESTRING() with 2 points". The up side is,
> they
> > at
> > > > > least lie within my bounding box.
> > > >
> > > > It sounds as a bug to me. Which GEOS version are you using ?
> > > > What types are input geometries ?
> > > > Which postgis version ? postgresql ?
> > > > --strk;
> > > > _______________________________________________
> > > > postgis-users mailing list
> > > > postgis-users at postgis.refractions.net
> > > > http://postgis.refractions.net/mailman/listinfo/postgis-users
> > > > _______________________________________________
> > > > postgis-users mailing list
> > > > postgis-users at postgis.refractions.net
> > > > http://postgis.refractions.net/mailman/listinfo/postgis-users
> > > _______________________________________________
> > > postgis-users mailing list
> > > postgis-users at postgis.refractions.net
> > > http://postgis.refractions.net/mailman/listinfo/postgis-users
> > > _______________________________________________
> > > postgis-users mailing list
> > > postgis-users at postgis.refractions.net
> > > http://postgis.refractions.net/mailman/listinfo/postgis-users
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
More information about the postgis-users
mailing list