[mapserver-users] Tiger line file and mapserver
Adam Eskreis
aeskreis at gmail.com
Fri Nov 5 09:54:22 PDT 2010
Hello everyone.
I'm having a problem with the Tiger line file in mapserver that I can't seem
to work out. I am using mapserver as my backend and openlayers as my
frontend. I'm not sure if my configuration is off, but I put on the layer
in openlayers, and the angle of the lines seems to be a bit off. If you
look at, for instance, openstreetmaps.org (who also uses the tiger file) in
the area of new york city, all the blocks are perfect rectangles. However,
in my map, these same boxes seem to represent more of a shape similar to a
parallelogram with acute and obtuse angles at the corners.
I inspected the code of openstreetmaps.org, and looked at their openlayers
code. They have something similar to this for their map declaration:
map = new OpenLayers.Map('map', {
controls: [
new OpenLayers.Control.PanZoomBar()
],
units: "m",
maxResolution: "156543.0339",
numZoomLevels: 20,
displayProjection: new OpenLayers.Projection("EPSG:4326")
});
I tried using this on my map (which also uses the tiger file), but I cannot
get it to scale properly. On the most zoomed in level, new york city is
just a tiny dot, and if I zoom out I can't see anything. Here is my mapfile
code:
MAP
NAME "basemap"
STATUS on
SIZE 800 600
EXTENT -180 -90 180 90
IMAGECOLOR 250 250 250
IMAGETYPE 'AGGA'
CONFIG "MS_ERRORFILE" "/var/tmp/ms.log"
DEBUG 5
WEB
METADATA
"wms_srs" "EPSG:4326"
"wms_onlineresource" "
http://mydomain.com/cgi-bin/mapserv?map=/var/www/htdocs/dev/modules/maps/basemap.map
"
END
END
PROJECTION
"init=epsg:4326"
END
FONTSET "fonts.txt"
OUTPUTFORMAT
NAME "AGGA"
MIMETYPE "image/png"
DRIVER "AGG/PNG"
IMAGEMODE "RGBA"
TRANSPARENT TRUE
EXTENSION "PNG"
FORMATOPTION "INTERLACE=FALSE"
END
LAYER
name lines
GROUP basemap
TYPE LINE
PROJECTION
"init=epsg:4326"
END
STATUS on
CONNECTIONTYPE postgis
CONNECTION "[removed]"
DATA "the_geom from tiger_lines"
CLASS
style
color 131 139 131
width 24
antialias true
end
style
color 200 200 200
width 22
antialias true
end
END
END
END
Does anyone see anything that might be the reason why I cannot get my map to
scale properly using the same exact file and openlayers code as
openstreetmap.org?
Thanks,
-Adam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20101105/869b2ec0/attachment.htm>
More information about the MapServer-users
mailing list