Skip to content

Commit

Permalink
Merge pull request #788 from openego/features/#787-set-pk-for-osm_way…
Browse files Browse the repository at this point in the history
…s_with_segments

Features/#787 set pk for osm ways with segments
  • Loading branch information
nesnoj committed Jun 13, 2022
2 parents 21a6f90 + 2509b4e commit 62dcbe3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,8 @@ Changed
`#736 <https://github.com/openego/eGon-data/issues/736>`_
* Improve CH4 stores and productions aggregation by removing dedicated task
`#PR775 <https://github.com/openego/eGon-data/pull/775>`_
* Add primary key to table openstreetmap.osm_ways_with_segments
`#787 <https://github.com/openego/eGon-data/issues/787>`_


Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion src/egon/data/datasets/osm_buildings_streets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class OsmBuildingsStreets(Dataset):
def __init__(self, dependencies):
super().__init__(
name="OsmBuildingsStreets",
version="0.0.4",
version="0.0.5",
dependencies=dependencies,
tasks=(
preprocessing,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,9 @@ CREATE TABLE openstreetmap.osm_ways_with_segments as
way_w_segments.geom
) ways
where ways.nodes is not null;

ALTER TABLE openstreetmap.osm_ways_with_segments
ADD CONSTRAINT osm_ways_with_segments_osm_id_pkey PRIMARY KEY (osm_id);

CREATE INDEX ON openstreetmap.osm_ways_with_segments USING gist (geom);

0 comments on commit 62dcbe3

Please sign in to comment.