[mapserver-users] Nationalatlas Shapefile Projection
Sathiskumar Govindasamy
gsathis@yahoo.com
Thu, 21 Mar 2002 20:25:30 -0600
--=====================_299801==_.ALT
Content-Type: text/plain; charset="us-ascii"; format=flowed
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
--=====================_299801==_.ALT
Content-Type: text/html; charset="us-ascii"
<html>
<font face="InaiKathir">Hi all,<br><br>
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.<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>
<x-tab> </x-tab>"proj=lcc"
<br>
<x-tab> </x-tab>"lat_0=24"
<br>
<x-tab> </x-tab>"lat_1=50"
<br>
<x-tab> </x-tab>"lon_0=-99"
<br>
END<br><br>
WEB <br>
<x-tab> </x-tab>TEMPLATE
demo.html <br>
<x-tab> </x-tab>LOG
demo.log <br>
END<br><br>
# <br>
# Start of symbol definitions (we're only using a few) <br>
# <br>
SYMBOL <br>
<x-tab> </x-tab>NAME
'circle' <br>
<x-tab> </x-tab>TYPE
ELLIPSE <br>
<x-tab> </x-tab>POINTS 1 1
END <br>
<x-tab> </x-tab>FILLED
TRUE <br>
END<br><br>
# <br>
# Start of layer definitions <br>
#<br>
LAYER <br>
<x-tab> </x-tab>NAME
statesp020 <br>
<x-tab> </x-tab>MAXSCALE
600000 <br>
<x-tab> </x-tab>TYPE
POLYGON <br>
<x-tab> </x-tab>STATUS
DEFAULT <br>
<x-tab> </x-tab>DATA
statesp020 <br>
<x-tab> </x-tab>PROJECTION
<br>
<x-tab> </x-tab><x-tab> </x-tab>"proj=latlong"
<br>
<x-tab> </x-tab><x-tab> </x-tab>"ellps=clrk66"
<br>
<x-tab> </x-tab>END<br><br>
<x-tab> </x-tab>CLASSITEM
'state' <br>
<x-tab> </x-tab>CLASS
<br>
<x-tab> </x-tab><x-tab> </x-tab>NAME
'Unwanted States' <br>
<x-tab> </x-tab><x-tab> </x-tab>EXPRESSION
/'Virgin Island'|Puerto|Alaska/ <br>
<x-tab> </x-tab><x-tab> </x-tab>OUTLINECOLOR
198 243 255 <br>
<x-tab> </x-tab><x-tab> </x-tab>COLOR
198 243 255 <br>
<x-tab> </x-tab>END <br>
<x-tab> </x-tab>CLASS
<br>
<x-tab> </x-tab><x-tab> </x-tab>NAME
'State & Nation Boundary' <br>
<x-tab> </x-tab><x-tab> </x-tab>EXPRESSION
/./ <br>
<x-tab> </x-tab><x-tab> </x-tab>OUTLINECOLOR
180 180 180 <br>
<x-tab> </x-tab><x-tab> </x-tab>COLOR
255 255 255 <br>
<x-tab> </x-tab><x-tab> </x-tab>OVERLAYSYMBOL
'circle' <br>
<x-tab> </x-tab><x-tab> </x-tab>OVERLAYSIZE
2 <br>
<x-tab> </x-tab><x-tab> </x-tab>OVERLAYOUTLINECOLOR
180 180 180 <br>
<x-tab> </x-tab>END<br><br>
<x-tab> </x-tab>TOLERANCE
0 <br>
END<br><br>
END<br><br>
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
?<br><br>
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
render <br>
maps in different ways. If you have ArcView (what I use), you can take
your <br>
UNPROJECTED DATA (Decimal Degrees) and PROJECT it. This will allow you to
see <br>
what happens. If you can't do that, then you might post to the group and
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 one
<br>
projection over another. Tell the group what you want to accomplish and
go from <br>
there. <br>
HTH. <br>
Kieran<br>
</font></html>
--=====================_299801==_.ALT--