[mapserver-users] Tiger line file and mapserver
Adam Eskreis
aeskreis at gmail.com
Fri Nov 5 10:12:22 PDT 2010
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> 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] *On Behalf Of *Adam Eskreis
> *Sent:* Friday, November 05, 2010 11:54 AM
> *To:* 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 (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/4afea57f/attachment.htm>
More information about the MapServer-users
mailing list