[Mapserver-users] Enhancement for tiling files in multiple coordinate systems

Ed McNierney ed at topozone.com
Fri Apr 25 14:12:16 EDT 2003


This is a multi-part message in MIME format.

------_=_NextPart_001_01C30B56.33CC4275
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Brent -
=20
Here are some thoughts:
=20
You seem to be moving the problem around more than actually eliminating =
it.  If the tileindex files are in a different coordinate system, then =
you either need a tool to generate reprojected tile indexes or you need =
to reproject the native-projection tileindex file after you make it.  =
Then you have to splice together the separate index files.  Or create a =
new tool that does the indexing, reprojection, and splicing all in one.
=20
Maintaining multiple layers like yours can be made much easier by =
automating the mapfile generation process.  As I've mentioned here =
before, we use the C preprocessor to generate the layers for all 27 UTM =
zones needed for complete USGS DRG coverage.  I've only got one set of =
zone definitions, and let the computer crank them all out.
=20
We've thought about tileindexes in different coordinate systems before, =
too.  I don't think there's much of a reason to NOT do it, but if the =
real issue is "how do I most easily maintain this setup?", the C =
preprocessor route works quite well.
=20
    - Ed
Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
ed at topozone.com
(978) 251-4242=20

-----Original Message-----
From: Brent Fraser [mailto:bfraser at geoanalytic.com]
Sent: Friday, April 25, 2003 1:50 PM
To: mapserver-users
Subject: [Mapserver-users] Enhancement for tiling files in multiple =
coordinate systems


Mapserver users,
=20
=20
  I've got about 4 gb of U.S. topos (1:250k scale DRGs) .  My goal is to =
serve up the DRGs as one layer and have Mapserver reproject them on the =
fly when necessary to the UTM zone used for viewing (I'll be using =
scripting to determine which UTM zone to use for the user's current =
extent every time they pan or zoom).  Usually no reprojection will be =
required except when the user's extent is at the edge of a UTM zone.  My =
plan is to use the TILEINDEX feature to reference the raster data. =
Currently Mapserver requires the TILEINDEX shapefile to be in the same =
coordinate system as the data it references.
=20
  One option, given the current capabilities of Mapserver, is to have =
one layer for each UTM zone.  In the U.S. that would mean about 10 layer =
definitions, not too bad but I may eventually have some other data =
covering 16 zones (or all 60!).  Too many layer definitions would be a =
maintenance problem I'd like to avoid.
=20
    Another option would be to pre-condition the raster data by =
reprojecting it to geographic coordinates.  This would allow one =
tileindex file and therefore one layer definition.  But the result is =
that the raster data would always be re-projected on the fly by =
Mapserver (since the display projection would be UTM) and performance =
would suffer.
=20
  A solution might be enhance Mapserver to allow the tileindex shapefile =
to be in geographic coords while using the "PROJECTION AUTO" feature to =
determine the coordinate system of the data file.  That would require =
two projection definitions in one layer: one for the tileindex =
(proj=3Dlatlong) and one for the data (AUTO) requiring either a change =
to structure of the map file or the addition of keywords.  How about =
replacing TILEINDEX and TILEITEM with a TILE object containing INDEX, =
ITEM, and PROJECTION?  Any other ideas?
=20
Thanks!
Brent Fraser
=20
GeoAnalytic Inc.
Tel:(403) 213-2700
bfraser at geoanalytic.com
www.geoanalytic.com


------_=_NextPart_001_01C30B56.33CC4275
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">


<META content=3D"MSHTML 6.00.2800.1141" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><SPAN class=3D500025817-25042003><FONT face=3DArial color=3D#0000ff =
size=3D2>Brent=20
-</FONT></SPAN></DIV>
<DIV><SPAN class=3D500025817-25042003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D500025817-25042003><FONT face=3DArial color=3D#0000ff =
size=3D2>Here=20
are some thoughts:</FONT></SPAN></DIV>
<DIV><SPAN class=3D500025817-25042003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D500025817-25042003><FONT face=3DArial color=3D#0000ff =
size=3D2>You=20
seem to be moving the problem around more than actually eliminating =
it.&nbsp; If=20
the tileindex files are in a different coordinate system, then you =
either need a=20
tool to generate reprojected tile indexes or you need to reproject the=20
native-projection tileindex file after you make it.&nbsp; Then you have =
to=20
splice together the separate index files.&nbsp; Or create a new tool =
that does=20
the indexing, reprojection, and splicing all in one.</FONT></SPAN></DIV>
<DIV><SPAN class=3D500025817-25042003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D500025817-25042003><FONT face=3DArial color=3D#0000ff =

size=3D2>Maintaining multiple layers like yours can be made much easier =
by=20
automating the mapfile generation process.&nbsp; As I've mentioned here =
before,=20
we use the C preprocessor to generate the layers for all 27 UTM zones =
needed for=20
complete USGS DRG coverage.&nbsp; I've only got one set of zone =
definitions, and=20
let the computer crank them all out.</FONT></SPAN></DIV>
<DIV><SPAN class=3D500025817-25042003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D500025817-25042003><FONT face=3DArial color=3D#0000ff =
size=3D2>We've=20
thought about tileindexes in different coordinate systems before, =
too.&nbsp; I=20
don't think there's much of a reason to NOT do it, but if the real issue =
is "how=20
do I most easily maintain this setup?", the C preprocessor route works =
quite=20
well.</FONT></SPAN></DIV>
<DIV><SPAN class=3D500025817-25042003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D500025817-25042003>&nbsp;&nbsp;&nbsp; <FONT =
face=3DArial=20
color=3D#0000ff size=3D2>- Ed</FONT></SPAN></DIV>
<DIV><SPAN class=3D500025817-25042003>
<P><FONT size=3D2>Ed McNierney<BR>President and Chief =
Mapmaker<BR>TopoZone.com /=20
Maps a la carte, Inc.<BR>73 Princeton Street, Suite 305<BR>North =
Chelmsford,=20
MA&nbsp; 01863<BR>ed at topozone.com<BR>(978) 251-4242 =
</FONT></P></SPAN></DIV>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
  <DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
  size=3D2>-----Original Message-----<BR><B>From:</B> Brent Fraser=20
  [mailto:bfraser at geoanalytic.com]<BR><B>Sent:</B> Friday, April 25, =
2003 1:50=20
  PM<BR><B>To:</B> mapserver-users<BR><B>Subject:</B> [Mapserver-users]=20
  Enhancement for tiling files in multiple coordinate=20
  systems<BR><BR></FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>Mapserver users,</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>&nbsp; I've got about 4 gb of U.S. =
topos (1:250k=20
  scale&nbsp;DRGs) .&nbsp; My goal is to serve up the DRGs as one layer =
and have=20
  Mapserver reproject them on the fly when necessary to the UTM zone =
used for=20
  viewing (I'll be using scripting to determine which UTM zone to use =
for the=20
  user's current extent every time they pan or zoom).&nbsp; Usually no=20
  reprojection will be required except when the user's extent is at the =
edge of=20
  a UTM zone.&nbsp; My plan is to use the TILEINDEX feature to reference =
the=20
  raster data. Currently Mapserver requires the TILEINDEX shapefile to =
be in the=20
  same coordinate system as the data it references.</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>&nbsp; One option, given the current =
capabilities=20
  of Mapserver, is to have one layer for each UTM zone.&nbsp; In the =
U.S. that=20
  would mean about 10 layer definitions, not too bad but I may =
eventually have=20
  some other data covering 16 zones (or all 60!).&nbsp; Too many layer=20
  definitions would be a maintenance problem I'd like to =
avoid.</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; Another option =
would be to=20
  pre-condition the raster data by reprojecting it to geographic=20
  coordinates.&nbsp; This would allow one tileindex file and therefore =
one layer=20
  definition.&nbsp; But the result is that the raster data would always =
be=20
  re-projected on the fly by Mapserver (since the display projection =
would be=20
  UTM) and performance would suffer.</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>&nbsp; A solution might be enhance =
Mapserver to=20
  allow the tileindex shapefile to be in geographic coords while using =
the=20
  "PROJECTION AUTO" feature to determine the coordinate system of the =
data=20
  file.&nbsp; That would require two projection definitions in one =
layer: one=20
  for the tileindex (proj=3Dlatlong) and one for the data (AUTO)=20
  requiring&nbsp;either a change to structure of the&nbsp;map file or =
the=20
  addition of keywords.&nbsp; How about replacing TILEINDEX and TILEITEM =
with a=20
  TILE object&nbsp;containing INDEX, ITEM, and PROJECTION?&nbsp; Any =
other=20
  ideas?</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>Thanks!</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>Brent Fraser</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>GeoAnalytic Inc.<BR>Tel:(403) =
213-2700<BR><A=20
  =
href=3D"mailto:bfraser at geoanalytic.com">bfraser at geoanalytic.com</A><BR><A=
=20
  =
href=3D"http://www.geoanalytic.com">www.geoanalytic.com</A></FONT></DIV><=
/BLOCKQUOTE></BODY></HTML>

------_=_NextPart_001_01C30B56.33CC4275--



More information about the mapserver-users mailing list