Skip to content
This repository has been archived by the owner on Apr 27, 2021. It is now read-only.

Fix boundary definition bug in ArcGIS and Grid headers #17

Closed
wants to merge 2 commits into from

Conversation

atdyer
Copy link
Contributor

@atdyer atdyer commented Jan 26, 2015

The point (min_x, min_y) is the southwest corner of the bounding box of the input dataset as well as the center of the bottom left cell in the grid, and the point (max_x, max_y) is the northeast corner of the bounding box of the input dataset.

The ArcGIS format allows the coordinates of the origin to be defined by either the center or lower left corner of the lower left cell. I've fixed the values printed to be consistent with the lower left corner.

The GRASS Grid format calls for the N, S, E, W boundaries to describe the outer edges of the region. Printed values now represent these edges instead of the bounding box of the input dataset.

Related to bugs #6 and #7

@gadomski
Copy link
Contributor

@atdyer code looks ok to me. One nit before I merge: any way you could add a unit test or two? I've provided an example of testing the asc header here — you could just include that test, and maybe add a corresponding one for the grid format as well?

Also, curious if you've checked the geotiff headers to see if the problem exists there as well?

@atdyer
Copy link
Contributor Author

atdyer commented Jan 27, 2015

@gadomski I've included your asc header unit test as well as added a single grid format test. Working on an additional (slightly larger) point cloud for testing purposes.

It looks like the problem does exist in the geotiff files...the results appear different when opened in GRASS GIS. Am currently researching how coordinate systems are defined in gdal/geotiff.

@gadomski
Copy link
Contributor

Awesome, looks great. I'm going to merge, and I've opened #18 for the geotiff issue.

Thanks @atdyer.

@gadomski gadomski closed this in 1ccabed Jan 27, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants