[mapserver-users] Clipping
Steve Lime
Steve.Lime at dnr.state.mn.us
Mon Dec 22 17:10:16 PST 2008
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
<a37ffbf90812221704q1b79d27frf27f9c5b24034e59 at mail.gmail.com>, "José
María
Michia" <jose.maria.michia at gmail.com> wrote:
> 2008/12/22 Joshua Hevenor <jhevenor at rogers.com>:
>> 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
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list