Question about showing a location in mapserver by longitude/latitude

Karl Lehenbauer karl-umn at SC.COM
Mon Mar 7 11:53:48 EST 2005


Greetings mapserver users....

I've gotten Tiger 2004FE data for Texas imported into PostGIS and am
generating, panning and zooming some decent-looking maps using
mapserver/mapsurfer.   I would like to add a way for someone to type in
a latitude and longitude and zoom to an area around that point.  Is
there a relatively easy way to do this?

Also (stupid questions) what is the relationship between extents and
long/lat.  I can select extent(wkb_geometry) on some query against the
Tiger data to get a lat/long box, but, again, I'm stymied in turning
that into an extent or somehow getting mapserver to go there.

This is amazing stuff, and after suffering through getting the CVS
and/or very latest versions of things all set up right, it was really
exciting to see this stuff generate imagery.

I've generated some tiffs using a modified mapfile with IMAGETYPE GTiff
set, so it's real fast to generate zoomed out views.  After tweaking
the minscale and maxcale settings on the layers, the transitions
between bitmaps and vectors are pretty smooth.  But sometimes I'll hit
a sour spot where the box'll hammer the database at 50 MB/sec for 10 or
20 seconds before producing a very simple result.  I have debug on on
all the layers.  My guess is that under certain circumstances, for some
reason, it's traversing all the data in completechain.  Anyone have any
hints on this?  And one more thing, is there a way to automate
generating a bunch of more zoomed-in tiffs?  I figure I'll need to take
on mapscript, maybe brush the debris off the Tcl interface or
something.

Finally as a heavy Delorme Street Atlas user for several years, it's
always annoyed me that a zoomed in level in a city shows all the roads
and their names and produces a nice printed map, but in the country,
you have to zoom way too far in to see the road names.  Now I get why.
I guess the answer would be to do some kind of density calculation to
see how many roads there are going to be in the view, then decide about
street names and the like.  If there're only 3 roads in a 5 mile by 5
mile view, I certainly want to see the road names.  Now my stuff is
screwy just like theirs.  ;-)



More information about the mapserver-users mailing list