[mapserver-users] Another related SHPXY question, about Crossing window vs within for TEMPLATED output.
Basques, Bob (CI-StPaul)
bob.basques at ci.stpaul.mn.us
Fri Mar 3 07:14:51 PST 2017
On Mar 2, 2017, at 6:03 PM, Stephen Woodbridge <woodbri at swoodbridge.com<mailto:woodbri at swoodbridge.com>> wrote:
What is you current sql that is not getting the features that cross the window?
Hi Steve,
Right now I’m just using the regular WFS calling structure from MapServer:
DATA “wkb_geometry from cache.sprws_distribution_mains using unique ogc_fid"
The end of the day yesterday I figured out a Crossing window select via psql that does return the lines that crossed the view port. That looks like this:
select
*
from
cache.sprws_distribution_mains
where
ST_Crosses(ST_GeomFromText(‘POLYGON((576741 157601,576959 157601,576959 157601,576741 157750,576741 157601))’,200068), wkb_geometry)
That is using the same BBOX values that are being passed in via the WFS call to the mapserver mapfile.
Problem there though, is now I need to pass in the WFS BBOX window to the custom select. It looks like if there is no vertex inside of the requested BBOX then the line feature is not output in the TEMPLATE. I’ll go through and test it all again to be sure though.
bobb
I've never had a problem like that with mapserver, so I'm wondering how you are generating the problem.
Mapserver has substition variable like !BBOX! or something like that which gets replaced with the BBOX of the window getting requested.
geom from (select * from table where geom && !BBOX!) using ...
I don't remember the exact syntax off the top of my head, but give me a shout if you can't figure it out.
-Steve W
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users
I took a speed reading course and read ‘War and Peace’ in twenty minutes. It involves Russia.
—Woody Allen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20170303/db0fd697/attachment.htm>
More information about the MapServer-users
mailing list