Skip to content

arctern-0.3.0

Latest
Compare
Choose a tag to compare
@GuoRentong GuoRentong released this 20 Jul 09:08
0294677

Arctern Release Notes

0.3.0

We have a number of improvements and updates in this release. Here are some highlights that you may be interested in:

  • arctern_spark - The arctern_spark package is the counterpart of arctern in the ecosystem of Apache Spark. Built on Apache Koalas, arctern_spark implements GeoSeries and GeoDataFrame classes similar to their counterparts in the arctern package. In other words, the GeoSeries and GeoDataFrame APIs in arctern_spark and arctern are almost the same. So, you can easily migrate your arctern codebase to arctern_spark when working with large datasets.

  • Improvements - Add 11 GeoSeries APIs implemented with C++ multi-threading, three GeoSeries APIs that read or write geometries, and two top-level functions (sjoin and read_file).

  • Plot - arctern.plot.choroplethmap now supports MultiPolygons. Functions suffixed with _layer generates PNG images encoded with base64. unique_value_choroplethmap and unique_value_choroplethmap_layer support specifying the color for each geometry according to its label.

  • GeoDataFrame - Starting with this release, Arctern begins to support GeoDataFrame. A GeoDataFrame object is a pandas.DataFrame that has columns with geometry.

  • RESTful Service - Introduce arctern-webserver, which is built on Apache Zeppelin, to provide RESTful service. arctern-webserver provides interactive geospatial data analysis services that enable data engineers, data analysts, and data scientists to increase their productivity. You can use a web-based notebook to perform geospatial data analysis without the usage of command lines or knowledge of the cluster details.

New features

GeoSeries APIs
Name Description
GeoSeries.is_empty Tests whether each geometry in the GeoSeries is empty.
GeoSeries.boundary Returns the closure of the combinatorial boundary of each geometry in the GeoSeries.
GeoSeries.union(other) Returns a geometry being a union of two input geometries.
GeoSeries.exterior For each geometry in the GeoSeries, returns a line string representing the exterior ring of the geometry.
GeoSeries.difference(other) For each geometry in the GeoSeries and the corresponding geometry given in other, returns a geometry representing the part of the first geometry that does not intersect with the other.
GeoSeries.symmetric_difference(other) For each geometry in the GeoSeries and the corresponding geometry given in other, returns a geometry representing the portions of the two geometries that do not intersect.
GeoSeries.scale(factor_x, factor_y[, origin]) Scales all geometries in the GeoSeries to a new size.
GeoSeries.affine_transform(matrix) Returns a GeoSeries with transformed geometries.
GeoSeries.translate(offset_x, offset_y) Returns a GeoSeries with translated geometries shifted by offsets along each dimension.
GeoSeries.rotate(angle[, origin, use_radians]) Returns a GeoSeries with rotated geometries on a 2D plane.
GeoSeries.disjoint(other) For each geometry in the GeoSeries and the corresponding geometry given in other, tests whether the first geometry disjoints to the other.
GeoSeries.from_file(fp[, bbox, mask, item]) Constructs a GeoSeries from a file or OGR dataset.
GeoSeries.to_file(fp[, mode, driver]) Writes a GeoSeries to a file or OGR dataset.
GeoSeries.to_json([show_bbox]) Returns a GeoJSON string representation of the GeoSeries.
GeoDataFrame APIs
Name Description
GeoDataFrame.to_geopandas() Transforms an arctern.GeoDataFrame object to a geopandas.GeoDataFrame object.
GeoDataFrame.from_geopandas(gdf) Constructs an arctern.GeoSeries object from a geopandas.DataFrame object.
GeoDataFrame.to_json([na, show_bbox, geometry]) Returns a GeoJSON string representation of the GeoDataFrame.
GeoDataFrame.from_file(filename, **kwargs) Constructs a GeoDataFrame from a file or URL.
GeoDataFrame.to_file(filename[, driver, ...]) Writes a GeoDataFrame to a file.
GeoDataFrame.crs The Coordinate Reference System (CRS) of arctern.GeoDataFrame.
GeoDataFrame.set_geometry(col[, inplace, crs]) Sets an existing column in the GeoDataFrame to a geometry column, which is used to perform geometric calculations later.
GeoDataFrame.dissolve([by, col, aggfunc, ...]) Dissolves geometries within by into a single observation.
GeoDataFrame.merge(right[, how, on, ...]) Merges two GeoDataFrame objects with a database-style join.
Top-level functions
Name Description
arctern.sjoin(left_df, right_df, left_col, ...) Spatially joins two GeoDataFrames.
arctern.read_file(*args, **kwargs) Returns a GeoDataFrame from a file or URL.
Plot functions suffixed with _layer
Name Description
arctern.plot.pointmap_layer(w, h, points[, ...]) Plots a point map layer.
arctern.plot.weighted_pointmap_layer(w, h, ...) Plots a weighted point map layer.
arctern.plot.heatmap_layer(w, h, points, ...) Plots a heat map layer.
arctern.plot.choroplethmap_layer(w, h, ...) Plots a choropleth map layer.
arctern.plot.iconviz_layer(w, h, points, ...) Plots an icon map layer.
arctern.plot.fishnetmap_layer(w, h, points, ...) Plots a fishnet map layer.
Plot functions with unique values
Name Description
arctern.plot.unique_value_choroplethmap(ax, ...) Plots a choropleth map in matplotlib with a set of unique colors.
arctern.plot.unique_value_choroplethmap_layer(w, ...) Plots a choropleth map layer with a set of unique colors.