Google Earth

Milo van der Linden mlinden at ZEELANDNET.NL
Fri Dec 7 08:56:00 PST 2007


I had a similar problem.

It seems that by default; the parameters for the transformation from the 
bessel ellipsoid to WGS84 ellipsoid are not set correctly within the 
epsg definitions. I solved this by altering the definition for my 
projection in the EPSG definition file on my server.

So you should determine if the projection you use (31300) has a 
ellipsoid definition other than WGS84 and then look to find what 
settings you have to use for "towgs84="




Steven De Vriendt schreef:
> I have some data with projected in 31300, when I change my wms 
> settings to 4326, there's quite some shift in Google Earth. Made a 
> screenshot at:
>
> http://img516.imageshack.us/img516/1986/shiftex6.jpg 
> <http://img516.imageshack.us/img516/1986/shiftex6.jpg>
>
> Steven
>
>
> On Dec 7, 2007 3:40 PM, Milo van der Linden <mlinden at zeelandnet.nl 
> <mailto:mlinden at zeelandnet.nl>> wrote:
>
>     For wms layers to show up in Google Earth, you generate a
>     groundoverlay. The projection of the mapfile or layers itself is
>     not so important, as long as the wms service is able to publis in
>     epsg:4326.
>
>     This means that in your map metadata you need to have something like:
>
>     METADATA
>        "wms_title" "My WMS map"
>        "wms_srs" "EPSG:4326 EPSG:28992"
>        "wms_onlineresource"
>     "http://www.myserver.com/cgi-bin/mapserv.exe?map=somemap.map"
>     <http://www.myserver.com/cgi-bin/mapserv.exe?map=somemap.map>
>       END
>
>     where you separate the supported projections with spaces.
>
>
>     When you create a GroundOverlay, Google generates the following
>     kml snippet:
>
>     Make sure to add the STYLES= to the end of the request or
>     mapserver will generate a wrong result (this is for my 5.0
>     installation)
>
>     <GroundOverlay>
>                 <name>Terreincontouren</name>
>                 <color>adffffff</color>
>                 <Icon>
>                     <href>
>     http://www.myserver.com/cgi-bin/mapserv.exe?map=somemap.map&VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG:4326&WIDTH=1024&HEIGHT=1024&LAYERS=aLayer&TRANSPARENT=TRUE&FORMAT=image/png&STYLES=&amp
>     <http://www.myserver.com/cgi-bin/mapserv.exe?map=somemap.map&VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG:4326&WIDTH=1024&HEIGHT=1024&LAYERS=aLayer&TRANSPARENT=TRUE&FORMAT=image/png&STYLES=&amp>;</href>
>                     <viewRefreshMode>onStop</viewRefreshMode>
>                 </Icon>
>                 <LatLonBox>
>                     <north>52.43886219516767</north>
>                     <south>52.19180808173348</south>
>                     <east>5.137624941169889</east>
>                     <west>4.652306951338773</west>
>                 </LatLonBox>
>             </GroundOverlay>
>
>
>
>     It is also possible to show a mapserver legend in Google Earth
>     with the following kml snippet:
>
>     <ScreenOverlay>
>             <visibility>1</visibility>
>                 <name>Legenda - Percelen</name>
>                 <Icon>
>                    
>     <href>http://www.myserver.com/cgi-bin/mapserv.exe?map=somemap.map&VERSION=1.1.1&REQUEST=GetLegendGraphic&LAYER=aLayer&Format=image/png
>     <http://www.myserver.com/cgi-bin/mapserv.exe?map=somemap.map&VERSION=1.1.1&REQUEST=GetLegendGraphic&LAYER=aLayer&Format=image/png></href>
>                 </Icon>
>                 <overlayXY x="0" y="1" xunits="fraction"
>     yunits="fraction"/>
>                 <screenXY x="0" y="1" xunits="fraction"
>     yunits="fraction"/>
>                 <rotationXY x="0.5" y="0.5" xunits="fraction"
>     yunits="fraction"/>
>                 <size x="-1" y="-1" xunits="pixels" yunits="pixels"/>
>             </ScreenOverlay>
>
>
>     If you embed these snippets in a kml file, you can see what happens.
>
>
>     Hans Castorp schreef:
>>
>>     Hi to all,
>>
>>      
>>
>>     It's possible to visualize wms layers from mapserver using Google
>>     Earth?? I'm trying to do it but I'm always receiving an error
>>     saying that the wms server does not have layer that google earth
>>     could process. I think this could be something about my map file
>>     configuration. Is there any trick??
>>
>>      
>>
>>     PD: I'm serving GeoTiff and shape layers.
>>
>>      
>>
>>     Thanks in advance.
>>
>>      
>>
>>      
>>
>>     Hans Castorp
>>
>>      
>>
>>
>>     No virus found in this outgoing message.
>>     Checked by AVG Free Edition.
>>     Version: 7.5.503 / Virus Database: 269.16.17/1176 - Release Date:
>>     06/12/2007 23:15
>>
>
>
>     -- 
>
>
>     	
>
>     Milo van der Linden
>     skype: milovanderlinden
>     mlinden at zeelandnet.nl <mailto:mlinden at zeelandnet.nl>
>     milovanderlinden at gmail.com <mailto:milovanderlinden at gmail.com>
>     milo at 3dsite.nl <mailto:milo at 3dsite.nl>
>     http://www.3dsite.nl
>
>     	  	
>
>     De informatie in dit bericht reflecteert mijn persoonlijke mening
>     en niet die van een bedrijf of instantie. Aan de informatie kunnen
>     geen rechten worden ontleend. Indien dit bericht onderdeel is van
>     een forum, mailing-list of community dan gelden automatisch de bij
>     het betreffende medium behorende voorwaarden. The information in
>     this message reflects my personal opinion and not that of a
>     company or public body. All rights reserved.If this message is
>     contained in a mailing-list or community, the rights on the medium
>     are automatically adapted.
>
>


-- 


	

Milo van der Linden
skype: milovanderlinden <skype:milovanderlinden?add>
mlinden at zeelandnet.nl <mailto:mlinden at zeelandnet.nl>
milovanderlinden at gmail.com <mailto:milovanderlinden at gmail.com>
milo at 3dsite.nl <mailto:milo at 3dsite.nl>
http://www.3dsite.nl

	  	

De informatie in dit bericht reflecteert mijn persoonlijke mening en 
niet die van een bedrijf of instantie. Aan de informatie kunnen geen 
rechten worden ontleend. Indien dit bericht onderdeel is van een forum, 
mailing-list of community dan gelden automatisch de bij het betreffende 
medium behorende voorwaarden. The information in this message reflects 
my personal opinion and not that of a company or public body. All rights 
reserved.If this message is contained in a mailing-list or community, 
the rights on the medium are automatically adapted.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20071207/8c241105/attachment.htm>


More information about the MapServer-users mailing list