Abstract:
Use the grid chart data source to configure WMS through Deegree. First, the raster map uses RTB to cut out the pyramid data source, and WMS is configured through the WCS.
Content:
As the RTB data source, it is an image file but must be supported by header files. When RTB is used to cut a grid chart, the requirements for X_Scale and Y_Scale [latitude and longitude difference of each horizontal/vertical pixel] are very accurate. If x_scale is an infinitely non-repeating decimal number, if you use the Decimal data type in C # To save the value, an error is also reported during the graph cutting process. The error is reported at the upper layer of the graph because the inaccuracy of the longitude and latitude is magnified, the higher the pyramid, the more images with errors reported.
If the cut graph cannot provide a very accurate X_Scale, the cut graph level value can only be small. I will do a test. If the double type is used to save the x_scale value, an error will be reported when the cut level is switched to the third level, when a decimal is saved, an error is returned when it is switched to level 4. If only the level 1 is switched, no error is returned.
After you use RTB to cut an image, the generated new folder contains the wcs _ *** _ configuration. xml file and the related geographical information [geographic range of the cut image].
<description xmlns:wcs="http://www.opengis.net/wcs"/><name>sea</name><label xmlns:wcs="http://www.opengis.net/wcs">sea</label><lonLatEnvelope xmlns:wcs="http://www.opengis.net/wcs" srsName="WGS84(DD)"><gml:pos dimension="2">123.5,-12.98762765121767</gml:pos><gml:pos dimension="2">147.6919169860052,18.5</gml:pos></lonLatEnvelope>
Wcs_configuration.xml
<wcs:ContentMetadata xmlns:wcs="http://www.opengis.net/wcs"> <CoverageOfferingBrief gml:id="ID000001"> <description>Aerial image of Saltlake City</description> <name>sea</name> <label>Aerial image of Saltlake City</label> <lonLatEnvelope srsName="WGS84(DD)"> <gml:pos dimension="2">123.5,-12.98762765121767</gml:pos> <gml:pos dimension="2">147.6919169860052,18.5</gml:pos> </lonLatEnvelope> <wcs:keywords> <wcs:keyword>Satellite image</wcs:keyword> <wcs:keyword>Saltlake City</wcs:keyword> </wcs:keywords> <deegree:Configuration>http://www.cnblogs.com/data/utah/raster/Demo/wcs_Demo_configuration.xml </deegree:Configuration> </CoverageOfferingBrief> </wcs:ContentMetadata>
The fields that must be modified in this Configuration file include the values of <name>, <lonLatEnvelope>, and <deegree: Configuration>. After the Configuration is complete, the WCS should be able to preview the image.
For example:
http://localhost:8090/deegree-wcs/services?service=WCS&version=1.0.0&request=GetCoverage&coverage=sea&crs=EPSG:432&BBOX=123.5,-12.98762765121767,147.6919169860052,18.5&width=2248&height=3067&format=jpeg
WMS can be further configured after the whitelist is configured. WMS is configured using the image set generated by RTB. It involves three files: wcs _ *** _ configuration. xml, local_capabilities.xml, and wms_configuration.xml.
The wcs _ *** _ configuration. xml file generated by RTB does not need to be changed.
The modification of local_capabilities.xml is consistent with the modification of wcs_configuration.xml mentioned above.
The main file to be modified is wms_configuration.xml. The raster map is published to WMS using the WCS method. The code to be modified is as follows:
<Layer queryable="0" noSubsets="0" fixedWidth="0" fixedHeight="0"> <Name>sea</Name> <Title>Ortho Imagery of Salt Lake City no Bbox</Title> <SRS>EPSG:4326</SRS> <LatLonBoundingBox miny="-12.98762765121767" maxy="18.5" minx="123.5" maxx="147.6919169860052" /> <BoundingBox SRS="EPSG:4326" miny="-12.98762765121767" maxy="18.5" minx="123.5" maxx="147.6919169860052" /> <deegree:DataSource failOnException="1" queryable="0"> <deegree:Name>sea</deegree:Name> <deegree:Type>LOCALWCS</deegree:Type> <deegree:ScaleHint min="0.0" max="100000000" /> <deegree:OWSCapabilities> <deegree:OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="sea_capabilities.xml" /> </deegree:OWSCapabilities> </deegree:DataSource> </Layer>
The field to be concerned about is the modification of NAME, LatLonBoundingBox, and OnlineResource fields. Pay attention to the ScaleHint field and set the range of the scale. If the configuration is correct, no error is reported, but only a blank image is generated, with no expected display effect, it is probably because of this field.
Based on the above configuration, WMS is configured using the raster chart through the WCS. Enter the URL as follows:
http://localhost:8090/deegree-wms/services?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=800&HEIGHT=800&LAYERS=sea&TRANSPARENT=TRUE&FORMAT=image/png&BBOX=123.5,-12.98762765121767,147.6919169860052,18.5&SRS=EPSG:4326
You can see the image generated by calling WMS: