Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Geopackage with non-geographic input, outputs geometries with inverted X/Y axis #1165

Open
bdon opened this issue Feb 4, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@bdon
Copy link
Contributor

bdon commented Feb 4, 2025

Describe the bug
The GeoPackageReader projects non-geographic sources incorrectly.

To Reproduce

  @Override
  public void processFeature(SourceFeature sourceFeature, FeatureCollector features) {
    features.polygon("water").setZoomRange(0,8);
  }
    Planetiler.create(args)
      .setProfile(new Water())
      .addGeoPackageSource("landcover", Path.of("data", "sources", "water.gpkg"), "https://example.com")
      .overwriteOutput(Path.of("data", "water.pmtiles"))
      .run();

Expected behavior
The output geometries are not tiled correctly, the X and Y axis are inverted.

Image

Environment (please complete the following information):

  • Hardware: M1 MacBook Pro
  • OS: MacOS 15.2
  • Java OpenJDK Runtime Environment Temurin-22.0.2+9
  • Maven version: 3.9.9

Looks like the CRS initialization needs to look like CRS.decode("EPSG:4326", true); as is done in ShapefileReader.

@bdon bdon added the bug Something isn't working label Feb 4, 2025
@bdon bdon changed the title [BUG] [BUG] Geopackage non-geographic output geometries invert X/Y axis Feb 4, 2025
@bdon bdon changed the title [BUG] Geopackage non-geographic output geometries invert X/Y axis [BUG] Geopackage with non-geographic input, outputs geometries with inverted X/Y axis Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant