Skip to content
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

Optimize GeoJSON #29

Merged
merged 1 commit into from Nov 18, 2017
Merged

Conversation

abettermap
Copy link

@abettermap abettermap commented Nov 18, 2017

  • Remove unneeded fields (e.g. SHAPE_LEN, etc.)
  • Simplify (reduce number of vertices)
  • Reduce precision (e.g. 40.374187379751248 to 40.3742)
  • Minify

Closes #27

- Remove unneeded fields (e.g. `SHAPE_LEN`, etc.)
- Simplify (reduce number of vertices)
- Reduce precision (e.g. 40.374187379751248 to 40.3742)
- Minify
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 35addfe on abettermap:27.slim-geojson into b567415 on CodeForFoco:master.

@abettermap
Copy link
Author

@deidyomega

The geojson is about 10% of its original size and should suffice, but mainly I just want to make sure:

  • The GeoJSON still works, looks good enough overall, and is not missing any required fields.
  • From a general perspective, the shell script looks ok. Any advice/tips are appreciated as I'm still learning the basics!

You can't really test the actual script unless you install ogr2ogr (could use Docker too I guess), but I don't imagine it is something we will use very often anyway.

@deidyomega deidyomega merged commit 74f8fc1 into CodeForFoco:master Nov 18, 2017
@abettermap
Copy link
Author

@deidyomega

Even though we probably won't use it again and it's pretty basic, any advice on that shell script? For something that simple do you typically make functions and allow more arguments to be passed, or just make it quick and dirty and global like I did? I threw in some parameters and set some defaults for input and output files, but that's about it.

@deidyomega
Copy link
Contributor

Au contraire, the geojson updates from the state from time to time, so I imagine it will be run again.

As for the code itself, that's pretty standard shell scripting. It was and is designed to be a script. Not a full object oriented language.

I may have had a comment about where to install the program you were using, but other than that, it looks good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants