11

which layer do you want, i dont understand? but getting all layer: map.layers getting all layer name: var mLayers = map.layers; for(var a = 0; a < mLayers.length; a++ ){ alert(mLayers[a].name) }; getting last added layer name: map.layers.getLast().name and beside this you can use all this method too: 1.map.getLayer() 2.map.getLayerIndex() 3....


6

The solution is simple: anything that yields a boolean value must be explicitly compared to true. Like (with proper URL encoding): &cql_filter=strEqualsIgnoreCase(name, 'Jane Doe') = true &cql_filter=strMatches(name, '(?i).* doe') = true


5

You have not posted a complete example of the url you are building and sending to GeoServer so it is difficult to know for sure what the problem is. However, I suspect the problem lies in the use of the % for the wildcard. In a url the % character has a special meaning as it is used when certain characters should be encoded. For example, you may well recall ...


5

Thanks for reply. I didn't know this log file. Really a great help! Here is the solution for my problem: http://myserver:8080/geonetwork/srv/eng/csw?SERVICE=CSW&version=2.0.2 &REQUEST=GetRecords&resultType=results &constraintLanguage=CQL_TEXT&constraint_language_version=1.1.0 &constraint=TempExtent_begin%20>=%20'2014-10-12T00:00:00Z' &elementSetName=full&...


5

Figured it out! The following SLD uses a rendering transformation to call "gs:Clip", which clips vector features to a bounding geometry. The result is then rasterized by GeoServer's WMS. <?xml version="1.0" encoding="UTF-8"?> <StyledLayerDescriptor version="1.0.0" xmlns:ogc="http://www.opengis.net/ows" ...


5

Since this has not been answered. Here is my own solution which is very simple and works well. The "update" function clears the vector source. The "loader" function, which has been added to the vector source, will then automatically update the features using the url. var vectorSource = new ol.source.Vector({ loader: function (extent, resolution, ...


5

You can successfully use the NOT IN syntax if you are filtering more than one feature. "attribute" NOT IN (1, 2) ← works "attribute" NOT IN (1) ← does not work So I suppose this syntax is limited to filtering based on arrays of length greater than 1. However you can work around this if you still want to with: "attribute" NOT IN (1, 1) ← works In my case:...


4

You can use WFS GetFeature, either encoding the filter in CQL or Filter. Something like: http://host:port/geoserver/wfs?service=WFS&version=1.0&request=GetFeature&typeName=myLayer&CQL_FILTER=INTERSECTS(the_geom, POLYGON((...)))&propertyName=data1,data2,data3 more here: http://docs.geoserver.org/2.7.1/user/filter/ecql_reference.html#...


4

As far as I know these are not supported by anyone else as they are a vendor specific parameter that is added by GeoServer. I also don't believe there is anyway to determine the vendor specific parameters from the capabilities request.


4

On your second question: An SLD can be created dynamically, which means it can style maps using dynamic data. For this to work you will need to know the IDs of the polygons you're trying to style and you also need to alter / expand your web service. Have your web service generate SLDs on-the-fly instead of just returning data. This is simple enough using ....


4

http://***/geoserver/Kaski/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=Kaski:PIN&maxFeatures=50&outputFormat=json&featureID=97 not use cql_fiter it is working. thanks anyway


4

CQL filter is a vendor parameter provided by GeoServer, therefore you have to include the cql_filter in the params string object. OpenLayers 3's ol.source.TileWMS object only supports options you can see in the corresponding API page. Also, in OpenLayers 2 you had to include cql_filter in the params object. Because of its limited input options, you didn't ...


4

It's likely the axis flipping biting you, you should flip coordinates in WFS 1.1 and 2.0 filters: http://docs.geoserver.org/stable/user/services/wfs/basics.html#axis-ordering


4

Note only a GeoServer based WFS will understand a CQL filter, you can and should use an OGC Filter to achieve this effect too. You can use one (or more) of the ECQL temporal filters for this. I would probably use something like the following for your query: DATE_TIME during 2017-02-28T00:00:00Z/P1D to find all features that occurred today - the time ...


3

For the moment I have solved this via a bodge. The Java side of the application that is generating the CQL knows how many ID's are in the table in total so if the number of ID's selected by the user are less than half the total in the table a CQL 'IN ()' query is generated as normal. If the number of ID's selected by the user is more than half the total, ...


3

There is no way to do that. If you want to get the highest value of a filed you have to use WPS, GeoServer has a process that does basic statistics on fields, including the max value.


3

Did I understood you right, that you basically want to request two layers in one Request? If so then just use "typeName" instead of "typeNames". See this request of two layers at the same time ( bvv:gmd_ex and bvv:lkr_ex ): http://geoserv.weichand.de:8080/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&typeName=bvv:gmd_ex,bvv:lkr_ex&...


3

Often even if filters or pagination are not supported, you can use the BBOX parameter to query features limited to a specific region. Via trial and error this can give you all the data. Just slice the area of interest into BBOXes that return less features than what the WFS is limited to. For example &BBOX=395000,5815000,400000,5820000 for a part of ...


3

POLYGON((-90.89 46.67,-90.89 46.67,-90.89 46.67,-90.89 46.67,-90.89 46.67)) Looks like WKT. If it is, you can convert features/layers/geojson to WKT using Wellknown or Wicket-Leaflet


3

Complete post request would be var url = 'http://localhost/geoserver/ows?service=WFS&version=1.0.0&outputFormat=application%2Fjson&request=GetFeature&typeName=topp:states', wktRepresentation = 'POLYGON((579832.0820867891 165971.37415659515,579946.6092781681 165790.03943691167,580180.4356272336 165914.11056090562,580149.4178462351 166047....


3

The CQL is defined by the OGC as part of the catalogue service (i.e. CSW) model specification. See http://docs.opengeospatial.org/is/12-168r6/12-168r6.html for the current (as of July 2016) version. GeoTools claims support for 2.0.1, which you can find linked off http://www.opengeospatial.org/standards/cat in the deprecated spec section. For the GeoTools ...


3

This error is trying to tell you a FilterFunction is not a Filter which means that it doesn't evaluate to true or false. The CQL filter is used to select some or all of the features in the data store, but you are trying to use it transform a features' geometry instead. The usual way to achieve what you are trying is to get GeoServer to return your selected ...


3

CQL (Common Query Language) is a query language created by the OGC for the Catalogue Web Services specification. Unlike the XML-based Filter Encoding language, CQL is written using a familiar text-based syntax. It is thus more readable and better-suited for manual authoring. Filter is (usually) an OGC filter which is expressed in XML and is more suited for ...


3

I think you are being bitten by loose bounding box comparisons since technically this polygon doesn't intersect any features. POLYGON((123664.03100000322 210489.5150000006, 123705.24599999934 210489.5150000006, 123705.24599999934 210587.86800000072, 123664.03100000322 210587.86800000072, 123664.03100000322 210489.5150000006)) But if I ...


3

The WFS specification does not allow aggregation, the filter, regardless of the language used is the equivalent of a "where" clause only. If you need aggregation you'll have to combine WFS with WPS, do the filtering in a WFS request and then pipe it into a "Aggregate" process. Try using the "WPS request builder" to setup a template of your layer of choice (...


3

When the plugin was developed Filter was the only way to force usage of a spatial index. Maybe more recent versions of SQLServer do not have this requirement anymore and will leverage the spatial index seeing a simple STWithin? As an alternative hypothesis, the query above is using the spatial index in a case where it would be better to do a full scan, e.g, ...


3

Something that could be related is documented in http://docs.geoserver.org/stable/en/user/extensions/querylayer/index.html Memory limits The queryCollection and collectGeometries functions do not perform a true database-style join. Instead they execute a query against the secondary layer every time they are executed, and load the entire result ...


2

One approach would be to use the OGC Common Query Language (CQL) to generate your expressions and then use the OpenLayers CQL parser to convert to an OGC Filter. A description of the process can be found here.


2

I don't know for GeoNetwork, but a CSW compliant request should probably look more like the following: http://serverurl/geonetwork/srv/en/csw? REQUEST=GetRecords& SERVICE=CSW& VERSION=2.0.2& namespace=xmlns(csw=http%3A%2F%2Fwww.opengis.net%2Fcat%2Fcsw%2F2.0.2)& OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd& constraintLanguage=CQL_TEXT&...


2

It seems you are using the cross layer filtering plugin: http://docs.geoserver.org/stable/en/user/extensions/querylayer/index.html Did you read and apply the hints in the "optimizing the module speed" section? The hint is needed only for the 2.1.x series, the 2.2.x won't benefit from it


Only top voted, non community-wiki answers of a minimum length are eligible