Announcement

Collapse
No announcement yet.

DDS Plugin for geoserver

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

  • vash
    started a topic DDS Plugin for geoserver

    DDS Plugin for geoserver

    I have written a plug in that allows geoserver WMS to serve dds tiles. This avoids WorldWind clients to convert png tiles into dds.
    I've used the "gov.nasa.worldwind.formats.dds.DDSConve rter" class from the WWJ sdk to perform the conversion.

    ddsGeoserverPlugin-src.zip

    plugin-dds-geoserver.jar

    To use it just copy the plugin-dds-geoserver.jar and worldwind.jar from the WWJ sdk into the subdirectory "webapps\geoserver\WEB-INF\lib" of your geoserver installation and restart geoserver.
    Last edited by vash; 05-17-2008, 12:22 AM.

  • pabercrombie
    replied
    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.

    Leave a comment:


  • shislim
    replied
    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!

    Leave a comment:


  • shislim
    replied
    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

    Leave a comment:


  • icepig
    replied
    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.

    Leave a comment:


  • icepig
    replied
    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

    Leave a comment:


  • Guest's Avatar
    Guest replied
    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.

    Leave a comment:


  • Guest's Avatar
    Guest replied
    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.

    Leave a comment:


  • GeoMaster
    replied
    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

    Leave a comment:


  • doa
    replied
    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

    Leave a comment:


  • GeoMaster
    replied
    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

    Leave a comment:


  • GeoMaster
    replied
    Hi what_nick,

    I have downloaded the newest nightly build (2011/11/11) of the DDS-PlugIn and the newest trunk of GeoServer (geoserver-trunk-2011-11-11-bin.zip) and followed the instructions on docs.geoserver.org.

    When I am calling the web interface of GeoServer I receive the following version information:
    Version 2.1.2
    Subversion Revision -1
    (DE) Build Date 06-ott-2011 11:09
    (DE) GeoTools Version 2.7.3 (rev -1)

    When I call the Layer Preview and select Layer "nurc:Arc_Sample" for preview with format "BIL", GeoServer delivers a document of type "application/vnd.ogc.se_xml" with the following content:

    <?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE ServiceExceptionReport SYSTEM "http://localhost:8080/geoserver/schemas/wms/1.1.1/WMS_exception_1_1_1.dtd">
    <ServiceExceptionReport version="1.1.1" >
    <ServiceException>java.lang.AbstractMeth odError null</ServiceException>
    </ServiceExceptionReport>

    I have repeated this approach quite often with different layers and type "DDS", but the result is the same every time. What am I doing wrong?

    I appreciate every kind of help :-)

    With best regrads
    Tobias

    Leave a comment:


  • what_nick
    replied
    The GS2.2 DDS plugin gets automatically built by the build server nightly. You can find it here:

    http://gridlock.opengeo.org/geoserve...munity-latest/

    Please test and report stability and bug. I might get some priorities assigned to me soon to backport this to GS 2.1.

    Cheers,

    whatnick.

    Leave a comment:


  • Mewi
    replied
    DDS plug in for GS2.1.1

    Hi,

    Any news of a GS2.1.1 compliant DDS plugin ?

    All I can find is a GS2.2 DDS plugin in the trunk.
    At the least where can I find the instructions tu rebuild it myself ?
    Thanks,

    bye

    Leave a comment:


  • anaxa_gore
    replied
    Hello everybody,

    Is there some news about DDS/BIL plugin for Geoserver 2.1 ?
    Thanks,
    Thomas

    Leave a comment:

Working...
X