<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16640" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=252074613-29052008><FONT face=Arial color=#0000ff
size=2>MapServer should do the conversion on the fly, my point was just that
MapServer needs to know what SRS (and units) that the data is in, so it can make
the translation. </FONT></SPAN></DIV>
<DIV><SPAN class=252074613-29052008><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=252074613-29052008><FONT face=Arial color=#0000ff size=2>Can
you post the text of your map file? </FONT></SPAN></DIV>
<DIV><SPAN class=252074613-29052008><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=252074613-29052008><FONT face=Arial color=#0000ff
size=2>David.</FONT></SPAN></DIV>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> Pierre-Benoit
Besse [mailto:besse.pb@gmail.com] <BR><B>Sent:</B> Thursday, May 29, 2008 2:51
AM<BR><B>To:</B> Fawcett, David<BR><B>Cc:</B>
mapserver-users@lists.osgeo.org<BR><B>Subject:</B> Re: [MAPSERVER-USERS]
Displaying population density with Mapserver<BR><BR></FONT></DIV>Hi
David,<BR><BR>I tried WGS84 yesterday after a little research on projection,
but it didn't change anything.<BR>I tried re-generating the shapefile with
WGS84 projection but it's still the same.<BR>In fact, my data comes from GPW
v3 (<A
href="http://sedac.ciesin.columbia.edu/gpw/global.jsp">http://sedac.ciesin.columbia.edu/gpw/global.jsp</A>)
but I didn't find any clue on the projection used, I suppose there is none as
you say.<BR><BR>When you speak about translating ground units, do you mean I
have to translate my shapefile from degrees to, say, kilometers before I can
use SIZEUNITS kilometers ? I thought it could be done dynamically by
MapServer.<BR>I found a tutorial about this, I will try it anyway (assuming my
data is WGS84) and give you the outcome :)<BR><BR>I attached my mapfile this
time, just in case I made a noob mistake somewhere...<BR><BR>thank you very
much !<BR><BR>Faldor<BR><BR>
<DIV class=gmail_quote>2008/5/28 Fawcett, David <<A
href="mailto:David.Fawcett@state.mn.us">David.Fawcett@state.mn.us</A>>:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">Faldor,<BR><BR>When
you have point coordinates stored in a text file, there really is<BR>no way
to encode/attach the projection definition. Even if you could,<BR>it
doesn't sound like you really know what spatial reference system<BR>(SRS) or
projection that it is in. The key to projecting to another SRS<BR>or
translating ground units to another measure (from degrees to meters)<BR>is
knowing what the current SRS of the data is.<BR><BR>Since your data is
worldwide and it is unprojected (lat/lon), a good<BR>first guess would be to
assume that it is unprojected with using the<BR>WGS84.<BR><BR>Try defining
your layer projection by including this block in your
layer<BR>definition.<BR><BR>PROJECTION<BR> "init=epsg:4326"<BR>END<BR>
<DIV class=Ih2E3d><BR>David.<BR><BR>-----Original Message-----<BR>From: <A
href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</A><BR>[mailto:<A
href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</A>]
On Behalf Of<BR></DIV>
<DIV class=Ih2E3d>Pierre-Benoit Besse<BR>Sent: Wednesday, May 28, 2008 4:11
AM<BR>To: Fawcett, David<BR></DIV>
<DIV>
<DIV></DIV>
<DIV class=Wj3C7c>Cc: <A
href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</A><BR>Subject:
Re: [MAPSERVER-USERS] Displaying population density
with<BR>Mapserver<BR><BR><BR>Well, I confess, I'm new to GIS applications
and I do not know a lot<BR>about projections.<BR>I understand I have to tell
MapServer what is the projection of each<BR>layer I use in the mapfile, but
using ogrinfo on my shapefiles tells me<BR>that :<BR><BR>Layer name:
pop_density<BR>Geometry: Point<BR>Feature Count: 249937<BR>Extent:
(-180.000000, -56.000000) - (179.750000, 83.500000)<BR>Layer SRS
WKT:<BR>(unknown)<BR>latitude: Real (24.15)<BR>longitude: Real
(24.15)<BR>densite: Real (24.15)<BR><BR>I generated this shapefile from a
CSV file with 3 columns : latitude,<BR>longitude, density_value.<BR>Did I
have to define a projection then ? How do I do that ?<BR><BR>Best
regards,<BR><BR>Faldor<BR><BR><BR>2008/5/27 Fawcett, David <<A
href="mailto:David.Fawcett@state.mn.us">David.Fawcett@state.mn.us</A>>:<BR><BR>Have
you defined an output projection for your map and input projections<BR>for
each of your layers? It is likely that MapServer needs to know
what<BR>the input projection/SRS is before it can translate to different
units.<BR><BR>David.<BR>-----Original Message-----<BR>From: Pierre-Benoit
Besse [mailto:<A
href="mailto:besse.pb@gmail.com">besse.pb@gmail.com</A>]<BR>Sent: Tuesday,
May 27, 2008 11:26 AM<BR>To: Fawcett, David<BR>Cc: Ritesh Ambastha; <A
href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</A><BR>Subject:
Re: [MAPSERVER-USERS] Displaying population density
with<BR>Mapserver<BR><BR><BR>Ha, well, I prefer that :) I would need a lot
of layer definitions to<BR>obtain something ok...<BR><BR>But I just tried
the "ground units" stuff, I tried with a 50 kilometers<BR>wide square and it
drew squares the size of ASIA !! oO<BR>I had to define a 1 feet wide square
to obtain something more or less<BR>ok...<BR>Does anybody know why
?<BR><BR>Aside from that It seems to work, thank you !<BR><BR>I will try the
scalesymbol stuff tomorrow.<BR><BR>Regards<BR><BR><BR><BR>2008/5/27 Fawcett,
David <<A
href="mailto:David.Fawcett@state.mn.us">David.Fawcett@state.mn.us</A>>:<BR><BR>Before
you create lots of different layers to simulate symbol scaling,<BR>you may
want to try something else. It has been a long time since I<BR>have
played with scaled symbols, but give it a try.<BR><BR>You should be able to
scale the symbols by setting a SYMBOLSCALE in the<BR>LAYER object.
This is the scale at which you want the symbol to appear<BR>at the
SIZE stated in the map file.<BR><BR>You may want to modify STYLE MAXSIZE if
you think that you will want<BR>your symbols to be larger than 50
pixels.<BR><BR>Another completely different approach that just came to my
mind would be<BR>to use ground units (e.g. meters) to set the size of your
symbol. To do<BR>this, set LAYER SIZEUNITS to meters. Calculate
the size of a symbol in<BR>meters on the ground that will touch adjacent
symbols, or give you the<BR>desired amount of space between the symbols.
That way, the symbols<BR>should scale
consistently.<BR><BR>David.<BR><BR><BR>-----Original Message-----<BR>From:
<A
href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</A><BR><BR>[mailto:<A
href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</A>]
On Behalf Of Ritesh<BR>Ambastha<BR>Sent: Tuesday, May 27, 2008 10:16
AM<BR>To: <A
href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</A><BR>Subject:
Re: [MAPSERVER-USERS] Displaying population density
with<BR>Mapserver<BR><BR><BR><BR>Dear Faldor,<BR><BR>Robert is absolutely
right. You will have to make different LAYERS for<BR>the same POINT layer.
But, define MAX/MINSCALE for each Layer. Change<BR>STYLE -> SIZE values
in each of the layer. You are done !!<BR><BR>Cheers
!<BR>Ambastha<BR><BR><BR>Faldor wrote:<BR>><BR>> Yes, but I need them
to adapt for different extents.<BR>><BR>> For example, When I zoom out
enough to see the world, I need them 1<BR>> pixel wide (it's ugly
otherwise), but when I zoom in I will need then<BR>> 2 or 5 or even 30
pixels wide to cover all space.<BR>><BR>> 2008/5/27 Ritesh Ambastha
<<A
href="mailto:group.ritesh@gmail.com">group.ritesh@gmail.com</A>>:<BR>><BR>>><BR>>>
Dear Faldor,<BR>>><BR>>> <snip>What I need is to have the
points grow to cover all space<BR>>> available when I zoom
in.</snip><BR>>><BR>>> Do you mean that the size of points
should grow? It can be done<BR>>> easily by setting proper SIZE in the
STYLE tag.<BR>>><BR>>><BR>>> Regards,<BR>>>
Ambastha<BR>>><BR>>><BR>>><BR>>> Faldor
wrote:<BR>>> ><BR>>> > Hi,<BR>>> ><BR>>>
> Sorry for my first empty message.<BR>>> ><BR>>> > My
problem is, I need to display population density with
Mapserver.<BR><BR>>> > The data comes from GPWv3 and has a
resolution of 15'. I converted<BR>>> > it to a POINT Shapefile
using ogr2ogr.<BR>>> ><BR>>> > At first when I display it
on a world map it shows nicely. But when<BR><BR>>> > I<BR>>>
zoom<BR>>> > in it begins to show separated points for each value
in the<BR>>> > shapefile. What I need is to have the points grow to
cover all<BR>>> > space available<BR>>> when<BR>>>
I<BR>>> > zoom in.<BR>>> ><BR>>> > Is there any
mean to do it with Mapserver ? I did not find it in<BR>>> > the
mapfile reference.<BR>>> ><BR>>> > I don't know if I
explained it well (I'm not english speaking). If<BR>>> >
you<BR>>> do<BR>>> > not understand something, please
ask.<BR>>> ><BR>>> > Cordialy,<BR>>>
><BR>>> > Faldor<BR>>> ><BR>>> ><BR>>>
><BR>>><BR>>> --<BR>>> View this message in
context:<BR>>> <A
href="http://www.nabble.com/Displaying-population-density-with-Mapserver-tp"
target=_blank>http://www.nabble.com/Displaying-population-density-with-Mapserver-tp</A><BR>>>
17492210p17492387.html<BR>>> Sent from the Mapserver - User mailing
list archive at Nabble.com.<BR>>><BR>>>
_______________________________________________<BR>>> mapserver-users
mailing list<BR>>> <A
href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</A><BR>>>
<A href="http://lists.osgeo.org/mailman/listinfo/mapserver-users"
target=_blank>http://lists.osgeo.org/mailman/listinfo/mapserver-users</A><BR>>><BR>><BR>>
_______________________________________________<BR>> mapserver-users
mailing list<BR>> <A
href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</A><BR>>
<A href="http://lists.osgeo.org/mailman/listinfo/mapserver-users"
target=_blank>http://lists.osgeo.org/mailman/listinfo/mapserver-users</A><BR>><BR>><BR><BR>--<BR>View
this message in context:<BR><A
href="http://www.nabble.com/Displaying-population-density-with-Mapserver-tp174"
target=_blank>http://www.nabble.com/Displaying-population-density-with-Mapserver-tp174</A><BR><BR>92210p17492783.html<BR><BR>Sent
from the Mapserver - User mailing list archive at
Nabble.com.<BR><BR>_______________________________________________<BR>mapserver-users
mailing list<BR><A
href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</A><BR><A
href="http://lists.osgeo.org/mailman/listinfo/mapserver-users"
target=_blank>http://lists.osgeo.org/mailman/listinfo/mapserver-users</A><BR>_______________________________________________<BR>mapserver-users
mailing list<BR><A
href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</A><BR><A
href="http://lists.osgeo.org/mailman/listinfo/mapserver-users"
target=_blank>http://lists.osgeo.org/mailman/listinfo/mapserver-users</A><BR></DIV></DIV></BLOCKQUOTE></DIV><BR></BLOCKQUOTE></BODY></HTML>