0

I am using Geoserver to cache 4 band (RGB,Alpha) satellite imagery. The native projection of the imagery is NAD83 and I want them in WGS84, when I do the reprojection,using Arcmap, depending on the extent of the imagery, black borders or areas appear in the results. I can make the black areas transparent in Arcmap, but no matter what I do (Set Null, change no data value to zero, clip the black borders,etc) in Arcmap, when I cache the imagery using Geoserver, the black areas re appear in the results both in Open layer viewer of Geoserver and when I serve them as WMTS in Arcmap or QGIS. Cache results in Geoserver viewer

Same extent and imagery in Arcmap

  • JackB, Welcome to GIS StackExchange! I would probably try mosaicking the imagery in its native projection first (assures no checkerboard effect), then reproject the mosaic to WGS84. – cm1 Mar 15 '18 at 19:46
  • Thanks. And I appreciate your solution, but what I missed to mention in my question is I have around 800 imagery, so it is not feasible to mosaic them and then to reproject a giant mosaic and then feed it to Geoserver for caching. I added the above two scenes just as examples to clarify my question. – JackB Mar 15 '18 at 20:29
  • add them to GeoServer as a mosaic and allow GeoServer to handle the reprojection for you, it's what it is good at. – Ian Turton Mar 15 '18 at 20:51
  • Thanks Ian, the problem I face when I let GeoServer handle the reprojection is that when the cache is built, when I zoom in/out, there is a shift among the tiles, as if the place of the tiles change on each zoom level. That's why I want to do the reprojection before feeding them to GeoServer. – JackB Mar 15 '18 at 21:16
  • that sounds like a client issue or a miss defined grid in the cache – Ian Turton Mar 16 '18 at 8:46
2

If you have A LOT of imagery, you could utilize GDAL's virtual mosaic building tool and create a virtual mosaic, then add it to Geoserver as Ian suggested. Take a look at Geoserver's ImagePyramid format.

An example workflow could be:

  1. Create virtual mosaic
  2. Tile mosaic into an ImagePyramid using gdal_retile
  3. Add ImagePyramid to Geoserver (i.e.- add the imagepyramid store, point it to your tiles location, publish it etc.

Then on the 'Data' tab for the layer in Geoserver, you could set the "Output Transparent Color" to black #000000 as discussed here.

  • Thanks. I did all the steps outlined above, but I am still getting black areas and black borders in my result. Any ideas why? – JackB Mar 19 '18 at 18:19
  • I'll try it in the native projection, in the mean time, to add more information on the steps outlined above, when I change the "Output Transparent Color" to black, nothing gets displayed in Open Layers, as if the result is blank, and in ArcMap and QGIS I still get the black borders and areas. – JackB Mar 19 '18 at 19:14
  • It could be near-black colors around the edges causing problems if you're still using tiles that have been reprojected. I would mosaic all in their native projection first. If the images have been cropped to their outline shapefiles, be sure to specify the "-srcnodata 0" option in your gdalbuildvrt command. – cm1 Mar 19 '18 at 19:16
  • I tried native projection and also added "-srcnodata 0" but I still get the black areas and black lines, any more ideas? thanks in advance. – JackB Mar 20 '18 at 22:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.