[mapserver-users] Tiger line file and mapserver
Fawcett, David (MPCA)
David.Fawcett at state.mn.us
Fri Nov 5 11:23:03 PDT 2010
Adam,
There was a TIGER import into OSM, but many of the ways have been edited since the original import.
>From the display standpoint, the spatial reference system (SRS) of the input data set is not very important. It is the output SRS that is important. I think that you will want to set your output projection to world Mercator (epsg:900913 or epsg:3785) http://spatialreference.org/ref/epsg/3785/
If you use 900913, make sure that there is an entry in your epsg database for it, you may need to add it.
With MapServer, you can re-project on the fly, so your data doesn't need to be in the output SRS, but you can make your map rendering more efficient by pre-projecting the data to the output SRS.
David.
From: Adam Eskreis [mailto:aeskreis at gmail.com]
Sent: Friday, November 05, 2010 12:12 PM
To: Fawcett, David (MPCA)
Cc: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] Tiger line file and mapserver
So would that mean that they converted the entire tiger line file to a different projection? I will give that a try. Thank you for the suggestion.
On Fri, Nov 5, 2010 at 1:08 PM, Fawcett, David (MPCA) <David.Fawcett at state.mn.us<mailto:David.Fawcett at state.mn.us>> wrote:
It could be that your data is in a geographic spatial reference system and that the OSM tiles are in a World Mercator spatial reference system (epsg:900913).
David.
From: mapserver-users-bounces at lists.osgeo.org<mailto:mapserver-users-bounces at lists.osgeo.org> [mailto:mapserver-users-bounces at lists.osgeo.org<mailto:mapserver-users-bounces at lists.osgeo.org>] On Behalf Of Adam Eskreis
Sent: Friday, November 05, 2010 11:54 AM
To: mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>
Subject: [mapserver-users] Tiger line file and mapserver
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<http://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<http://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<http://openstreetmap.org>?
Thanks,
-Adam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20101105/bef0877a/attachment.htm>
More information about the MapServer-users
mailing list