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?

1

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.