[MAPSERVER-USERS] Displaying population density with Mapserver

Fawcett, David David.Fawcett at state.mn.us
Tue May 27 12:29:10 EDT 2008


Have you defined an output projection for your map and input projections
for each of your layers?  It is likely that MapServer needs to know what
the input projection/SRS is before it can translate to different units.
 
David.

	-----Original Message-----
	From: Pierre-Benoit Besse [mailto:besse.pb at gmail.com] 
	Sent: Tuesday, May 27, 2008 11:26 AM
	To: Fawcett, David
	Cc: Ritesh Ambastha; mapserver-users at lists.osgeo.org
	Subject: Re: [MAPSERVER-USERS] Displaying population density
with Mapserver
	
	
	Ha, well, I prefer that :) I would need a lot of layer
definitions to obtain something ok...
	
	But I just tried the "ground units" stuff, I tried with a 50
kilometers wide square and it drew squares the size of ASIA !! oO
	I had to define a 1 feet wide square to obtain something more or
less ok...
	Does anybody know why ?
	
	Aside from that It seems to work, thank you !
	
	I will try the scalesymbol stuff tomorrow.
	
	Regards
	
	
	
	2008/5/27 Fawcett, David <David.Fawcett at state.mn.us>:
	

		Before you create lots of different layers to simulate
symbol scaling,
		you may want to try something else.  It has been a long
time since I
		have played with scaled symbols, but give it a try.
		
		You should be able to scale the symbols by setting a
SYMBOLSCALE in the
		LAYER object.  This is the scale at which you want the
symbol to appear
		at the SIZE stated in the map file.
		
		You may want to modify STYLE MAXSIZE if you think that
you will want
		your symbols to be larger than 50 pixels.
		
		Another completely different approach that just came to
my mind would be
		to use ground units (e.g. meters) to set the size of
your symbol.  To do
		this, set LAYER SIZEUNITS to meters.  Calculate the size
of a symbol in
		meters on the ground that will touch adjacent symbols,
or give you the
		desired amount of space between the symbols.  That way,
the symbols
		should scale consistently.
		
		David.
		

		-----Original Message-----
		From: mapserver-users-bounces at lists.osgeo.org
		
		[mailto:mapserver-users-bounces at lists.osgeo.org] On
Behalf Of Ritesh
		Ambastha
		Sent: Tuesday, May 27, 2008 10:16 AM
		To: mapserver-users at lists.osgeo.org
		Subject: Re: [MAPSERVER-USERS] Displaying population
density with
		Mapserver
		
		
		
		Dear Faldor,
		
		Robert is absolutely right. You will have to make
different LAYERS for
		the same POINT layer. But, define MAX/MINSCALE for each
Layer. Change
		STYLE -> SIZE values in each of the layer. You are done
!!
		
		Cheers !
		Ambastha
		
		
		Faldor wrote:
		>
		> Yes, but I need them to adapt for different extents.
		>
		> For example, When I zoom out enough to see the world,
I need them 1
		> pixel wide (it's ugly otherwise), but when I zoom in I
will need then
		> 2 or 5 or even 30 pixels wide to cover all space.
		>
		> 2008/5/27 Ritesh Ambastha <group.ritesh at gmail.com>:
		>
		>>
		>> Dear Faldor,
		>>
		>> <snip>What I need is to have the points grow to cover
all space
		>> available when I zoom in.</snip>
		>>
		>> Do you mean that the size of points should grow? It
can be done
		>> easily by setting proper SIZE in the STYLE tag.
		>>
		>>
		>> Regards,
		>> Ambastha
		>>
		>>
		>>
		>> Faldor wrote:
		>> >
		>> > Hi,
		>> >
		>> > Sorry for my first empty message.
		>> >
		>> > My problem is, I need to display population density
with Mapserver.
		
		>> > The data comes from GPWv3 and has a resolution of
15'. I converted
		>> > it to a POINT Shapefile using ogr2ogr.
		>> >
		>> > At first when I display it on a world map it shows
nicely. But when
		
		>> > I
		>> zoom
		>> > in it begins to show separated points for each
value in the
		>> > shapefile. What I need is to have the points grow
to cover all
		>> > space available
		>> when
		>> I
		>> > zoom in.
		>> >
		>> > Is there any mean to do it with Mapserver ? I did
not find it in
		>> > the mapfile reference.
		>> >
		>> > I don't know if I explained it well (I'm not
english speaking). If
		>> > you
		>> do
		>> > not understand something, please ask.
		>> >
		>> > Cordialy,
		>> >
		>> > Faldor
		>> >
		>> >
		>> >
		>>
		>> --
		>> View this message in context:
		>>
http://www.nabble.com/Displaying-population-density-with-Mapserver-tp
		>> 17492210p17492387.html
		>> Sent from the Mapserver - User mailing list archive
at Nabble.com.
		>>
		>> _______________________________________________
		>> 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
		>
		>
		
		--
		View this message in context:
	
http://www.nabble.com/Displaying-population-density-with-Mapserver-tp174
		
		92210p17492783.html
		
		Sent from the Mapserver - User mailing list archive at
Nabble.com.
		
		_______________________________________________
		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
		


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080527/84cb7bce/attachment-0001.html


More information about the mapserver-users mailing list