### Build and Install for Development Source: https://github.com/pola-rs/geopolars/blob/main/py-geopolars/DEVELOP.md Builds the Python and Rust code using Maturin and installs the wheel into the Poetry virtual environment. Use this for active development. ```bash poetry run poe develop ``` -------------------------------- ### Serve Documentation Locally Source: https://github.com/pola-rs/geopolars/blob/main/py-geopolars/DEVELOP.md Starts a local web server for viewing the documentation. This uses mkdocs for local development. ```bash poetry run mkdocs serve ``` -------------------------------- ### Install GeoPolars (Alpha) Source: https://github.com/pola-rs/geopolars/blob/main/py-geopolars/docs/index.md Install the alpha version of GeoPolars from PyPI. The '-pre' flag is required for alpha releases. Binary wheels are available for easy installation. ```bash pip install --pre geopolars ``` -------------------------------- ### Build and Install for Release Development Source: https://github.com/pola-rs/geopolars/blob/main/py-geopolars/DEVELOP.md Builds the Python and Rust code using Maturin and installs the wheel into the Poetry virtual environment using a release build. This is slower to compile but faster at runtime. ```bash poetry run poe develop-release ``` -------------------------------- ### Start IPython Session Source: https://github.com/pola-rs/geopolars/blob/main/py-geopolars/DEVELOP.md Opens an IPython session after building for development, allowing you to import and test 'geopolars'. ```bash poetry run ipython ``` -------------------------------- ### Load and Process GeoPandas Datasets Source: https://github.com/pola-rs/geopolars/blob/main/py-geopolars/python/geopolars/datasets/README.md Loads the 'nybb', 'naturalearth_lowres', and 'naturalearth_cities' datasets using GeoPandas, converts specific columns to appropriate numeric types, and saves them as Feather files. Ensure GeoPandas is installed to use `gpd.datasets.get_path`. ```python import geopandas as gpd import pandas as pd gdf = gpd.read_file(gpd.datasets.get_path("nybb")) gdf["BoroCode"] = pd.to_numeric(gdf["BoroCode"], downcast="unsigned") gdf["Shape_Leng"] = pd.to_numeric(gdf["Shape_Leng"], downcast="float") gdf["Shape_Area"] = pd.to_numeric(gdf["Shape_Area"], downcast="float") gdf.to_feather("nybb.arrow") gdf = gpd.read_file(gpd.datasets.get_path("naturalearth_lowres")) gdf["pop_est"] = pd.to_numeric(gdf["pop_est"], downcast="unsigned") gdf["gdp_md_est"] = pd.to_numeric(gdf["gdp_md_est"], downcast="float") gdf.to_feather("naturalearth_lowres.arrow") gdf = gpd.read_file(gpd.datasets.get_path("naturalearth_cities")) gdf.to_feather("naturalearth_cities.arrow") ``` -------------------------------- ### Deploy Documentation (Latest Version) Source: https://github.com/pola-rs/geopolars/blob/main/py-geopolars/DEVELOP.md Deploys the documentation using 'mike', pushing changes and setting the 'latest' alias. Replace VERSION with the actual version tag. ```bash poetry run mike deploy --push --no-redirect VERSION latest ``` -------------------------------- ### Deploy Documentation (Specific Version) Source: https://github.com/pola-rs/geopolars/blob/main/py-geopolars/DEVELOP.md Deploys a specific version of the documentation (e.g., '0.1.0-alpha.4') and sets the 'latest' alias. ```bash poetry run mike deploy --push --no-redirect 0.1.0-alpha.4 latest ``` -------------------------------- ### Build Wheel for Release Source: https://github.com/pola-rs/geopolars/blob/main/py-geopolars/DEVELOP.md Builds a Python wheel for releasing the package. The wheel will be placed in the 'dist/' directory. ```bash poetry run poe build ``` -------------------------------- ### GeoSeries Constructor Source: https://github.com/pola-rs/geopolars/blob/main/py-geopolars/docs/api/geoseries.md Details on how to construct a GeoSeries object. ```APIDOC ## Constructor ::: geopolars.GeoSeries ``` -------------------------------- ### Constructive Methods Source: https://github.com/pola-rs/geopolars/blob/main/py-geopolars/docs/source/reference/geoseries.rst Creates new geometries based on existing ones, such as buffering, finding centroids, or computing convex hulls. ```APIDOC ## Constructive Methods ### Description Creates new geometries based on existing ones, such as buffering, finding centroids, or computing convex hulls. ### Methods - **centroid**: Computes the centroid of each geometry. - **convex_hull**: Computes the convex hull of each geometry. - **envelope**: Computes the bounding box (envelope) of each geometry. (Note: Methods like `buffer`, `boundary`, and `simplify` are listed but their specific documentation is not detailed in the provided source.) ``` -------------------------------- ### GeoSeries General Methods and Attributes Source: https://github.com/pola-rs/geopolars/blob/main/py-geopolars/docs/api/geoseries.md Overview of general methods and attributes applicable to GeoSeries objects. ```APIDOC ## General methods and attributes ::: geopolars.GeoSeries.geo ``` -------------------------------- ### Serialization / IO / Conversion Source: https://github.com/pola-rs/geopolars/blob/main/py-geopolars/docs/source/reference/geoseries.rst Handles conversion of GeoSeries to other formats like GeoPandas GeoSeries, WKB, WKT, and JSON, as well as loading from various sources. ```APIDOC ## Serialization / IO / Conversion ### Description Handles conversion of GeoSeries to other formats like GeoPandas GeoSeries, WKB, WKT, and JSON, as well as loading from various sources. ### Methods - **to_geopandas**: Converts the GeoSeries to a GeoPandas GeoSeries. (Note: Methods like `from_file`, `from_wkb`, `from_wkt`, `from_xy`, `to_file`, `to_json`, `to_wkb`, and `to_wkt` are listed but their specific documentation is not detailed in the provided source.) ``` -------------------------------- ### Projection Handling Source: https://github.com/pola-rs/geopolars/blob/main/py-geopolars/docs/source/reference/geoseries.rst Manages Coordinate Reference Systems (CRS) for the GeoSeries, including conversion to different CRS. ```APIDOC ## Projection Handling ### Description Manages Coordinate Reference Systems (CRS) for the GeoSeries, including conversion to different CRS. ### Methods - **to_crs(crs)**: Reprojects the geometries to a new Coordinate Reference System. (Note: Attributes like `crs`, `set_crs`, and `estimate_utm_crs` are listed but their specific documentation is not detailed in the provided source.) ``` -------------------------------- ### from_arrow Source: https://github.com/pola-rs/geopolars/blob/main/py-geopolars/docs/source/reference/functions.rst Converts an Apache Arrow Table to a GeoDataFrame. ```APIDOC ## from_arrow ### Description Converts an Apache Arrow Table to a GeoDataFrame. ### Method N/A (Function) ### Parameters N/A (Function parameters are not detailed in this section) ### Request Example N/A ### Response N/A ``` -------------------------------- ### Plotting Source: https://github.com/pola-rs/geopolars/blob/main/py-geopolars/docs/source/reference/geoseries.rst Provides methods for visualizing GeoSeries data. ```APIDOC ## Plotting ### Description Provides methods for visualizing GeoSeries data. ### Methods - **plot**: Plots the geometries in the GeoSeries. - **explore**: Creates an interactive map visualization of the GeoSeries. (Note: These methods are listed but their specific documentation is not detailed in the provided source.) ``` -------------------------------- ### Affine Transformations Source: https://github.com/pola-rs/geopolars/blob/main/py-geopolars/docs/source/reference/geoseries.rst Applies affine transformations to the geometries in the GeoSeries, including translation, rotation, scaling, and skewing. ```APIDOC ## Affine Transformations ### Description Applies affine transformations to the geometries in the GeoSeries, including translation, rotation, scaling, and skewing. ### Methods - **affine_transform(matrix)**: Applies an affine transformation defined by a matrix. - **rotate(angle, origin='center', use_radians=False)**: Rotates geometries by a given angle. - **scale(xfact, yfact=None, zfact=None, origin='center')**: Scales geometries by given factors. - **geom_skew(angle, axis='x', origin='center', use_radians=False)**: Skews geometries along a specified axis. - **translate(xoff, yoff=0, zoff=0)**: Translates geometries by given offsets. ``` -------------------------------- ### from_geopandas Source: https://github.com/pola-rs/geopolars/blob/main/py-geopolars/docs/source/reference/functions.rst Converts a GeoPandas GeoDataFrame to a GeoDataFrame. ```APIDOC ## from_geopandas ### Description Converts a GeoPandas GeoDataFrame to a GeoDataFrame. ### Method N/A (Function) ### Parameters N/A (Function parameters are not detailed in this section) ### Request Example N/A ### Response N/A ``` -------------------------------- ### Unary Predicates Source: https://github.com/pola-rs/geopolars/blob/main/py-geopolars/docs/source/reference/geoseries.rst Performs unary spatial predicates on each geometry in the GeoSeries, returning boolean values. ```APIDOC ## Unary Predicates ### Description Performs unary spatial predicates on each geometry in the GeoSeries, returning boolean values. ### Methods - **is_geom_empty**: Checks if each geometry is empty. - **is_ring**: Checks if each geometry is a ring. (Note: Methods like `is_simple`, `is_valid`, and `has_z` are listed but their specific documentation is not detailed in the provided source.) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.