PropertyMap

PropertyMaps are used throughout the GeognoSIS HTTP API to allow a number of value pairs to be sent or received as part of the request. They are structured using JSON and can be identified by the PropertyMap.

PropertyMap as part of a response

Some requests such as

http://server:port/geognosis/9/sessions/session_id/map/overlays/0/dataset/properties.json

will return a PropertyMap of data:

{"Data":
	{"PropertyMap":
		{"_idNextItem&":411,
		"_nItems&":410,
		"_size@":{"ui8":"18657092"},
		"_name$":"C:\\Data\\NaturalEngland\\CountryParksBDS.bds", 
               "_projection$":"PROJCS[\"OSGB 1936.British National 
               Grid\",GEOGCS[\"Latitude/Longitude.OGC.OSGB_1936\",DATUM[\"OSGB_1936\",SPHEROID[\"Airy 1830\",
               6377563.396,299.32496460007]],PRIMEM[\"Greenwich\",0],UNIT[\"degrees\",0.0174532925199433]],
               PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"Central_Meridian\",2],PARAMETER[\"False_Easting\",
               400000],PARAMETER[\"False_Northing\",100000],PARAMETER[\"Latitude_of_Origin\",49],
		PARAMETER[\"Scale_Factor\",0.9996012717],UNIT[\"m\",1]]",
		"_report$":
			{"Dataset":
				{"PropertyMap":
                                       {"_name$":"C:\\Data\\NaturalEngland\\CountryParksBDS.bds","_crs$":
					"OSGB 1936.BritishNationalGrid",
                                        "_epsg&":27700,"_loadTime#":0.386679338934585,"_bV6FileFormat&":false
					}
				}
			},"_epsg&":27700
		}
	},
"Up":"../dataset.json",
"Representations":"properties",
"Operations":"properties.json?"
}

Whilst most information is returned as pairs structured as "property_name":property_value there are cases where a PropertyMap is returned within the PropertyMap response.

In the response above, the _report$ property contains a range of information about the layer and load times so requires a number of items which are best returned as a PropertyMap.

Using a PropertyMap in a PATCH request

You also need to send a PropertyMap as part of the request if the request would return the information to you as a PropertyMap.

The following request asks for the properties of a theme legend:

http://server:port/geognosis/9/sessions/session_id/map/overlays/1/themes/1/properties.json

Response

{"Data":{"PropertyMap":{"_formula$":"DescriptiveGroups$","_nValues&":16,"_title$":"DescriptiveGroups",
"_text_opaque&":true,"_brush$":{"Brush":{"Style":"Solid","Colour":{"RGBA":[255,255,255,0]}}},
"_font$":"Segoe UI","_pen$":{"Pen":{"Colour":{"RGBA":[0,0,0,0]},"LineCap":"Round","LineJoin":"Round"}}}},
"Up":"../1.json","Representations":"properties","Operations":"properties.json?"}

The legend looks like this:

Note: You can request the legend using http://localhost:4355/geognosis/8.0/sessions/123/map/overlays/1/themes/1.png

To update the title of the legend, use a PATCH request:

http://localhost:4355/GeognoSIS/8.0/Sessions/123/Map/Overlays/1/Themes/1/Properties.json

adding the following as the raw payload:

{"PropertyMap":{"_title$": "MasterMap Themes"}}

The HTTP API always Base64-encodes Item bookmarks as these can contain non-URL-friendly characters (e.g. /.)