Start with any lat/long and end with a map

Ed McNierney ed at TOPOZONE.COM
Thu Aug 12 16:46:50 EDT 2004


Jacob -

Let's (for the sake of the example) assume you have two data layers,
named STATES and RIVERS.  One is a set of data files, one per state,
each with one or more polygons describing the outline of that particular
state.  The second is another set of data files, one per county, with
line features showing streams and rivers.  In the first case you have
some 50+ files and in the second you have a little under 4,000 files.

The *data* inside of each of these files is in latitude/longitude
coordinates, so MapServer will correctly display it.  So I think your
question is "How do I know which data file(s) to turn on in response to
a particular location?".  The answer is, "You don't - MapServer will do
that".

Look in the online documentation for the TILEINDEX keyword.  By creating
a tile index, you will create a new ESRI shapefile that contains two
bits of information for each input file - the rectangular bounding box
that encloses all the data in that file, and the filename of that data
file.  It is, literally, an index to all the individual data files that
make up the layer.

For the STATES and RIVERS cases you would create one TILEINDEX file for
each.  One would have 50+ rectangles in it, and the other would have
nearly 4,000 rectangles.  You then create two data layers and instead of
using the DATA keyword to indicate the direct filename to use, you use
the TILEINDEX keyword to specify an indirect index.  MapServer will look
at the rectangular extent of the requested output map (not just the
center point) and can quickly determine which rectangles in the
TILEINDEX file intersect the output extent (computing rectangular
intersections is very easy).  MapServer will then know which few input
files could possibly contribute to the output image (for irregular
shapes, the bounding rectangle may intersect but the actual data
doesn't).  MapServer will then draw only those data files in that list,
and you don't have to worry or know which ones they are.

The tile4ms tool will create the TILEINDEX files for you.

        - Ed

Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
Phone: +1 978 251-4242   Fax: +1 978 251-1396 
 

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Jacob Blankenship
Sent: Thursday, August 12, 2004 3:37 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] Start with any lat/long and end with
a map

Tom, I appreciate your reply. I'm starting with a lat/long coordinate in
the U.S.A and wanting to display a map of the local area at this point
with various layers of GIS data. But the data a have from ESRI is by
state and county and I don't know how load the correct file for display.

Thank you for your thoughts,
Jacob

--- Ed McNierney <ed at TOPOZONE.COM> wrote:

> Jacob -
>
> You'll need to explain what you mean by "resolving".
>  What data do you
> have that you're trying to map?
>
>         - Ed
>
> Ed McNierney
> President and Chief Mapmaker
> TopoZone.com / Maps a la carte, Inc.
> 73 Princeton Street, Suite 305
> North Chelmsford, MA  01863
> Phone: +1 978 251-4242   Fax: +1 978 251-1396
>
> -----Original Message-----
> From: UMN MapServer Users List
> [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Jacob Blankenship
> Sent: Thursday, August 12, 2004 12:57 PM
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: [UMN_MAPSERVER-USERS] Start with any lat/long and end with a 
> map
>
> All, How would I go about resolving a lat/long (for any point in N.
> America or the world) to display a map using MapServer 4.2? Geocoding?
> Is there a WMS that can help with this? If necessary I can host the 
> GIS data and a DBMS.
>
> Thanks,
> Jacob Blankenship
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail is new and improved - Check it out!
> http://promotions.yahoo.com/new_mail
>





__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail



More information about the mapserver-users mailing list