Skip to content

Commit

Permalink
Improve DB comments, intro docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rustprooflabs committed May 2, 2023
1 parent 910ab74 commit c8f7185
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
6 changes: 2 additions & 4 deletions db/deploy/001.sql
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,6 @@ COMMENT ON PROCEDURE geofaker.point_in_place_landuse IS 'Uses osm.landuse_polygo
;


-- From: https://trac.osgeo.org/postgis/wiki/UserWikiRandomPoint

CREATE FUNCTION geofaker.n_points_in_polygon(geom geometry, num_points integer)
RETURNS SETOF geometry
LANGUAGE plpgsql VOLATILE
Expand Down Expand Up @@ -288,11 +286,11 @@ END
$$
;

COMMENT ON FUNCTION geofaker.n_points_in_polygon(GEOMETRY, INT) IS 'Creates N points randomly within the given polygon.';
COMMENT ON FUNCTION geofaker.n_points_in_polygon(GEOMETRY, INT) IS 'Creates N points randomly within the given polygon. From: https://trac.osgeo.org/postgis/wiki/UserWikiRandomPoint';



-- Ensure the required temp table exists, avoids deploy failure on next sproc
-- Ensure the required temp table exists, avoids deploy failure creating next sproc
CREATE TEMP TABLE IF NOT EXISTS faker_store_location
(
store_id BIGINT, place_osm_id BIGINT, place_osm_type TEXT, place_name TEXT,
Expand Down
21 changes: 14 additions & 7 deletions docs/src/geo-faker.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
# What is Geo Faker?

The the Geo Faker project creates fake store and customer data with geospatial
components based on OpenStreetMap. The use of OpenStreetMap data
Geo Faker is a project to create fake geospatial data in PostGIS.
The generated data is based on real OpenStreetMap region, using
the region of your choice. The whole process is easy
thanks to the [PgOSM Flex](https://pgosm-flex.com/)
project, which provides the main functionality used by Geo Faker.


The the Geo Faker project currently creates two tables with fake store
and fake customer data. The use of OpenStreetMap data
as a starting point provides a sense of realism. The use of `random()`
and to generate fake data avoids privacy concerns.
and other methods to generate fake data avoid privacy concerns.


> Warning: This project is in early development! Things will be changing quickly over the first few releases (e.g. before 0.5.0).
> Warning: This project is in early development! Things will be changing over the first few releases (e.g. before 0.5.0).


GeoFaker builds on [PgOSM Flex](https://pgosm-flex.com/), using its inherit ability
to be customized as a launching point to generate realistic looking, but absolutely fake
geospatial data.

----

Original Examples -- New examples coming soon!

Version 1

Expand Down
4 changes: 2 additions & 2 deletions docs/src/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ docker run --name geofaker -d --rm \
-v /etc/localtime:/etc/localtime:ro \
-e POSTGRES_USER=$POSTGRES_USER \
-e POSTGRES_PASSWORD=$POSTGRES_PASSWORD \
-p 5433:5432 -d rustprooflabs/geofaker
-p 5439:5432 -d rustprooflabs/geofaker

docker exec -it \
geofaker python3 docker/pgosm_flex.py \
--ram=8 \
--region=north-america/us \
--subregion=nebraska \
--subregion=colorado \
--layerset=faker
```

Expand Down

0 comments on commit c8f7185

Please sign in to comment.