6

EVIband.gte(0.6712).and(EVIband.lte(0.776) evaluates each pixel and returns 1 if the pixel value meets the conditions and 0 if not. If you want to give the pixels that meet this condition some identifiable number, easiest is to multiply this image by a constant ee.Image. Example: var ten = EVIband.gte(0.6712).and(EVIband.lte(0.776).multiply(ee.Image(10)) I ...


3

ee.Filters are best when working with features and their properties, not dictionaries. Therefore, I recommend converting the dictionaries to features and the list to a feature collection: var groupsList = lcStudyAreas.reduceRegion({ reducer: ee.Reducer.sum().group({ groupField: 1, groupName: 'code', }), geometry: neighborhood, scale: 1000, ...


3

Quick and 'dirty' solution would be to simply create global var marker for saving created marker, which can then be remove upon mouse exit: var marker; function locOver(event) { var llt = event.target.dataset["lat"], lln = event.target.dataset["lon"]; marker = L.marker([llt, lln]).addTo(...


2

You can use the turf function booleanContains: <script src="https://cdn.jsdelivr.net/npm/@turf/turf@5.1.6/turf.min.js"></script> var poly = L.polygon([[22.29227, 114.20847],[32.28227, 110.24847],[42.08227, 114.19847]]).addTo(map) function onLocationFound(e) { var marker = L.marker(e.latlng).addTo(map) var contains = turf....


2

The easiest way is to call .resetStyle() on the GeoJSON Group. This clears the style of all markers. Or you can call .resetStyle(layer) then it resets only the passed layer. I recommand to reset all styles when a marker is clicked and then add the new style: function resetMarkerStyles(){ contentLayer.resetStyle(); infoWindow.update(); } function ...


1

Why does it occur In Earth Engine, geometries may become a type of lower dimension (polygon to line string, line string to point) when their area or length becomes zero. This is usually seen when a reprojection collapses an edge; for example, in latitude-longitude coordinates there are many different points of +90° latitude, but in a projection suitable ...


1

When I have dealt with this kind of Image Collections, with 8 or 24 images per day, I found out that the processing is very demanding of time for monthly and yearly aggregation. Additionally, it produces a composition of images valid for a resolution of 1 arc degree instead of original 0.25 arc degrees. On the other hand, your range of dates ('2001-01-01', '...


1

As Mike stated in the comments Even when you have a cluster of one you will need to extract the real feature from the cluster this means the return feature; will need to instead be return feature.get('features')[0]; so the code became Omap.on('click', function (evt){ var feature = Omap.forEachFeatureAtPixel(evt.pixel, function (feature,layer) { ...


1

This is an instance of the XY problem. You say you want to... How can I convert the gpkg file into an array that I can easily traverse through? ...but I do not think you want to convert the data into a structure you can traverse through, I think you just want to traverse through the data. Now, the geopackage-js documentation states: GeoPackageFeatureLayer ...


1

If your KML source is not working with a cluster source it may contain features which are not Point geometry. You can add a geometryFunction to the cluster source options to ensure only point features are used when clustering: var clusterSource = new ol.source.Cluster({ distance: parseInt(distance.value,10), geometryFunction: function (...


1

Looks like you were pretty close, and with the help of Nicholas Clinton's answer here we can arrive at a solution. The main changes I made were: removing unnecessary variable definitions (first and time0) adjust how the function mapped to months is defined added a years variable for the same function mapping technique All of that said, here's an updated ...


1

Assuming your affirmation that the remote sensing reflectance has to divide by pi, it is preferable to have three functions for mapping original and followings ImageCollections. First of them, it prepares selected bands for correct use (dividing by pi and it is also necessary a scale factor). Second function calculates band max between B1 and B2 and ...


1

I think it should work to call both request. But the problem that I see is that you don't add it to the map in your code. Replace it with: ... success: function (response) { WFSLayer.addData(response); WFSLayer.addTo(map); } ... success: function (response) { BuildingsWFSLayer.addData(response); BuildingsWFSLayer....


1

The cause of your problem with WFS layer is that layer object initially has NULL value. Since actual layer is created async via AJAX, layer does not exist at the time of Leaflet tree control creation and as a consequence you get mentioned error. Solution for this is to initially create an empty GeoJSON layer, and then fill it with data async and add to map: ...


1

The Loader wasn't receiving the data sent by Post. So, now the page where I do the query, receives the data in json format. Also I removed the vecLayer from the Map Layer Array, and added it to the map later because the vecLayer doesn't exist. I put it all in one function, and now it works. I would have to adjust map.getView (). fit (vectorParcels.getExtent (...


1

Firstly, you want to create a new VectorSource, like this: var vectorSource = new Vector({ format: new GeoJSON(), loader: function(extent, resolution, projection) { var proj = projection.getCode(); var xhr = new XMLHttpRequest(); xhr.open('POST', "functions/parcel.php"); var onError = function() { vectorSource....


1

I understand it's an old post but putting the notes for someone it can help! So, how do I get the source for querySourceFeatures()? Here's the one-liner: map.querySourceFeatures('composite', {sourceLayer: 'source-name', filter: [filters]}) So - what is composite, what is sourceLayer, what is filter? Well first, we need to get to the composite source id and ...


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