Re: [mapserver-users] Dynamic intersection color with MapServer?
You have to use a tool like PostgreSQL/PostGIS to do such a thing. It can create true geometries based on the intersection of other geometries. You'd have to do this as two separate layers though, AB intersections and AC intersections since the intersections would be defined in the connection string for PostGIS. Steve >>> On 5/8/2009 at 10:20 AM, in message <107901.78725...@web110606.mail.gq1.yahoo.com>, "kreshna_icehe...@yahoo.com" wrote: > Let's say I have three layers: A, B, and C. > > If layer A intersects with layer B, I want the intersection area to be > colored with, say, red. Only the intersection area. > > If layer A intersects with layer C, I want the intersection area to be > colored with, say, green. Again, only the intersection area. > > Is it possible to do such thing with MapServer? For starter, is it possible > for MapServer to dynamically "generate" the intersection area on the fly? And > it is possible to assign specific color to the intersection area? > > Many thanks, > -Kresh > > > > > > ___ > mapserver-users mailing list > mapserver-users@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Dynamic intersection color with MapServer?
Hi Kreshna, I don't think it is possible to achieve this with the cgi. Possibly some application logic using mapscript could do. I have a simpler idea though, if the map will be used for just presenting the data (not analysing) you could assign an OPACITY parameter to the layers A,B,C and color them with different colors. Thus, the intersection will be mixed with the colors of the layers providing the "effect" you want. > Date: Fri, 8 May 2009 08:20:00 -0700 > From: kreshna_icehe...@yahoo.com > To: mapserver-users@lists.osgeo.org > Subject: [mapserver-users] Dynamic intersection color with MapServer? > > > Let's say I have three layers: A, B, and C. > > If layer A intersects with layer B, I want the intersection area to be > colored with, say, red. Only the intersection area. > > If layer A intersects with layer C, I want the intersection area to be > colored with, say, green. Again, only the intersection area. > > Is it possible to do such thing with MapServer? For starter, is it possible > for MapServer to dynamically "generate" the intersection area on the fly? And > it is possible to assign specific color to the intersection area? > > Many thanks, > -Kresh > > > > > > ___ > mapserver-users mailing list > mapserver-users@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapserver-users _ Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
RE: [mapserver-users] Dynamic intersection color with MapServer?
Thanks, Jim & Steve. Yes, I guess I have to use postgreSQL query to define the intersection layer (using intersect spatial query). I still wonder about something, though. Let say I have the following layers: layer A, layer B, and layer C. Layer C is the distinctly-colored intersection layer, which is generated by postgreSQL query. Is it possible to automatically activate layer C whenever layer A and layer B is activated? It needs certain programming, but it is possible to achieve trough cgi alone? Or would I need PHP MapScript? How about p.mapper? Is it easier to do such thing using p.mapper? It is based on PHPMapScript, isn't it? Any sample codes for such purpose? Many thanks, -Kresh ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users