SV: [mapserver-users] Clipping out unprojectable area?

Espen.Messel at ffi.no Espen.Messel at ffi.no
Fri May 15 02:32:18 EDT 2009


Hi.

You could try something like this:

DATA "geometri from ( select geometri, * from general.country where ST_Intersection(geometri,GeomFromText('POLYGON((12 0,18 0,18 84,12 84,12 0))',4326)) ) AS FOO USING UNIQUE ogc_fid USING SRID=4326"

It's not very nice, but it works.

Regards,
Espen

----------------------------------------------------------------------
Espen Messel
 

> -----Opprinnelig melding-----
> Fra: mapserver-users-bounces at lists.osgeo.org 
> [mailto:mapserver-users-bounces at lists.osgeo.org] På vegne av paalkr
> Sendt: 12. mai 2009 16:19
> Til: mapserver-users at lists.osgeo.org
> Emne: Re: [mapserver-users] Clipping out unprojectable area?
> 
> 
> Hi!
> 
> I'm trying to achieve the same thing, but I need some hints 
> on how to incorporate the spatial filter in the DATA 
> statement. This is a snippet from my mapfile
> 
>       DATA "geometri from general.country USING UNIQUE 
> ogc_fid USING SRID=4326"
> 
> and this is the spatial filter i try to apply
> 
>       ST_Intersection(geometri,GeomFromText('POLYGON((12 0,18 
> 0,18 84,12
> 84,12 0))',4326))
> 
> but I don't manage build the right the DATA statement!
> 
> Can someone please help with the DATA statement?
> 
> Regards,
> Pål Kristensen 
> 
> 
> Gregor at HostGIS wrote:
> > 
> > With some SQL know-how I did get the EPSG database merged 
> with our own 
> > spatial_ref_sys table (it has other mods for our uses, so this was
> > trivial) and our program generating 
> ST_Intersection(the_geom) statements.
> > 
> > This does work as expected, which is great. Thanks for 
> another simple 
> > and elegant solution, Christopher.
> > 
> > Now to cope with some of our data having self-intersecting polygons 
> > which break such operators...
> > 
> > -- 
> > Gregor Mosheh / Greg Allensworth    BS, A+, Network+, 
> Security+, Server+
> > System Administrator, Lead Programmer
> > HostGIS development & hosting services, http://www.HostGIS.com/
> > 
> > "Remember that no one cares if you can back up,
> >   only if you can restore." - AMANDA
> > _______________________________________________
> > mapserver-users mailing list
> > mapserver-users at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/mapserver-users
> > 
> > 
> 
> 
> -----
> 
> Regards,
> Pål Kristensen
> --
> View this message in context: 
> http://n2.nabble.com/Clipping-out-unprojectable-area--tp229984
7p2869427.html
> Sent from the Mapserver - User mailing list archive at Nabble.com.
> 
> _______________________________________________
> 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