Precision Ag Directory

GeoJSON and Shapefile Basics

Boundaries and field features are stored in a few common formats.

What it is and why it matters

Boundaries and field features are stored in a few common formats. Knowing the basics of GeoJSON and shapefiles helps you move data between displays, apps and GIS software.

How to do it

  1. Know that a shapefile is a set of files (.shp, .shx, .dbf and usually .prj) that must stay together.
  2. Know that GeoJSON is a single text file that stores geometry and attributes, usually in longitude and latitude.
  3. Check the coordinate system, often WGS 84, before combining files.
  4. Open the file in a GIS viewer and check that it lands in the right place.
  5. Check attribute names and units, and rename columns that are cut off at 10 characters in shapefiles.
  6. Export in the format the destination requires, and test it by importing.

A worked example

A customer sends only a .shp file, and the software shows an error. The shop requests the .dbf, .shx and .prj files, zips them and imports the set. The boundary lands in the correct place. A second file imported from a GeoJSON file appears off the coast of Africa because its coordinates were in latitude-longitude order, and a reordering fixes it.

Mistakes to avoid

  • Sending only the .shp file.
  • Mixing projected and geographic coordinates.
  • Ignoring the .prj file.

Using the state directory with this guide

Providers in the directory should state which formats they accept. Ask for a sample import before you send everything.

  • Ask which coordinate system they use.
  • Ask whether attributes are kept.
  • Ask for the process to export your data.

Putting it to work

Start by trying the geojson and shapefile basics steps on one field or one machine, and keep the notes. Then use your state page to shortlist two or three local providers, ask each the questions above in writing, and compare the answers side by side before you spend money. Save the written answers with your farm records, together with your own test results and any quotes, so a later adviser can see what was decided and why.

General information only. Confirm equipment specifications, safety steps and regulations with the manufacturer, your land-grant extension office and the relevant agency.

Credible references

Farm.FM reading

More farm technology stories and humor are at farm.FM Farming.