GeoJSON

A format for encoding various geographic data structures using JSON (JavaScript Object Notation), a lightweight data-interchange format. GeoJSON extends JSON to include data about geographical features and their non-spatial attributes. Let’s explore some illustrative examples of GeoJSON data structures:

1. Point

{
    "type": "Feature",
    "geometry": {
        "type": "Point",
        "coordinates": [-86.13379, 39.7684] 
    },
    "properties": {
        "name": "Monument Circle, Indianapolis"
    }
}

2. MultiPoint

{
    "type": "Feature",
    "geometry": {
        "type": "MultiPoint",
        "coordinates": [
            [-86.13379, 39.7684],  // Monument Circle
            [-86.15804, 39.76638]   // Indiana Statehouse
        ]
    },
    "properties": {
        "name": "Landmarks in Indianapolis"
    }
}

3. LineString

{
    "type": "Feature",
    "geometry": {
        "type": "LineString",
        "coordinates": [
            [-86.16211, 39.77675],  // Start of the Cultural Trail
            [-86.15383, 39.77083],
            [-86.14528, 39.76389]   // End near Mass Ave
        ]
    },
    "properties": {
        "name": "Section of the Indianapolis Cultural Trail"
    }
}

4. Polygon

{
    "type": "Feature",
    "geometry": {
        "type": "Polygon",
        "coordinates": [
            [
                [-86.16404, 39.79518], 
                [-86.13256, 39.79518],
                [-86.13256, 39.76121],
                [-86.16404, 39.76121],
                [-86.16404, 39.79518]
            ]
        ]
    },
    "properties": {
        "name": "Approximate boundary of downtown Indianapolis"
    }
}

5. MultiPolygon

{
    "type": "Feature",
    "geometry": {
        "type": "MultiPolygon",
        "coordinates": [
            [
                [ 
                    [-86.2, 39.8], 
                    [-86.1, 39.8],
                    [-86.1, 39.7],
                    [-86.2, 39.7],
                    [-86.2, 39.8]
                ]
            ],
            [
                [
                    [-86.3, 39.9], 
                    [-86.2, 39.9],
                    [-86.2, 39.8],
                    [-86.3, 39.8],
                    [-86.3, 39.9]
                ]
            ]
        ]
    },
    "properties": {
        "name": "Two separate areas near Indianapolis"
    }
}

Key Points:

This format is widely used in web mapping and geographic information systems (GIS) due to its simplicity, ease of use, and compatibility with web technologies.

Exit mobile version