Storing Spatial Data

Spatial and temporal data can be stored as combined statements in Sub-Objects. This allows you to state in a Sub-Object like ‘Birth’ when/where a person was born, or in a Sub-Object like ‘Place of Residence’ when/where a person lived.

When you create an Object Type that has a Sub-Object with default settings, you have three ways of entering spatial data: latitude/longitude points, geometries, or location references.   In this guide we will go over these three options.

We will demonstrate how to use these options by means of the Type that was set up in the guide on creating your first Object Type. This Object Type ‘Person’ has three Sub-Objects: ‘Birth’, ‘Place of Residence’ and ‘Death’. In this guide we will add ‘Place of Residence’ Sub-Objects with different kinds of locations.

Three 'Place of Residence' Sub-Objects, each shows an option for making spatial statements in nodegoat.

Go to the Data section of your environment, open the Object Type ‘Person’, and add a new Object or edit an existing one. Go to the Sub-Objects Editor and click on the plus icon next to ‘Place of Residence’. You can enter a period for the date. Under the date section of this Sub-Object you will see the settings that you can use to define a location. By means of the dropdown menu you can choose what kind of location you want to enter: ‘Reference’, ‘Geometry’, or ‘Point’.

Location: Point  

Change the kind of location to ‘Point’ to be able to enter latitude and longitude values. These values have to be entered as decimal degrees, e.g. 51.5 and 10.5 for 'Germany', or 52.074057 and 4.335130 for 'Binckhorstlaan 36, The Hague, The Netherlands' (nodegoat uses the WGS84 geographic coordinate system, EPSG:4326). If you have latitude and longitude values available, you can enter the latitude value in the first input field and the longitude value in the second input field.

If you do not have latitude and longitude values available, you can click the green ‘map’ button to open a map that allows you to select a latitude and longitude value. You can drag the map and zoom in to find the location you are looking for. You can look for a city and click on it to select a latitude and longitude value for this city, or zoom in to street level and pick the latitude and longitude value for a building, street, or monument. After you have entered a latitude and longitude value you can save the Object and run the geographical visualisation to inspect this point on the map.

Location: Geometry  

Change the kind of location to ‘Geometry’ to be able to enter geometrical data: polygons, lines, points, or combinations of this. You can use this feature to define areas, borders, or any other kind of space. This data has to be entered in GeoJSON format, which is a standard used to describe geographical data. There are several online resources that publish historical spatial data in GeoJSON format, e.g. the New York University Spatial Data Repository. In case you have spatial data available in another format (e.g. shapefile, TopoJSON), you can use an online converter like mapshaper to transform your data to GeoJSON.

The spatial data in the GeoJSON file may be presented in any geographic coordinate system in the EPSG registry. By default nodegoat interprets data using the WGS84 geographic coordinate system (EPSG:4326). If you want to store spatial data in a non-WGS84 geographic coordinate system, like CH1903/LV03 (EPSG:21781), you can specify the 'Coordinate Reference System' by means of the following format.

{
    "crs": {
        "type": "name",
        "properties": {
            "name": "EPSG:21781"
        }
    },
    "type": "Point",
    "coordinates": [
        600977.856021,
        199700.412026
    ]
}

If you do not have geometrical data available, you can create your own GeoJSON data by means of a service provided by geojson.io. You can access this service by clicking the green ‘create’ button that is shown below the input field. You can use the polygon option to draw an area and copy the generated GeoJSON data to your clipboard. Go back to your nodegoat environment and paste the copied GeoJSON data into the input field. Save the object and run the geographic visualisation to inspect this data on a map.

Use the geojson.io service to draw polygons and generate GeoJSON data.

Location: Reference  

Change the kind of location to ‘Reference’ to be able to make a reference to another Object in your environment. By means of this option you do not store the actual spatial statement in this Object, but you reuse a spatial statement that has been made in a Sub-Object of an other Object. The idea behind this is that you can quickly reuse locations that reoccur in your research project.

This means that in a project on correspondence networks, you would not store a latitude and longitude value for the sending and receiving locations of each letter, but you would use another Object Type in which you would store the various locations only once. The Object 'Berlin' of the Type 'City' would then include a Sub-Object with the latitude value 52.5243 and longitude value 13.4105. Every time you encounter a letter that was sent from Berlin, you make a reference to the Object 'Berlin'. This approach saves you a lot of time, as you are able to quickly geocode many letters.

Once the kind of location is set to 'Reference', you can select an Object Type that you want to use to make this location reference. The Object Type 'City' has been made available to you by default and contains over 130.000 Objects of cities. All these Objects have a latitude and longitude value stored in their Sub-Object 'Located'. To select a city, start to type in the input field with the magnifying glass and click on one of the options that appear. Save the object and run the geographic visualisation to inspect this data on a map.

If the reference you want to make is not available as an Object of the Type 'City', you can add it as a new Object there.

When you work with location references, it is good to know that this reference can span and inherit multiple levels. You can locate a university by storing a location reference to an Object of a city. Next, you can make a statement that a person is a professor at a university and use the Object of this university for the location reference.

If you do not want to use modern day cities as location references, but any other kind of list of locations (ancient villages, monuments, archeological findings, etc.) you can create your own list of locations. The next guide will show you how to create your own gazetteer and how to link this to any other Object in your project.