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

AlbersUSA Projection Fails for Coords of Puerto Rico #17

Open
BugsBunny338 opened this issue May 21, 2020 · 2 comments
Open

AlbersUSA Projection Fails for Coords of Puerto Rico #17

BugsBunny338 opened this issue May 21, 2020 · 2 comments

Comments

@BugsBunny338
Copy link

BugsBunny338 commented May 21, 2020

Hi there,

When running cat input.geojson | dirty-reproject --forward albersUsa > output.geojson on data/us-states.geojson, it works fine.

When I replace us-states.geojson with my custom file with coords inside of the US, it still works fine.

However when I supply my custom puerto-rico.geojson, it returns null values instead of valid coordinates.

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {
        "STATE_FIPS": "01"
      },
      "geometry": {
        "type": "Point",
        "coordinates": [
          -66.72280000,
          18.16380000
        ]
      }
    }
  ]
}

Another examples of failed reprojection coordinates (this output comes from my custom script that uses dirty-reprojectors as a dependency and is here only to reference other coords that convert to null):

Couldn't reproject lat;lon for row #56: Msa, 18.16380000;-66.72280000, Adjuntas, PR
Couldn't reproject lat;lon for row #164: Msa, 18.21880000;-66.59370000, Jayuya, PR
Couldn't reproject lat;lon for row #227: Msa, 18.02923158;-66.64959474, Ponce, PR
Couldn't reproject lat;lon for row #243: Msa, 18.35592609;-66.06849304, San Juan-Carolina-Caguas, PR
Couldn't reproject lat;lon for row #396: Msa, 18.07620000;-66.36270000, Coamo, PR
Couldn't reproject lat;lon for row #397: Msa, 17.97580000;-66.25660000, Coco, PR
Couldn't reproject lat;lon for row #490: Msa, 18.18635000;-67.13682500, Mayagez, PR
Couldn't reproject lat;lon for row #554: Msa, 18.08501667;-67.08118333, San Germ n, PR
Couldn't reproject lat;lon for row #941: Msa, 18.36447857;-67.03729286, Aguadilla-Isabela, PR
Couldn't reproject lat;lon for row #947: Msa, 18.43365000;-66.75864000, Arecibo, PR
Couldn't reproject lat;lon for row #1026: Msa, 17.98575000;-66.07537500, Guayama, PR
Couldn't reproject lat;lon for row #1113: Msa, 17.97010000;-66.40050000, Santa Isabel, PR

Why is that? 🤔 Is it a bug, or is it "a feature"? Why doesn't the conversion work for Puerto Rico as well? Any help greatly appreaciated! 🙏

@BugsBunny338
Copy link
Author

Never mind, after extensive googling I found the answer myself: d3/d3-geo#152. Hope this will be supported soon!

@Zulu-Inuoe
Copy link

@BugsBunny338 Did you ever find a method of getting PR data to show through dirty-reprojectors?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants