JuliaGeo / Proj.jl

Julia wrapper for the PROJ cartographic projections library
MIT License
48 stars 9 forks source link

Add Proj.bounds function #72

Closed simonbyrne closed 2 years ago

simonbyrne commented 2 years ago

Now we've upgraded the library, we can expose this interface.

See discussion in https://github.com/MakieOrg/GeoMakie.jl/pull/101

rafaqz commented 2 years ago

There is also https://github.com/rafaqz/Extents.jl that we use in GeoInterface.jl and DimensionslData.jl/Rasters.jl for this.

It's basically bounds with a type wrapper and explicit dimension name and order

simonbyrne commented 2 years ago

@rafaqz I'm not quite sure I understand: are you suggesting we import Extent into Proj, or import Proj into Extent?

rafaqz commented 2 years ago

import Extent

It's a tiny package just to have a shared wrapper for extents/bounding boxes.

Maybe I misunderstand what your bounds method is here

visr commented 2 years ago

@rafaqz it probably makes sense to also support Extents, but that can be done in a separate PR, right? Perhaps by adding a method to Proj.bounds that returns an Extent when that is the input? Or would this definition be in the way?

simonbyrne commented 2 years ago

Probably best to do that as another PR?

I've opened https://github.com/MakieOrg/GeoMakie.jl/pull/132, which uses this.

rafaqz commented 2 years ago

Yeah it can totally be in another PR, I was just pointing out we mostly are using Extent for passing around this information now in JuliaGeo.

simonbyrne commented 2 years ago

can we merge this and tag a new release?