I'm used the GDAL to modify the coordinates of polygons. I have referenced the C++ and Python versions of the code and modified them in Java:

    String ShpPath="G:\\GeoData\\New_Shapefile.shp";
    DataSource dataSource=ogr.Open(ShpPath,1);
    Layer layer=dataSource.GetLayer(0);
    Feature feature;

    while ((feature=layer.GetNextFeature())!=null)
        Geometry geometry = feature.GetGeometryRef();

        Geometry geo2=geometry.GetGeometryRef(0);

        for (int j = 0; j < geo2.GetPointCount(); j++)
            System.out.println("X:"+geo2.GetX(j)+" Y:"+geo2.GetY(j));


But when I'm done, I load the data into Arcmap and a warning is displayed: Acope inconsistent! The scope of one or more added layers is inconsistent with the associated spatial reference information. How can I solve this problem?

  • 1
    Reference Systems have boundaries, for example -180.00, -90.00, 180.00, 90.00. Is it possible your code altered coordinates beyond the boundaries of your crs? Jun 11 at 2:57


Your Answer

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

Browse other questions tagged or ask your own question.