New answers tagged

1

A Python3 and QGIS 3 version would be : from PyQt5.QtWidgets import QMessageBox from qgis.gui import* from qgis.core import * import os def run_script(): path = QgsProject.instance().readPath(".{0}".format(os.sep)) path = os.getcwd() dir = "Submit" mif_path = os.sep.join([path, dir, "MID_MIF"]) + os.sep shape_path = os.sep.join([path, ...


0

There are a couple of problems with your code. getDownloadURL() expects region to be an ee.Geometry, you provided a list The first invocation of get_url() doesn't specify the image The resulting image is a three band image. Not black and white in other words. If you're seeing a black and white image, you're probably only visualizing one of the three bands....


2

I think the issue arises because you were trying to export the image clipped on a GeometryCollection instead of Polygon. Try this: var CuadroPoly = Cuadro.geometries(); // Create a new polygon to clip the image to CuadroPoly = CuadroPoly.get(1); var image = ee.ImageCollection('COPERNICUS/S2') .filterBounds(Cuadro) .filterDate('2020-03-20','2020-03-24') ...


2

Use .visualize() to export data as an 8-bit RGB image. Note that the image will no longer contain the original data values; each band of the image will represent color intensity for red, green, and blue respectively. If you want to maintain the original data, keep the export as you have it and use the visualization settings in your GIS to stretch a color ...


4

Im sure there are other ways but this is working and the code should be adaptable to suite many different problems. My test data have a date field called 'Start' with datetimes in two different formats: idfield,scientificName,Start 1,Pisidium,2001-03-21 00:00:00 2,Rosa dumalis subsp. subcanina,9/1/1881 12:00:00 AM ... Which complicate things a bit. Im ...


0

I am not exactly sure on what it does but after I used the reduce command, I managed to export my several NDVI tiles all at once with the NDVI scale I wanted. Hope someone with good skill will comment/confirm on this. // reduce var reducedNDVI = ndvi.reduce(ee.Reducer.median()) // Export the image, specifying scale and region. Export.image.toDrive({ ...


3

If you export to an Excel, the first feature is analysed for the contained properties and only the available properties are exported. If you extend the period, there are (possibly) null values for the LST and that property is not exported. You have two options: Filter out the null values before exporting: var imageCollection = mod11a1.map(function(image){ ...


-1

I share an example script from my repository, which should give you some inspiration as to how you can automate/concatenate the file/folder naming process. In this example, I have 3 images and 10 regions, and my objective is to do the following; clip each image to each of the 10 regions, reclassify them and export them to Google Drive. Hopefully you can ...


2

There are many ways to achieve this. One of the methods is the following. Export the point shapefile into another shapefile. Make sure to change the CRS of the new file is WGS84 (EPSG4326). In the “Layers” panel, open the attribute table for this new layer you just created. Click on “Toggle Editing Mode”, and open “Field Calculator”. Make a new field type ...


1

Your w is an image where each pixel contains monthly means. Maybe you're looking the mean across your entire ROI? If so, you have to call w.reduceRegion(). Try something like this: // Picking the scale from the first image in the collection var scale = UK_SST.first().projection().nominalScale() var months = ee.List.sequence(1, 12); var monthlySST = ee....


0

var imagery = landsat.filterDate('2016-04-30', '2016-05-02').filterBounds(roi) .sort('CLOUD_COVER', false); ... Export.image.toDrive({ image: imagery.select('B10','B11'), ... }); Export.image is strictly for exporting a single image, but you have given it an ImageCollection. In order to get a single image that is identical to what Map.addLayer shows ...


0

Probably, the issue is because 'NOAA/CDR/SST_WHOI/V2' product has 8 values per day and your series has 29216 values instead 3621 (number expected for series with one value per day). So, it exceeds user memory. You can overcome this problem taking one image per day (in this case as median); as in following script (I used an arbitrary point in Atlantic Ocean). ...


Top 50 recent answers are included