Releases: hersfeldtn/projectionpasta
Releases · hersfeldtn/projectionpasta
2.0.1
Input bugfix, should be able to use Mercator and Cylindrical Equal-Area now
2.0.0: Major Rewrite, Robinson, Conics
Substantially rewrote internal routines and data flow. This largely breaks compatibility, though legacy Main and MainDeg functions are retained that attempt to support the old format (but note that ordering of the projection list has changed).
-
Important usage changes:
- Command line input now only covers projection type (still including subtypes like hemispheric, and now allowing for input of reference latitudes for relevant projections) and aspect, all other options are in the internal "opts" dictionary.
- Added projpasta_options.cfg which can also be used to alter additional options
- 3 main functions now designed for use by scripts:
- Proj_Image for projecting an image file
- Proj_Array for projecting any 2- or 3-dimensional numpy array
- Find_Index for projecting any set of points
- lon, lat, and 3rd rotation inputs are now formatted as tuples for each projection (lon, lat, rot) rather than provided as separate variables
- Main functions now all assume degree input for aspects by default (toggleable with the deg parameter), and options inputs are all treated as degrees
-
Added projections:
- Cylindrical equal-area (with any reference latitude)
- Equal Earth
- Robinson
- Natural Earth
- Equidistant Conic
- Albers Equal-Area Conic
- Lambert Conformal Conic
- Pseudostereographic
- Pseudoorthographic
-
Projection improvements:
- Mercator and Stereographic now both allow for choosing a custom maximum latitude from center
- Realized I was being stupid and could do the inverse projection of Aitoff the same way as Azimuthal Equidistant
- Also makes for a better initial guess function for Winkel Tripel inverse which produces somewhat better results in the corners
- Improved Nicolosi Globular projection, works more reliably as both input and output now (but still working on global)
- Added options for projecting Ortelius Oval as a single hemisphere or bihemisphere, using the procedure for the inner hemisphere of the global map.
-
New(/properly implemented) features (mainly accessed through options):
- Improved handling of aspect ratios and output sizes
- Projections can have variable aspect ratios, depending on additional data like reference latitudes
- Options to force a specific output aspect ratio or image size
- Various cropping options, all of which can be combined
- Can crop by pixel indices within input or output maps
- Can crop by longitude and latitude, either based on output aspect or treating input or output map as normal aspect (0,0 in center)
- Can treat input map as cropped and project back to global map
- Semi-experimental graticules
- Seems to work fine within the map area but can have issues at the edges for some projections, is a bit slow, and may not work for all color modes
- As with cropping can be based on true, input-as-normal, or output-as-normal coordinates
- Can be given as list or regular interval, defined separately for longitude and latitude
- Configurable color and transparency, though limited to 1-pixel width for now
- Experimental "forwards" projection: rather than starting with each output pixel and projecting backwards to interpolate on the input grid with scipy.interpn, projects each input pixel forwards to output map and interpolates there with scipy.griddata. So far is generally slower, less reliable, and doesn't support cropping or graticules, so is disabled by default, but could have potential future uses and so will improve later
- Symmetry use: speeds up projection in some cases by taking advantage of projection algorithm symmetry to project only part of map and then use template for the rest
- "Padding" of input map to avoid seams on reprojection; copies pixels across sides of maps to ensure proper interpolation along edges of input map
- Neater projection list in command line
- Added Globe_gif function to make a neat little gif of a spinning globe
- Improved handling of aspect ratios and output sizes
1.4
projectionpasta
Zip contains 2 versions:
- A python script requiring the numpy, pillow, and (if using interpolation) scipy packages
- A standalone .exe (without interpolation)
See readme for more details on methodology and use.
Changelog:
- Optimized rotation, should go much faster on large maps
- Added linear, cubic, PCHIP, and spline interpolation options; requires scipy and not included in .exe version
- Added option to output a trimmed map within specified pixel coordinates; only this area is projected so it may go much faster.
1.3
projectionpasta
Zip contains 2 versions:
- A python script requiring the numpy and pillow packages
- A standalone .exe
See readme for more details on methodology and use.
Changelog:
- Replaced default PIL limit with a maximum of 1 trillion pixels, well beyond what I imagine anyone would attempt.
Added exe
Added a standalone .exe that can be used on windows without a python install
New Projections and Fixes
- Added Eckert IV, Nicolosi Globular, and Lambert Azimuthal Equal-Area
- A couple minor fixes and tweaks; longitude-only rotation now goes the right way
- Added proj_list, which lists projection by order of index; so other programs can reference this index of projections here rather than use an index that may change in the future
1.0
Initial release