emplexed / gs-mvt Goto Github PK
View Code? Open in Web Editor NEWGeoserver WMS Extension for delivering Mapnik Vector Tiles
License: Apache License 2.0
Geoserver WMS Extension for delivering Mapnik Vector Tiles
License: Apache License 2.0
The buffer Parameter ist still not working. The tile coordinate system is messed when requesting with a buffer (WMS parameter).
Does the plugin cache the vector tiles and if so, is it possible to seed the cache?
There seems to be an issue with MinScaleDenominator.
<StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="1.0.0" xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd">
<NamedLayer>
<UserStyle>
<FeatureTypeStyle>
<Rule>
<MinScaleDenominator>100000000</MinScaleDenominator>
<Filter>
<PropertyIsEqualTo>
<PropertyName>minzoom</PropertyName>
<Literal>1</Literal>
</PropertyIsEqualTo>
</Filter>
<PolygonSymbolizer>
<Fill>
<CssParameter name="fill">#0000FF</CssParameter>
</Fill>
</PolygonSymbolizer>
</Rule>
<Rule>
<MaxScaleDenominator>100000000</MaxScaleDenominator>
<Filter>
<PropertyIsEqualTo>
<PropertyName>minzoom</PropertyName>
<Literal>2</Literal>
</PropertyIsEqualTo>
</Filter>
<PolygonSymbolizer>
<Fill>
<CssParameter name="fill">#FF0000</CssParameter>
<CssParameter name="fill-opacity">0.2</CssParameter>
</Fill>
</PolygonSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
I would expect that at scale above 100000000 only features with minzoom=1 will be returned (which it does) and at scale below 100000000 only features with minzoom=2 would be returned, instead it returns both - minzoom=1 and minzoom=2 features.
Is it bug, or am i missing something. The same filter seems to work fine with wms raster, but not with mvt.
The readme mentions gs-mvt-2.6.2.jar
. However, It cannot be found anywhere.
Hi,
thanks for this great plugin @stefan0722.
I have a short question: Is it possible to add the ".json" format to the Slippy Map Tiles feature?
That extension would help me a lot to use our geoserver in the same way like http://tile.openstreetmap.us/vectiles-buildings/{z}/{x}/{y}.json'.
Best regards
Benedikt
Hope it's ok to cross post from: https://gis.stackexchange.com/questions/256888/styling-geoserver-pbf-vector-tiles-in-leaflet
I believe the issue is related specifically to Geoserver/this extension
I'm serving up vector tiles in pbf format in Geoserver 2.11.2 (using the MVT extension) and consuming them in Leaflet 1.2.0 with Leaflet.VectorGrid 1.2.0 but am having trouble styling them.
The URL format I am using is:
http://xxxx/geoserver/gwc/service/tms/1.0.0/GIS:LSOA@EPSG%3A900913@pbf/{z}/{x}/{-y}.pbf
The vectors appear and render nicely but with a default blue line style. The docs state you should set the style for each layer within the vector tile set like so:
var vectorTileOptions = {
vectorTileLayerStyles: {
// A plain set of L.Path options.
water: {
weight: 0,
fillColor: '#9bc2c4',
fillOpacity: 1,
fill: true
}
};
i.e in this example 'water' is the layer name.
I am unsure what my layer name is because whatever I have tried, the style remains the default blue.
In geoserver my layer title is "LSOA" and name is "GIS:LSOA" so I have tried the following without success:
LSOA: {
weight: 0,
fillColor: '#9bc2c4',
fillOpacity: 1,
fill: true
}
JS Error with the colon
GIS:LSOA: {
weight: 0,
fillColor: '#9bc2c4',
fillOpacity: 1,
fill: true
}
Nope:
pbfLayerOpts["pbfLayerStyles"]["GIS:LSOA"] = {
weight: 0,
fillColor: '#9bc2c4',
fillOpacity: 1,
fill: true
}
All attempts result in the same default style.
I have also tried creating a layer group in Geoserver and adding one or multiple layers but no luck there. Also tried adding a layer group without a workspace (the GIS prefix) but in that case Geoserver returned an error to the pbf request.
If I use the Openmaptiles service then everything works as expected so it seems the issue is with Geoserver/the extension and how it names layers/serves the data.
Has anyone got this setup working before?
Thanks.
Hi,
We weren't able to use it with 2.7.2. Is there maybe an already compiled version for 2.7.2.
Br,
Bernd
A NullPointerException occurs if there is no filter for a layer in the SLD style.
Adding a dummy filter solves the problem. However, it would be better if the plugin can handle layers without a SLD filter.
java.lang.NullPointerException
at org.geotools.filter.visitor.SimplifyingFilterVisitor.collect(SimplifyingFilterVisitor.java:234)
at org.geotools.filter.visitor.SimplifyingFilterVisitor.visit(SimplifyingFilterVisitor.java:292)
at org.geotools.filter.OrImpl.accept(OrImpl.java:49)
at org.geotools.filter.visitor.SimplifyingFilterVisitor.collect(SimplifyingFilterVisitor.java:234)
at org.geotools.filter.visitor.SimplifyingFilterVisitor.visit(SimplifyingFilterVisitor.java:164)
at org.geotools.filter.AndImpl.accept(AndImpl.java:52)
at org.geotools.filter.visitor.SimplifyingFilterVisitor.simplify(SimplifyingFilterVisitor.java:524)
at org.geotools.filter.visitor.SimplifyingFilterVisitor.simplify(SimplifyingFilterVisitor.java:508)
at org.geotools.data.DataUtilities.mixQueries(DataUtilities.java:2502)
at org.geoserver.wms.mvt.StreamingMVTMap.encode(StreamingMVTMap.java:80)
I have been looking in the code and can’t figure if this extension support the wms viewparams?
It is not mentioned in the code so does it inherit from wms?
I have successfully used this feature with the community module for vector tiles as mvt but I really like the idea implemented here to control the generalization and small geometries.
I have a smaller problem with the community module where some features will disappear. It might be solved by setting the size of tile grid from 256x256 to a higher resolution, but still here it is possible to make a precise configuration.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.