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

Deal with askew coordinates #31

Closed
waldoj opened this issue May 10, 2017 · 5 comments
Closed

Deal with askew coordinates #31

waldoj opened this issue May 10, 2017 · 5 comments
Labels

Comments

@waldoj
Copy link
Owner

waldoj commented May 10, 2017

We're getting coordinates over the border in Canada, and our coordinates within the U.S. appear to be wrong. e.g., 35.55, -76.65 is in ZIP 27810, but this has those coordinates in zone 8b, but that ZIP is in zone 8a. So something isn't right here.

@waldoj waldoj added the bug label May 10, 2017
@waldoj
Copy link
Owner Author

waldoj commented May 10, 2017

Yuuuuup, this is a projection problem. The phm_us.prj file specifies that this uses:

GEOGCS["GCS_North_American_1983",
    DATUM["North_American_Datum_1983",
        SPHEROID["GRS_1980",6378137.0,298.257222101]],
    PRIMEM["Greenwich",0.0],
    UNIT["Degree",0.0174532925199433]]

This may complicate things beyond what is plausible for me to deal with via a simple iteration over a grid. :-/ But I'll try!

@waldoj
Copy link
Owner Author

waldoj commented May 10, 2017

OK, so the basic problem here is that PHZ grid data is stored as NAD 1983, and it should perhaps instead be stored as WGS 84 (EPSG:4326). (This is surely a projection problem, whatever the proper projection is.) gdal is the tool for this. My efforts so far have failed, e.g.:

# gdaltransform -s_srs EPSG:4326 -t_srs EPSG:32617 phm_us.asc phm_us_2.asc

ERROR 4: `phm_us_2.asc' does not exist in the file system,
and is not recognised as a supported dataset name.

(Removed: a big list of drivers.) Maybe ogr2ogr can read ESRI ASCII Raster, but not write it?

Anyway, there are two necessary tasks here:

  1. Identify the proper projection to use for this task.
  2. Get gdal to perform that conversion.

@waldoj
Copy link
Owner Author

waldoj commented May 11, 2017

Solution: Redo the whole damn thing as Shapefile -> GeoJSON -> JSON pipeline, and see how that goes.

@waldoj
Copy link
Owner Author

waldoj commented May 11, 2017

I am not a proud man.

@waldoj
Copy link
Owner Author

waldoj commented May 11, 2017

Obviated by #32.

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

No branches or pull requests

1 participant