pyearth 0.2.2__tar.gz → 0.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyearth-0.2.2 → pyearth-0.2.3}/.binder/environment.yml +1 -1
- {pyearth-0.2.2 → pyearth-0.2.3}/PKG-INFO +7 -5
- {pyearth-0.2.2 → pyearth-0.2.3}/README.md +4 -3
- {pyearth-0.2.2 → pyearth-0.2.3}/docs/source/algorithm/api.rst +3 -3
- {pyearth-0.2.2 → pyearth-0.2.3}/docs/source/algorithm/toolbox/toolbox.rst +5 -5
- {pyearth-0.2.2 → pyearth-0.2.3}/docs/source/conf.py +4 -4
- {pyearth-0.2.2 → pyearth-0.2.3}/environment.yml +1 -1
- pyearth-0.2.3/pyearth/__init__.py +1 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/geometry/calculate_intersect_on_great_circle.py +18 -11
- pyearth-0.2.3/pyearth/gis/geometry/check_counter_clockwise.py +138 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/geometry/international_date_line_utility.py +247 -312
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/geometry/kernel.c +152 -152
- pyearth-0.2.3/pyearth/gis/geometry/pole_check.py +111 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/location/get_geometry_coordinates.py +29 -14
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/location/kernel.c +152 -152
- pyearth-0.2.3/pyearth/toolbox/analysis/image/raster_process.py +288 -0
- pyearth-0.2.3/pyearth/toolbox/data/remove_duplicate_closure.py +8 -0
- pyearth-0.2.2/pyearth/toolbox/management/raster/merge_rasters.py → pyearth-0.2.3/pyearth/toolbox/management/raster/merge_raster_files.py +1 -1
- pyearth-0.2.2/pyearth/toolbox/management/vector/merge_files.py → pyearth-0.2.3/pyearth/toolbox/management/vector/merge_vector_files.py +26 -19
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/management/vector/remove_small_polygon.py +23 -6
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/mesh/algorithm/split_by_length.py +65 -22
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/mesh/line.py +20 -6
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/mesh/nvector.py +33 -24
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/mesh/point.py +88 -11
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/mesh/polygon.py +53 -20
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/mesh/polyline.py +1 -1
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth.egg-info/PKG-INFO +7 -5
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth.egg-info/SOURCES.txt +7 -4
- {pyearth-0.2.2 → pyearth-0.2.3}/pyproject.toml +5 -4
- pyearth-0.2.3/tests/example/test_idl_split.py +60 -0
- pyearth-0.2.2/pyearth/__init__.py +0 -1
- pyearth-0.2.2/pyearth/gis/geometry/check_counter_clockwise.py +0 -72
- pyearth-0.2.2/pyearth/toolbox/geometry/create_gcs_buffer_zone.py +0 -1149
- {pyearth-0.2.2 → pyearth-0.2.3}/.binder/README.md +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/.github/workflows/release.yml +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/.gitignore +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/.gitpod.yml +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/.vscode/launch.json +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/.vscode/settings.json +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/LICENSE.md +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/MANIFEST.in +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/docs/Makefile +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/docs/make.bat +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/docs/requirements.txt +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/docs/source/Doxyfile.in +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/docs/source/_static/.gitkeep +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/docs/source/algorithm/gis/gis.rst +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/docs/source/algorithm/system/system.rst +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/docs/source/authors.rst +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/docs/source/contribution.rst +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/docs/source/faq.rst +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/docs/source/getting-started.rst +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/docs/source/index.rst +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/docs/source/story.rst +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/docs/source/support.rst +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/.gitignore +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/envi/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/envi/envi_write_header.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/gdal/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/gdal/gdal_check_file_type.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/gdal/gdal_check_raster_valid.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/gdal/gdal_raster_format_support.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/gdal/gdal_to_numpy_datatype.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/gdal/gdal_validate_polygon_file.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/gdal/gdal_vector_format_support.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/gdal/read/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/gdal/read/raster/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/gdal/read/raster/gdal_get_raster_extent.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/gdal/read/raster/gdal_get_raster_spatial_reference.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/gdal/read/raster/gdal_read_ascii_file.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/gdal/read/raster/gdal_read_envi_file.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/gdal/read/raster/gdal_read_geotiff_file.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/gdal/read/vector/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/gdal/read/vector/gdal_get_vector_boundary.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/gdal/read/vector/gdal_get_vector_extent.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/gdal/read/vector/gdal_get_vector_spatial_reference.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/gdal/read/vector/gdal_read_vector_file.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/gdal/write/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/gdal/write/raster/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/gdal/write/raster/gdal_write_envi_file.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/gdal/write/raster/gdal_write_geotiff_file.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/gdal/write/vector/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/gdal/write/vector/gdal_export_point_to_vector_file.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/gdal/write/vector/gdal_write_wkt_to_vector_file.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/geometry/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/geometry/calculate_angle_between_point.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/geometry/calculate_angle_between_point_normal.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/geometry/calculate_angle_between_vectors_degrees.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/geometry/calculate_distance_based_on_longitude_latitude.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/geometry/calculate_distance_to_line.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/geometry/calculate_distance_to_plane.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/geometry/calculate_polygon_area.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/geometry/calculate_spherical_triangle_area.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/geometry/check_convex_polygon.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/geometry/clean_geometry.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/geometry/convert_longitude_range.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/geometry/create_box_from_longitude_latitude.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/geometry/douglas_peucker_geodetic.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/geometry/extract_unique_vertices_and_connectivity.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/geometry/get_output_geometry_type.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/geometry/kernel.pyx +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/geometry/visvalingam_whyatt_geodetic.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/location/Google_MetersPerPixel.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/location/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/location/convert_between_longitude_latitude_and_sphere_3d.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/location/find_index_by_longitude_latitude.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/location/get_hydrosheds_continent_from_extent.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/location/kernel.pxd +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/location/kernel.pyx +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/location/world2Pixel.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/spatialref/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/spatialref/convert_between_degree_and_meter.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/spatialref/is_wgs84_projection.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/spatialref/reproject_coordinates.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/gis/spatialref/utm_utility.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/system/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/system/create_symlink.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/system/define_global_variables.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/system/filename.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/system/python/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/system/python/get_python_environment.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/system/set_linker_directory.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/analysis/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/analysis/difference/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/analysis/difference/difference_polygon_with_polygon_file.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/analysis/difference/difference_polyline_with_polygon_file.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/analysis/extract/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/analysis/extract/clip_raster_by_polygon_file.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/analysis/extract/clip_vector_by_polygon_file.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/analysis/extract/exclude_vector_by_polygon_file.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/analysis/extract/exclude_vector_by_polygon_files.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/analysis/extract/filter_vector_by_attribute.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/analysis/extract/filter_vector_by_polygon.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/analysis/intersect/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/analysis/intersect/intersect_polygon_with_polygon_file.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/analysis/intersect/intersect_polyline_with_polygon_file.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/conversion/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/conversion/convert_polygon_to_polyline_file.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/conversion/convert_vector_format.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/conversion/convert_vector_to_global_raster.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/conversion/rasterize_vector.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/conversion/vectorize_raster.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/cython/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/data/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/data/beta/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/data/beta/add_variable_to_netcdf.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/data/beta/replace_variable_in_netcdf.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/data/cgpercentiles.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/data/convert_time_series_daily_to_monthly.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/data/list/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/data/list/check_if_duplicates.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/data/list/list_alg.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/data/netcdf/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/data/ocean/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/data/ocean/define_land_ocean_mask.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/data/remove_outliers.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/data/vector/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/data/vector/copy_geometry_without_attributes.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/date/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/date/day_in_month.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/date/day_of_year.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/date/dt2cal.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/date/julian.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/date/leap_year.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/date/timer.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/geometry/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/geometry/calculate_hexagon_area.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/management/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/management/raster/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/management/raster/reproject.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/management/raster/resample.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/management/vector/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/management/vector/fields.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/management/vector/merge_features.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/management/vector/polygon_calculator.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/management/vector/reproject.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/math/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/math/array/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/math/gap_fill_by_window.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/math/stat/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/math/stat/remap.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/math/stat/scipy_bivariate_kde.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/mesh/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/mesh/algorithm/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/mesh/algorithm/convert_coordinates.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/mesh/algorithm/find_minimal_enclosing_polygon.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/mesh/algorithm/save_points_as_polygon.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/mesh/circle.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/mesh/hexaon/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/mesh/hexaon/create_hexagon_mesh.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/mesh/latlon/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/mesh/latlon/create_latlon_mesh.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/mesh/square/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/mesh/square/create_square_mesh.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/reader/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/reader/beta/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/reader/beta/parse_xml_file_e3sm.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/reader/line_count.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/reader/parse_xml_file.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/reader/read_configuration_file.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/reader/split_string_into_chunk.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/reader/text_reader_string.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth/toolbox/spatialindex/__init__.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth.egg-info/dependency_links.txt +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth.egg-info/requires.txt +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/pyearth.egg-info/top_level.txt +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/setup.cfg +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/setup.py +0 -0
- {pyearth-0.2.2 → pyearth-0.2.3}/tests/example/test.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyearth
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.3
|
|
4
4
|
Summary: Python for Earth Science.
|
|
5
5
|
Author-email: Chang Liao <changliao.climate@gmail.com>
|
|
6
6
|
License: BSD-3-Clause
|
|
@@ -14,13 +14,14 @@ Classifier: Operating System :: OS Independent
|
|
|
14
14
|
Classifier: Intended Audience :: Science/Research
|
|
15
15
|
Classifier: Programming Language :: Python
|
|
16
16
|
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
17
18
|
Classifier: Programming Language :: Python :: 3.10
|
|
18
19
|
Classifier: Programming Language :: Python :: 3.11
|
|
19
20
|
Classifier: Programming Language :: Python :: 3.12
|
|
20
21
|
Classifier: Topic :: Scientific/Engineering
|
|
21
22
|
Classifier: Topic :: Scientific/Engineering :: Visualization
|
|
22
23
|
Classifier: Topic :: Scientific/Engineering :: GIS
|
|
23
|
-
Requires-Python: >=3.
|
|
24
|
+
Requires-Python: >=3.9
|
|
24
25
|
Description-Content-Type: text/markdown
|
|
25
26
|
License-File: LICENSE.md
|
|
26
27
|
Requires-Dist: numpy
|
|
@@ -51,7 +52,8 @@ Dynamic: license-file
|
|
|
51
52
|
### PyEarth
|
|
52
53
|
|
|
53
54
|
[](https://zenodo.org/badge/latestdoi/67889575)
|
|
54
|
-
[](https://pepy.tech/project/pyearth)
|
|
55
|
+
[](https://pepy.tech/project/pyearth)
|
|
56
|
+
[](https://anaconda.org/conda-forge/pyearthviz3d)
|
|
55
57
|
|
|
56
58
|
Every hiker/camper would love to have a leatherman pocket knife around because it is lightweight, versatile and reliable, sometimes life saving.
|
|
57
59
|
|
|
@@ -175,9 +177,9 @@ Performance-critical geometry and location calculations are accelerated with Cyt
|
|
|
175
177
|
- `pyearth.gis.geometry.kernel` - Fast geometry operations
|
|
176
178
|
- `pyearth.gis.location.kernel` - Efficient location calculations
|
|
177
179
|
|
|
178
|
-
### Related Packages in
|
|
180
|
+
### Related Packages in PyEarthSuite
|
|
179
181
|
|
|
180
|
-
PyEarth works seamlessly with other
|
|
182
|
+
PyEarth works seamlessly with other PyEarthSuite packages:
|
|
181
183
|
|
|
182
184
|
|
|
183
185
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
### PyEarth
|
|
2
2
|
|
|
3
3
|
[](https://zenodo.org/badge/latestdoi/67889575)
|
|
4
|
-
[](https://pepy.tech/project/pyearth)
|
|
4
|
+
[](https://pepy.tech/project/pyearth)
|
|
5
|
+
[](https://anaconda.org/conda-forge/pyearthviz3d)
|
|
5
6
|
|
|
6
7
|
Every hiker/camper would love to have a leatherman pocket knife around because it is lightweight, versatile and reliable, sometimes life saving.
|
|
7
8
|
|
|
@@ -125,9 +126,9 @@ Performance-critical geometry and location calculations are accelerated with Cyt
|
|
|
125
126
|
- `pyearth.gis.geometry.kernel` - Fast geometry operations
|
|
126
127
|
- `pyearth.gis.location.kernel` - Efficient location calculations
|
|
127
128
|
|
|
128
|
-
### Related Packages in
|
|
129
|
+
### Related Packages in PyEarthSuite
|
|
129
130
|
|
|
130
|
-
PyEarth works seamlessly with other
|
|
131
|
+
PyEarth works seamlessly with other PyEarthSuite packages:
|
|
131
132
|
|
|
132
133
|
|
|
133
134
|
|
|
@@ -296,7 +296,7 @@ Management
|
|
|
296
296
|
from pyearth.toolbox.management.raster.resample import resample_raster
|
|
297
297
|
|
|
298
298
|
# Vector management
|
|
299
|
-
from pyearth.toolbox.management.vector.
|
|
299
|
+
from pyearth.toolbox.management.vector.merge_vector_files import merge_vector_files
|
|
300
300
|
from pyearth.toolbox.management.vector.merge_features import merge_features
|
|
301
301
|
from pyearth.toolbox.management.vector.reproject import reproject_vector
|
|
302
302
|
from pyearth.toolbox.management.vector.fields import (
|
|
@@ -384,8 +384,8 @@ Working with Vectors
|
|
|
384
384
|
convert_vector_format('input.shp', 'output.geojson')
|
|
385
385
|
|
|
386
386
|
# Merge files
|
|
387
|
-
from pyearth.toolbox.management.vector.
|
|
388
|
-
|
|
387
|
+
from pyearth.toolbox.management.vector.merge_vector_files import merge_vector_files
|
|
388
|
+
merge_vector_files(['file1.shp', 'file2.shp'], 'merged.shp')
|
|
389
389
|
|
|
390
390
|
Coordinate Operations
|
|
391
391
|
=====================
|
|
@@ -215,7 +215,7 @@ Vector Management
|
|
|
215
215
|
File Operations
|
|
216
216
|
---------------
|
|
217
217
|
|
|
218
|
-
* **
|
|
218
|
+
* **merge_vector_files** - Merge multiple vector files into one
|
|
219
219
|
* **merge_features** - Merge/dissolve features within a file
|
|
220
220
|
* **remove_small_polygon** - Remove polygons below size threshold
|
|
221
221
|
* **reproject_vector** - Reproject vector to different coordinate system
|
|
@@ -236,10 +236,10 @@ Polygon Calculations
|
|
|
236
236
|
|
|
237
237
|
.. code-block:: python
|
|
238
238
|
|
|
239
|
-
from pyearth.toolbox.management.vector.
|
|
239
|
+
from pyearth.toolbox.management.vector.merge_vector_files import merge_vector_files
|
|
240
240
|
|
|
241
241
|
# Merge multiple shapefiles
|
|
242
|
-
|
|
242
|
+
merge_vector_files(
|
|
243
243
|
['region1.shp', 'region2.shp', 'region3.shp'],
|
|
244
244
|
'merged_regions.shp'
|
|
245
245
|
)
|
|
@@ -449,11 +449,11 @@ Example 4: Merge and Reproject Vectors
|
|
|
449
449
|
|
|
450
450
|
.. code-block:: python
|
|
451
451
|
|
|
452
|
-
from pyearth.toolbox.management.vector.
|
|
452
|
+
from pyearth.toolbox.management.vector.merge_vector_files import merge_vector_files
|
|
453
453
|
from pyearth.toolbox.management.vector.reproject import reproject_vector
|
|
454
454
|
|
|
455
455
|
# Merge multiple region files
|
|
456
|
-
|
|
456
|
+
merge_vector_files(
|
|
457
457
|
['region_north.shp', 'region_south.shp', 'region_east.shp'],
|
|
458
458
|
'all_regions.shp'
|
|
459
459
|
)
|
|
@@ -34,7 +34,7 @@ def get_version():
|
|
|
34
34
|
"""Read version from pyproject.toml"""
|
|
35
35
|
if toml_lib is None:
|
|
36
36
|
# Fallback if no TOML library is available
|
|
37
|
-
return "0.2.
|
|
37
|
+
return "0.2.3"
|
|
38
38
|
|
|
39
39
|
try:
|
|
40
40
|
pyproject_path = os.path.join(os.path.dirname(__file__), '..', '..', 'pyproject.toml')
|
|
@@ -43,7 +43,7 @@ def get_version():
|
|
|
43
43
|
return pyproject_data['project']['version']
|
|
44
44
|
except (FileNotFoundError, KeyError, Exception):
|
|
45
45
|
# Fallback if pyproject.toml is missing or malformed
|
|
46
|
-
return "0.2.
|
|
46
|
+
return "0.2.3"
|
|
47
47
|
|
|
48
48
|
# -- General configuration ------------------------------------------------
|
|
49
49
|
|
|
@@ -138,8 +138,8 @@ try:
|
|
|
138
138
|
release = _version # The full version, including alpha/beta/rc tags
|
|
139
139
|
except Exception:
|
|
140
140
|
# Fallback if pyproject.toml is not available
|
|
141
|
-
version = "0.2.
|
|
142
|
-
release = "0.2.
|
|
141
|
+
version = "0.2.3"
|
|
142
|
+
release = "0.2.3"
|
|
143
143
|
|
|
144
144
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
|
145
145
|
# for a list of supported languages.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.2.3"
|
|
@@ -339,17 +339,24 @@ def find_great_circle_intersection_with_meridian(
|
|
|
339
339
|
|
|
340
340
|
# We have: A * cos(lat) + B * sin(lat) = 0
|
|
341
341
|
# This can be written as: tan(lat) = -A / B (if B != 0)
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
342
|
+
#
|
|
343
|
+
# If B ~= 0, the great-circle plane contains the Earth's rotation axis,
|
|
344
|
+
# so the great circle passes through both poles. In that case the target
|
|
345
|
+
# meridian intersection is a pole, and tiny non-zero A values are usually
|
|
346
|
+
# just floating-point noise.
|
|
347
|
+
tolerance = 1e-8
|
|
348
|
+
|
|
349
|
+
if abs(B) < tolerance:
|
|
350
|
+
mean_lat = 0.5 * (lat1 + lat2)
|
|
351
|
+
fallback_lat = 90.0 if mean_lat >= 0.0 else -90.0
|
|
352
|
+
|
|
353
|
+
if abs(A) < tolerance:
|
|
354
|
+
# The target meridian lies nearly in the great-circle plane.
|
|
355
|
+
# Return a stable representative point on the relevant pole side.
|
|
356
|
+
return (target_lon, fallback_lat)
|
|
357
|
+
|
|
358
|
+
# Pole-passing great circle: every meridian intersects it at the poles.
|
|
359
|
+
return (target_lon, fallback_lat)
|
|
353
360
|
|
|
354
361
|
# Calculate latitude
|
|
355
362
|
lat_rad = np.arctan2(-A, B)
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import numpy as np
|
|
2
|
+
from typing import Union
|
|
3
|
+
from pyearth.toolbox.data.remove_duplicate_closure import remove_duplicate_closure as remove_duplicate_closure
|
|
4
|
+
|
|
5
|
+
def calculate_signed_area_shoelace(coords: np.ndarray) -> float:
|
|
6
|
+
x, y = coords[:, 0], coords[:, 1]
|
|
7
|
+
|
|
8
|
+
# Vectorized shoelace formula - more efficient than loops
|
|
9
|
+
# Handle the wrap-around (last point to first point) implicitly
|
|
10
|
+
x_rolled = np.roll(x, -1) # x[i+1] for all i, with wrap-around
|
|
11
|
+
y_rolled = np.roll(y, -1) # y[i+1] for all i, with wrap-around
|
|
12
|
+
|
|
13
|
+
signed_area = 0.5 * np.sum(x * y_rolled - x_rolled * y)
|
|
14
|
+
return signed_area
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def calculate_signed_area_spherical_polar(
|
|
18
|
+
coords: np.ndarray, pole: str = "north"
|
|
19
|
+
) -> float:
|
|
20
|
+
"""Calculate signed spherical area for polygons enclosing a pole.
|
|
21
|
+
|
|
22
|
+
The polygon is projected with Lambert azimuthal equal-area (LAEA) centered
|
|
23
|
+
on the requested pole, then planar signed area is computed with the
|
|
24
|
+
shoelace formula. With unit sphere radius, output area is in steradians.
|
|
25
|
+
|
|
26
|
+
Parameters
|
|
27
|
+
----------
|
|
28
|
+
coords : np.ndarray
|
|
29
|
+
Polygon coordinates as (lon, lat) degrees.
|
|
30
|
+
pole : str, default="north"
|
|
31
|
+
Polar center for projection, either "north" or "south".
|
|
32
|
+
|
|
33
|
+
Returns
|
|
34
|
+
-------
|
|
35
|
+
float
|
|
36
|
+
Signed spherical area (steradians on unit sphere).
|
|
37
|
+
"""
|
|
38
|
+
if not isinstance(coords, np.ndarray) or coords.ndim != 2 or coords.shape[1] != 2:
|
|
39
|
+
raise ValueError("coords must be a 2D numpy array with shape (n, 2)")
|
|
40
|
+
|
|
41
|
+
if len(coords) < 3:
|
|
42
|
+
return 0.0
|
|
43
|
+
|
|
44
|
+
arr = remove_duplicate_closure(coords)
|
|
45
|
+
if len(arr) < 3:
|
|
46
|
+
return 0.0
|
|
47
|
+
|
|
48
|
+
lon_rad = np.deg2rad(arr[:, 0])
|
|
49
|
+
lat_rad = np.deg2rad(arr[:, 1])
|
|
50
|
+
|
|
51
|
+
cos_lat = np.cos(lat_rad)
|
|
52
|
+
sin_lat = np.sin(lat_rad)
|
|
53
|
+
|
|
54
|
+
pole_lc = pole.lower()
|
|
55
|
+
if pole_lc == "north":
|
|
56
|
+
# LAEA centered at +90 deg latitude
|
|
57
|
+
denom = 1.0 + sin_lat
|
|
58
|
+
# Avoid divide-by-zero at antipode (not expected for pole-enclosing cells)
|
|
59
|
+
denom = np.maximum(denom, 1.0e-15)
|
|
60
|
+
k = np.sqrt(2.0 / denom)
|
|
61
|
+
x = k * cos_lat * np.sin(lon_rad)
|
|
62
|
+
y = -k * cos_lat * np.cos(lon_rad)
|
|
63
|
+
elif pole_lc == "south":
|
|
64
|
+
# LAEA centered at -90 deg latitude
|
|
65
|
+
denom = 1.0 - sin_lat
|
|
66
|
+
denom = np.maximum(denom, 1.0e-15)
|
|
67
|
+
k = np.sqrt(2.0 / denom)
|
|
68
|
+
x = k * cos_lat * np.sin(lon_rad)
|
|
69
|
+
y = k * cos_lat * np.cos(lon_rad)
|
|
70
|
+
else:
|
|
71
|
+
raise ValueError("pole must be either 'north' or 'south'")
|
|
72
|
+
|
|
73
|
+
projected = np.column_stack((x, y))
|
|
74
|
+
return calculate_signed_area_shoelace(projected)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def check_counter_clockwise(coords: np.ndarray) -> bool:
|
|
78
|
+
"""Check if polygon coordinates are in counter-clockwise order.
|
|
79
|
+
|
|
80
|
+
Parameters
|
|
81
|
+
----------
|
|
82
|
+
coords : np.ndarray
|
|
83
|
+
Array of shape (n, 2) representing polygon coordinates.
|
|
84
|
+
|
|
85
|
+
Returns
|
|
86
|
+
-------
|
|
87
|
+
bool
|
|
88
|
+
True if vertices are in counter-clockwise order, False otherwise.
|
|
89
|
+
"""
|
|
90
|
+
from pyearth.gis.geometry.international_date_line_utility import (
|
|
91
|
+
check_cross_international_date_line_polygon,
|
|
92
|
+
unwrap_longitudes,
|
|
93
|
+
)
|
|
94
|
+
from pyearth.gis.geometry.pole_check import polygon_includes_pole
|
|
95
|
+
|
|
96
|
+
if not isinstance(coords, np.ndarray) or coords.ndim != 2 or coords.shape[1] != 2:
|
|
97
|
+
raise ValueError("coords must be a 2D numpy array with shape (n, 2)")
|
|
98
|
+
|
|
99
|
+
if len(coords) < 3:
|
|
100
|
+
return True # Degenerate case
|
|
101
|
+
|
|
102
|
+
if polygon_includes_pole(coords, pole="north"):
|
|
103
|
+
signed_area = calculate_signed_area_spherical_polar(coords, pole="north")
|
|
104
|
+
elif polygon_includes_pole(coords, pole="south"):
|
|
105
|
+
signed_area = calculate_signed_area_spherical_polar(coords, pole="south")
|
|
106
|
+
else:
|
|
107
|
+
# Check if polygon crosses the International Date Line
|
|
108
|
+
iFlag_cross, _ = check_cross_international_date_line_polygon(coords)
|
|
109
|
+
if iFlag_cross:
|
|
110
|
+
coords_unwrapped = unwrap_longitudes(coords)
|
|
111
|
+
# Calculate signed area using optimized shoelace formula
|
|
112
|
+
signed_area = calculate_signed_area_shoelace(coords_unwrapped)
|
|
113
|
+
else:
|
|
114
|
+
# Standard case: calculate signed area directly
|
|
115
|
+
signed_area = calculate_signed_area_shoelace(coords)
|
|
116
|
+
return signed_area > 0
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
def get_polygon_orientation(coords: np.ndarray) -> str:
|
|
120
|
+
"""Get the orientation of polygon coordinates as a string.
|
|
121
|
+
|
|
122
|
+
Parameters
|
|
123
|
+
----------
|
|
124
|
+
coords : np.ndarray
|
|
125
|
+
Array of shape (n, 2) representing polygon coordinates.
|
|
126
|
+
|
|
127
|
+
Returns
|
|
128
|
+
-------
|
|
129
|
+
str
|
|
130
|
+
Either "counter-clockwise" or "clockwise".
|
|
131
|
+
|
|
132
|
+
Examples
|
|
133
|
+
--------
|
|
134
|
+
>>> coords = np.array([[0, 0], [1, 0], [1, 1], [0, 1], [0, 0]])
|
|
135
|
+
>>> get_polygon_orientation(coords)
|
|
136
|
+
'counter-clockwise'
|
|
137
|
+
"""
|
|
138
|
+
return "counter-clockwise" if check_counter_clockwise(coords) else "clockwise"
|