You can also do intersections with the GEOS methods exposed in MapScript
(all flavors) assuming
you have GEOS support compiled in...

Steve

>>> On 12/22/2008 at 7:04 PM, in message
<[email protected]>, "José
María
Michia" <[email protected]> wrote:
> 2008/12/22 Joshua Hevenor <[email protected]>:
>> Good morning list,
>> I'm looking for a function and/or method to clip a polygon. In
general, I
>> need to limit a polygon to the map boundary for export (export as
shapefile
>> from a web map)...so if I had a 20x20 square that was overlapping
>> the visible map by 10 units, the exported result would be a 10x20
>> rectangle.  PHP MapScript is my weapon of choice.  I'd also welcome
opinions
>> on the approach or suggestions for alternatives.
>>
>> Thanks for your assistance,
>>
>> Josh
>>
>> PS.  Sorry for the re-post...forgot the subject
> 
> I don't know how to make this using only PHP,  but combining with
> postgis, you can clip geometries using something like:
> 
> SELECT intersection(the_Geom, <box3d>) FROM <table> WHERE the_Geom &&
<box3d>;
> 
> Saludos
> José María
> _______________________________________________
> mapserver-users mailing list
> [email protected] 
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to