Announcement

Collapse
No announcement yet.

DDS Plugin for geoserver

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

  • #31
    resolved

    Hi!

    I have solved the error and can deliver BIL/DDS with GeoServer, now. At the moment we would like to know what needs to be done to make your plugin an offical GeoServer plugin (instead of a community plugin)? This is quite important for the usage in our project. We would like to offer you the support which is needed to realize our need.

    With best regards
    Tobias

    Comment


    • #32
      Hi GeoMaster,

      can you please tell me how you have solved the problem you described in your previous post. I have the same problem.

      Thank you and kind regards,
      doa

      Comment


      • #33
        Hi doa!

        I hope I have got the right solution on my mind:
        Just add a Worldwind.jar to the WEB-INF/lib-Folder of your GeoServer-Instance. At least version 0.5 is necessary, but 1.2 works fine, too. The DDS-Plugin needs it as dependency.

        With best regards
        Tobias

        Comment


        • #34
          a trouble with the bil format

          Hi,
          I have two troubles with the bil format.

          1.I want to get the bil plugin for Geoserver 2.1.x


          2.I try the plugin for GeoServer 2.2.I also get a .bil file.But the file is not identical to the one which is generated by Global Mapper. And the file from Global Mapper is what I want. So I have the trouble to use the plugin.

          Comment


          • #35
            Hi,

            Thank you for this plugin, it considerably improves the rendering time of textures.

            Therefore, we noticed a lower display quality after activating the dds plugin : the contours of textures are unexpectedly white, texts are blurred and colors are slightly different of what they look like when we disable the DDS extension.

            The dds compression is made even without using the dds plugin so there is no reason to get a different quality if the compression is made on geoserver side or on WWJ side.

            After looking at the code, this is the DDSMapResponse.formatImageOutputStream code :
            Code:
            public void formatImageOutputStream(RenderedImage img, OutputStream os, 
                    WMSMapContent mapContent)
            			throws ServiceException, IOException {	
            			BufferedImage bimg = convertRenderedImage(img);
            			ByteBuffer bb = DDSConverter.convertToDxt3(bimg);
            			saveBuffer(bb,os);
            	}
            DDSConverter looks like the old way to make the conversion. This class doesn't exist anymore in WWJ 1.5.

            We tried to look how the conversion is currently made on WWJ side and to use the same mechanism, so we replace this code by :
            Code:
            public void formatImageOutputStream(RenderedImage img, OutputStream os, 
            	        WMSMapContent mapContent)
            			throws ServiceException, IOException {	
                    BufferedImage bimg = (BufferedImage) img;
                    DXTCompressionAttributes attributes = DDSCompressor.getDefaultCompressionAttributes();
            
                    DDSCompressor compressor = new DDSCompressor();
            
                    attributes.setBuildMipmaps(true);
            
                    ByteBuffer buffer = compressor.compressImage(bimg, attributes);
            
                    saveBuffer(buffer, os);
            	}
            We also have to change the saveBuffer method :
            Code:
            public static boolean saveBuffer(ByteBuffer buffer, OutputStream os) throws IOException {
                    if (buffer == null) {
                        String message = "nullValue.BufferNull";
                        Logging.logger().severe(message);
                        throw new IllegalArgumentException(message);
                    }
                    if (os == null) {
                        String message = "nullValue.FileIsNull";
                        Logging.logger().severe(message);
                        throw new IllegalArgumentException(message);
                    } else {
                        BufferedOutputStream bos = new BufferedOutputStream(os);
                        
                        byte[] arrayBytes = new byte[buffer.remaining()];
                        int counter = 0;
                        // Extract array of bytes from buffer because the array method is not available for MappedByteBuffer
                        while (buffer.hasRemaining()) {
                            arrayBytes[counter] = buffer.get();
                            counter++;
                        }
            
                        bos.write(arrayBytes);
            
                        return true;
                    }
                }
            With this modification, we get significantly better texture renderer. This change is compatible with WWJ 0.6.

            Please feel free to give me your thought and feedback on this change. I will be pleased to share the modified extension with the community.

            Comment


            • #36
              Hi, dbacar,what_nick,
              Thanks for the description of how to add elevation data from the dds/bil plugin.
              I publish a geotiff image through geoserver2.4.2, and follow the WroclawElevation.xml to config EarthElevations2.xml.
              But i got an error, the terrain are shown like cubic in the worldwind, Click image for larger version

Name:	cubic surface.jpg
Views:	1
Size:	100.8 KB
ID:	110338
              Is there any solution for this.

              Thaks a lot,
              icepig

              Comment


              • #37
                I think the problem exists because of the low resolution of the geotiff image.

                I use the worldwind wms server to publish the same geotiff image, the resulting surface is smooth, I think it might be the server returned bil interpolation image, and geoserver dds/bil plugin did not.

                When I interpolate the geotiff image by myself and then published, the resulting effect is just as smooth as the worldwind wms server.

                Comment


                • #38
                  Hi what_nick,

                  First of all, thanks for the great work on the dds/bil plugin!
                  I used gdal to compile dted0 and dted1 data of a limited region into two geotiffs. I then serve this terrain data using Geoserver and your plugin, and display it in WW. This works wonderfully using Geoserver 2.1.3.
                  However, we now need to use a newer version of Geoserver, and there appear problems at the edge of the area covered by the data (see pic). Apart from the edges it works flawlessly. Also, the geotiffs are the same.

                  Click image for larger version

Name:	DTM_border_issues.jpg
Views:	1
Size:	70.8 KB
ID:	110344

                  When zooming in, the "holes" get smaller but never disappear completely. It looks like there is exactly one row of tiles that sinks into the ground. Interestingly, this does not even happen at all the edges of the area, only the northern, eastern and (to some degree) the western border.

                  Could it be some problem of extreme/undefined values?

                  I have spent quite some time fiddling with the configuration-xmls for the terrain model, but without success (only solution that worked was using geoserver 2.1.3 - a solution I don't like because other plugins we use rely on newer GS versions).
                  Has the plugin been tested with GS versions > 2.1? (and if not, is it planned)?

                  Do you have any idea where the problem could be, or could you point me in any direction? I guess it must have something to do with the changes between Geoserver versions...

                  Thanks a lot in Advance,

                  Shislim

                  Comment


                  • #39
                    Ok, seems like the real problem was between my ears...

                    Turns out that I by setting the missingDataValue to -32768 (programmatically, as setting that value in the xml causes an exception) the problem disappeared.
                    I don't know why it worked with an earlier version, but I won't argue!

                    Comment


                    • #40
                      I wrote a short article on how to configure World Wind to use elevation data served by the Geoserver DDS/BIL plugin, and some of the issues to be aware of. I hope that it's helpful.

                      Comment

                      Working...
                      X