[mapserver-users] Re: Problem with OpenStreetMap, osm2pgsql, MapServer, OpenLayers and epsg=900913
Edward Mac Gillavry
emacgillavry at hotmail.com
Sun May 9 10:52:23 PDT 2010
Hi Roshni,
You are almost there it seems! Try extending the DATA statement such that it states the srid (Spatial Reference System Identifier) explicitly:
DATA "way from planet_osm_line using unique gid using srid=900913"
Hope this helps.
Regards,
Edward Mac Gillavry
> From: roshni.aruna at gmail.com
> To: mapserver-users at lists.osgeo.org
> Subject: [mapserver-users] Re: Problem with OpenStreetMap, osm2pgsql, MapServer, OpenLayers and epsg=900913
>
>
> Hi Milo, thanks for your reply.
>
> I have gone through the link you sent and after doing many tests i decided
> to start again from zero without WMS. I downloaded the Frida_tutorial and
> implemented it and it works perfectly fine (connecting to postgis and
> reading info from the db).
> After checking this, i just copy-pasted everything and just changed the info
> of the connection and the table from where get the data and again the image
> comes blank, so i guess the problem is between the db and the projection.
> This is my new map file.
>
> MAP
> IMAGETYPE JPEG
> EXTENT 3428000 5787000 3444000 5800000
> SIZE 600 600
>
> IMAGECOLOR 100 100 100
> SHAPEPATH "C:/ms4w/apps/palmarouting/data"
> SYMBOLSET "C:/ms4w/apps/palmarouting/symbols.sym"
> FONTSET "C:/ms4w/apps/palmarouting/fonts/fonts.list"
> DEBUG 5
> CONFIG "MS_ERRORFILE" "C:\ms4w\apps\palmarouting\ms_error.txt"
>
> WEB
> TEMPLATE "template.html"
> #IMAGEPATH "C:/ms4w/Apache/htdocs/tmp/"
> IMAGEPATH "C:/ms4w/apps/palmarouting/tmp/"
> IMAGEURL "C:/ms4w/apps/palmarouting/tmp/"
>
>
>
> END
>
> PROJECTION
> "init=epsg:900913"
> END
>
>
> LAYER
> NAME "roads"
> TYPE LINE
> CONNECTION "user=postgres password=postgres dbname=gis host=localhost
> port=5432"
> CONNECTIONTYPE postgis
> DATA "way from planet_osm_line using unique gid"
>
> STATUS DEFAULT
> #LABELITEM 'strname'
> CLASSITEM 'highway'
> CLASS
> EXPRESSION '1'
> STYLE
> COLOR 255 0 0
> SIZE 6
> END
> END
> CLASS
> EXPRESSION '3'
> STYLE
> COLOR 0 255 0
> END
> END
> CLASS
> EXPRESSION /./
> STYLE
> COLOR 200 200 200
> END
> END
> END
>
> LAYER
> NAME "path"
> CONNECTION "user=postgres password=postgres dbname=gis host=localhost
> port=5432"
> CONNECTIONTYPE postgis
> STATUS ON
> TYPE LINE
>
> CLASS
> NAME "path"
> STYLE
> SYMBOL 'circle'
> COLOR 255 0 0
> SIZE 8
> END
> END
> END
> END
>
>
> The only difference i can see between the Frida db and mine is that in
> Fridadb the srid set in the geometry_columns is set to -1, but in mine its
> 900913. I have tried to apply this diff in my map file but with no success
> :(
>
> What can i do??? Thanks a lot!!
> --
> View this message in context: http://osgeo-org.1803224.n2.nabble.com/Problem-with-OpenStreetMap-osm2pgsql-MapServer-OpenLayers-and-epsg-900913-tp5022925p5026547.html
> Sent from the Mapserver - User mailing list archive at Nabble.com.
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20100509/194ef762/attachment.htm>
More information about the MapServer-users
mailing list