Donut Symbol.

Steve Lime steve.lime at DNR.STATE.MN.US
Fri Aug 26 16:04:17 EDT 2005


There is a max symbol size defined in map.h. Just bump that value and
recompile.

Steve

>>> Bob Basques <bob.b at gritechnologies.com> 08/26/05 2:10 PM >>>
The need:

This is for locating point that Photographs were taken around a city.  
The idea is for the user to pick a point on a map, along with a MIN & 
MAX distance (in ground units) away from the point picked.   This Donut 
shaped area is where all the photo's that were taken and generally 
looking in the direction of the point picked (did I mention the photo 
data is all in a database, complete with a compass heading for the 
direction of view) will be listed out.  We have the selection and 
outputting working for the photography, but I can't seem to figure out a 
way to display this donut shape, in the map.

I'm using two circles on top of one another at the moment for this, but 
the inner area is currenly filled in.   I was just trying to get to a 
point where only the donut area is filled in.   The closed Donut symbol 
shape that Paco came up with is the closest so far to what I'm looking 
for, and will do for our needs.   I don't know that this is a big enough 
deal to reprogram anything at this point.  I was just wondering if there 
were a way to handle it.

The Symbol method would be the best choice for this application as the 
View can be zoomed into and out of. at will by the users, to the donut 
shape can scale in relation to the view size. (see otherproblem below.)

-----------

On a related item.  Is there some sort of Symbol (PIXEL) size limit in 
place?  I can't seem to make a Symbol generate any bigger than around 
500 pixels?  If I zoom into too close above for example, the symbol for 
this buffer area stops getting any bigger.  There is no error generated, 
the symbol is just rendered at this max setting after a certain zoom 
level is reached.  

Some more info, I'm using mutiple circles in my example, all static 
sized (in ground units) so as I zoom in they should all stay the same 
ratio in size to each other as they grow, but when the outer circle hits 
this limit, it just stops growing, and the inner circle continue to grow 
until they reach this limit.

bobb



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
>>>
>>>   
>>>
>>>      
>>>
>> 
>>
>>    
>>
>
>
>
>
>  
>



More information about the mapserver-users mailing list