How do I connect to a local elevation server?

How do I connect to a local elevation server?

brett

Reply | Threaded | More    

Mar 18, 2009; 10:02pm

How do I connect to a local elevation server?

 
Hi,

Since I was having problems using public elevation servers I created one of our own using arcgis. First I generated some tiffs and used gdal to get elevation up and running. This .earth file works and I see elevation just fine. (Elev1.tif is a heightfield).

<map name="test" type="geocentric">

<profile>global-geodetic</profile>
        
    <image name="world1" driver="gdal">
        <url>../../data/Terrain/world/world1.tif</url>
        <tile_size>256</tile_size>
    </image>

<heightfield name="world1" driver="gdal">
        <url>../../data/Terrain/world/Elev1.tif</url>
        <tile_size>16</tile_size>
    </heightfield>
        
</map>

Next, I tried to connect to the server itself but can‘t seem to get the .earth file right....

<map name="test" type="geocentric">

<heightfield name="world1" driver="wms">
        <url>http://gems2/ArcGIS/services/Elevation/MapServer/WMSServer</url>
        <format>tiff</format>
    </heightfield>
        
</map>

I‘m seeing the following errors printed out...

TIFF loader: Error opening file 
TIFF loader: Error opening file 
TIFF loader: Error opening file 
TIFF loader: Error opening file 
Couldn‘t get tile for 0_0_0 
TIFF loader: Error opening file 
TIFF loader: Error opening file 
TIFF loader: Error opening file 
TIFF loader: Error opening file 
Couldn‘t get tile for 0_1_0

Thoughts?

Thanks, 
Brett

Remove Ads

jasonbeverage

Reply | Threaded | More    

Mar 18, 2009; 10:23pm

Re: How do I connect to a local elevation server?

 
Hi Brett,

For the WMS driver to work, you need to specify the layers from the WMS to query.  So if your elevation layer is called "elevation" then you need to add:
<layers>elevation</layers>
to your heightfield element to work correctly.

You can see an example of this at:  http://wush.net/trac/osgearth/wiki/TileSourcePluginWMS

Let us know how it goes!

Thanks!

Jason

On Wed, Mar 18, 2009 at 10:02 AM, brett (via Nabble) - No Reply <[hidden email]> wrote:

Hi,

Since I was having problems using public elevation servers I created one of our own using arcgis. First I generated some tiffs and used gdal to get elevation up and running. This .earth file works and I see elevation just fine. (Elev1.tif is a heightfield).

<map name="test" type="geocentric">

<profile>global-geodetic</profile> 
        
    <image name="world1" driver="gdal"> 
        <url>../../data/Terrain/world/world1.tif</url> 
        <tile_size>256</tile_size> 
    </image>

<heightfield name="world1" driver="gdal"> 
        <url>../../data/Terrain/world/Elev1.tif</url> 
        <tile_size>16</tile_size> 
    </heightfield> 
        
</map>

Next, I tried to connect to the server itself but can‘t seem to get the .earth file right....

<map name="test" type="geocentric">

<heightfield name="world1" driver="wms"> 
        <url>http://gems2/ArcGIS/services/Elevation/MapServer/WMSServer</url> 
        <format>tiff</format> 
    </heightfield> 
        
</map>

I‘m seeing the following errors printed out...

TIFF loader: Error opening file 
TIFF loader: Error opening file 
TIFF loader: Error opening file 
TIFF loader: Error opening file 
Couldn‘t get tile for 0_0_0 
TIFF loader: Error opening file 
TIFF loader: Error opening file 
TIFF loader: Error opening file 
TIFF loader: Error opening file 
Couldn‘t get tile for 0_1_0

Thoughts?

Thanks, 
Brett



View message @ http://n2.nabble.com/How-do-I-connect-to-a-local-elevation-server--tp2497311p2497311.html 
To start a new topic under osgEarth, email [hidden email] 
To unsubscribe from osgEarth, click here.

... [show rest of quote]

jasonbeverage

Reply | Threaded | More    

Mar 18, 2009; 10:25pm

Re: How do I connect to a local elevation server?

 
In reply to this post by brett

Hi Brett,

Forgot to mention, for the WMS elevation, you‘ll probably also want add a <tile_size>16</tile_size> to keep the keep the terrain tile sizes reasonable.

Thanks!

Jason

On Wed, Mar 18, 2009 at 10:23 AM, Jason Beverage <[hidden email]> wrote:

Hi Brett,

For the WMS driver to work, you need to specify the layers from the WMS to query.  So if your elevation layer is called "elevation" then you need to add:
<layers>elevation</layers>
to your heightfield element to work correctly.

You can see an example of this at:  http://wush.net/trac/osgearth/wiki/TileSourcePluginWMS

Let us know how it goes!

Thanks!

Jason

On Wed, Mar 18, 2009 at 10:02 AM, brett (via Nabble) - No Reply <[hidden email]> wrote:

Hi,

Since I was having problems using public elevation servers I created one of our own using arcgis. First I generated some tiffs and used gdal to get elevation up and running. This .earth file works and I see elevation just fine. (Elev1.tif is a heightfield).

<map name="test" type="geocentric">

<profile>global-geodetic</profile> 
        
    <image name="world1" driver="gdal"> 
        <url>../../data/Terrain/world/world1.tif</url> 
        <tile_size>256</tile_size> 
    </image>

<heightfield name="world1" driver="gdal"> 
        <url>../../data/Terrain/world/Elev1.tif</url> 
        <tile_size>16</tile_size> 
    </heightfield> 
        
</map>

Next, I tried to connect to the server itself but can‘t seem to get the .earth file right....

<map name="test" type="geocentric">

<heightfield name="world1" driver="wms"> 
        <url>http://gems2/ArcGIS/services/Elevation/MapServer/WMSServer</url> 
        <format>tiff</format> 
    </heightfield> 
        
</map>

I‘m seeing the following errors printed out...

TIFF loader: Error opening file 
TIFF loader: Error opening file 
TIFF loader: Error opening file 
TIFF loader: Error opening file 
Couldn‘t get tile for 0_0_0 
TIFF loader: Error opening file 
TIFF loader: Error opening file 
TIFF loader: Error opening file 
TIFF loader: Error opening file 
Couldn‘t get tile for 0_1_0

Thoughts?

Thanks, 
Brett



View message @ http://n2.nabble.com/How-do-I-connect-to-a-local-elevation-server--tp2497311p2497311.html 
To start a new topic under osgEarth, email [hidden email] 
To unsubscribe from osgEarth, click here.

... [show rest of quote]

... [show rest of quote]

brett

Reply | Threaded | More    

Mar 19, 2009; 5:26am

Re: How do I connect to a local elevation server?

 
In reply to this post by brett

Jason,

OK, thanks. One step forward... My map file now uses the heightfield as imagery so I can easily find the areas with big elevations.

<map name="test" type="geocentric">

<image name="vmap0" driver="wms">
       <url>http://XXXXX/ArcGIS/services/Elevation/MapServer/WMSServer</url>
       <layers>0</layers>
       <format>png</format>
       <tile_size>256</tile_size>
   </image>

<heightfield name="world1" driver="wms">
        <url>http://XXXXX/ArcGIS/services/Elevation/MapServer/WMSServer</url>    
        <layers>0</layers>  
        <format>tiff</format>
        <tile_size>16</tile_size>
    </heightfield>
        
</map>

When I run this I see no elevation neither with osgviewer. Because I see elevation when I connect to the pelican server (except those rare cases when the nextwork gives me trouble) I believe this to be a configuration problem with my .earth file or wms server.

Anyway to tell?

Thanks, 
Brett

gwaldron

Reply | Threaded | More    

Mar 19, 2009; 5:49am

Re: How do I connect to a local elevation server?


Brett, can you post your WMS capabilities XML? thanks

http://XXXXX/ArcGIS/services/Elevation/MapServer/WMSServer?request=GetCapabilities

Glenn Waldron / Pelican Mapping / @glennwaldron

brett

Reply | Threaded | More    

Mar 19, 2009; 8:28pm

Re: How do I connect to a local elevation server?

 
Hey Glenn,

Here are the WMS server capabilities: 
<?xml version="1.0" encoding="UTF-8"?> 
<WMS_Capabilities version="1.3.0" 
xmlns="http://www.opengis.net/wms"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wms http://schemas.opengis.net/wms/1.3.0/capabilities_1_3_0.xsd">
  <Service>
    <Name>WMS</Name>
    <Title>Elevation</Title>
    <Abstract>WMS</Abstract>
    <KeywordList><Keyword></Keyword></KeywordList>
    <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://gems2/ArcGIS/services/Elevation/MapServer/WMSServer"/>

<ContactInformation>
      <ContactPersonPrimary>
        <ContactPerson></ContactPerson>
        <ContactOrganization></ContactOrganization>
      </ContactPersonPrimary>
      <ContactPosition></ContactPosition>
      <ContactAddress>
        <AddressType></AddressType>
        <Address></Address>

<City></City>
        <StateOrProvince></StateOrProvince>
        <PostCode></PostCode>
        <Country></Country>
      </ContactAddress>
      <ContactVoiceTelephone></ContactVoiceTelephone>
      <ContactFacsimileTelephone></ContactFacsimileTelephone>
      <ContactElectronicMailAddress></ContactElectronicMailAddress>
    </ContactInformation>

<Fees></Fees>
    <AccessConstraints></AccessConstraints>
    <MaxWidth>2048</MaxWidth>
    <MaxHeight>2048</MaxHeight>
  </Service>
  <Capability>
    <Request>
      <GetCapabilities>

<Format>application/vnd.ogc.wms_xml</Format>
        <Format>text/xml</Format>
        <DCPType>
          <HTTP><Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://gems2/ArcGIS/services/Elevation/MapServer/WMSServer"/></Get></HTTP>
        </DCPType>
      </GetCapabilities>
      <GetMap>
        <Format>image/bmp</Format>

<Format>image/jpeg</Format>
        <Format>image/tiff</Format>
        <Format>image/png</Format>
        <Format>image/gif</Format>
        <Format>image/svg+xml</Format>
        <DCPType>

<HTTP><Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://gems2/ArcGIS/services/Elevation/MapServer/WMSServer"/></Get></HTTP>
        </DCPType>
      </GetMap>
      <GetFeatureInfo>
        <Format>application/vnd.ogc.wms_xml</Format>
        <Format>text/xml</Format>
        <Format>text/html</Format>

<Format>text/plain</Format>
        <DCPType>
          <HTTP><Get><OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://gems2/ArcGIS/services/Elevation/MapServer/WMSServer"/></Get></HTTP>
        </DCPType>
      </GetFeatureInfo>
    </Request>
    <Exception>
      <Format>application/vnd.ogc.se_xml</Format>

<Format>application/vnd.ogc.se_inimage</Format>
      <Format>application/vnd.ogc.se_blank</Format>
      <Format>text/xml</Format>
      <Format>XML</Format>
    </Exception>
    <Layer>
    <Title>Layers</Title>

<CRS>CRS:84</CRS>
    <CRS>EPSG:4326</CRS>
    <EX_GeographicBoundingBox>
      <westBoundLongitude>-198.000002</westBoundLongitude>
      <eastBoundLongitude>198.000019</eastBoundLongitude>
      <southBoundLatitude>-99.000002</southBoundLatitude>

<northBoundLatitude>99.000009</northBoundLatitude>
    </EX_GeographicBoundingBox>
    <BoundingBox CRS="CRS:84" minx="-198.000002" miny="-99.000002" maxx="198.000019" maxy="99.000009"/>
    <BoundingBox CRS="EPSG:4326" minx="-99.000002" miny="-198.000002" maxx="99.000009" maxy="198.000019"/>
      <Layer>
        <Name>0</Name>
        <Title>con_isnull_g1</Title>

<Abstract>con_isnull_g1</Abstract>
        <CRS>CRS:84</CRS>
        <CRS>EPSG:4326</CRS>
        <EX_GeographicBoundingBox>
          <westBoundLongitude>-180.000001</westBoundLongitude>
          <eastBoundLongitude>180.000018</eastBoundLongitude>

<southBoundLatitude>-90.000001</southBoundLatitude>
          <northBoundLatitude>90.000008</northBoundLatitude>
        </EX_GeographicBoundingBox>
        <BoundingBox CRS="CRS:84" minx="-180.000001" miny="-90.000001" maxx="180.000018" maxy="90.000008"/>
        <BoundingBox CRS="EPSG:4326" minx="-90.000001" miny="-180.000001" maxx="90.000008" maxy="180.000018"/>
        <Style> <Name>default</Name> <Title>con_isnull_g1</Title> <LegendURL width="100" height="97"> <Format>image/png</Format> <OnlineResource xlink:href="http://gems2/arcgisoutput/Elevation_MapServer/wms/default0.png" xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" /> </LegendURL> </Style>      </Layer>
    </Layer>

</Capability>
</WMS_Capabilities>

Does this tell you anything useful?

Thanks, 
Brett

gwaldron

Reply | Threaded | More    

Mar 19, 2009; 8:56pm

Re: How do I connect to a local elevation server?

 
Brett,

This might be an ArcGIS Server issue. I ran a test, adding some 1-channel 32-bit float SRTM data to an MXD and publishing as a Map service. The resulting TIFFs are RGB 3-channel, not 1-channel. In other words, AGS rendered the elevation data to a regular image, making it useless to osgEarth.

(Side note: in MapServer, the open source WMS server, you can explicitly configure the output formats and achieve the desired effect.)

I don‘t see a way offhand to configure AGS to do this. An alternative would be to publish the layer as a WCS service (which provides raw access to the source data). However ... the osgEarth WCS driver is not mature yet and will probably require some addition work on our end.

时间: 2024-08-16 15:40:19

How do I connect to a local elevation server?的相关文章

解决mysql报错Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’

启动mysql 报错: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) 1.先查看 /etc/rc.d/init.d/mysqld status 看看m y s q l 是否已经启动.另外看看是不是权限问题. 2.确定你的mysql.sock是不是在那个位置,mysql -u 你的mysql用户名 -p -S /var/lib/mysql/

mysql连接报错 ERROR 2002 (HY000): Can&#39;t connect to local MySQL server through socket

安装完mysql连接报错: [[email protected] app]# mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) [[email protected] app]# mysql -uroot -p Enter password:  ERROR 2002 (HY000): Can't connect to local M

ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var mysql 启动不了

ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var mysql 启动不了 ps -A | grep -i mysql kill 列出来的进程 service mysql start 我的问题就解决了 ---------------------------------------------- Fedora8启动mysql 报错:ERROR 2002 (HY000): Can’t connect

MAC中Django中runserver提示Can&#39;t connect to local MySQL server through socket &#39;/tmp/mysql.sock错误

好像不止遇到一次,直接Google就可以了,在stackoverflow中就有答案,答案就是你没有开MySQL - -. stackoverflow链接见 http://stackoverflow.com/questions/16325607/cant-connect-to-local-mysql-server-through-socket-tmp-mysql-sock 开启MySQL的命令如下: mysql.server start MAC中Django中runserver提示Can't co

Can&#39;t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock‘ (2)解决思路

首先说明一下mysql.sock文件的作用: 连接mysql有两种方式,第一种是TCP/IP,第二种就是直接使用unix domain socket,它比TCP/IP块. mysql.sock是在mysql-server和client在同一服务器上时,发起本地连接时可用,而无需定义-h参数指定具体的IP.mysql.sock是随每次mysql server启动时生成,通常配置参数是将mysql.sock生成在/tmp/目录下.即在/etc/my.cnf文件中指定socket=/tmp/mysql

连接Mysql提示Can’t connect to local MySQL server through socket的解决方法

mysql,Mysqldump,Mysqladmin,php连接mysql服务常会提示下面错误: 1 ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) 这是由于修改mysql服务的了socket文件mysql.sock位置,而导致无法通过mysql socket文件连接到mysql服务引起的,具体解决办法如下:1.查看mysql服务的sock

Can&#39;t connect to local MySQL server through socket &#39;/tmp/mysql.sock&#39;

启动mysql之后,不能进入mysql命令行: Can't connect to local MySQL server through socket '/tmp/mysql.sock': 修改/etc/my.cnf 当中 socket=/tmp/mysql.sock 重启mysql,即可 Can't connect to local MySQL server through socket '/tmp/mysql.sock'

命令行连接mysql服务器时 报Can&#39;t connect to local MySQL server through socket &#39;xxx.sock&#39;错误

本来之前用的好好的mysql服务器,突然就报Can't connect to local MySQL server through socket 'xxx.sock'错误了 遇到该问题思路首先是:检查 my.cnf 中 socket 配置的路径及权限. 但是查看完 没发现路劲权限有问题,最后跑去另一台同时配置的服务器上看  发现/data/perconadata有一个/mnt/perconadata/mysql.sock的软连接 于是乎到问题机器上 cd /data/perconadata/ s

mysql Can&#39;t connect to local MySQL server through socket &#39;/var/lib/mysql/mysql.sock&#39; (2)

错误原因:/var/lib/mysql目录中socket文件不存在.连接mysql服务器有两种方式:tcp连接,通过socket文件连接.通过socket文件,启动mysql服务,mysql服务会自动生成一个sock文件,生成的sock文件默认放在 --datadir=/var/lib/mysql,mysql默认从/var/lib/mysql目录读取sock文件. 解决办法:1.看看/var/lib/mysql/mysql 有没有mysql.sock文件2.没有mysql.sock,重启mysq