Exemple #1
0
def _test_pgsql2shp_epsg(db: PostgreSQL, shp: DataForTest):

    # Export a spatial table to shapefile
    output_shp = db.pgsql2shp(shp.NAME, shp.EXPORT_FOLDER)

    gdf = gpd.read_file(output_shp)

    sql_epsg = db.all_spatial_tables_as_dict()[shp.NAME]

    shapefile_crs = gdf.crs

    assert sql_epsg == shapefile_crs
Exemple #2
0
def _test_pgsql2shp(db: PostgreSQL, shp: DataForTest):

    # Export a spatial table to shapefile
    output_shp = db.pgsql2shp(shp.NAME, shp.EXPORT_FOLDER)

    assert output_shp.exists()