[Mapserver-users] Enhancement for tiling files in multiple coordinate systems
Brent Fraser
bfraser at geoanalytic.com
Fri Apr 25 12:31:53 PDT 2003
This is a multi-part message in MIME format.
------=_NextPart_000_01CF_01C30B2F.087FAF60
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Ed, Paul, (and others),
Thanks for the excellent suggestions! Using the C preprocessor (or a =
similar menchanism) to automatically include the 10 to 20 layer =
definitions would solve my current problem, and I'll have to look into =
that. I think automatically generating map files has merit too and =
potentially offers lots of functionality above and beyond solving my =
problem.=20
Ed, you hit the nail on the head with your maintenance comment. We've =
got several Mapserver sites set up internally and we build sites for our =
customers too. I like to minimize the amount of scripting for each site =
by using the native features of Mapserver whenever possible to reduce =
maintenance issues (hmmm, maybe I just write buggy scripts?).
In this particular case, I'd rather look to enhancing Mapserver =
since I don't think it stresses the scope of Mapserver, and I doubt if =
it would require a lot of internal Mapserver code. The other benefit is =
that others can make use of the functionality "out of the box" without =
having to do any scripting.
On the other hand, maybe this problem is just too specialized and =
better left to scripting. I don't want to add code (and complexity) to =
Mapserver if it's not solving a important problem.
Thanks again,
Brent
----- Original Message -----=20
From: Ed McNierney=20
To: Brent Fraser ; mapserver-users=20
Sent: Friday, April 25, 2003 12:12 PM
Subject: RE: [Mapserver-users] Enhancement for tiling files in =
multiple coordinate systems
Brent -
Here are some thoughts:
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.
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.
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.
- 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,
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.
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.
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.
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?
Thanks!
Brent Fraser
GeoAnalytic Inc.
Tel:(403) 213-2700
bfraser at geoanalytic.com
www.geoanalytic.com
------=_NextPart_000_01CF_01C30B2F.087FAF60
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=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Ed, Paul, (and others),</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> Thanks for the excellent =
suggestions! =20
Using the C preprocessor (or a similar menchanism) to automatically =
include the=20
10 to 20 layer definitions would solve my current problem, and I'll have =
to look=20
into that. </FONT><FONT face=3DArial size=3D2>I think automatically =
generating map=20
files has merit too and potentially offers lots of functionality above =
and=20
beyond solving my problem. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> Ed, you hit the nail on the =
head with=20
your maintenance comment. We've got several Mapserver sites set up =
internally and we build sites for our customers too. I like to =
minimize=20
the amount of scripting for each site by using the native features of =
Mapserver=20
whenever possible to reduce maintenance issues (hmmm, maybe I just =
write=20
buggy scripts?).</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> In this particular=20
case, I</FONT><FONT face=3DArial size=3D2>'d rather look to =
enhancing Mapserver=20
since I don't think it stresses the scope of Mapserver, and I doubt if =
it would=20
require a lot of internal Mapserver code. The other benefit is =
that others=20
can make use of the functionality "out of the box" without having to do =
any=20
scripting.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> On the other hand, =
maybe this=20
problem is just too specialized and better left to scripting. I =
don't want=20
to add code (and complexity) to Mapserver if it's not solving a =
important=20
problem.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks again,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Brent</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV=20
style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
<A title=3Ded at topozone.com href=3D"mailto:ed at topozone.com">Ed =
McNierney</A> </DIV>
<DIV style=3D"FONT: 10pt arial"><B>To:</B> <A =
title=3Dbfraser at geoanalytic.com=20
href=3D"mailto:bfraser at geoanalytic.com">Brent Fraser</A> ; <A=20
title=3Dmapserver-users at lists.gis.umn.edu=20
href=3D"mailto:mapserver-users at lists.gis.umn.edu">mapserver-users</A> =
</DIV>
<DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Friday, April 25, 2003 =
12:12=20
PM</DIV>
<DIV style=3D"FONT: 10pt arial"><B>Subject:</B> RE: [Mapserver-users]=20
Enhancement for tiling files in multiple coordinate systems</DIV>
<DIV><BR></DIV>
<DIV><SPAN class=3D500025817-25042003><FONT face=3DArial =
color=3D#0000ff=20
size=3D2>Brent -</FONT></SPAN></DIV>
<DIV><SPAN class=3D500025817-25042003><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN> </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=20
size=3D2></FONT></SPAN> </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. =20
If the tileindex files are in a different coordinate system, then you =
either=20
need a tool to generate reprojected tile indexes or you need to =
reproject the=20
native-projection tileindex file after you make it. Then you =
have to=20
splice together the separate index files. 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=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D500025817-25042003><FONT face=3DArial =
color=3D#0000ff=20
size=3D2>Maintaining multiple layers like yours can be made much =
easier by=20
automating the mapfile generation process. As I've mentioned =
here=20
before, we use the C preprocessor to generate the layers for all 27 =
UTM zones=20
needed for complete USGS DRG coverage. I've only got one set of =
zone=20
definitions, and let the computer crank them all =
out.</FONT></SPAN></DIV>
<DIV><SPAN class=3D500025817-25042003><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D500025817-25042003><FONT face=3DArial =
color=3D#0000ff=20
size=3D2>We've thought about tileindexes in different coordinate =
systems before,=20
too. I don't think there's much of a reason to NOT do it, but if =
the=20
real issue is "how do I most easily maintain this setup?", the C =
preprocessor=20
route works quite well.</FONT></SPAN></DIV>
<DIV><SPAN class=3D500025817-25042003><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D500025817-25042003> <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 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> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> I've got about 4 gb of U.S. =
topos=20
(1:250k scale DRGs) . My goal is to serve up the DRGs as =
one=20
layer and have Mapserver reproject them on the fly when necessary to =
the UTM=20
zone used for viewing (I'll be using scripting to determine which =
UTM zone=20
to use for the user's current extent every time they pan or =
zoom). =20
Usually no reprojection will be required except when the user's =
extent is at=20
the edge of a UTM zone. My plan is to use the TILEINDEX =
feature to=20
reference the raster data. Currently Mapserver requires the =
TILEINDEX=20
shapefile to be in the same coordinate system as the data it=20
references.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> One option, given the =
current=20
capabilities of Mapserver, is to have one layer for each UTM =
zone. In=20
the U.S. that would mean about 10 layer definitions, not too bad but =
I may=20
eventually have some other data covering 16 zones (or all =
60!). Too=20
many layer definitions would be a maintenance problem I'd like to=20
avoid.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> Another option =
would be to=20
pre-condition the raster data by reprojecting it to geographic=20
coordinates. This would allow one tileindex file and therefore =
one=20
layer definition. But the result is that the raster data would =
always=20
be re-projected on the fly by Mapserver (since the display =
projection would=20
be UTM) and performance would suffer.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> 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. That would require two projection definitions in one =
layer: one=20
for the tileindex (proj=3Dlatlong) and one for the data (AUTO)=20
requiring either a change to structure of the map file or =
the=20
addition of keywords. How about replacing TILEINDEX and =
TILEITEM with=20
a TILE object containing INDEX, ITEM, and PROJECTION? Any =
other=20
ideas?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </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> </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></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_01CF_01C30B2F.087FAF60--
More information about the MapServer-users
mailing list