Skip to content

Releases: hotosm/fmtm-splitter

v1.1.1

11 Feb 18:16
Compare
Choose a tag to compare
  • Improved parsing of AOI boundary strings.
  • Option to not include data extract in split_by_sql:
    • The data extract is generated automatically by the osm-rawdata module.
    • If a data extract is passed, splitting is attempted using the custom extract.

v1.1.0

08 Feb 17:41
Compare
Choose a tag to compare
  • Added support for parsing AOIs with multiple geometries.

v1.0.0

30 Jan 10:55
Compare
Choose a tag to compare

As v1.0.0rc0

Additions:

  • Now accepts SQLAlchemy Session objects, in addition to psycopg2 connection or db connection string.
    # Previously
    sqlalchemy_session = SessionLocal()
    psycopg2_connection = sqlalchemy_session.connection()
    split_by_sql(psycopg2_connection, ...)
    
    # Now just pass the sqlalchemy session directly
    sqlalchemy_session = SessionLocal()
    split_by_sql(sqlalchemy_session, ...)
  • Suppressed noisy geopandas warnings.

v1.0.0 Release Candidate 0

21 Jan 13:27
Compare
Choose a tag to compare
Pre-release
  • Removed SQLAlchemy and GeoAlchemy dependencies.
  • Usage of the splitBySQL method now requires either a connection string, or psycopg2 connection.
  • SQLAlchemy Session objects are no longer accepted.

To get the psycopg2 driver connection from an SQLAlchemy Session, it's as simple as using:

psycopg2_connection = sqlalchemy_session.connection()
# Then pass psycopg2_connection as the db variable

Advantages

  • The updated code uses a single database transaction instead of three.
  • The tables will be dropped with the CASCADE option at the start of the script:
    • This prevents conflicts if osm_ways or osm_lines already exist in the db, likely from previous fmtm-splitter versions.
  • Reduction in sub-dependencies required to install this module.

v0.2.6

18 Jan 17:19
Compare
Choose a tag to compare
  • Minor fix to parse tags as JSON prior to insert into database (using geopandas.to_postgis).

v0.2.5

16 Dec 16:33
Compare
Choose a tag to compare
  • Return descriptive error if data extract is empty or incorrectly parsed.
  • Handle case where 'tags' key in data extract is a JSON string (i.e. with escape characters).
    • This would fail previously due to attempt to .get() a string.
    • The use case was for flatgeobuf --> geojson deserialisation. Sometimes nested props are generated as JSON string in the GeoJSON. This could be during flatgeobuf generation, or during the fgb --> geojson deserialisation.
    • The workaround parses the 'tags' key as a dict, else skips the tags for a feature (if parsing fails).

v0.2.4

07 Dec 15:16
Compare
Choose a tag to compare
  • Handle case where split_by_sql is used, but no data extract is passed.
  • Automatically drop_all prior to create_all database tables (preventing conflicts if the existing db table has an incorrect schema).

v0.2.3

06 Dec 15:27
Compare
Choose a tag to compare
  • Improved parsing of various geojson geometry types for AOI.

v0.2.2

05 Dec 17:24
Compare
Choose a tag to compare
  • Improve parsing of geojson files: accept FeatureCollections, Feature, Geometry (polygon).
  • splitByFeature use features instead of geopandas dataframe for splitting.
  • Bug fixes and logging improvements.

v0.2.1

05 Dec 10:12
Compare
Choose a tag to compare

Tidy up import pinning:

  • Use minimum required versions.
  • Use >= for future compatibility.