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

Accept different formats of SRS #305

Open
7 tasks
emlys opened this issue Feb 13, 2023 · 0 comments
Open
7 tasks

Accept different formats of SRS #305

emlys opened this issue Feb 13, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@emlys
Copy link
Member

emlys commented Feb 13, 2023

Pygeoprocessing functions that take in a SRS parameter require it to be in WKT format. GDAL/OGR utilities also accept EPSG and ESRI codes, PROJ strings, and more. We usually define projections in terms of EPSG codes anyway, so it would be convenient to pass those directly to pygeoprocessing. It's also nice to be consistent with GDAL when possible.

From the ogr2ogr docs, srs parameters may be

anything supported by the OGRSpatialReference.SetFromUserInput() call, which includes EPSG Projected, Geographic or Compound CRS (i.e. EPSG:4296), a well known text (WKT) CRS definition, PROJ.4 declarations, or the name of a .prj file containing a WKT CRS definition.

From a quick search, functions that take WKT parameters are

  • align_and_resize_raster_stack
  • create_raster_from_bounding_box
  • reproject_vector
  • warp_raster
  • transform_bounding_box
  • shapely_geometry_to_vector
  • numpy_array_to_raster
@emlys emlys added the enhancement New feature or request label Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant