Donut Symbol.
Blammo
bob.basques at CI.STPAUL.MN.US
Fri Aug 26 14:17:05 PDT 2005
The points are in Oracle right now, but as I indicated earlier, I think
the ideas already presented will suffice for now.
Thanks for the offer though.
bobb
Bill Binko wrote:
>Bob,
>
>If your points are stored in PostGIS, there are ways of getting this
>perfect. It's not always pretty, and can require some Nasty SQL, , but
>I'd be happy to work with you offline on this (and you can post the
>results back to the list).
>
>Bill
>bill at binko.net
>
>On Fri, 26 Aug 2005, Blammo wrote:
>
>
>
>>Hmm, sounds like overkill for my needs, but it does give me another idea.
>>
>>Using Paco's method of a closed "U" shap symbol, I could stack two
>>circle outlines on top of the closed Ushape and use those for the
>>outline colors of the filled donut area.
>>
>>It's not pretty, but I won't tell anyone if you don't.
>>
>>The sizing of the radius for offset is dynamic and being sent to the
>>sever, so your thoughts are certainly relevent.
>>
>>Thanks for the ideas. I had thought about drawing a PolyShape with a
>>HOLE in it as well. But this even seemed like overkill. As a matter
>>of fact, I've probably put to much into it already at this point :c)
>>
>>bobb
>>
>>Bill Binko wrote:
>>
>>
>>
>>>Another approach is to handle this on the data side: either in Mapscript
>>>or in the database if your data is in PostGIS (and perhaps through OGR:
>>>Frank?)
>>>
>>>What I do for this is simply have the data set return a buffer() around
>>>the point and then display the layer as a POLYGON rather than a point.
>>>
>>>So, if your original data was in PostGIS and your DATA line was:
>>>
>>>DATA "myPoint from (SELECT oid, myPoint from myTable WHERE someField =
>>> 'someValue') as foo using unique oid using SRID=1234"
>>>
>>>You could just change that to:
>>>
>>>DATA "myPoint from (SELECT oid, buffer(myPoint, myRingsize) from myTable
>>> WHERE someField = 'someValue') as foo using unique oid using SRID=1234"
>>>
>>>and change your layer from POINT to POLYGON
>>>
>>>I don't know if OGR can do buffer(), but certainly you could look into it.
>>>
>>>Bill
>>>
>>>
>>>
>>>On Fri, 26 Aug 2005, Steve Lime wrote:
>>>
>>>
>>>
>>>
>>>
>>>>A dynamic donut is not possible given the way MapServer currently works.
>>>>
>>>>The way point symbols work is that a raster marker image is rendered based
>>>>on the properties of the symbol and a SINGLE style. So this has to be accomplished
>>>>within the context of a symbol definition or a style definition. Multiple styles will not
>>>>help you because the base circle would already obscure anything underneath it.
>>>>
>>>>We could change the way an ELLIPSE symbol is rendered so that if you have
>>>>additional second set of radii defined then that defines the hole. But the problem
>>>>still remains that you need to specify sizes for the inner and outer ring which would
>>>>involve changes to the style object- yuck.
>>>>
>>>>One could look at rendering all styles at once as well rather then in turn. You'd just
>>>>define the hole somehow as a style. Nice idea but not doable at the moment.
>>>>
>>>>I wonder if a better approach would be to think about this particular problem as
>>>>an exercise in combining a couple of maps. You certainly can use MapServer to build
>>>>the base image, and you can also use MapServer to draw the rings in a seperate
>>>>images (draw the big ring, and then draw the hole using the background color for
>>>>the whole image). You just need to figure out how to combine them.
>>>>
>>>>You could use DHTML or MapScript to do this. I bet there's a way to do it using straight
>>>>CGI (draw the rings as a raster layer in the second map) if we knew more about the
>>>>application. For example, you might create the ring image and then refer to it as a
>>>>layer in the base image. With AJAX you could do that using the CGI.
>>>>
>>>>Steve
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>>>Blammo <bob.basques at CI.STPAUL.MN.US> 08/26/05 11:46 AM >>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>Jeff,
>>>>
>>>>I tried that already.
>>>>
>>>>What I'm basically after is a sysmbol that is a empty circle with a
>>>>thickness aplied to the line. Ideally it would be a symbol like
>>>>anyother that I could apply a COLOR and OUTLINECOLOR to.
>>>>
>>>>Paco's idea of the close "u" shap would work if I didn't need to outline it.
>>>>
>>>>I also ran into another slight problem as well (may Paco has some ideas
>>>>about this too.)
>>>>
>>>>I was trying to use this symbol as a distance measuring tool. but
>>>>seemed to run into a snag with a size limit. I couldn't get the symbol
>>>>to go over a certain pixel size. The circle is supposed to represent
>>>>a distance buffer in miles (ground units).
>>>>
>>>>If I zoom in too close, the symbol won't get any larger than a certain
>>>>size, about 500 pixels I would guess. I actually have three of these
>>>>symbols stacked on top of each other for different distances. But the
>>>>size of the symbol grow as I zoom in, but once I hit this max pixel
>>>>size, the sysbol stop growing at this approx 500 pixel size.
>>>>
>>>>Thanks
>>>>
>>>>bobb
>>>>
>>>>
>>>>
>>>>Jeff Portwine wrote:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>I haven't tried this , so it may not work, I've always used filled in
>>>>>shapes.. but couldn't you just use a non-filled in circle:
>>>>>
>>>>>SYMBOL
>>>>>NAME "circle"
>>>>>TYPE ellipse
>>>>>FILLED false
>>>>>POINTS
>>>>> 1 1
>>>>>END
>>>>>END
>>>>>
>>>>>and then set its size appropriately? I'm not sure if there is a good way
>>>>>to affect the thickness though, other than stacking several of them with
>>>>>varying sizes.
>>>>>
>>>>>-Jeff
>>>>>
>>>>>----- Original Message -----
>>>>>From: "Bob Basques" <bob.basques at CI.STPAUL.MN.US>
>>>>>To: <MAPSERVER-USERS at LISTS.UMN.EDU>
>>>>>Sent: Thursday, August 25, 2005 5:39 PM
>>>>>Subject: [UMN_MAPSERVER-USERS] Donut Symbol.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>Does anyone know of a good way to make a donut symbol.
>>>>>>
>>>>>>I need to be able to resize a symbol that is basically a donut. Where the
>>>>>>donut part is semi-opaque, and the center is open. It's basically a
>>>>>>min/max distance from a point overlay. I have the dynamic handing off of
>>>>>>the sizing handled already, but haven't figured out a good way to make a
>>>>>>filled donut symbol.
>>>>>>
>>>>>>I did mange to make a stacked symbol, but I would really like to have the
>>>>>>center no be filled in, only the area between the MIN/MAX distance from
>>>>>>the point picked.
>>>>>>
>>>>>>Thanks
>>>>>>
>>>>>>bobb
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>>
>>
>>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20050826/a70739db/attachment.htm>
More information about the MapServer-users
mailing list