-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load spatial data #750
Load spatial data #750
Changes from 7 commits
ec3190e
5e9c163
3a39a82
22f2aea
1af5151
be3fe05
4a783c0
b33ff1a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
spatial-data/c_05mr24.prj filter=lfs diff=lfs merge=lfs -text | ||
spatial-data/c_05mr24.shp filter=lfs diff=lfs merge=lfs -text | ||
spatial-data/c_05mr24.shx filter=lfs diff=lfs merge=lfs -text | ||
spatial-data/s_05mr24.dbf filter=lfs diff=lfs merge=lfs -text | ||
spatial-data/s_05mr24.prj filter=lfs diff=lfs merge=lfs -text | ||
spatial-data/s_05mr24.shx filter=lfs diff=lfs merge=lfs -text | ||
spatial-data/c_05mr24.dbf filter=lfs diff=lfs merge=lfs -text | ||
spatial-data/s_05mr24.shp filter=lfs diff=lfs merge=lfs -text | ||
spatial-data/cities500.txt filter=lfs diff=lfs merge=lfs -text |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Spatial data | ||
|
||
We store certain geospatial data in our own database and use it for some basic | ||
geospatial queries. In order for the site to work correctly locally, the data | ||
needs to be loaded first. The spatial data is stored in our repo using | ||
[git LFS](https://www.atlassian.com/git/tutorials/git-lfs). | ||
|
||
1. Install and enable git LFS. | ||
|
||
- **Linux**: [download instructions](https://docs.github.com/en/repositories/working-with-files/managing-large-files/installing-git-large-file-storage?platform=linux) | ||
- **Windows**: [download instructions](https://docs.github.com/en/repositories/working-with-files/managing-large-files/installing-git-large-file-storage?platform=windows) | ||
- **macOS**: the easiest way is to use Homebrew and run | ||
```sh | ||
brew install git-lfs | ||
``` | ||
Alternatively, there are manual [download instructions](https://docs.github.com/en/repositories/working-with-files/managing-large-files/installing-git-large-file-storage?platform=mac). | ||
|
||
2. Enable git LFS on your local machine by running | ||
|
||
```sh | ||
git lfs install | ||
``` | ||
|
||
3. Load the spatial data into your local database by running | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe for the future not-usses (or us, when we've long forgotten), we can reiterate that you need to zap the application locally here and also There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Went ahead and updated the doc, but also added spatial loading into the |
||
```sh | ||
node load-shapefiles.js | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we have to also have the dependencies from this script locally since this is running locally and not in the container? i.e. mariadb, shapefiles, etc. |
||
``` | ||
|
||
## Loading data into cloud environments | ||
|
||
Ensure you have the spatial data in your project in the `spatial-data` directory. | ||
If not, run `git lfs pull` to fetch it. Then, log into cloud.gov: | ||
|
||
```sh | ||
cf login --sso -a api.fr.cloud.gov | ||
``` | ||
|
||
And then run this utility script, indicating which environment you want to load | ||
data into. | ||
|
||
```sh | ||
./scripts/load-spatial-data.sh <environment> | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might go without saying but - make sure the docker container is running and healthy?