Skip to content

Commit

Permalink
Updating the shapefile
Browse files Browse the repository at this point in the history
  • Loading branch information
siddjain444 committed Jan 25, 2024
1 parent 53175ad commit 035adcf
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions src/data.jl
Original file line number Diff line number Diff line change
Expand Up @@ -83,22 +83,13 @@ function state_hr_district_dfs()
# get the CRS (if on another DB)
spatial_ref_df = DBInterface.execute(connection, "SELECT * from spatial_ref_sys") |> DataFrame
db_crs = spatial_ref_df.SRTEXT[begin] # TODO: use this when converting.
# get tables for each admin level
state_table = do_geoquery(connection, "states")
hr_table = do_geoquery(connection, "homogeneous_regions")
district_table = do_geoquery(connection, "districts_2011")
# get rivers etc
shape_wkb_to_module_geom!(GeometryBasics, state_table)
shape_wkb_to_module_geom!(GeometryBasics, hr_table)
district_table = do_geoquery(connection,"districts_states_hr" )
shape_wkb_to_module_geom!(GeometryBasics, district_table)
# drop missing values, since we shouldn't have any at this stage.
dropmissing!(state_table)
dropmissing!(hr_table)
dropmissing!(district_table)
# clean up by closing the connection
DBInterface.close!(connection)

return state_table, hr_table, district_table
#return state_table, hr_table, district_table, my_table
return district_table

end

Expand Down

0 comments on commit 035adcf

Please sign in to comment.