[mapserver-users] Circles around points in miles

Arnd Wippermann arnd.wippermann at web.de
Mon Jun 11 13:35:37 PDT 2012


Hello,

Most likely the radius of your circles is to small for the extent you choose

Arnd

-----Ursprüngliche Nachricht-----
Von: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] Im Auftrag von Ian Walberg
Gesendet: Montag, 11. Juni 2012 18:37
An: Lime, Steve D (DNR); mapserver-users at lists.osgeo.org
Betreff: Re: [mapserver-users] Circles around points in miles

Steve,

Below is a map file with the settings we are using.

The Extent and projection are commented out for the test.

With the projection set to "init=epsg:4326" the circles appear the size we
expect.

With projection set to "proj=orth" and the extent changed to EXTENT -200000
-200000 200000 200000 all the other data (removed form this map file for
simplicity) appears ok and the circles disappear.

Thanks

Ian



MAP
  NAME 'Simple'
  STATUS ON
  SIZE 1280 768

	EXTENT -121 34 -115 41
#	EXTENT -200000 -200000 200000 200000

  UNITS DD
  SHAPEPATH "shp"
  IMAGECOLOR 120 120 120

  SYMBOL
    NAME 'circle2'
    TYPE ELLIPSE
    POINTS 1 1 END
    FILLED FALSE
  END

  LAYER
		DEBUG 5
    NAME range_circles
    TYPE point
    STATUS DEFAULT
  	UNITS miles
		SIZEUNITS miles

		FEATURE
			POINTS 
				 -118 38
			END
		END
  
    CLASS
      STYLE 
	      MAXWIDTH 1
        SYMBOL 'circle2'
        SIZE 50
        COLOR 255 0 0
      END
      STYLE 
	      MAXWIDTH 1
        SYMBOL 'circle2'
        SIZE 100
        COLOR 255 0 0
      END
      STYLE 
	      MAXWIDTH 1
        SYMBOL 'circle2'
        SIZE 150
        COLOR 255 0 0
      END

    END
	  PROJECTION
	  	"proj=latlong"
			"ellps=WGS84"
			"datum=WGS84"
		END
  END

  PROJECTION
		"init=epsg:4326"

#		"proj=ortho"
		"lat_0=38.0"
		"lon_0=-118"
		"ellps=WGS84"
  END
END


-----Original Message-----
From: Lime, Steve D (DNR) [mailto:Steve.Lime at state.mn.us]
Sent: Monday, June 11, 2012 7:45 AM
To: Ian Walberg; mapserver-users at lists.osgeo.org
Subject: RE: [mapserver-users] RE: Circles around points in miles

What are the UNITs set to with "proj=ortho"?

-----Original Message-----
From: Ian Walberg [mailto:ian.walberg at airborne.aero]
Sent: Friday, June 08, 2012 7:19 PM
To: mapserver-users at lists.osgeo.org
Cc: Lime, Steve D (DNR)
Subject: RE: [mapserver-users] RE: Circles around points in miles

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


_______________________________________________
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