While raster data can be stored in many different formats, GeoTIFF is one of the most common. GeoTIFF is a standard .tif image that also contains spatial data (e.g., coordinates and projections) and attributes. In general, however, any standard image (e.g., jpeg), if given proper spatial data, a practice called georeferencing, can act like a raster file.
Vector data includes data in the form of points, lines, and polygons along with any connected attributes. This type of data can come in several different formats, such as GeoJSON, CSV, and KML. Below you can see an array of data formats (found in Boston Open Data), GeoJason, CSV, KML, Shapefile, ESRI Rest API, and ArcGIS Hub Dataset. All contain the same food truck information:
While most platforms allow for some interoperability (the ability to work with several file formats), it is helpful to understand the basic distinction between them.
A CSV (comma-separated value) file is one of the most well-known formats for both spatial and non-spatial data and is created by using commas to separate each value of an attribute, with each line of the file equal to a single data record. If we return to thinking about structured data sets, comma-separated value file simply puts a comma in between attribute value, returning an output that looks something like this:
CSV data is useful simply because it is easy to create and manipulate in software like Excel or GoogleSheets, and these programs often allow you to export your data as a CSV to make it more interoperable. It is also easy to transform a CSV file into other formats, like GeoJSON, making it an easy "go-to" for sharing spatial data
CSV files are especially useful if you simply have a collection of point data. A file of this kind, sometimes called "XY data" or "long/lat data" can be easily imported into software like ArcGIS or QGIS in order to visualize it. (Note that it will not have any attributes).
GeoJSON is an open standard format for spatial data based on the JSON file format, which includes spatial information (points, lines, polygons) along with other qualitative and quantitative attributes. If you are using Python, a coding language, or platforms like Leaflet to manipulating spatial data, a GeoJSON export is probably your best choice.
The example below is a selection of GeoJSON data. It is organized similarly to the well-known CSV, with each feature containing a series of attributes, including (in this case) the geometry for point data, latitude, and longitude values for where the food truck will be located.
It's worth noting that there are tools for converting CSV to GeoJSON and vice versa.
A KML file (Keyhole-Markup-Language) is an open standard spatial data format most commonly associated with displaying geographic data in an Earth browser such as Google Earth. Although not necessarily as easily compatible with other platforms such as ArcGIS or Leaflet, there are a variety of conversion tools and plugins built-in within these platforms that may help ease the process.
A Shapefile is a simple format for storing the geometric location and attribute information of geographic features represented by points, lines, or polygons (areas), and is most commonly associated with ESRI's ArcGIS program suite. From within ArcGIS/QGIS, you may then export it as other file types, though this sometimes requires purchasing the Interoperability extension.