index.rst 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715
  1. .. _extensions_sldservice:
  2. SLD REST Service
  3. ================
  4. The SLD Service is a GeoServer REST service that can be used to create SLD styles on published GeoServer
  5. layers doing a classification on the layer data, following user provided directives.
  6. The purpose of the service is to allow clients to dynamically publish data and create simple styles on it.
  7. All the services are published under the common prefix ``/rest/sldservice/{layer}``, where **layer** is
  8. the layer to classify/query.
  9. Query Vector Data Attributes
  10. ----------------------------
  11. ``/attributes[.<format>]``
  12. .. list-table::
  13. :header-rows: 1
  14. * - Method
  15. - Action
  16. - Status code
  17. - Formats
  18. - Default Format
  19. * - GET
  20. - Gets the list of attributes for the given layer (of vector type)
  21. - 200
  22. - HTML, XML, JSON
  23. - HTML
  24. The service can be used to get the attributes list for the given vector layer.
  25. This can be used by a client as a prerequisite for the **classify** service, to
  26. get all the attributes usable for classification and let the user choose one.
  27. Examples
  28. ~~~~~~~~~~
  29. Get attributes for the states layer, in XML format
  30. .. code-block:: console
  31. curl -v -u admin:geoserver -XGET
  32. http://localhost:8080/geoserver/rest/sldservice/states/attributes.xml
  33. .. code-block:: xml
  34. <Attributes layer="states">
  35. <Attribute>
  36. <name>P_FEMALE</name>
  37. <type>Double</type>
  38. </Attribute>
  39. <Attribute>
  40. <name>HOUSHOLD</name>
  41. <type>Double</type>
  42. </Attribute>
  43. <Attribute>
  44. <name>SERVICE</name>
  45. <type>Double</type>
  46. </Attribute>
  47. ...
  48. </Attributes>
  49. Get attributes for the states layer, in JSON format
  50. .. code-block:: console
  51. curl -v -u admin:geoserver -XGET
  52. http://localhost:8080/geoserver/rest/sldservice/states/attributes.json
  53. .. code-block:: javascript
  54. {
  55. "Attributes":{
  56. "@layer":"states",
  57. "Attribute":[
  58. {
  59. "name":"P_FEMALE",
  60. "type":"Double"
  61. },
  62. {
  63. "name":"HOUSHOLD",
  64. "type":"Double"
  65. },
  66. {
  67. "name":"SERVICE",
  68. "type":"Double"
  69. },
  70. ...
  71. ]
  72. }
  73. }
  74. Classify Raster and Vector Data
  75. -------------------------------
  76. ``/classify[.<format>]``
  77. .. list-table::
  78. :header-rows: 1
  79. * - Method
  80. - Action
  81. - Status code
  82. - Formats
  83. - Default Format
  84. * - GET
  85. - Create a set of SLD Rules for the given layer
  86. - 200
  87. - HTML, XML, JSON
  88. - HTML
  89. The service can be used to create a set of SLD rules for the given vector
  90. layer, specifying the **attribute** used for classification, the **classification
  91. type** (equalInterval, uniqueInterval, quantile, jenks, equalArea, standardDeviation) and one of the
  92. **predefined color ranges** (red, blue, gray, jet, random, custom), together
  93. with some other optional parameters.
  94. The same can be applied on a raster layer too, in order to classify its contents. Data from the first
  95. band is used by default, but a different one can be selected.
  96. Using the **CUSTOM** ColorMap, startColor and endColor (and optionally midColor)
  97. have to be specified.
  98. The parameters usable to customize the SLD are:
  99. .. list-table::
  100. :header-rows: 1
  101. * - Parameter
  102. - Description
  103. - Values
  104. - Default Value
  105. * - intervals
  106. - Number of intervals (rules) for the SLD
  107. - integer numeric value
  108. - 2
  109. * - attribute (mandatory)
  110. - Classification attribute
  111. - For vector layers, one of the layer attribute names, for raster layers, a band number (starting from one, like in the raster symbolizer)
  112. - No default for vectors, "1" for rasters
  113. * - method
  114. - Classification method
  115. - equalInterval, uniqueInterval, quantile, jenks, equalArea, standardDeviation (intervals above and below the mean of one standard deviation, available for vectors only)
  116. - equalInterval
  117. * - open
  118. - open or closed ranges
  119. - true, false
  120. - false
  121. * - reverse
  122. - normal or inverted ranges
  123. - true, false
  124. - false
  125. * - normalize
  126. - normalize (cast) attribute to double type (needed by some stores to handle integer types correctly)
  127. - true, false
  128. - false
  129. * - ramp
  130. - color ranges to use
  131. - red, blue, gray, jet, random, custom
  132. - red
  133. * - startColor
  134. - starting color for the custom ramp
  135. -
  136. -
  137. * - endColor
  138. - ending color for the custom ramp
  139. -
  140. -
  141. * - midColor
  142. - central color for the custom ramp
  143. -
  144. -
  145. * - colors
  146. - list of comma delimited colors for the custom ramp (use this instead of startColor, endColor and midColor to specify colors in more detail)
  147. -
  148. -
  149. * - strokeColor
  150. - color of the stroke, for points and polygons
  151. -
  152. - BLACK
  153. * - strokeWeight
  154. - weight of the stroke, for points and polygons (use a negative value to not include stroke in style)
  155. -
  156. - 1
  157. * - pointSize
  158. - size of points
  159. -
  160. - 15
  161. * - fullSLD
  162. - create a full valid SLD document, instead of the Rules fragment only
  163. - true or false
  164. - false
  165. * - cache
  166. - append caching headers to the responses
  167. - expire time in seconds, use 0 to disable cache
  168. - 600 (10 minutes)
  169. * - viewparams
  170. - allows use of parametric views
  171. - view parameters in the usual format (<key>:<value>;...;<keyN>:<valueN>)
  172. -
  173. * - customClasses
  174. - allows specifying a set of custom classes (client driven style); no classes calculation will happen (method, intervals, etc. are ignored)
  175. - classes in the following format: <min>,<max>,<color>;...;<minN>,<maxN>,<colorN>)
  176. -
  177. * - bbox
  178. - allows to run the classification on a specific bounding box. Recommended when the overall dataset is too big, and the classification can be performed on a smaller dataset, or to enhance the visualization of a particular subset of data
  179. - same syntax as WMS/WFS, expected axis order is east/north unless the spatial reference system is explicitly provided, ``minx,miny,max,maxy[,srsName]``
  180. -
  181. * - stddevs
  182. - limits the data the classifier is working on to a range of "stddevs" standard deviations around the mean value.
  183. - a positive floating-point number (e.g., '1', '2.5', '3').
  184. -
  185. * - env
  186. - a list of environment variables that the underlying layer may be using to select features/rasters to be
  187. classified (e.g., by using the ``filter`` in vector and mosaic layer definitions)
  188. - a semicolon separate list of name to value assignments, e.g. ``name1:value1;name2:value2;name3:value3;...``
  189. -
  190. * - continuous
  191. - used only for raster layers, if set to true will generate a raster palette that interpolates linearly between classified values
  192. - true|false
  193. -
  194. * - percentages
  195. - allows to obtain percentages of values in each class. For raster layers they will be included in the label of the ColorMapEntry,
  196. while for vector layer they will be placed in the rule title; in both cases they will be placed at the end of the text between parentheses.
  197. - true|false
  198. - false
  199. * - percentagesScale
  200. - number of digits of percentages
  201. - integer numeric value
  202. - 1
  203. * - intervalsForUnique
  204. - Max number of intervals (rules or ColorMapEntry) that a uniqueIntervalClassification can produce. If the number of classes produced by the classification is greater than the number specified by this parameter, the service will return an error message.
  205. - integer numeric value
  206. - -1
  207. More on unique intervals classification
  208. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  209. The ``intervalsForUnique`` parameter allows the user to control the number of classes generated by the classification, that is important when dealing with large dataset. In this case the check on the classes' number will be made once the unique interval classification has been performed.
  210. Additionally it is possible to define a system variable named ``org.geoserver.sldService.maxUniqueRange`` to define the maximum number of values that can be collected by the classification (default value is ``1024``). This control is performed before the unique interval classification is performed on the data. If the number of values is found to be greater than the system variable value, the service will return an error message.
  211. Examples
  212. ~~~~~~~~~~
  213. A default (equalInterval) classification on the states layer LAND_KM attribute using
  214. a red based color range.
  215. .. code-block:: console
  216. curl -v -u admin:geoserver -XGET
  217. http://localhost:8080/geoserver/rest/sldservice/states/classify.xml?attribute=LAND_KM&ramp=red
  218. .. code-block:: xml
  219. <Rules>
  220. <Rule>
  221. <Title> &gt; 159.1 AND &lt;= 344189.1</Title>
  222. <Filter>
  223. <And>
  224. <PropertyIsGreaterThanOrEqualTo>
  225. <PropertyName>LAND_KM</PropertyName>
  226. <Literal>159.1</Literal>
  227. </PropertyIsGreaterThanOrEqualTo>
  228. <PropertyIsLessThanOrEqualTo>
  229. <PropertyName>LAND_KM</PropertyName>
  230. <Literal>344189.1</Literal>
  231. </PropertyIsLessThanOrEqualTo>
  232. </And>
  233. </Filter>
  234. <PolygonSymbolizer>
  235. <Fill>
  236. <CssParameter name="fill">#680000</CssParameter>
  237. </Fill>
  238. <Stroke/>
  239. </PolygonSymbolizer>
  240. </Rule>
  241. <Rule>
  242. <Title> &gt; 344189.1 AND &lt;= 688219.2</Title>
  243. <Filter>
  244. <And>
  245. <PropertyIsGreaterThan>
  246. <PropertyName>LAND_KM</PropertyName>
  247. <Literal>344189.1</Literal>
  248. </PropertyIsGreaterThan>
  249. <PropertyIsLessThanOrEqualTo>
  250. <PropertyName>LAND_KM</PropertyName>
  251. <Literal>688219.2</Literal>
  252. </PropertyIsLessThanOrEqualTo>
  253. </And>
  254. </Filter>
  255. <PolygonSymbolizer>
  256. <Fill>
  257. <CssParameter name="fill">#B20000</CssParameter>
  258. </Fill>
  259. <Stroke/>
  260. </PolygonSymbolizer>
  261. </Rule>
  262. </Rules>
  263. A uniqueInterval classification on the states layer SUB_REGION attribute using
  264. a red based color range.
  265. .. code-block:: console
  266. curl -v -u admin:geoserver -XGET
  267. http://localhost:8080/geoserver/rest/sldservice/states/classify.xml?attribute=SUB_REGION&ramp=red&method=uniqueInterval
  268. .. code-block:: xml
  269. <Rules>
  270. <Rule>
  271. <Title>E N Cen</Title>
  272. <Filter>
  273. <PropertyIsEqualTo>
  274. <PropertyName>SUB_REGION</PropertyName>
  275. <Literal>E N Cen</Literal>
  276. </PropertyIsEqualTo>
  277. </Filter>
  278. <PolygonSymbolizer>
  279. <Fill>
  280. <CssParameter name="fill">#330000</CssParameter>
  281. </Fill>
  282. <Stroke/>
  283. </PolygonSymbolizer>
  284. </Rule>
  285. <Rule>
  286. <Title>E S Cen</Title>
  287. <Filter>
  288. <PropertyIsEqualTo>
  289. <PropertyName>SUB_REGION</PropertyName>
  290. <Literal>E S Cen</Literal>
  291. </PropertyIsEqualTo>
  292. </Filter>
  293. <PolygonSymbolizer>
  294. <Fill>
  295. <CssParameter name="fill">#490000</CssParameter>
  296. </Fill>
  297. <Stroke/>
  298. </PolygonSymbolizer>
  299. </Rule>
  300. ...
  301. </Rules>
  302. A uniqueInterval classification on the states layer SUB_REGION attribute using
  303. a red based color range and 3 intervals.
  304. .. code-block:: console
  305. curl -v -u admin:geoserver -XGET
  306. http://localhost:8080/geoserver/rest/sldservice/states/classify.xml?attribute=SUB_REGION&ramp=red&method=uniqueInterval&intervals=3
  307. .. code-block:: xml
  308. <string>Intervals: 9</string>
  309. A quantile classification on the states layer PERSONS attribute with a custom
  310. color ramp and 3 **closed** intervals.
  311. .. code-block:: console
  312. curl -v -u admin:geoserver -XGET
  313. http://localhost:8080/geoserver/rest/sldservice/states/classify.xml?attribute=PERSONS&ramp=CUSTOM&method=quantile&intervals=3&startColor=0xFF0000&endColor=0x0000FF
  314. .. code-block:: xml
  315. <Rules>
  316. <Rule>
  317. <Title> &gt; 453588.0 AND &lt;= 2477574.0</Title>
  318. <Filter>
  319. <And>
  320. <PropertyIsGreaterThanOrEqualTo>
  321. <PropertyName>PERSONS</PropertyName>
  322. <Literal>453588.0</Literal>
  323. </PropertyIsGreaterThanOrEqualTo>
  324. <PropertyIsLessThanOrEqualTo>
  325. <PropertyName>PERSONS</PropertyName>
  326. <Literal>2477574.0</Literal>
  327. </PropertyIsLessThanOrEqualTo>
  328. </And>
  329. </Filter>
  330. <PolygonSymbolizer>
  331. <Fill>
  332. <CssParameter name="fill">#FF0000</CssParameter>
  333. </Fill>
  334. <Stroke/>
  335. </PolygonSymbolizer>
  336. </Rule>
  337. <Rule>
  338. <Title> &gt; 2477574.0 AND &lt;= 4866692.0</Title>
  339. <Filter>
  340. <And>
  341. <PropertyIsGreaterThan>
  342. <PropertyName>PERSONS</PropertyName>
  343. <Literal>2477574.0</Literal>
  344. </PropertyIsGreaterThan>
  345. <PropertyIsLessThanOrEqualTo>
  346. <PropertyName>PERSONS</PropertyName>
  347. <Literal>4866692.0</Literal>
  348. </PropertyIsLessThanOrEqualTo>
  349. </And>
  350. </Filter>
  351. <PolygonSymbolizer>
  352. <Fill>
  353. <CssParameter name="fill">#AA0055</CssParameter>
  354. </Fill>
  355. <Stroke/>
  356. </PolygonSymbolizer>
  357. </Rule>
  358. <Rule>
  359. <Title> &gt; 4866692.0 AND &lt;= 2.9760021E7</Title>
  360. <Filter>
  361. <And>
  362. <PropertyIsGreaterThan>
  363. <PropertyName>PERSONS</PropertyName>
  364. <Literal>4866692.0</Literal>
  365. </PropertyIsGreaterThan>
  366. <PropertyIsLessThanOrEqualTo>
  367. <PropertyName>PERSONS</PropertyName>
  368. <Literal>2.9760021E7</Literal>
  369. </PropertyIsLessThanOrEqualTo>
  370. </And>
  371. </Filter>
  372. <PolygonSymbolizer>
  373. <Fill>
  374. <CssParameter name="fill">#5500AA</CssParameter>
  375. </Fill>
  376. <Stroke/>
  377. </PolygonSymbolizer>
  378. </Rule>
  379. </Rules>
  380. A quantile classification on the states layer PERSONS attribute with a custom
  381. color ramp and 3 **open** intervals.
  382. .. code-block:: console
  383. curl -v -u admin:geoserver -XGET
  384. http://localhost:8080/geoserver/rest/sldservice/states/classify.xml?attribute=PERSONS&ramp=CUSTOM&method=quantile&intervals=3&startColor=0xFF0000&endColor=0x0000FF&open=true
  385. .. code-block:: xml
  386. <Rules>
  387. <Rule>
  388. <Title> &lt;= 2477574.0</Title>
  389. <Filter>
  390. <PropertyIsLessThanOrEqualTo>
  391. <PropertyName>PERSONS</PropertyName>
  392. <Literal>2477574.0</Literal>
  393. </PropertyIsLessThanOrEqualTo>
  394. </Filter>
  395. <PolygonSymbolizer>
  396. <Fill>
  397. <CssParameter name="fill">#FF0000</CssParameter>
  398. </Fill>
  399. <Stroke/>
  400. </PolygonSymbolizer>
  401. </Rule>
  402. <Rule>
  403. <Title> &gt; 2477574.0 AND &lt;= 4866692.0</Title>
  404. <Filter>
  405. <And>
  406. <PropertyIsGreaterThan>
  407. <PropertyName>PERSONS</PropertyName>
  408. <Literal>2477574.0</Literal>
  409. </PropertyIsGreaterThan>
  410. <PropertyIsLessThanOrEqualTo>
  411. <PropertyName>PERSONS</PropertyName>
  412. <Literal>4866692.0</Literal>
  413. </PropertyIsLessThanOrEqualTo>
  414. </And>
  415. </Filter>
  416. <PolygonSymbolizer>
  417. <Fill>
  418. <CssParameter name="fill">#AA0055</CssParameter>
  419. </Fill>
  420. <Stroke/>
  421. </PolygonSymbolizer>
  422. </Rule>
  423. <Rule>
  424. <Title> &gt; 4866692.0</Title>
  425. <Filter>
  426. <PropertyIsGreaterThan>
  427. <PropertyName>PERSONS</PropertyName>
  428. <Literal>4866692.0</Literal>
  429. </PropertyIsGreaterThan>
  430. </Filter>
  431. <PolygonSymbolizer>
  432. <Fill>
  433. <CssParameter name="fill">#5500AA</CssParameter>
  434. </Fill>
  435. <Stroke/>
  436. </PolygonSymbolizer>
  437. </Rule>
  438. </Rules>
  439. Classify Raster Data
  440. --------------------
  441. This resource is deprecated, as the classify endpoint can now also handle raster data
  442. ``/rasterize[.<format>]``
  443. .. list-table::
  444. :header-rows: 1
  445. * - Method
  446. - Action
  447. - Status code
  448. - Formats
  449. - Default Format
  450. * - GET
  451. - Create a ColorMap SLD for the given layer (of coverage type)
  452. - 200
  453. - HTML, XML, JSON, SLD
  454. - HTML
  455. The service can be used to create a ColorMap SLD for the given coverage,
  456. specifying the **type of ColorMap** (VALUES, INTERVALS, RAMP) and one of the
  457. **predefined color ranges** (RED, BLUE, GRAY, JET, RANDOM, CUSTOM).
  458. Using the **CUSTOM** ColorMap, startColor and endColor (and optionally midColor)
  459. have to be specified.
  460. The parameters usable to customize the ColorMap are:
  461. .. list-table::
  462. :header-rows: 1
  463. * - Parameter
  464. - Description
  465. - Values
  466. - Default Value
  467. * - min
  468. - Minimum value for classification
  469. - double numeric value
  470. - 0.0
  471. * - max
  472. - Maximum value for classification
  473. - double numeric value
  474. - 100.0
  475. * - classes
  476. - Number of classes for the created map
  477. - integer numeric value
  478. - 100
  479. * - digits
  480. - Number of fractional digits for class limits (in labels)
  481. - integer numeric value
  482. - 5
  483. * - type
  484. - ColorMap type
  485. - INTERVALS, VALUES, RAMP
  486. - RAMP
  487. * - ramp
  488. - ColorMap color ranges
  489. - RED, BLUE, GRAY, JET, RANDOM, CUSTOM
  490. - RED
  491. * - startColor
  492. - starting color for the CUSTOM ramp
  493. -
  494. -
  495. * - endColor
  496. - ending color for the CUSTOM ramp
  497. -
  498. -
  499. * - midColor
  500. - central color for the CUSTOM ramp
  501. -
  502. -
  503. * - cache
  504. - append caching headers to the responses
  505. - expire time in seconds, use 0 to disable cache
  506. - 600 (10 minutes)
  507. Examples
  508. ~~~~~~~~~~
  509. A RED color ramp with 5 classes
  510. .. code-block:: console
  511. curl -v -u admin:geoserver -XGET
  512. http://localhost:8080/geoserver/rest/sldservice/sfdem/rasterize.sld?min=0&max=100&classes=5&type=RAMP&ramp=RED&digits=1
  513. .. code-block:: xml
  514. <?xml version="1.0" encoding="UTF-8"?>
  515. <sld:StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:sld="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" version="1.0.0">
  516. <sld:NamedLayer>
  517. <sld:Name>Default Styler</sld:Name>
  518. <sld:UserStyle>
  519. <sld:Name>Default Styler</sld:Name>
  520. <sld:FeatureTypeStyle>
  521. <sld:Name>name</sld:Name>
  522. <sld:FeatureTypeName>gray</sld:FeatureTypeName>
  523. <sld:Rule>
  524. <sld:RasterSymbolizer>
  525. <sld:ColorMap>
  526. <sld:ColorMapEntry color="#000000" opacity="0" quantity="-1.0E-9" label="transparent"/>
  527. <sld:ColorMapEntry color="#420000" opacity="1.0" quantity="0.0" label="0.0"/>
  528. <sld:ColorMapEntry color="#670000" opacity="1.0" quantity="25.0" label="25.0"/>
  529. <sld:ColorMapEntry color="#8B0000" opacity="1.0" quantity="50.0" label="50.0"/>
  530. <sld:ColorMapEntry color="#B00000" opacity="1.0" quantity="75.0" label="75.0"/>
  531. <sld:ColorMapEntry color="#D40000" opacity="1.0" quantity="100.0" label="100.0"/>
  532. </sld:ColorMap>
  533. </sld:RasterSymbolizer>
  534. </sld:Rule>
  535. </sld:FeatureTypeStyle>
  536. </sld:UserStyle>
  537. </sld:NamedLayer>
  538. </sld:StyledLayerDescriptor>
  539. A CUSTOM color ramp with 5 classes, with colors ranging from RED (0xFF0000) to BLUE (0x0000FF).
  540. .. code-block:: console
  541. curl -v -u admin:geoserver -XGET
  542. http://localhost:8080/geoserver/rest/sldservice/sfdem/rasterize.sld?min=0&max=100&classes=5&type=RAMP&ramp=CUSTOM&digits=1&startColor=0xFF0000&endColor=0x0000FF
  543. .. code-block:: xml
  544. <?xml version="1.0" encoding="UTF-8"?>
  545. <sld:StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:sld="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" version="1.0.0">
  546. <sld:NamedLayer>
  547. <sld:Name>Default Styler</sld:Name>
  548. <sld:UserStyle>
  549. <sld:Name>Default Styler</sld:Name>
  550. <sld:FeatureTypeStyle>
  551. <sld:Name>name</sld:Name>
  552. <sld:FeatureTypeName>gray</sld:FeatureTypeName>
  553. <sld:Rule>
  554. <sld:RasterSymbolizer>
  555. <sld:ColorMap>
  556. <sld:ColorMapEntry color="#000000" opacity="0" quantity="-1.0E-9" label="transparent"/>
  557. <sld:ColorMapEntry color="#FF0000" opacity="1.0" quantity="0.0" label="0.0"/>
  558. <sld:ColorMapEntry color="#CC0033" opacity="1.0" quantity="25.0" label="25.0"/>
  559. <sld:ColorMapEntry color="#990066" opacity="1.0" quantity="50.0" label="50.0"/>
  560. <sld:ColorMapEntry color="#660099" opacity="1.0" quantity="75.0" label="75.0"/>
  561. <sld:ColorMapEntry color="#3300CC" opacity="1.0" quantity="100.0" label="100.0"/>
  562. </sld:ColorMap>
  563. </sld:RasterSymbolizer>
  564. </sld:Rule>
  565. </sld:FeatureTypeStyle>
  566. </sld:UserStyle>
  567. </sld:NamedLayer>
  568. </sld:StyledLayerDescriptor>
  569. Capabilities
  570. ------------
  571. ``/capabilities[.<format>]``
  572. .. list-table::
  573. :header-rows: 1
  574. * - Method
  575. - Action
  576. - Status code
  577. - Formats
  578. - Default Format
  579. * - GET
  580. - Returns the supported classification's methods for rasters and vectors
  581. - 200
  582. - JSON, XML
  583. - JSON
  584. The service can be used to retrieve the capabilities of the SldService plugin. At the time of writing the endpoint
  585. will simply return a list of supported classification's methods for both raster and vector data. It can be useful i.e. for clients who might be dealing with different GeoServer versions to know which classification methods is available to be used.
  586. Follow the service's outputs in json and xml format:
  587. .. code-block:: json
  588. {
  589. "capabilities": {
  590. "vector": {
  591. "classifications": [
  592. "quantile",
  593. "jenks",
  594. "equalArea",
  595. "equalInterval",
  596. "uniqueInterval",
  597. "standardDeviation"
  598. ]
  599. },
  600. "raster": {
  601. "classifications": [
  602. "quantile",
  603. "jenks",
  604. "equalArea",
  605. "equalInterval",
  606. "uniqueInterval"
  607. ]
  608. }
  609. }
  610. }
  611. .. code-block:: xml
  612. <capabilities>
  613. <vector>
  614. <classifications>quantile</classifications>
  615. <classifications>jenks</classifications>
  616. <classifications>equalArea</classifications>
  617. <classifications>equalInterval</classifications>
  618. <classifications>uniqueInterval</classifications>
  619. <classifications>standardDeviation</classifications>
  620. </vector>
  621. <raster>
  622. <classifications>quantile</classifications>
  623. <classifications>jenks</classifications>
  624. <classifications>equalArea</classifications>
  625. <classifications>equalInterval</classifications>
  626. <classifications>uniqueInterval</classifications>
  627. </raster>
  628. </capabilities>