Skip to content

Commit

Permalink
noise level corrected to also have neg values
Browse files Browse the repository at this point in the history
  • Loading branch information
wschuell committed Nov 21, 2023
1 parent 0ed5d7b commit 9ff385b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions gis_fillers/getters/generic_getters.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ def get(self, **kwargs):
else:
new_point = translate(
geom,
xoff=random.random() * self.noise_size,
yoff=random.random() * self.noise_size,
xoff=(random.random() - 0.5) * 2 * self.noise_size,
yoff=(random.random() - 0.5) * 2 * self.noise_size,
)
tmp.append(
{
Expand All @@ -60,8 +60,6 @@ def get(self, **kwargs):
)
new_gdf = gpd.GeoDataFrame(tmp, columns=["geometry"])
gdf["geometry"] = new_gdf["geometry"]
# gdf["lat"] = new_gdf["lat"]
# gdf["long"] = new_gdf["long"]
gdf["lat"] = gdf["geometry"].y
gdf["long"] = gdf["geometry"].x

Expand Down

0 comments on commit 9ff385b

Please sign in to comment.