Robert,

i have a 'geoserver defined view' that works fine like this:

select ogc_fid, wkb_geometry, track,
  from tracks.tracks where
  ST_Intersects
    (
       ST_SetSRID(MakeBox2D(
                PointFromText('POINT(%minx% %miny%)'),
                PointFromText('POINT(%maxx% %maxy%)')
      ),4326),
      geog
    )

so its a layer that takes the WMS extent (BBOX parameter) to define the extent 
and then a second min/max/x/y to further refine the result set, as provided by 
the client (there are further filters that i've ommitted for the eg). you could 
adjust the ST_Intersects to use a different layer in the db somehow instead of 
the external params. geoserver views are really great, combined with postgres 
(python) functions you can do lots of work inside the db itself.

-i




De : Robert Buckley [mailto:robertdbuck...@yahoo.com]
Envoyé : Wednesday, 21 September 2011 8:08 AM
À : Simon Appelt; geoserver-users@lists.sourceforge.net
Objet : Re: [Geoserver-users] st_intersection as new SQL view

Thanks simon,

The app on you Tube looks interesting

Is that GeoExt/Postgis/Geoserver/OpenLayers on linux with php backend?

Any source code available?

cheers,

Rob

________________________________
Von: Simon Appelt <flan...@gmx.de<mailto:flan...@gmx.de>>
An: Robert Buckley <robertdbuck...@yahoo.com<mailto:robertdbuck...@yahoo.com>>
Gesendet: 20:26 Dienstag, 20.September 2011
Betreff: Re: [Geoserver-users] st_intersection as new SQL view
Hi Rob,

did u try?:

http://trac.osgeo.org/postgis/wiki/UsersWikiExamplesOverlayTables

it works for me as u can see at my youtube video 1:30:

http://www.youtube.com/user/maptagsde?feature=mhee#p/a/u/0/Aw1Myp7iHbI

My PHP-Code looks like:

$sql = 'INSERT INTO ma_teilflaechen(the_geom,flurnr) SELECT 
intersection(f.the_geom, c.the_geom),d.txt
FROM "alk_flurstuecke" f, "ma_flaechen" c, "alk_nummern" d
WHERE
   c.gid = '.$gid.'
AND
   f.the_geom && c.the_geom
AND
   Intersects(f.the_geom, c.the_geom)
AND
   f.alk_oid = d.r_masterid;';

maybe this,

regards,
Simon



Am 20.09.2011 19:12, schrieb Robert Buckley:
Hi,

I have been trying to st_intersect two layers from the same postgis database on 
and off for a couple of weeks now without any success.

Can this be done as a geoserver sql view?

yours,

Rob



------------------------------------------------------------------------------

All the data continuously generated in your IT infrastructure contains a

definitive record of customers, application performance, security

threats, fraudulent activity and more. Splunk takes this data and makes

sense of it. Business sense. IT sense. Common sense.

http://p.sf.net/sfu/splunk-d2dcopy1



_______________________________________________

Geoserver-users mailing list

Geoserver-users@lists.sourceforgenet<mailto:Geoserver-users@lists.sourceforge.net>

https://lists.sourceforge.net/lists/listinfo/geoserver-users


--

Visit me at

 - Blog   : http://www.maptags.de

 - Twitter: http://twitter.com/maptagsde

 - youtube: http://www.youtube.com/maptagsde

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to