Hot answers tagged

6

What I ended up doing: Layer > Create Layer > New Virtual Layer… Import rid CSV layer. Set query as select "State", count(*) AS “TERPS” from rid group by "State". Click 'Add'. This creates a virtual layer that counts the number of points per date. Close dialog. Go to the properties of the shapefile layer. Create a new join that joins to the virtual layer ...


5

Let's assume there is a multi-polygon layer called 'polygons' with its attribute table, see image below Step 1. Apply "Multipart to singleparts" geoalgorithm Step 2. Use a "Virtual Layer" through Layer > Add Layer > Add/Edit Virtual Layer... with the following query: SELECT * FROM "Single parts" GROUP BY "id" ...


5

This is because the example you link to has separate layers, whereas yours is one layer, rendered with multiple styles (eg categorized, graduated, or rule-based). I'm afraid qgis2web only creates visibility checkboxes for whole layers, not for categories/ranges/rules within a layer's renderer. The workaround is to create a separate layer for each of your ...


4

Please have a look at the mean coordinates tool. This should do exactly what you need. Hand the tool a layer, maybe add a weighting value, and (this is important for you) tell the tool, which column contains your group IDs.


4

If you get too many features in such an expression, the problem is often a stray 'or'. To me it looks as if you have got everything right here, but you are asking for quite a lot... are you sure you are not querying for the entire data set? Do you also get the barriers and waterways? If so, try to remove the "is null" part and see what is happening. Also, ...


4

Found the answer. One had to add the "%" sign with a concat operator: "id" LIKE concat(attribute ( @atlas_feature, 'ref'),'%')


4

You have to write the name of the field and the ILIKE again after the OR. "cityname" ILIKE 'Paris' OR "cityname" ILIKE 'London'


4

This setting is used for the value box, which is useful ONLY within the query builder interface. For example select the osm_id field click on the sample or all, you will get, well, all results. Set a filter to be osm_id < 1000000. Click on sample or all, you will get ONLY results with an osm_id less than 1 000 000. Check the use unfiltered layer box, ...


4

You can achieve this in a single step using a virtual layer. The idea is to call QGIS function to order the multi part, as suggested by @Babel, and to select the 1st (biggest) one. The difference between the two approaches is how the biggest part is retained, and that a virtual layer is dynamic, i.e. if you modify the source shapes, it will be automatically ...


3

The and/or look fine. Considering maxspeed as both a string and a number is wrong and is likely to throw an error, which in turn could be interpreted as no filter. Try removing the "maxspeed" <= 60. Eventually, cast this field to a number first, so you can always compare with a number instead of a string


3

You need to wrap your <PropertyIsLike> element in a <Not> element. So: <ogc:Filter> <ogc:PropertyIsLike wildCard="*" singleChar="." escape="!"> <ogc:...


3

The fast and working solution (found in the comments) is : aggregate( 'LayerB', 'max', expression:= coalesce("fieldC", 0), filter:= attributes( @parent )['ID-A']="ID-B" ) The original formula works under Ubuntu but it seems that sometimes, NULL nullify the entire expression. coalesce take the first non null value in its arguments starting from the ...


3

Okay, here you are. // Define a region of interest (i.e. the shapefile you imported) var roi = ee.Geometry.Rectangle([91, 53, 92, 54]); // Load the Landsat 8 scaled radiance image collection. var landsatCollection = ee.ImageCollection('LANDSAT/LC08/C01/T1') .filterDate('2019-06-10', '2019-07-12') .filterBounds(roi); // Make a cloud-free composite....


3

You can solve your problem using only one layer and using the Geometry generator. In the symbology of your Coverage Layer select the Geometry generator option: here, in Geometry Type select the option which coincides with the geometry of your coverage layer (point, line or polygons). Use this expression: case --to show the selected geometry in layout ...


3

It looks like you are using the Jetty instructions on a tomcat server - try following the tomcat ones. You need to add the following to $CATALINA_HOME/conf/web.xml: <filter> <filter-name>CorsFilter</filter-name> <filter-class>org.apache.catalina.filters.CorsFilter</filter-class> <init-param> <param-name>...


3

There is no 'advanced' outlier filtering in lidR yet. But for simple cases you can built a simple method yourself. Here are some hints and you can modify the examples to fit your need. Filter point of interest using thresholds las <- filter_poi(las, Z >= 0, Z <= 30) Filter high outliers using 95th percentile CHM This is an example taken from this ...


3

Try writing a multiple LIKE statement with the values you're trying in an IN statement. In the image below, there are 2 sets of selected features for each LIKE statement (highlighted in pink): "GEOID" like ('34013000100%') or "GEOID" like ('34013000200%')


3

Here's another alternative using a virtual layer Go to Layer > Add Layer > Add/Edit Virtual Layer... and enter the following prompt: WITH tbla AS (SELECT id, st_area(geometry) area, geometry FROM "Single parts") SELECT id, MAX(area) max_area, geometry FROM tbla I hope that your result meets your expectations...


2

Is this file being created somewhere else, or is it not being created at all? The literal answer to this question is, "It is being created, but it is not a file." The answer you probably want, though, is more like... The file path that you assigned to output_layer is not being used as a file path, but merely as a string identifier for your new layer. The ...


2

You can duplicate/copy your layer when you right-click it. Then filter one layer, and leave the other as it is. Put both layers in a group and set this group to mutually exclusive by rightclicking it.


2

However, as I noted above, bitmasks for cloud state, cloud shadow and land/water only return two values, 0 and 1. I think there could be a problem with my approach, therefore my question is raised: When working with MOD09GA product, is supposed QC bitmask for high aerosol quantity to return 4 values? According to the description of the quality assessment ...


2

This still works, but it probably doesn't do what you want it to. From the ee.ImageCollection.filterDate() docs: end (Date|Number|String, optional): The end date (exclusive). Optional. If not specified, a 1-millisecond range starting at 'start' is created. If you have an exact date (with time), you can filter so you only get images from that date/time (...


2

I got this working by basically putting all the code in the _getExpr: section of the Filter Widget. _getExpr: function(layerId,username) { //var portal = new esri.arcgis.Portal('https://segramapsdev.lumosnet.com/portal/') //var userName = esri.arcgis.PortalUser(this.username); this.portal = portalUtils.getPortal(this.appConfig....


2

The distance is transformated by Geotools in org.geotools.data.jdbc.PostgisFilterToSQL : protected double getDistanceInNativeUnits(DistanceBufferOperator operator) { if (currentSRID == null) { return operator.getDistance(); } try { CoordinateReferenceSystem crs = CRS.getHorizontalCRS(CRS.decode("EPSG:" + currentSRID)); ...


2

If you plot the geometry of the original image, you would have seen that it simply doesn't cover all your geometries. Return from your function: return ee.Image([betMEAN, ltNEG, gtPOS]) .selfMask() // Mask 0's .multiply(ee.Image([1, 2, 3])) // Assign values to the classes .reduce(ee.Reducer.firstNonNull()) // Pick first class .addBands(...


2

You can simply use the ee.Filter.inList() filter: var tiles = [ '20190129T160521_20190129T161214_T17RMN', '20190106T160511_20190106T160506_T17RNJ', '20190106T160511_20190106T160506_T17RNK' ] var filtered = ee.ImageCollection('COPERNICUS/S2') .filter(ee.Filter.inList('system:index', tiles)) print(filtered.size());


2

There are multiple versions of the Kalman filter. The idea behind the filter is this: You keep track of a vector of states of the system (i.e. position, speed, acceleration and noise) and update it for each new data. When post-processing data you can initialize de filter on a forward pass and then use the backwards for estimation. You have a model of how ...


2

The hour is saved in the property forecast_hour of every Image. You can use this property and .filterMetadata() to filter only those with forecast_hour: 3. Here's the code: var dataset = ee.ImageCollection('NOAA/CFSR') .filter(ee.Filter.date('2019-04-01', '2019-05-31')) .filterMetadata("forecast_hour", "...


2

Simply use the following layer.setSubsetString(expression)


2

This is not really a GIS question, but pure JS one, but anyway ... In your filter logic you return true/false value immediately when first condition is satisfied, and so the other two conditions remain untested. You also don't need switch statement for attribute values, attribute value can be directly used in .indexOf(...) array method. Your filter should ...


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