2

I am new to GIS, I publish one TIFF in GeoServer like this

enter image description here

I can use Java to get (x1,y1)(x1,y2)(x2,y2)(x2,y1)

GeoServerRESTManager manager = null;
    try {
        manager = new GeoServerRESTManager(new URL(config.getGeoserverUrl()), config.getGeoserverUsername(), config.getGeoserverPassword());
    } catch (Exception e) {
        e.printStackTrace();
    }
    GeoServerRESTReader reader = manager.getReader();
    RESTLayer layer = reader.getLayer("uav", "r6ibp4e7izpp");
    RESTWms restWms = Objects.requireNonNull(reader.getWms(layer),
            "can not get " + layer.getName());
    RESTBoundingBox box = restWms.getNativeBoundingBox();
    System.out.println(box.getMinX()+"\n"+box.getMinY()+"\n"+box.getMaxX()+"\n"+box.getMaxY());

Now I want to get the coordinates (x1,a1),(a2,y2)(a3,y1)(x2,a4). What can I do?

Is there a question which is similar to me or the way to get this coordinates?

Vince
  • 20,017
  • 15
  • 45
  • 64
AiMM
  • 21
  • 1
  • You could use GDAL to create footprint polygons from your images: https://gis.stackexchange.com/questions/61512/calculating-image-boundary-footprint-of-satellite-images-using-open-source-too – christoph Oct 09 '22 at 08:16

0 Answers0