Description of the GeoJSON export format of the GET Export Report API.
The GeoJSON
format writes GeoJSON
to the HTTP response body.
It is required to specify both the <geojson>
configuration element and
the base table primaryKeyColumns
attribute to activate the geojson
format.
Format Parameter: geojson
Response Content-Type: application/vnd.geo+json
This format is only available under the Pull Reports™ Standard Edition license. To evaluate this format with a Pull Reports™ Community Edition license, enable evaluation mode.
Geometry configured via <geojson>
:
The geometry value of each GeoJSON feature
(such as a Point
, LineString
, or Polygon
)
for each export result row is the value of the base table column designated by the
<report>
's <geojson>
geometryColumnPath
attribute. The GeoJSON export format will only
create a feature
for result rows with a non-null value
for the column referenced by geometryColumnPath
.
If no <geojson>
geometryColumnPath
is designated, the format will return a 400
HTTP response status.
Feature distinctness respective to base table primary key columns:
The geojson
format will return a single GeoJSON feature per distinct result
row. Distinctness is determined from the base table
primaryKeyColumns
attribute.
FeatureCollection name
property:
For OK
responses, the GeoJSON FeatureCollection
has a
name
property that is:
Export from: [<catalog> name]:[<report> name]
"name
" is a non-standard GeoJSON property.
FeatureCollection filters
property:
For OK
responses, if at least one filter
parameter is specified, the
GeoJSON FeatureCollection
has a filters
property that is an array of
Objects each with a source
and readable
property whose values are,
respectively, the original filter parameter and human-readable filter definition.
"filters
" is a non-standard GeoJSON property.
FeatureCollection subqueries
property:
For OK
responses, if at least one <subquery>
's parent <table>
is included within the export result and the <subquery>
has a description, the
GeoJSON FeatureCollection
will have a subqueries
property that is an array of
Objects each with a tablePath
, displayName
, and description
property whose values are, respectively, the <subquery>
parent <table>
resource path
and displayName
, and <subquery>
description.
"subqueries
" is a non-standard GeoJSON property.
FeatureCollection totalCount
property:
For OK
responses, the GeoJSON FeatureCollection
has a
totalCount
property that is the total number of results to be returned
based on the filter
and columns
parameters. The total count value is irrespective of
limit
or offset
parameters and whether
records have non-null GeoJSON geometry.
"totalCount
" is a non-standard GeoJSON property.
Additional columns as feature
properties
:
The properties
Map of each feature
contains
the columns within the export request from the report's base
table plus any column from a table in a to-one descendant <relationship>
to the base table.
The property name is the <column>
's displayName
and the value is the <column>
's result row value. In the case of columns
in a to-one descendant relationship to the base table, the property name is prefixed with
the parent <table>
's displayName
.
The property value of <column>
s with a <url_template>
is a JavaScript Object with attributes "url" and "value" corresponding to the filled
URL template and result row value respectively.
Status Code: 200
GeoJSON responses without error follow this example:
link-{"type": "FeatureCollection" ,"name":"Export from: Class Information:Student Report" ,"totalCount":2 ,"exportLimitedReason":[Only present when license is missing or invalid] ,"filters":[ { "source":"/student@fname like 'J%'" ,"readable":"'Student', 'First Name' like 'J%'" } ,{ "source":"/student@lname = 'Hernadez'" ,"readable":"'Student', 'Last Name' = 'Hernandez'" } ] ,"subqueries":[ { "tablePath":"/student" ,"displayName":"Student" ,"description":"The student table has been restricted to records within the school of the current user." } ] ,"features": [ { "type": "Feature" ,"geometry":{ "type": "Point" ,"coordinates": [-105.0906227,40.5656519] } ,"properties":{ "Student ID":177 ,"First Name":"Joe" ,"Last Name":{"url":"/some/url/177","value":"Hernandez"} } } ,{ "type": "Feature" ,"geometry":{ "type": "Point" ,"coordinates": [-105.0994311,40.5673064] } ,"properties":{ "Student ID":213 ,"First Name":"Julia" ,"Last Name":{"url":"/some/url/213","value":"Hernandez"} } } ] }
Status Code: 400
and 500
GeoJSON responses with error follow this example:
{ // messages: array of message Strings. "messages":[ ... ] }
{ "messages":[ "The filter \"/student@id & 173\" does not match filter grammar. The \"Operator\" definition is missing or unparseable." ] }