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="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
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>