Example #1
0
def _test_shp2pgsql_epsg(db: PostgreSQL, shp: DataForTest):

    # Import the shapefile
    _ = db.shp2pgsql(shp.NAME, shp.IMPORT_FILEPATH)

    # Confirm SQL table and shapefile both have same EPSGs
    gdf = gpd.read_file(shp.IMPORT_FILEPATH)
    shapefile_crs = gdf.crs

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

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

    # Import the shapefile
    _ = db.shp2pgsql(shp.NAME, shp.IMPORT_FILEPATH)

    assert shp.NAME in db.all_spatial_tables_as_dict()