An open source software server written in Java that allows users to share and edit geospatial data.
Server Status shows a summary of server configuration parameters and run-time status.
GeoServer Logs shows the GeoServer log output. This is useful for determining errors without having to leave the browser.
Contact Information sets the public contact information available in the Capabilities document of the WMS server.
About GeoServer section provides links to the GeoServer documentation, homepage and bug tracker.
This section provides access to GeoServer diagnostic and configuration tools, and can be particularly useful for debugging.
Layer Preview provides links to layer previews in various output formats, including the common OpenLayers and KML formats.
Workspaces displays a list of workspaces. Also shows which workspace is the default for the server.
Stores displays a list of stores. Details include the workspace associated with the store, the type of store (data format), and whether the store is enabled.
Layers displays a list of layers. Details include the workspace and store associated with the layer, whether the layer is enabled, and the spatial reference system (SRS) of the layer.
Layer Groups displays a list of layer groups. Details include the associated workspace.
Styles displays a list of styles. Details include the associated workspace.
This section contains configuration options for all the different data-related settings
Web Map Service (WMS) manages metadata, resource limits, SRS availability, and other data-specific output for WMS.
Web Map Tile Service (WMTS) manages metadata for WMTS.
Web Feature Service (WFS) manages metadata, feature publishing, service level options, and data-specific output for WFS.
Web Coverage Service (WCS) manages metadata, resource limits, and SRS availability for WCS.
This section is for configuring the services published by GeoServer
Web Map Service (WMS) supports requests for map images (and other formats) generated from geographical data.
Web Feature Service (WFS) supports requests for geographical feature data (with vector geometry and attributes).
Web Coverage Service (WCS) supports requests for coverage data (rasters).
Global Settings configures messaging, logging, character and proxy settings for the entire server.
Image Processing configures several JAI parameters, used by both WMS and WCS operations.
Raster Access configures settings related to loading and publishing coverages.
This section contains configuration settings that apply to the entire server
Tile Layers shows which layers in GeoServer are also available as tiled (cached) layers.
Caching Defaults sets the global options for the caching service.
Gridsets shows all available gridsets for the tile caches.
Disk Quota sets the options for tile cache management on disk, including strategies to reduce file size when necessary.
BlobStores manages the different blobstores (tile cache sources) known to the embedded GeoWebCache.
This section configures the embedded GeoWebCache
Settings manages high-level options for the security subsystem.
Authentication manages authentication filters, filter chains, and providers.
Passwords manages the password policies for users and the master (root) account.
Users, Groups, Roles manages the users, groups, and roles, and how they are all associated with each other.
Data manages the data-level security options, allowing workspaces and layers to be restricted by role.
Services manages the service-level security options, allowing services and operations to be restricted by role.
This section configures the built-in security subsystem
Demos contains links to example WMS, WCS, and WFS requests for GeoServer as well as a listing all SRS info known to GeoServer.
Tools contains administrative tools. By default, the only tool is the Catalog Bulk Load Tool, which can bulk copy test data into the catalog.
Basic things to know:
Required Info:
Connection Parameters:
2 ways to create layers in Geoserver:
SQL View
Direct
Data
Publishing
Dimensions (not used)
Tile Caching
Default Line Style
TM LBD Style
Geoserver can serve 3 classes of shapes of vector data:
Each shape can be styled with Label
And with just that, you can start create your own Map!
Learn to style map in Geoserver by using 1 of these 5 methods:
A good way to learn about SLD is to study styling examples.
Refer: >> SLD Styling <<
<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
xmlns="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<NamedLayer>
<Name>Simple point</Name>
<UserStyle>
<Title>GeoServer SLD: Simple point</Title>
<FeatureTypeStyle>
<Rule>
<PointSymbolizer>
<Graphic>
<Mark>
<WellKnownName>circle</WellKnownName>
<Fill>
<CssParameter name="fill">#FF0000</CssParameter>
</Fill>
</Mark>
<Size>6</Size>
</Graphic>
</PointSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
Eg: Simple POINT using SLD styling
Don't have time to study and create SLD? Use QGIS.
Refer: >> QGIS SLD <<
Refer: >> CSS Styling <<
<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
xmlns="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<NamedLayer>
<Name>Simple point</Name>
<UserStyle>
<FeatureTypeStyle>
<Rule>
<PointSymbolizer>
<Graphic>
<Mark>
<WellKnownName>circle</WellKnownName>
<Fill>
<CssParameter name="fill">#FF0000</CssParameter>
</Fill>
</Mark>
<Size>6</Size>
</Graphic>
</PointSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
* {
mark: symbol(circle);
mark-size: 6px;
:mark {
fill: #FF0000;
}
}
Refer: >> YSLD Styling <<
<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
xmlns="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<NamedLayer>
<Name>Simple point</Name>
<UserStyle>
<FeatureTypeStyle>
<Rule>
<PointSymbolizer>
<Graphic>
<Mark>
<WellKnownName>circle</WellKnownName>
<Fill>
<CssParameter name="fill">#FF0000</CssParameter>
</Fill>
</Mark>
<Size>6</Size>
</Graphic>
</PointSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
title: 'YSLD : Simple Point'
feature-styles:
- name: Simple Point
rules:
- symbolizers:
- point:
size: 6
symbols:
- mark:
shape: circle
fill-color: '#FF0000'
Refer: >> MBStyle Styling <<
<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
xmlns="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<NamedLayer>
<Name>Simple point</Name>
<UserStyle>
<FeatureTypeStyle>
<Rule>
<PointSymbolizer>
<Graphic>
<Mark>
<WellKnownName>circle</WellKnownName>
<Fill>
<CssParameter name="fill">#FF0000</CssParameter>
</Fill>
</Mark>
<Size>6</Size>
</Graphic>
</PointSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
{
"version": 8,
"name": "simple-point",
"layers": [
{
"id": "point",
"type": "circle",
"paint": {
"circle-radius": 6,
"circle-color": "#FF0000",
"circle-pitch-scale": "map"
}
}
]
}
<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd" xmlns:se="http://www.opengis.net/se">
<NamedLayer>
<se:Name>State</se:Name>
<UserStyle>
<se:Name>State</se:Name>
<se:FeatureTypeStyle>
<se:Rule>
<se:Name>State_Polygon</se:Name>
<se:PolygonSymbolizer>
<se:Fill>
<se:SvgParameter name="fill">#f9f9f9</se:SvgParameter>
</se:Fill>
</se:PolygonSymbolizer>
</se:Rule>
</se:FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
Polygon
<sld:UserStyle 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">
<sld:Name>Default Styler</sld:Name>
<sld:Title/>
<sld:FeatureTypeStyle>
<sld:Name>name</sld:Name>
<!-- Mid Label -->
<sld:Rule>
<Name>Mid Label</Name>
<MinScaleDenominator>3000000</MinScaleDenominator>
<MaxScaleDenominator>8000000</MaxScaleDenominator>
<sld:TextSymbolizer>
<sld:Geometry>
<ogc:Function name="centroid">
<ogc:PropertyName>geom</ogc:PropertyName>
</ogc:Function>
</sld:Geometry>
<sld:Label>
<ogc:PropertyName>state_name</ogc:PropertyName>
</sld:Label>
<sld:Font>
<sld:CssParameter name="font-family">DejaVu Sans</sld:CssParameter>
<sld:CssParameter name="font-size">14</sld:CssParameter>
<sld:CssParameter name="font-style">bold</sld:CssParameter>
<sld:CssParameter name="font-weight">normal</sld:CssParameter>
</sld:Font>
<sld:Halo>
<sld:Radius>1.5</sld:Radius>
<sld:Fill><sld:CssParameter name="fill">#FFFFFF</sld:CssParameter></sld:Fill>
</sld:Halo>
<sld:Fill>
<sld:CssParameter name="fill">#734b39</sld:CssParameter>
</sld:Fill>
<sld:LabelPlacement>
<sld:PointPlacement>
<sld:AnchorPoint>
<sld:AnchorPointX>0.5</sld:AnchorPointX>
<sld:AnchorPointY>0.5</sld:AnchorPointY>
</sld:AnchorPoint>
<sld:Displacement>
<sld:DisplacementX>0</sld:DisplacementX>
<sld:DisplacementY>5</sld:DisplacementY>
</sld:Displacement>
</sld:PointPlacement>
</sld:LabelPlacement>
<sld:VendorOption name="autoWrap">15</sld:VendorOption>
<sld:VendorOption name="maxDisplacement">30</sld:VendorOption>
<sld:VendorOption name="charSpacing">0.5</sld:VendorOption>
</sld:TextSymbolizer>
</sld:Rule>
</sld:FeatureTypeStyle>
</sld:UserStyle>
Label
<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd" xmlns:se="http://www.opengis.net/se">
<NamedLayer>
<se:Name>Street</se:Name>
<UserStyle>
<se:Name>Street Line</se:Name>
<!-- 34K 34K 34K 34K 34K 34K 34K 34K 34K 34K -->
<!-- HIGHWAY Outline 34K -->
<se:FeatureTypeStyle>
<se:Rule>
<se:Name>HIGHWAY Outline 34K</se:Name>
<MaxScaleDenominator>50000</MaxScaleDenominator>
<MinScaleDenominator>25000</MinScaleDenominator>
<se:Description><se:Title>Hway Low</se:Title></se:Description>
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>street_cl</ogc:PropertyName>
<ogc:Literal>1</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<se:LineSymbolizer>
<se:Stroke>
<se:SvgParameter name="stroke">#b2924e</se:SvgParameter>
<se:SvgParameter name="stroke-width">5</se:SvgParameter>
<se:SvgParameter name="stroke-linejoin">mitre</se:SvgParameter>
<se:SvgParameter name="stroke-linecap">round</se:SvgParameter>
</se:Stroke>
</se:LineSymbolizer>
</se:Rule>
<se:VendorOption name="sortBy">street_ele</se:VendorOption>
<se:VendorOption name="sortByGroup">roads</se:VendorOption>
</se:FeatureTypeStyle>
<!-- HIGHWAY Fill 34K -->
<se:FeatureTypeStyle>
<se:Rule>
<se:Name>HIGHWAY Fill 34K</se:Name>
<MaxScaleDenominator>50000</MaxScaleDenominator>
<MinScaleDenominator>25000</MinScaleDenominator>
<se:Description><se:Title>Hway Low</se:Title></se:Description>
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>street_cl</ogc:PropertyName>
<ogc:Literal>1</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<se:LineSymbolizer>
<se:Stroke>
<se:SvgParameter name="stroke">#ffe68c</se:SvgParameter>
<se:SvgParameter name="stroke-width">3</se:SvgParameter>
<se:SvgParameter name="stroke-linejoin">mitre</se:SvgParameter>
<se:SvgParameter name="stroke-linecap">round</se:SvgParameter>
</se:Stroke>
</se:LineSymbolizer>
</se:Rule>
<se:VendorOption name="sortBy">street_ele</se:VendorOption>
<se:VendorOption name="sortByGroup">roads</se:VendorOption>
</se:FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
Line
<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd" xmlns:se="http://www.opengis.net/se">
<NamedLayer>
<se:Name>Street</se:Name>
<UserStyle>
<se:Name>Street Label</se:Name>
<!-- Highway -->
<!-- Highway Mid Level-->
<se:FeatureTypeStyle>
<se:Rule>
<se:Name>Hway Mid</se:Name>
<MaxScaleDenominator>200000</MaxScaleDenominator>
<MinScaleDenominator>20000</MinScaleDenominator>
<se:Description><se:Title>Hway Mid</se:Title></se:Description>
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>street_cl</ogc:PropertyName>
<ogc:Literal>1</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<se:TextSymbolizer>
<se:Label>
<ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace">
<ogc:PropertyName>street_na</ogc:PropertyName>
<ogc:Literal>^Lbr</ogc:Literal><ogc:Literal>Lebuhraya</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>^Jln</ogc:Literal><ogc:Literal>Jalan</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>^Sun</ogc:Literal><ogc:Literal>Susuran</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>^Jam</ogc:Literal><ogc:Literal>Jambatan</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>Ldp.</ogc:Literal><ogc:Literal>LDP</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>Kesas.</ogc:Literal><ogc:Literal>KESAS</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>Npe.</ogc:Literal><ogc:Literal>NPE</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>Mex.</ogc:Literal><ogc:Literal>MEX</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>Plus.</ogc:Literal><ogc:Literal>PLUS</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>Duke.</ogc:Literal><ogc:Literal>DUKE</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>Lekas.</ogc:Literal><ogc:Literal>LEKAS</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>.*Baru Lembah Klang.*</ogc:Literal><ogc:Literal>NKVE</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>.*Lembah Klang Selatan.*</ogc:Literal><ogc:Literal>SKVE</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>.*Utara-Selatan Lingkaran Tengah.*</ogc:Literal><ogc:Literal>ELITE</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>.*Utara-Selatan.*</ogc:Literal><ogc:Literal>PLUS</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>.*Baru Pantai.*</ogc:Literal><ogc:Literal>NPE</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>.*Damansara-Puchong.*</ogc:Literal><ogc:Literal>LDP</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>Sungai Besi.*</ogc:Literal><ogc:Literal>Besraya</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>.*Kajang-Seremban.*</ogc:Literal><ogc:Literal>LEKAS</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>.*Kemuning.*</ogc:Literal><ogc:Literal>LKSA</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>.*Duta-Ulu Kelang.*</ogc:Literal><ogc:Literal>DUKE</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>.*Bertingkat Ampang-Kuala Lumpur.*</ogc:Literal><ogc:Literal>AKLEH</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>.*Lingkaran Tengah 2.*</ogc:Literal><ogc:Literal>MRR2</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>.*Shah Alam.*</ogc:Literal><ogc:Literal>KESAS</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>.*Kuala Lumpur-Kuala Selangor.*</ogc:Literal><ogc:Literal>LATAR</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>Skve.</ogc:Literal><ogc:Literal>SKVE</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>Nkve.</ogc:Literal><ogc:Literal>NKVE</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>Bee.</ogc:Literal><ogc:Literal></ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>Mrr2.</ogc:Literal><ogc:Literal>MRR2</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>Akleh.</ogc:Literal><ogc:Literal>AKLEH</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>Eli$</ogc:Literal><ogc:Literal>ELITE</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>Elite.</ogc:Literal><ogc:Literal>ELITE</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>Lksa.</ogc:Literal><ogc:Literal>LKSA</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>.*Maju.*</ogc:Literal><ogc:Literal>MEX</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>.*Lpt.*</ogc:Literal><ogc:Literal>LPT</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>.*Edl.*</ogc:Literal><ogc:Literal>EDL</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>.*Borr.*</ogc:Literal><ogc:Literal>BORR</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>.*Spdh.*</ogc:Literal><ogc:Literal>SPDH</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>.*Csr.*</ogc:Literal><ogc:Literal>CSR</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
</se:Label>
<se:Font>
<se:CssParameter name="font-family">SansSerif.plain</se:CssParameter>
<se:CssParameter name="font-size">10.5</se:CssParameter>
<se:CssParameter name="font-weight">normal</se:CssParameter>
</se:Font>
<se:Halo>
<se:Radius>1.5</se:Radius>
</se:Halo>
<se:LabelPlacement>
<LinePlacement/>
</se:LabelPlacement>
<se:VendorOption name="followLine">true</se:VendorOption>
<se:VendorOption name="maxAngleDelta">30</se:VendorOption>
<se:VendorOption name="maxDisplacement">400</se:VendorOption>
<se:VendorOption name="repeat">300</se:VendorOption>
<se:VendorOption name="group">yes</se:VendorOption>
</se:TextSymbolizer>
</se:Rule>
</se:FeatureTypeStyle>
Label
<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
xmlns="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<NamedLayer>
<Name>POI</Name>
<UserStyle>
<FeatureTypeStyle>
<Rule>
<Name>Sekolah</Name>
<MinScaleDenominator>1</MinScaleDenominator>
<MaxScaleDenominator>5000</MaxScaleDenominator>
<PointSymbolizer>
<Graphic>
<ExternalGraphic>
<OnlineResource xlink:type="simple" xlink:href="http://localhost:8080/POI_Icon/school.png" />
<Format>image/png</Format>
</ExternalGraphic>
<Size>16</Size>
</Graphic>
</PointSymbolizer>
<TextSymbolizer>
<Label>
<ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace"><ogc:Function name="strReplace">
<ogc:PropertyName>place_na</ogc:PropertyName>
<ogc:Literal>Sk</ogc:Literal><ogc:Literal>SK</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>Smk</ogc:Literal><ogc:Literal>SMK</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>Smjk</ogc:Literal><ogc:Literal>SMJK</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>Sm</ogc:Literal><ogc:Literal>SM</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>Srjk</ogc:Literal><ogc:Literal>SRJK</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>Srk</ogc:Literal><ogc:Literal>SRK</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>Sjk</ogc:Literal><ogc:Literal>SJK</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
<ogc:Literal>Elc</ogc:Literal><ogc:Literal>ELC</ogc:Literal><ogc:Literal>true</ogc:Literal>
</ogc:Function>
</Label>
<Font>
<CssParameter name="font-family">SansSerif</CssParameter>
<CssParameter name="font-weight">bold</CssParameter>
<CssParameter name="font-size">9.5</CssParameter>
</Font>
<Halo>
<Radius>1.5</Radius>
</Halo>
<LabelPlacement>
<PointPlacement>
<AnchorPoint>
<AnchorPointX>0.0</AnchorPointX>
<AnchorPointY>0.0</AnchorPointY>
</AnchorPoint>
<Displacement>
<DisplacementX>-40</DisplacementX>
<DisplacementY>7</DisplacementY>
</Displacement>
</PointPlacement>
</LabelPlacement>
<Fill>
<CssParameter name="fill">#606312</CssParameter>
</Fill>
<VendorOption name="autoWrap">50</VendorOption>
<VendorOption name="maxDisplacement">45</VendorOption>
<VendorOption name="spaceAround">10</VendorOption>
</TextSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
Point & Label
SELECT
place_na AS poi_name,
tel_no,
url AS website,
lot_number AS lot_no,
house_num AS house_no,
buildingna AS building_name,
landmarkna AS landmark_name,
street_t AS street_type,
street_na AS street_name,
postal_num AS postcode,
section_na AS section_name,
city_name,
CASE
WHEN state_code='JH' THEN 'JOHOR'
WHEN state_code='KD' THEN 'KEDAH'
WHEN state_code='KN' THEN 'KELANTAN'
WHEN state_code='MK' THEN 'MELAKA'
WHEN state_code='NS' THEN 'NEGERI SEMBILAN'
WHEN state_code='PH' THEN 'PAHANG'
WHEN state_code='PP' THEN 'PULAU PINANG'
WHEN state_code='PK' THEN 'PERAK'
WHEN state_code='PS' THEN 'PERLIS'
WHEN state_code='SL' THEN 'SELANGOR'
WHEN state_code='TG' THEN 'TERENGGANU'
WHEN state_code='SB' THEN 'SABAH'
WHEN state_code='SW' THEN 'SARAWAK'
WHEN state_code='WP' THEN 'WILAYAH PERSEKUTUAN'
WHEN state_code='LB' THEN 'LABUAN'
ELSE 'Other'
END AS state_name,
geom
FROM ml_poi
WHERE
poi_code NOT LIKE 'GSML%' AND poi_code NOT LIKE 'TMEX%' AND
poi_code NOT LIKE 'PFPH%' AND poi_code NOT LIKE 'PFPT%' AND
poi_code NOT LIKE 'PFMP%' AND poi_code NOT LIKE 'PLAD%' AND
poi_code NOT LIKE 'PLBB%' AND poi_code NOT LIKE 'PLBG%' AND
poi_code NOT LIKE 'PLCT%' AND poi_code NOT LIKE 'PLID%' AND
poi_code NOT LIKE 'PLLM' AND poi_code NOT LIKE 'PLLMBB' AND
poi_code NOT LIKE 'PLLMOT' AND poi_code NOT LIKE 'PLRAKG' AND
poi_code NOT LIKE 'PLRATM' AND poi_code NOT LIKE 'PLRABW' AND
poi_code NOT LIKE 'PLRAOT' AND poi_code NOT LIKE 'TRKM%' AND
poi_code NOT LIKE 'GSDP%' AND poi_code NOT LIKE 'GSIMLB' AND
poi_code NOT LIKE 'GSPLAD' AND poi_code NOT LIKE 'GSMNMI' AND
poi_code NOT LIKE 'GSMNDE' AND poi_code NOT LIKE 'MDHCPC'
Example:
SQL View for layer - WFS_POI
More: >> SQL View <<
Example:
To create new layer where the condition is excluding all states except Kuala Lumpur
More: >> CQL/ECQL Filter <<
Example:
Using String function (strReplace) to return the string with the pattern replaced with the given replacement text.
<sld:Label>
<ogc:Function name="strReplace">
<ogc:Function name="strReplace">
<ogc:Function name="strReplace">
<ogc:Function name="strReplace">
<ogc:PropertyName>building_n</ogc:PropertyName>
<ogc:Literal>Klcc</ogc:Literal><ogc:Literal>KLCC</ogc:Literal><ogc:Literal>true</ogc:Literal></ogc:Function>
<ogc:Literal>Klia</ogc:Literal><ogc:Literal>KLIA</ogc:Literal><ogc:Literal>true</ogc:Literal></ogc:Function>
<ogc:Literal>Tnb</ogc:Literal><ogc:Literal>TNB</ogc:Literal><ogc:Literal>true</ogc:Literal></ogc:Function>
<ogc:Literal>Tudm</ogc:Literal><ogc:Literal>TUDM</ogc:Literal><ogc:Literal>true</ogc:Literal></ogc:Function>
<![CDATA[
]]><ogc:PropertyName>building_2</ogc:PropertyName>
</sld:Label>
GeoServer provides a number of vendor-specific extensions to SLD 1.0.
Although not portable to other applications, these extensions make styling more powerful and concise and allow for the generation of better-looking maps.
More: >> SLD Extensions <<
More: >> Geom Transformation <<
<StyledLayerDescriptor version="1.0.0" xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd">
<NamedLayer>
<Name>Building 3D Polygon</Name>
<UserStyle>
<Title>Building 3D polygon style</Title>
<FeatureTypeStyle>
<Rule>
<Name>Wall</Name>
<MaxScaleDenominator>10000</MaxScaleDenominator>
<PolygonSymbolizer>
<Geometry>
<ogc:Function name="isometric">
<ogc:PropertyName>geom</ogc:PropertyName>
<ogc:Literal>0.00010</ogc:Literal>
</ogc:Function>
</Geometry>
<Fill>
<CssParameter name="fill">#c9c9c9</CssParameter>
<CssParameter name="fill-opacity">0.45</CssParameter>
</Fill>
<Stroke>
<CssParameter name="stroke">#c9c9c9</CssParameter>
</Stroke>
</PolygonSymbolizer>
</Rule>
</FeatureTypeStyle>
<FeatureTypeStyle>
<Rule>
<Name>Roof</Name>
<MaxScaleDenominator>10000</MaxScaleDenominator>
<PolygonSymbolizer>
<Geometry>
<ogc:Function name="offset">
<ogc:PropertyName>geom</ogc:PropertyName>
<ogc:Literal>0</ogc:Literal>
<ogc:Literal>0.00010</ogc:Literal>
</ogc:Function>
</Geometry>
<Fill>
<CssParameter name="fill">#fdfdfd</CssParameter>
<CssParameter name="fill-opacity">0.80</CssParameter>
</Fill>
<Stroke>
<CssParameter name="stroke">#c9c9c9</CssParameter>
</Stroke>
</PolygonSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
Example:
Function 'Isometric' & 'Offset' to generate 3D Building
More: >> Graphic Symbology <<
<PointSymbolizer>
<Graphic>
<Mark>
<WellKnownName>circle</WellKnownName>
<Fill>
<CssParameter name="fill">#ff8000</CssParameter>
</Fill>
<Stroke>
<CssParameter name="stroke">#000000</CssParameter>
<CssParameter name="stroke-width">1</CssParameter>
</Stroke>
</Mark>
<Size>4</Size>
</Graphic>
</PointSymbolizer>
<PointSymbolizer>
<Graphic>
<ExternalGraphic>
<OnlineResource xlink:type="simple" xlink:href="http://localhost:8080/POI_Icon/train.png" />
<Format>image/png</Format>
</ExternalGraphic>
<Size>18.3</Size>
</Graphic>
</PointSymbolizer>
Mark
External Graphics
Dynamic Symbolizer
<PointSymbolizer>
<Graphic>
<ExternalGraphic>
<OnlineResource xlink:type="simple" xlink:href="http://localhost:8080/Icon/capital_${state_name='Kuala Lumpur'}.png" />
<Format>image/png</Format>
</ExternalGraphic>
<Size>11</Size>
</Graphic>
</PointSymbolizer>
Eg: Show icon for KL state label only
<LineSymbolizer uom="http://www.opengeospatial.org/se/units/metre">
<Stroke>
<CssParameter name="stroke">#0000FF</CssParameter>
<CssParameter name="stroke-width">5</CssParameter>
</Stroke>
</LineSymbolizer>
Zoom 1
Zoom 2
Zoom 3
Eg: Applying the style to the Street dataset shows how the line widths increase as the map is zoomed in:
More: >> Specific Symbolizer Sizes <<
<!-- 4261 4261 4261 4261 4261 4261 4261 4261 4261 4261 -->
<!-- NORMAL STREET Outline 4261 -->
<se:FeatureTypeStyle>
<se:Rule>
<se:Name>NORMAL STREET Outline 4261</se:Name>
<MaxScaleDenominator>5000</MaxScaleDenominator>
<MinScaleDenominator>3000</MinScaleDenominator>
<se:Description><se:Title>Street Bttm Low</se:Title></se:Description>
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"><ogc:Or><ogc:PropertyIsEqualTo><ogc:PropertyName>street_cl</ogc:PropertyName><ogc:Literal>3</ogc:Literal></ogc:PropertyIsEqualTo><ogc:Or><ogc:PropertyIsEqualTo><ogc:PropertyName>street_cl</ogc:PropertyName><ogc:Literal>4</ogc:Literal></ogc:PropertyIsEqualTo><ogc:Or><ogc:PropertyIsEqualTo><ogc:PropertyName>street_cl</ogc:PropertyName><ogc:Literal>6</ogc:Literal></ogc:PropertyIsEqualTo><ogc:Or><ogc:PropertyIsEqualTo><ogc:PropertyName>street_cl</ogc:PropertyName><ogc:Literal>0</ogc:Literal></ogc:PropertyIsEqualTo><ogc:Or><ogc:PropertyIsEqualTo><ogc:PropertyName>street_cl</ogc:PropertyName><ogc:Literal>5</ogc:Literal></ogc:PropertyIsEqualTo><ogc:Or><ogc:PropertyIsEqualTo><ogc:PropertyName>street_cl</ogc:PropertyName><ogc:Literal>-9999</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Or></ogc:Or></ogc:Or></ogc:Or></ogc:Or></ogc:Or></ogc:Filter>
<se:LineSymbolizer><se:Stroke><se:SvgParameter name="stroke">#c1c1c1</se:SvgParameter><se:SvgParameter name="stroke-width">11</se:SvgParameter><se:SvgParameter name="stroke-linejoin">mitre</se:SvgParameter><se:SvgParameter name="stroke-linecap">round</se:SvgParameter></se:Stroke></se:LineSymbolizer>
</se:Rule><se:VendorOption name="sortBy">street_ele</se:VendorOption>
<se:VendorOption name="sortByGroup">roads</se:VendorOption>
</se:FeatureTypeStyle>
<!-- MAJOR STREET Outline 4261 -->
<se:FeatureTypeStyle>
<se:Rule>
<se:Name>MAJOR STREET Outline 4261</se:Name>
<MaxScaleDenominator>5000</MaxScaleDenominator>
<MinScaleDenominator>2500</MinScaleDenominator>
<se:Description><se:Title>Major Bttm Low</se:Title></se:Description>
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"><ogc:PropertyIsEqualTo><ogc:PropertyName>street_cl</ogc:PropertyName><ogc:Literal>2</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter>
<se:LineSymbolizer><se:Stroke><se:SvgParameter name="stroke">#a09f61</se:SvgParameter><se:SvgParameter name="stroke-width">12</se:SvgParameter><se:SvgParameter name="stroke-linejoin">mitre</se:SvgParameter><se:SvgParameter name="stroke-linecap">round</se:SvgParameter></se:Stroke></se:LineSymbolizer>
</se:Rule><se:VendorOption name="sortBy">street_ele</se:VendorOption>
<se:VendorOption name="sortByGroup">roads</se:VendorOption>
</se:FeatureTypeStyle>
<!-- HIGHWAY Outline 4261 -->
<se:FeatureTypeStyle>
<se:Rule>
<se:Name>HIGHWAY Outline 4261</se:Name>
<MaxScaleDenominator>5000</MaxScaleDenominator>
<MinScaleDenominator>2500</MinScaleDenominator>
<se:Description><se:Title>Hway Bottom</se:Title></se:Description>
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"><ogc:PropertyIsEqualTo><ogc:PropertyName>street_cl</ogc:PropertyName><ogc:Literal>1</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter>
<se:LineSymbolizer><se:Stroke><se:SvgParameter name="stroke">#b2924e</se:SvgParameter><se:SvgParameter name="stroke-width">13</se:SvgParameter><se:SvgParameter name="stroke-linejoin">mitre</se:SvgParameter><se:SvgParameter name="stroke-linecap">round</se:SvgParameter></se:Stroke></se:LineSymbolizer>
</se:Rule><se:VendorOption name="sortBy">street_ele</se:VendorOption>
<se:VendorOption name="sortByGroup">roads</se:VendorOption>
</se:FeatureTypeStyle>
<!-- NORMAL STREET Fill 4261 -->
<se:FeatureTypeStyle>
<se:Rule>
<se:Name>NORMAL STREET Fill 4261</se:Name>
<MaxScaleDenominator>5000</MaxScaleDenominator>
<MinScaleDenominator>3000</MinScaleDenominator>
<se:Description><se:Title>Street Bttm Low</se:Title></se:Description>
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"><ogc:Or><ogc:PropertyIsEqualTo><ogc:PropertyName>street_cl</ogc:PropertyName><ogc:Literal>3</ogc:Literal></ogc:PropertyIsEqualTo><ogc:Or><ogc:PropertyIsEqualTo><ogc:PropertyName>street_cl</ogc:PropertyName><ogc:Literal>4</ogc:Literal></ogc:PropertyIsEqualTo><ogc:Or><ogc:PropertyIsEqualTo><ogc:PropertyName>street_cl</ogc:PropertyName><ogc:Literal>6</ogc:Literal></ogc:PropertyIsEqualTo><ogc:Or><ogc:PropertyIsEqualTo><ogc:PropertyName>street_cl</ogc:PropertyName><ogc:Literal>0</ogc:Literal></ogc:PropertyIsEqualTo><ogc:Or><ogc:PropertyIsEqualTo><ogc:PropertyName>street_cl</ogc:PropertyName><ogc:Literal>5</ogc:Literal></ogc:PropertyIsEqualTo><ogc:Or><ogc:PropertyIsEqualTo><ogc:PropertyName>street_cl</ogc:PropertyName><ogc:Literal>-9999</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Or></ogc:Or></ogc:Or></ogc:Or></ogc:Or></ogc:Or></ogc:Filter>
<se:LineSymbolizer><se:Stroke><se:SvgParameter name="stroke">#ffffff</se:SvgParameter><se:SvgParameter name="stroke-width">9</se:SvgParameter><se:SvgParameter name="stroke-linejoin">mitre</se:SvgParameter><se:SvgParameter name="stroke-linecap">round</se:SvgParameter></se:Stroke></se:LineSymbolizer>
</se:Rule><se:VendorOption name="sortBy">street_ele</se:VendorOption>
<se:VendorOption name="sortByGroup">roads</se:VendorOption>
</se:FeatureTypeStyle>
<!-- MAJOR STREET Fill 4261 -->
<se:FeatureTypeStyle>
<se:Rule>
<se:Name>MAJOR STREET Fill 4261</se:Name>
<MaxScaleDenominator>5000</MaxScaleDenominator>
<MinScaleDenominator>2500</MinScaleDenominator>
<se:Description><se:Title>Major Bttm Low</se:Title></se:Description>
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"><ogc:PropertyIsEqualTo><ogc:PropertyName>street_cl</ogc:PropertyName><ogc:Literal>2</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter>
<se:LineSymbolizer><se:Stroke><se:SvgParameter name="stroke">#fffdaf</se:SvgParameter><se:SvgParameter name="stroke-width">10</se:SvgParameter><se:SvgParameter name="stroke-linejoin">mitre</se:SvgParameter><se:SvgParameter name="stroke-linecap">round</se:SvgParameter></se:Stroke></se:LineSymbolizer>
</se:Rule><se:VendorOption name="sortBy">street_ele</se:VendorOption>
<se:VendorOption name="sortByGroup">roads</se:VendorOption>
</se:FeatureTypeStyle>
<!-- HIGHWAY Fill 4261 -->
<se:FeatureTypeStyle>
<se:Rule>
<se:Name>HIGHWAY Fill 4261</se:Name>
<MaxScaleDenominator>5000</MaxScaleDenominator>
<MinScaleDenominator>2500</MinScaleDenominator>
<se:Description><se:Title>Hway Bttm</se:Title></se:Description>
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"><ogc:PropertyIsEqualTo><ogc:PropertyName>street_cl</ogc:PropertyName><ogc:Literal>1</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter>
<se:LineSymbolizer><se:Stroke><se:SvgParameter name="stroke">#ffe68c</se:SvgParameter><se:SvgParameter name="stroke-width">11</se:SvgParameter><se:SvgParameter name="stroke-linejoin">mitre</se:SvgParameter><se:SvgParameter name="stroke-linecap">round</se:SvgParameter></se:Stroke></se:LineSymbolizer>
</se:Rule><se:VendorOption name="sortBy">street_ele</se:VendorOption>
<se:VendorOption name="sortByGroup">roads</se:VendorOption>
</se:FeatureTypeStyle>
More: >> Z-Ordering <<
1. Data Preparation
2. Workspace - Store - Layer
3 Workspaces
3 Stores
105 Layers
3. Styling Layers
56 Styles
44 Layers
4. Layer Groups
Layer Group 1 : Section_Label
Layer Group 2 : All_Features_Label
Layer Group 3 : TM_Smartmap
What is inside Malaysia:TM_Smartmap layer that we always use?
5. Output WMS - WMTS - WFS
{Workspace Name}:{Layer/Layer Group Name}
Layer Name Format
Malaysia:TM_Smartmap
Malaysia_WFS_POI:POI
Example: