Hi David,<br><br>I tried WGS84 yesterday after a little research on projection, but it didn&#39;t change anything.<br>I tried re-generating the shapefile with WGS84 projection but it&#39;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&#39;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 &lt;<a href="mailto:David.Fawcett@state.mn.us">David.Fawcett@state.mn.us</a>&gt;:<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. &nbsp;Even if you could,<br>
it doesn&#39;t sound like you really know what spatial reference system<br>
(SRS) or projection that it is in. &nbsp;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>
 &nbsp; &quot;init=epsg:4326&quot;<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&#39;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 &lt;<a href="mailto:David.Fawcett@state.mn.us">David.Fawcett@state.mn.us</a>&gt;:<br>
<br>
Have you defined an output projection for your map and input projections<br>
for each of your layers? &nbsp;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 &quot;ground units&quot; 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 &lt;<a href="mailto:David.Fawcett@state.mn.us">David.Fawcett@state.mn.us</a>&gt;:<br>
<br>
Before you create lots of different layers to simulate symbol scaling,<br>
you may want to try something else. &nbsp;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. &nbsp;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. &nbsp;To do<br>
this, set LAYER SIZEUNITS to meters. &nbsp;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. &nbsp;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 -&gt; SIZE values in each of the layer. You are done !!<br>
<br>
Cheers !<br>
Ambastha<br>
<br>
<br>
Faldor wrote:<br>
&gt;<br>
&gt; Yes, but I need them to adapt for different extents.<br>
&gt;<br>
&gt; For example, When I zoom out enough to see the world, I need them 1<br>
&gt; pixel wide (it&#39;s ugly otherwise), but when I zoom in I will need then<br>
&gt; 2 or 5 or even 30 pixels wide to cover all space.<br>
&gt;<br>
&gt; 2008/5/27 Ritesh Ambastha &lt;<a href="mailto:group.ritesh@gmail.com">group.ritesh@gmail.com</a>&gt;:<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; Dear Faldor,<br>
&gt;&gt;<br>
&gt;&gt; &lt;snip&gt;What I need is to have the points grow to cover all space<br>
&gt;&gt; available when I zoom in.&lt;/snip&gt;<br>
&gt;&gt;<br>
&gt;&gt; Do you mean that the size of points should grow? It can be done<br>
&gt;&gt; easily by setting proper SIZE in the STYLE tag.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Regards,<br>
&gt;&gt; Ambastha<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Faldor wrote:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Hi,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Sorry for my first empty message.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; My problem is, I need to display population density with Mapserver.<br>
<br>
&gt;&gt; &gt; The data comes from GPWv3 and has a resolution of 15&#39;. I converted<br>
&gt;&gt; &gt; it to a POINT Shapefile using ogr2ogr.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; At first when I display it on a world map it shows nicely. But when<br>
<br>
&gt;&gt; &gt; I<br>
&gt;&gt; zoom<br>
&gt;&gt; &gt; in it begins to show separated points for each value in the<br>
&gt;&gt; &gt; shapefile. What I need is to have the points grow to cover all<br>
&gt;&gt; &gt; space available<br>
&gt;&gt; when<br>
&gt;&gt; I<br>
&gt;&gt; &gt; zoom in.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Is there any mean to do it with Mapserver ? I did not find it in<br>
&gt;&gt; &gt; the mapfile reference.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I don&#39;t know if I explained it well (I&#39;m not english speaking). If<br>
&gt;&gt; &gt; you<br>
&gt;&gt; do<br>
&gt;&gt; &gt; not understand something, please ask.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Cordialy,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Faldor<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; View this message in context:<br>
&gt;&gt; <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>
&gt;&gt; 17492210p17492387.html<br>
&gt;&gt; Sent from the Mapserver - User mailing list archive at Nabble.com.<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; mapserver-users mailing list<br>
&gt;&gt; <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
&gt;&gt; <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
&gt;&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; mapserver-users mailing list<br>
&gt; <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
&gt; <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
&gt;<br>
&gt;<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>