[Mapserver-users] Re: finding intersections

Kieran J. Ames kames at keyspanenergy.com
Tue May 20 05:45:21 PDT 2003


The data include Zip and FIPS attributes. A Zip lookup for street names is sub-second.
Querying all the intersections for any given street and rendering the map takes 2-3 seconds.
(I spent a good amount of time deciding on an index structure and it works well.) This
performance is on a dual processor PIII box, 500MB RAM and WINNT 4.0. Load is minimal as the
app is used to meet only special business needs inside our firewall. However, having the
infrastructure in place opens the door for other applications.
I chose NOT to halve the records as you mention after pursuing the alternatives. I wrote one
record for MAIN and one for BROAD. They don't know about each other. Their LAT/LONs just
happen to be the same. The table is nicely optimized and index definition was very
clear-cut. It also means I didn't have to write multiple records (and figure out how to
search for them) where multiple streets converge.
"MAIN and BROAD" vs "BROAD and MAIN" also posed their own searching problems which could
have gotten ugly. Dead-Ends exist because their unique LAT/LON cannot be matched to any
other point. (Really, the data don't know they're intersections... they're just points. They
become intersections when properly queried.)
Regarding maintenance, yeah... no easy way. Fortunately, the creation of new roads in urban
NYC is rather rare, except for Staten Island, where sub-divisions are still going up. But I
know I'm going to have to deal with it sooner or later. :(
Kieran

pkishor_98 wrote:

> --- In mapserver-users at yahoogroups.com, "Kieran J. Ames" <kames at k...> wrote:
> ..
>
> > The data are in a MySQL database. Data and indices total about 2.9GB. (Almost
> > 28 million point records.)
>
> that is a lot of data. What is the performance like (on what kind of a machine and
> what kind of load)?
>
> > I ended up with a database of street intersections and dead-ends.
> > (...actually normalized street points that I query to derive intersection
> > data. The intersection of Main and Broad would be 2 records, each with the
> > same LAT/LON.) I'm using that to create a point layer that I include in my
> > mapfile.
>
> you could probably avoid storing "Main and Broad" and "Broad and Main" and
> potentially halve your number of records... just store one entry per road, and a its
> corresponding intersections in a related table. Although de-normalized data might be
> faster to lookup.
>
> > it was easy (though tedious) to create the data. The
> > problem is maintaining it and adding new information. I haven't crossed that
> > bridge yet!
>
> yup. that is the rub. But I am not sure if there is any easy way around that. As long as
> I can find a good method of locating the intersections, I am not going to worry about
> maintaining it... that is the problem that is going to come with this territory.
>
> thanks.
>
> >
> > pkishor_98 wrote:
> >
> > > Someone asked me if mapserver could find intersections (constitution
> > > and 16th). I replied that mapserver by itself can't but there is no
> > > reason it couldn't be programmed. Then I realized I didn't really know
> > > how.
> > >
> > > I could create a table of intersections for every road (line), but I
> > > would have to start with a table of roads first.
> > >
> > > I could do some finagling with geocoding.
> > >
> > > Or I could...
> > >
> > > all ideas welcomed. In return, I will take the do-able ones and wiki 'em.
> > >
> > > Puneet.
> > >
> > > _______________________________________________
> > > Mapserver-users mailing list
> > > Mapserver-users at l...
> > > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users




More information about the MapServer-users mailing list