Announcement

Collapse
No announcement yet.

WorldWind and GeoServer 1.3

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • WorldWind and GeoServer 1.3

    I am having some trouble with my 1st attempt at getting a WMS server setup and getting WW to utilize it. I have read through many of the posts, and was able to get the WMS Browser to see my server. I was very encouraged, however, every time I attempt to plot the data I get an error: “The given path’s format is not supported.”

    To keep things simple, I was attempting to use the example data that ships with the GeoServer tool.

    Any ideas would welcome
    .
    WMS_SERVER_ENTRY
    <Server>
    <Name>My GeoServer</Name>
    <ServerUrl>http://127.0.0.1:8080/geoserver/wms</ServerUrl>
    <Version>1.1.1</Version>
    <Abstract>My Test GeoServer</Abstract>
    </Server>

    Using Version 1.3.0 of the GeoServer tool
    ( http://docs.codehaus.org/display/GEOS/Latest )

    I have also attempted modifying the @images.xml file with variations of the following:
    <QuadTileSet ShowAtStartup="false">
    <Name>My Data 1</Name>
    <DistanceAboveSurface>10</DistanceAboveSurface>
    <BoundingBox>
    <North>
    <Value>71.55</Value>
    </North>
    <South>
    <Value>17.84</Value>
    </South>
    <West>
    <Value>-168.67</Value>
    </West>
    <East>
    <Value>-65.15</Value>
    </East>
    </BoundingBox>
    <TerrainMapped>false</TerrainMapped>
    <ImageAccessor>
    <LevelZeroTileSizeDegrees>2.0</LevelZeroTileSizeDegrees>
    <NumberLevels>6</NumberLevels>
    <TextureSizePixels>512</TextureSizePixels>
    <ImageFileExtension>png</ImageFileExtension>
    <WMSAccessor>
    <ServerGetMapUrl>http://127.0.0.1:8080/geoserver/wms?</ServerGetMapUrl>
    <Version>1.1.1</Version>
    <ImageFormat>image/png</ImageFormat>
    <WMSLayerName>states_shapefile:states</WMSLayerName>

    <UseTransparency>false</UseTransparency>
    </WMSAccessor>
    </ImageAccessor>
    <ExtendedInformation>
    <ToolBarImage>Data&#092;Icons&#092;Inter face&#092;shapes.png</ToolBarImage>
    </ExtendedInformation>
    </QuadTileSet>
    [img]style_emoticons/<#EMO_DIR#>/huh.gif[/img]

  • #2
    Maybe take a look at the OneEarth&#39;s xml.
    And remember that World Wind only supports EPSG:4326 projection.
    Hot stuff: FAQ, forum search, DirectX, .NET, Video Card Compatibility list

    Comment


    • #3
      I found what was causing the problem. GeoServer uses the ":" character to delimit Namespaces and Stores, which is passed as the LayerName propery. The layer name is used by World Wind to create Cache directories. Here is an example request in GeoServer 1.3

      http://127.0.0.1:8080/geoserver/wms?bbox=-...0&srs=EPSG:4326

      World wind attempts to create a directory called: "topp:states" to corospaoned to the layer name of layers=topp:states. The ":" is an illeage character in a direcoty name, so the cache directy is not created which causes the Invalid Directory error.

      I was ultiamty able to get this to work in a development version by chaninging the following in:

      WorldWind.MyWmsLayer

      Function:
      public WMSDownload GetWmsRequest( string dateString,
      WMSLayerStyle curStyle,
      decimal north,
      decimal south,
      decimal west,
      decimal east,
      string cacheDirectory)
      {
      ....

      string path = Path.Combine( cacheDirectory , Path.Combine(
      this._parentWMSList.Name,
      this._name.<span style="color:#990000">Replace(&#39;:&#39 ;, &#39;-&#39 </span> + (curStyle &#33;= null ? curStyle.name : "")));
      ...
      }

      Approximpaty line 2622 of WMSBrowser.cs

      I added the .<span style="color:#990000">Replace(&#39;:&#39 ;, &#39;-&#39 </span> part, and the everything workd [img]style_emoticons/<#EMO_DIR#>/smile.gif[/img].

      I suspect that a similar change will be needed if this was used as a Tiled layer, but I have not looked into that part yet.

      Beaker

      Comment


      • #4
        Is there any chance of getting that change in to worldwind in general? I work on GeoServer, and am very interested in having it work out of box with WorldWind.

        The &#39;:&#39; actually is kind of standard for any WFS that does namespaces, and we just call the layers the same thing in WMS. Note that in GeoServer if you define a namespace as your &#39;default&#39; then you can pass in the layer without the &#39;:&#39; delimiter. But it still will report in the Capabilities document with the delimited.

        We also could perhaps do something like make it a param for the GetCapabilities request, to return names that use - instead of &#39;:&#39; for delimiting, and then it&#39;s a couple hacks to get that working through out...

        <div class='quotetop'>QUOTE(beaker &#064; Apr 3 2006, 08&#58;16 AM) Quoted post</div><div class='quotemain'>
        I found what was causing the problem. GeoServer uses the ":" character to delimit Namespaces and Stores, which is passed as the LayerName propery. The layer name is used by World Wind to create Cache directories. Here is an example request in GeoServer 1.3

        http://127.0.0.1:8080/geoserver/wms?bbox=-...0&srs=EPSG:4326

        World wind attempts to create a directory called: "topp:states" to corospaoned to the layer name of layers=topp:states. The ":" is an illeage character in a direcoty name, so the cache directy is not created which causes the Invalid Directory error.

        I was ultiamty able to get this to work in a development version by chaninging the following in:

        WorldWind.MyWmsLayer

        Function:
        public WMSDownload GetWmsRequest( string dateString,
        WMSLayerStyle curStyle,
        decimal north,
        decimal south,
        decimal west,
        decimal east,
        string cacheDirectory)
        {
        ....

        string path = Path.Combine( cacheDirectory , Path.Combine(
        this._parentWMSList.Name,
        this._name.<span style="color:#990000">Replace(&#39;:&#39 ;, &#39;-&#39 </span> + (curStyle &#33;= null ? curStyle.name : "")));
        ...
        }

        Approximpaty line 2622 of WMSBrowser.cs

        I added the .<span style="color:#990000">Replace(&#39;:&#39 ;, &#39;-&#39 </span> part, and the everything workd [img]style_emoticons/<#EMO_DIR#>/smile.gif[/img].

        I suspect that a similar change will be needed if this was used as a Tiled layer, but I have not looked into that part yet.

        Beaker
        [/b][/quote]

        Comment


        • #5
          Hi..

          I am using geoserver1.7.5 for configuring place names as a wfs layer in world wind java1.5 version,I divide the place names data in to 24levels,but my application displaying only to the 14 lelvels.

          The following code i am using for displaying placenames:
          if (activeNamesList.contains(pop_rank0)) {
          placeNameService = new PlaceNameService(service, "topp:ww_pop_rank0", fileCachePath, Sector.FULL_SPHERE,
          GRID_1x1,
          java.awt.Font.decode("Arial-BOLDITALIC-12"));
          placeNameService.setColor(new java.awt.Color(200, 200, 200));
          placeNameService.setMinDisplayDistance(0 d);
          placeNameService.setMaxDisplayDistance(L EVEL_A);
          placeNameServiceSet.addService(placeName Service, false);
          }

          can any body help me where i am wrong or which configuration of geoserver or wwj missing.

          Comment


          • #6
            Thanks for bumping this, I will try and add that change into WW .NET later tonight.
            Bull_[UK]

            Comment

            Working...
            X