[mapserver-users] Circles around points in miles

Ian Walberg ian.walberg at airborne.aero
Fri Jun 8 17:18:35 PDT 2012


This question from earlier in the year has finally got to the top of our
to do list.

The issue is how to draw a circle at a given size (ideally in miles)
when using "proj=ortho".

Everything works well when using "proj=latlong" and SIZEUNITS miles.

Is this the expected behaviour and we do not understand something or is
this a problem?

Many thanks

Ian

-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Ian
Walberg
Sent: Thursday, February 16, 2012 1:57 PM
To: mapserver-users at lists.osgeo.org
Cc: Lime, Steve D (DNR)
Subject: RE: [mapserver-users] RE: Circles around points in miles

This does not work in all cases as we hoped,  or we may not  understand
how to use the overall ma projection correctly.

All the layers have the projection set to "proj=latlong,ellps=WGS84".

However if we set the overall map projection from this to "proj=ortho"
the layer with the sizeunits set disappears.

Is this an issue related to the projection or that the map units are now
different.

If we remove the sizeunits from the layer with the circles they reappear
but of course are not the correct size (in miles).

Many thanks

Ian

-----Original Message-----
From: Ian Walberg
Sent: Wednesday, February 15, 2012 11:40 AM
To: Stephen Woodbridge; mapserver-users at lists.osgeo.org
Subject: RE: [mapserver-users] RE: Circles around points in miles

Stephen,

That appears to do the trick.

Many thanks

Ian

-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Stephen
Woodbridge
Sent: Wednesday, February 15, 2012 10:36 AM
To: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] RE: Circles around points in miles

On 2/15/2012 1:23 PM, Ian Walberg wrote:
> Steve,
>
> Thanks again for the info so far.
>
> Testing this today we realise (not surprisingly) that both the size 
> and width of the symbol are now in miles.
>
> Ideally we would like to set the radius of the circle in miles and the

> width in pixels.
>
> Is there any way of doing this?

Yes, add minwidth 1 and maxwidth 1 to force the width to 1 pixel.

-Steve W

> Regards
>
> Ian
>
> -----Original Message-----
> From: Lime, Steve D (DNR) [mailto:Steve.Lime at state.mn.us]
> Sent: Monday, February 13, 2012 2:57 PM
> To: Ian Walberg; mapserver-users at lists.osgeo.org
> Subject: RE: Circles around points in miles
>
> I jumped the gun on the geomtransform idea. The support is there but 
> because it operates at the style level buffer distances must be given 
> in pixels and there's no easy way to convert a map distance (e.g. 10
> miles) to pixels. I really should make some runtime constants (for 
> example, extent, scale and cellsize) available to expressions- then 
> you could do this.
>
> Glad you picked option 2 to start.
>
> Steve
>
> -----Original Message-----
> From: Ian Walberg [mailto:ian.walberg at airborne.aero]
> Sent: Monday, February 13, 2012 4:38 PM
> To: Lime, Steve D (DNR); mapserver-users at lists.osgeo.org
> Subject: RE: Circles around points in miles
>
> Steve,
>
> Many thanks for the help and we have just tested option 2 and that 
> works.
>
> We are using 6.x but are not exactly sure how to use the geomtransform

> to do this. Do you have  an example?
>
> Regards
>
> Ian
>
> -----Original Message-----
> From: Lime, Steve D (DNR) [mailto:Steve.Lime at state.mn.us]
> Sent: Monday, February 13, 2012 9:37 AM
> To: Ian Walberg; mapserver-users at lists.osgeo.org
> Subject: RE: Circles around points in miles
>
> Couple of options depending on version:
>
>    1) 6.x: buffer the points using a style geomtransform
>    2) all versions: use layer SIZEUNITS to draw a circle symbol in 
> miles
>
> I think option 1 is more flexible but option 2 is probably faster.
>
> Steve
>
> -----Original Message-----
> From: mapserver-users-bounces at lists.osgeo.org
> [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Ian 
> Walberg
> Sent: Saturday, February 11, 2012 10:06 PM
> To: mapserver-users at lists.osgeo.org
> Subject: [mapserver-users] Circles around points in miles
>
>
> We need to draw circles of 50 and 100 miles around a list of points.
>
> How can we do this?
>
> Thanks
>
> Ian
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users

_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________
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