[mapserver-users] Nationalatlas Shapefile Projection
Sathiskumar Govindasamy
gsathis@yahoo.com
Fri, 22 Mar 2002 10:50:02 -0600
--------------070406050302030604070008
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Thanks guys. That was it. It works great.
-Sathis
Ed McNierney wrote:
>Sure - just use PROJ, the projection tool MapServer uses (available from
>http://www.remotesensing.org/proj). The "four corners" technique is a
>good start, but please remember that it won't always ensure that the
>entire original area is visible in the output area. But it's usually
>fine and you can tweak things from there.
>
> - Ed
>
>Ed McNierney
>Chief Mapmaker
>TopoZone.com
>ed@topozone.com
>(978) 251-4242
>
>
>-----Original Message-----
>From: Stephen Woodbridge [mailto:woodbri@swoodbridge.com]
>Sent: Friday, March 22, 2002 8:22 AM
>To: Ed McNierney
>Cc: Sathiskumar Govindasamy; mapserver-users@lists.gis.umn.edu
>Subject: Re: [mapserver-users] Nationalatlas Shapefile Projection
>
>
>OK, so is there a utility that lets you say project the extents so you
>have new numbers for you map file? You would probably want to project
>all four corners of your extents and then take the exnts of the
>projected corners to be you new extents in the project space.
>
>-Steve
>
>Ed McNierney wrote:
>
>>Sathis -
>>
>>Your EXTENT numbers are in the same units your output projection is
>>
>in.
>
>>If you're displaying decimal degrees, the extents work. When you
>>project the output to LCC, the units change completely, and the EXTENT
>>numbers now specify a tiny little area that's nowhere near the United
>>States. That's why you get a blank image.
>>
>> - Ed
>>Ed McNierney
>>Chief Mapmaker
>>TopoZone.com
>>
>>-----Original Message-----
>>From: Sathiskumar Govindasamy [mailto:gsathis@yahoo.com]
>>Sent: Thursday, March 21, 2002 9:26 PM
>>To: mapserver-users@lists.gis.umn.edu
>>Subject: Re: [mapserver-users] Nationalatlas Shapefile Projection
>>
>>Hi all,
>>
>>To give a better idea about what I am trying to acheive, I have
>>explained little bit more in this mail than before. I wanted the
>>mapserver to generate the image of USA in the "lcc : Lambert Conformal
>>Conic projection" or "aea : Albers Equal Area" or which ever suits
>>
>best
>
>>for US. I have the National Atlas US States shapefile statesp020.xxx .
>>The following is the map file.
>>
>>NAME USA
>>STATUS ON
>>EXTENT -126 50 -66 24
>>UNITS METERS
>>SIZE 700 550
>>SHAPEPATH "data"
>>IMAGECOLOR 79 173 253
>>
>>PROJECTION
>> "proj=lcc"
>> "lat_0=24"
>> "lat_1=50"
>> "lon_0=-99"
>>END
>>
>>WEB
>> TEMPLATE demo.html
>> LOG demo.log
>>END
>>
>>#
>># Start of symbol definitions (we're only using a few)
>>#
>>SYMBOL
>> NAME 'circle'
>> TYPE ELLIPSE
>> POINTS 1 1 END
>> FILLED TRUE
>>END
>>
>>#
>># Start of layer definitions
>>#
>>LAYER
>> NAME statesp020
>> MAXSCALE 600000
>> TYPE POLYGON
>> STATUS DEFAULT
>> DATA statesp020
>> PROJECTION
>> "proj=latlong"
>> "ellps=clrk66"
>> END
>>
>> CLASSITEM 'state'
>> CLASS
>> NAME 'Unwanted States'
>> EXPRESSION /'Virgin Island'|Puerto|Alaska/
>> OUTLINECOLOR 198 243 255
>> COLOR 198 243 255
>> END
>> CLASS
>> NAME 'State & Nation Boundary'
>> EXPRESSION /./
>> OUTLINECOLOR 180 180 180
>> COLOR 255 255 255
>> OVERLAYSYMBOL 'circle'
>> OVERLAYSIZE 2
>> OVERLAYOUTLINECOLOR 180 180 180
>> END
>>
>> TOLERANCE 0
>>END
>>
>>END
>>
>>In the Map PROJECTION Section when I change the above shown on to
>>proj=latlong and remove lat_0 and other stuff, then the map shows up
>>correctly. But, when I have it as shown above, I just only see an
>>
>image
>
>>with solid image color. Can someone tell me where I am making mistake
>>
>?
>
>>Thanks
>>Sathis
>>
>>Kieran J. Ames wrote:
>>
>>Sathis,
>>I'll share the little I know with you.
>>You need to investigate projections in general. Different projections
>>render
>>maps in different ways. If you have ArcView (what I use), you can take
>>your
>>UNPROJECTED DATA (Decimal Degrees) and PROJECT it. This will allow you
>>to see
>>what happens. If you can't do that, then you might post to the group
>>
>and
>
>>ask
>>them what the best projection for this would be.
>>eg: if you want to show North America and NOT zoom in, you may choose
>>one
>>projection over another. Tell the group what you want to accomplish
>>
>and
>
>>go from
>>there.
>>HTH.
>>Kieran
>>
--------------070406050302030604070008
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<html>
<head>
</head>
<body>
Thanks guys. That was it. It works great.<br>
<br>
-Sathis<br>
<br>
Ed McNierney wrote:<br>
<blockquote type="cite" cite="mid:13858AA1A74F30419F319ACB66A9D1220E7EE6@mercator.topozone.com">
<pre wrap="">Sure - just use PROJ, the projection tool MapServer uses (available from<br><a class="moz-txt-link-freetext" href="http://www.remotesensing.org/proj">http://www.remotesensing.org/proj</a>). The "four corners" technique is a<br>good start, but please remember that it won't always ensure that the<br>entire original area is visible in the output area. But it's usually<br>fine and you can tweak things from there.<br><br> - Ed<br><br>Ed McNierney<br>Chief Mapmaker<br>TopoZone.com<br><a class="moz-txt-link-abbreviated" href="mailto:ed@topozone.com">ed@topozone.com</a><br>(978) 251-4242<br><br><br>-----Original Message-----<br>From: Stephen Woodbridge [<a class="moz-txt-link-freetext" href="mailto:woodbri@swoodbridge.com">mailto:woodbri@swoodbridge.com</a>]<br>Sent: Friday, March 22, 2002 8:22 AM<br>To: Ed McNierney<br>Cc: Sathiskumar Govindasamy; <a class="moz-txt-link-abbreviated" href="mailto:mapserver-users@lists.gis.umn.edu">mapserver-users@lists.gis.umn.edu</a
><br>Subject: Re: [mapserver-users] Nationalatlas Shapefile Projection<br><br><br>OK, so is there a utility that lets you say project the extents so you<br>have new numbers for you map file? You would probably want to project<br>all four corners of your extents and then take the exnts of the<br>projected corners to be you new extents in the project space.<br><br>-Steve<br><br>Ed McNierney wrote:<br></pre>
<blockquote type="cite">
<pre wrap="">Sathis -<br><br>Your EXTENT numbers are in the same units your output projection is<br></pre>
</blockquote>
<pre wrap=""><!---->in.<br></pre>
<blockquote type="cite">
<pre wrap="">If you're displaying decimal degrees, the extents work. When you<br>project the output to LCC, the units change completely, and the EXTENT<br>numbers now specify a tiny little area that's nowhere near the United<br>States. That's why you get a blank image.<br><br> - Ed<br>Ed McNierney<br>Chief Mapmaker<br>TopoZone.com<br><br>-----Original Message-----<br>From: Sathiskumar Govindasamy [<a class="moz-txt-link-freetext" href="mailto:gsathis@yahoo.com">mailto:gsathis@yahoo.com</a>]<br>Sent: Thursday, March 21, 2002 9:26 PM<br>To: <a class="moz-txt-link-abbreviated" href="mailto:mapserver-users@lists.gis.umn.edu">mapserver-users@lists.gis.umn.edu</a><br>Subject: Re: [mapserver-users] Nationalatlas Shapefile Projection<br><br>Hi all,<br><br>To give a better idea about what I am trying to acheive, I have<br>explained little bit more in this mail than before. I wanted the<br>mapserver to generate the image of USA in the "lcc : Lambert Conformal<br>Conic projec
tion" or "aea : Albers Equal Area" or which ever suits<br></pre>
</blockquote>
<pre wrap=""><!---->best<br></pre>
<blockquote type="cite">
<pre wrap="">for US. I have the National Atlas US States shapefile statesp020.xxx .<br>The following is the map file.<br><br>NAME USA<br>STATUS ON<br>EXTENT -126 50 -66 24<br>UNITS METERS<br>SIZE 700 550<br>SHAPEPATH "data"<br>IMAGECOLOR 79 173 253<br><br>PROJECTION<br> "proj=lcc"<br> "lat_0=24"<br> "lat_1=50"<br> "lon_0=-99"<br>END<br><br>WEB<br> TEMPLATE demo.html<br> LOG demo.log<br>END<br><br>#<br># Start of symbol definitions (we're only using a few)<br>#<br>SYMBOL<br> NAME 'circle'<br> TYPE ELLIPSE<br> POINTS 1 1 END<br> FILLED TRUE<br>END<br><br>#<br># Start of layer definitions<br>#<br>LAYER<br> NAME statesp020<br> MAXSCALE 600000<br> TYPE POLYGON<br> STATUS DEFAULT<br> DATA statesp020<br> PROJECTION<br> "proj=latlong"<br> "ellps=clrk66"<br> END<br><br> CLASSITEM 'state'<br> CLASS<br>
NAME 'Unwanted States'<br> EXPRESSION /'Virgin Island'|Puerto|Alaska/<br> OUTLINECOLOR 198 243 255<br> COLOR 198 243 255<br> END<br> CLASS<br> NAME 'State & Nation Boundary'<br> EXPRESSION /./<br> OUTLINECOLOR 180 180 180<br> COLOR 255 255 255<br> OVERLAYSYMBOL 'circle'<br> OVERLAYSIZE 2<br> OVERLAYOUTLINECOLOR 180 180 180<br> END<br><br> TOLERANCE 0<br>END<br><br>END<br><br>In the Map PROJECTION Section when I change the above shown on to<br>proj=latlong and remove lat_0 and other stuff, then the map shows up<br>correctly. But, when I have it as shown above, I just only see an<br></pre>
</blockquote>
<pre wrap=""><!---->image<br></pre>
<blockquote type="cite">
<pre wrap="">with solid image color. Can someone tell me where I am making mistake<br></pre>
</blockquote>
<pre wrap=""><!---->?<br></pre>
<blockquote type="cite">
<pre wrap="">Thanks<br>Sathis<br><br>Kieran J. Ames wrote:<br><br>Sathis,<br>I'll share the little I know with you.<br>You need to investigate projections in general. Different projections<br>render<br>maps in different ways. If you have ArcView (what I use), you can take<br>your<br>UNPROJECTED DATA (Decimal Degrees) and PROJECT it. This will allow you<br>to see<br>what happens. If you can't do that, then you might post to the group<br></pre>
</blockquote>
<pre wrap=""><!---->and<br></pre>
<blockquote type="cite">
<pre wrap="">ask<br>them what the best projection for this would be.<br>eg: if you want to show North America and NOT zoom in, you may choose<br>one<br>projection over another. Tell the group what you want to accomplish<br></pre>
</blockquote>
<pre wrap=""><!---->and<br></pre>
<blockquote type="cite">
<pre wrap="">go from<br>there.<br>HTH.<br>Kieran<br></pre>
</blockquote>
</blockquote>
<br>
</body>
</html>
--------------070406050302030604070008--