If you are manipulating a lot of GeoJSON features/objects and want a quick CLI tool to filter and slice them, you should give jq a try! Since there are not many tutorials that exist on using jq to manage objects in the GeoJSON family, we hope that these few tricks will help you on your leaning journey.
+
If you are manipulating a lot of GeoJSON eatures/objects and want a quick CLI tool to filter and slice them, you should give jq a try! Since there are not many tutorials that exist on using jq to manage objects in the GeoJSON family, we hope that these few tricks will help you on your learning journey.
@@ -211,15 +211,15 @@
On this page
We are using a UNIX shell to run commands (zsh). If you are using powershell, you will need to adapt the following examples accordingly.
-
In these examples, we are using a GeoJSON file of Vermont Census Blocks with attributes related to our work on broadband data. While it is not a deeply nested JSON, it is perfect to illustrate some common use cases.
+
In these examples, we are using a GeoJSON file of Vermont census blocks with attributes related to our work on broadband data. While it is not a deeply nested JSON, it is perfect to illustrate some common use cases.
A quick check lets us know that it is 94 MB. Not “that” big but still decent.
-
First, lets see how many features it has. Here’s how we can approximate that:
+
First, let’s see how many features it has. Here’s how we can approximate that:
wc-l data/vt-bb.geojson# 24618 data/vt-bb.geojson
-
This is a decent estimate, but we are counting some rows at the top and bottom of the file that are not features (try head -n 5 and tail on it if you are curious).
+
This is a decent estimate, but we are counting some rows at the top and bottom of the file that are not features (try head -n 5 and tail on it if you are curious).