[mapserver-users] Re: Getting blank tiles in google maps

forums forums at craniumjuice.com
Thu Sep 8 12:30:39 PDT 2011


Doesn't look like you have SRS on the shapefiles.

ogrinfo info shows you what you need to know about the shapefiles:

ogrinfo -so -al HampshireLines.shp
ogrinfo -so -al HampshirePoints.shp
ogrinfo -so -al HampshireAreas.shp
All three currently have:
Layer SRS WKT:
(unknown)

I've had good luck using ogr2ogr to add SRS. For example to add EPSG:4326
(What google uses)
ogr2ogr -a_srs EPSG:4326 HampshireAreas2 HampshireAreas.shp
ogr2ogr -a_srs EPSG:4326 HampshirePoints2 HampshirePoints.shp
ogr2ogr -a_srs EPSG:4326 HampshireLines2 HampshireLines.shp

Ends up with:
Layer SRS WKT:
GEOGCS["GCS_WGS_1984",
    DATUM["WGS_1984",
        SPHEROID["WGS_84",6378137,298.257223563]],
    PRIMEM["Greenwich",0],
    UNIT["Degree",0.017453292519943295]]

Hope that helps.


On Thu, Sep 8, 2011 at 1:41 PM, vaibhavgarg <vaibhavkumargarg at gmail.com>wrote:

> Thanks for replying. I am new to mapserver so I did now know we can do
> that.
>
> Anyway, yes I was able to use that url to generate the map:
> http://osgeo-org.1803224.n2.nabble.com/file/n6773174/MapImage.png
>
> It looks just like the result of shp2img.exe
>
> How do I identify and specify the right projections, which really confuses
> me and I am guessing that that is the problem..
>
> Can you have a look at the sample .SHP data please?
>
>
>
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/Getting-blank-tiles-in-google-maps-tp6772814p6773174.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
>



-- 
A computer without Windows is like chocolate cake without mustard.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110908/b18890e0/attachment.htm>


More information about the MapServer-users mailing list