index.rst 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. .. _s3_geotiff:
  2. S3 Support for GeoTiff
  3. ====================================================================================================
  4. Support for GeoTiffs hosted on Amazon S3 or on other Amazon S3 compatible services, via a custom GeoTools GridFormat.
  5. What's in the Box?
  6. ----------------------------------------------------------------------------------------------------
  7. - `org.geotools.s3.geotiff`: S3 GeoTiff Format/FormatFactory/GridCoverage2dReader implementations
  8. based off of the GeoTiff versions. Only very minor changes to their parent classes.
  9. - `org.geotools.s3.cache`: Very basic caching of images from S3 based off of EhCache.
  10. - `S3ImageInputStreamImpl`: An implementation of ImageInputStream from JAI for reading imagery
  11. from S3. This class mainly contains the logic of stream position and chunking, while the cache
  12. package handles the actual S3 reads.
  13. GeoTiffs hosted on Amazon S3
  14. ----------------------------------------------------------------------------------------------------
  15. Configuration
  16. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  17. Almost all configuration is currently done via system properties. For caching configuration, please
  18. see the class `org.geotools.s3.cache.CacheConfig`.
  19. Usage
  20. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  21. S3GeoTiff uses s3:// style URLs to operate. The only twist is that S3GeoTiff uses query string
  22. parameters to configure certain parameters
  23. - `awsRegion`: Controls the region to use when connecting. Needs to be in Java enum format eg. US_WEST_2
  24. - `useAnon`: Controls whether to authenticate anonymously. This needs to be used to connect anonymous buckets
  25. For example:
  26. s3://landsat-pds/L8/001/002/LC80010022016230LGN00/LC80010022016230LGN00_B1.TIF?useAnon=true&awsRegion=US_WEST_2
  27. Credentials
  28. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  29. Unless `S3_USE_ANON` is set to true the
  30. [default AWS client credential chain](http://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/credentials.html#using-the-default-credential-provider-chain) is used.
  31. GeoTiffs hosted on other Amazon S3 compatible services
  32. ----------------------------------------------------------------------------------------------------
  33. Access geotiffs on S3 servers not hosted on Amazon, e.g. https://www.minio.io/ or other. There are 2 steps to access the geofiff files. configure the server in the s3.properties file and then you can use the prefix as an alias to access the file in the S3GeoTiff module for geoserver.
  34. Configuration
  35. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  36. The S3 endpoints are configured in the s3.properties file. The following properties are needed for each endpoint. The prefix `alias` can be any value you choose in order to configure multiple endpoints.
  37. - `alias.s3.endpoint`\=http://your-s3-server/
  38. - `alias.s3.user`\=your-user-name
  39. - `alias.s3.password`\=your-password
  40. Usage
  41. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  42. Using the above configuration in the s3.properties file, the files on the S3 service can be accessed with the following URL style configuration in geoserver:
  43. alias://bucketname/filename.tiff
  44. - `alias`: The prefix you choose for the configuration of the endpoint
  45. - `bucketname`: The path to the folder where the geotiffs are stored
  46. - `filename.tif`: The name of the geotiff file