I can't get the data to my Google Drive, see the code below:  var image = ee.Image(ee.ImageCollection("LANDSAT/LC08/C01/T1_SR") .filterBounds(roi) .filterDate('2018-05-01', '2018-05-30') .sort('CLOUD_COVER') .first()); Map.addLayer(image, {bands:['B3', 'B2', 'B1'], min:0, max: 3000}, 'True colour image');  var geometry = ee.Geometry. Rectangle(roi);   Export.image.toAsset({   image: image,   description: 'image_seoul',   scale: 30,   region: geometry,   maxPixels: 4020250081,   crs: 'EPSG:5186' });
124022
I want to export image to drive for my roi. For this i have specified a geometry(roi). But exported map doesn't cover the area specified and it's not showing the color palette. Is there any possible way to export a colored image (which shows in my layer) to Drive? Why it's not covering the region I have specified. Problem is in export.To.Drive section. But all the codes are given to check error that i did.  Code was:    var region = ee.FeatureCollection('users/karmakersourav/shape')   .filter(ee.Filter.eq('NAME_1', 'Chittagong'));   var addNDVI = function(image) {     var ndvi= image.normalizedDifference(['B4', 'B3']).rename('NDVI');     return image.addBands(ndvi);   };    var cloudMask = function(image) {     var clouds = ee.Algorithms.Landsat.simpleCloudScore(image).select(['cloud']);     return image.updateMask(clouds.lt(25));   };   // Select the land mask.   var landMask = function(image) {   var datamask = hansenImage.select('datamask');   // Create a binary mask.   var mask = datamask.eq(1);   return image.updateMask(mask);   };     // Load a Landsat collection, apply the NDVI and cloud/water masking functions over it.   var collection1 = ee.ImageCollection('LANDSAT/LE07/C01/T1_RT_TOA')     .filterBounds(region)     .filterDate('2008-01-01','2008-12-31')     .map(addNDVI)     .map(cloudMask)     .map(landMask)     .select('NDVI') ;   print(collection1);     //reducer   var annualNDVI = collection1.reduce(ee.Reducer.median());   var region_NDVI = annualNDVI.reduceRegions({     collection: region,     reducer: ee.Reducer.median(),     scale: 30 // the resolution of the dataset   });     var ndviParams = {min: -1, max: 1, palette: ['blue', 'white','green']};   var boundParams = {palette: ['black']};   Map.addLayer(annualNDVI.clip(region), ndviParams, 'NDVI', 1);    Map.addLayer(region, boundParams, 'LA', 1);    //here's the problem  Export.image.toDrive({    image: annualNDVI,    description: 'CTG_NDVi',    scale: 30,    region: roi,    fileFormat: 'GeoTIFF',    maxPixels: 1e12,    formatOptions: {       cloudOptimized: true     }   });     My imports was:  var image = ee.Image("UMD/hansen/global_forest_change_2015_v1_3"),       region = ee.FeatureCollection("users/karmakersourav/shape"),       hansenImage = ee.Image("UMD/hansen/global_forest_change_2015"),       roi = /* color: #98ff00 */ee.Geometry.Polygon(           [[[91.26571433292804, 22.382447200369512],           [91.70516745792804, 22.24015355729955],           [91.81503073917804, 21.50608889294255],           [91.99081198917804, 21.158146277513005],           [92.36434714542804, 20.74775339022756],           [92.38631980167804, 21.362918378188724],           [92.68868864595584, 21.285515736407884],           [92.66671598970584, 22.12251851402064],           [92.42501677095584, 22.964696114885136],           [92.43600309908084, 23.237540932485988],           [92.31515348970584, 23.620600408965007],           [92.21627653658084, 23.781555321668222],           [92.04049528658084, 23.691042604440895],           [91.90865934908084, 23.731278240693108],           [91.89767302095584, 23.47960242153599],           [91.75485075533084, 23.28800680321665],           [91.77682341158084, 23.08602889002461],           [91.61202848970584, 22.99503954262493],           [91.46920622408084, 23.277915158047364],           [91.34835661470584, 23.308187798303887],           [91.22750700533084, 23.600467103459394],           [91.28243864595584, 23.872005072934794],           [91.32638395845584, 24.082808607079368],           [91.24947966158084, 24.263221977268092],           [91.06271208345584, 24.223152164577193],           [90.73312223970584, 23.88205115062075],           [90.63424528658084, 23.660857737733508],           [90.54635466158084, 23.328365731356676],           [90.65621794283084, 22.83312931280329],           [90.98580778658084, 22.437667249990497],           [90.98580778658084, 22.071621721722586]]]);
106550
I have the following OGR virtual format data source, which includes a few GeoJSON files and one KML file:  &lt;OGRVRTDataSource&gt;   &lt;OGRVRTUnionLayer name="union"&gt;      &lt;GeometryType&gt;wkbGeometryCollection&lt;/GeometryType&gt;     &lt;LayerSRS&gt;EPSG:4326&lt;/LayerSRS&gt;      &lt;OGRVRTLayer name="AMDT_02_2014_Finland_FIR"&gt;       &lt;SrcDataSource&gt;AMDT_02_2014_Finland_FIR.kml&lt;/SrcDataSource&gt;       &lt;SrcSQL&gt;SELECT *,'PEN(c:#FF00FF,w:10px)' AS OGR_STYLE FROM AMDT_02_2014_Finland_FIR&lt;/SrcSQL&gt;     &lt;/OGRVRTLayer&gt;      &lt;OGRVRTLayer name="OGRGeoJSON"&gt;       &lt;SrcDataSource&gt;tsa2014.js&lt;/SrcDataSource&gt;       &lt;SrcSQL&gt;SELECT *,'PEN(c:#00FFFF,w:10px)' AS OGR_STYLE FROM OGRGeoJSON&lt;/SrcSQL&gt;     &lt;/OGRVRTLayer&gt;      &lt;OGRVRTLayer name="OGRGeoJSON"&gt;       &lt;SrcDataSource&gt;ctr2014.js&lt;/SrcDataSource&gt;       &lt;SrcSQL&gt;SELECT *,'PEN(c:#FFFF00,w:5px)' AS OGR_STYLE FROM OGRGeoJSON&lt;/SrcSQL&gt;     &lt;/OGRVRTLayer&gt;    &lt;/OGRVRTUnionLayer&gt; &lt;/OGRVRTDataSource&gt;   Setting the layer style for the GeoJSON layers works fine when doing a ogr2ogr conversion to another format such as PDF. However, trying to set the KML layer style with &lt;SrcSQL&gt;SELECT *,'PEN(c:#FF00FF,w:10px)' AS OGR_STYLE FROM AMDT_02_2014_Finland_FIR&lt;/SrcSQL&gt; seems to have no effect. Default black pen is used to draw the polygon outline:     Is there a way to change the style of a KML layer within OGR VRT file? At least the syntax above does not seem to work.  The KML file used in this question can be downloaded from .
103532
I was using Google Maps with OpenLayers plugin in QGIS with my vector layer with projection EPSG:4326 with google map projection EPSG:3857 and "on the fly" transformation enabled.   It was matching all the vector layer with Google Maps but now it's not working.  How can I reproject Google Maps so that it matches with my vector layer as before?
56060
I am trying to digitize OpenLayers data (such as Google satellite imagery) with no success. Whenever I try to move or zoom the canvas the vector layer I digitized loses the position relative to the imagery.  I have read about this problem elsewhere but was not able to find a solution.  Does anyone have a solution as to how I can digitize satellite imagery for free in QGIS?
64449
There is probably already a post for my problem, but after long searching, I could not find a solution for my issue.  I am working with QGIS und I am using the following projection/datum: MGI / Austria GK East (EPSG:31256) (+proj=tmerc +lat_0=0 +lon_0=16.33333333333333 +k=1 +x_0=0 +y_0=-5000000 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs)   I just want to add a layer form the openlayers plugin. For example Google satelite. the Google satelite uses the following projection/Datum:  WGS 84 / Pseudo Mercator (EPSG:3857) (+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext  +no_defs).  The Problem that I am facing with, is that I can not get the Google layer in the same projection with my other layers (EPSG:31256)! They are not overlapping correct!  Is there a way to do this?
3184
I am running a GetFeature request against a WFS server which does not support to download all data at once. Can I use ogc:PropertyIsGreaterThanOrEqualTo to split the dataset into chunks at download them step by step? I wonder how I can construct the actual URL to include the paging filter. Here is what I tried:  http://example.com/wfs.aspx?request=GetFeature&amp;service=WFS&amp;version=1.1.0 \ &amp;typeName=example:example&amp;maxFeatures=50000 \ &amp;FILTER=&lt;ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"&gt; \ &lt;ogc:PropertyIsGreaterThanOrEqualTo&gt;&lt;ogc:PropertyName&gt;OBJECTID&lt;/ogc:PropertyName&gt; \ &lt;ogc:Literal&gt;50000&lt;/ogc:Literal&gt;&lt;/ogc:PropertyIsGreaterThanOrEqualTo&gt;&lt;/ogc:Filter&gt;   This is not a valid URI though... That's why uri-encoded the filter part:  http://example.com/wfs.aspx?request=GetFeature&amp;service=WFS&amp;version=1.1.0 \ &amp;typeName=example:example&amp;maxFeatures=50000 \     &amp;FILTER=%3Cogc%3AFilter%20xmlns%3Aogc%3D%22http%3A%2F%2Fwww.opengis.net \ %2Fogc%22%3E%3Cogc%3APropertyIsGreaterThanOrEqualTo%3E%3Cogc%3APropertyName%3EOBJECTID \ %3C%2Fogc%3APropertyName%3E%3Cogc%3ALiteral%3E50000%3C%2Fogc%3ALiteral \ %3E%3C%2Fogc%3APropertyIsGreaterThanOrEqualTo%3E%3C%2Fogc%3AFilter%3E   This actually works. Is there a "nicer" way to do this?
20609
I am trying to get a GeoJSON with projected coordinates to show in Leaflet.  I have no problems loading GeoJSON with lat/lng (EPSG:4326). Here is a  where I load the GeoJSON with unprojected lat/lng.  I am using the Leaflet 1.0.0-beta.2 (954e83d) in the fiddle but I am happy to use another version.  I am aware of the coordsToLatLng method of L.geoJson but no idea how to make this work.  This is the GeoJSON with the projected (EPSG:3857) coordinates.  {     "type": "FeatureCollection",     "crs": {         "type": "name",         "properties": {             "name": "urn:ogc:def:crs:EPSG::3857"         }     },     "features": [{         "type": "Feature",         "properties": {          },         "geometry": {             "type": "Polygon",             "coordinates": [[             [-625570.6, 6465993.0],             [-305006.9, 6696510.8],             [-546330.2, 6768547.6],             [-445478.6, 7053093.0],             [-279794.0, 7056694.8],             [-359034.5, 7337638.4],             [-211359.0, 7485313.8],             [62380.8,   6955843.3],             [220861.7,  6909019.4],             [91195.5,   6700112.6],             [213658.1,  6682103.4],             [-625570.6, 6465993.0]]]         }     }] }     Notes: I am new to Leaflet. I come from a GIS background. I have a very good understanding of projections and transformations. I have a very good understanding of OpenLayers3. I use OL3 to do things such as this on a daily basis. The data in this post is obviously just an example. I am trying to learn Leaflet in order to compare the performance with OL3. I know how to use QGIS and can unproject the data manually but this is not the point of this post.  This is not a repost. I have checked every bit of information on coordsToLatLng but didn't find any good documentation and nothing like a working example. Certainly no fiddle.  Just saying this as I have read a lot of Leaflet posts on gis.stackexchange with half-a-code. And a lot of answers which suggest to change the data. I know that Leaflet is not a GIS system and the makers are not from a GIS background. In the last hour I have just read a lot of rubbish about Leaflet using EPSG:3857 as default SRS and WGS84 being an SRS.
85939
I have successfully created . Handy to avoid multiple calls to GAS services whit ordinary getRange calls.  While the code perfectly works in javascript, it throws an error in Google Apps Script upon saving.  The offending code is:  return matrix.slice(startRow, endRow + 1).map(i =&gt; i.slice(startCol, endCol + 1))   GAS seems rejecting code in the .map function.
96879
How do I change the coordinate value of a vector layer (13293061,-572595) to 119.413,-5.13677 (vector data &amp; Google Earth do not match)?   If I output my data using Google Earth as background, the vector data does not match with the underlying google layer.   Printing the result to PDF also has this same problem.
110223
I've installed OpenLayers plugin and opened Google satellite layer in QGIS.   For a point in Beijing china, it's shown as 12961957,4852605 coordinate in blue status bar, and it should be 116.33710,39.83818 in longitude and latitude.   I also have some shapefile which are in lat &amp; long coordinate for Beijing area. So how can I overlay the shapefile data on top of Google layer in correct position?  Anyone can help me or provide some hint?
83656
I want to add an image stored in my Google Photos. How can I get the direct link to an image in my Google Photos? The links I copied are not direct.
71561
I need to create a web map showing many raster layers. I am using mapserver and want to use Openlayers, however I can't find any good tutorial about it. I see a couple of old questions ( and ) saying that there were no good documentation. Have the things changed recently?  I would like to find a tutorial teaching from basics to rather complicated things with good explanations of the code and pictures/examples of the results. For now I managed to do only the simplest web map with my .map file, but I need to customize it (add legends, group layers, add more controls, embedding, etc).
68625
I am using Geoserver to upload and display GTiff images in OpenLayers. The images are unsigned 16 bit grayscale at about 300MB size and are processed to to give better performance using the methods .  When viewing the images in OpenLayers it changes darkness when zooming in/out and from what I understand this is coming from the ContrastEnhancement property in the style script (SLD).  This is not necessary with the images I have and are only lowering the performance.   Is it possible to disable this altogether?  Changing from Normalize to Histogram in SLD makes it better, but now black values for some reason will be treated as no-value and become transparent when zooming in.  I am fairly new with GeoServer.
11908
I'm trying to map the maximal amount of days without rain using the TRMM dataset in Google Earth Engine. I'm doing this by iterating over the collection and if no rain has fallen, one gets added to the cell (code below). When rain has fallen the value gets multiplied by 0 so the "counter" is reset. Then I would like to store each result of each iteration in a Image collection and then select the maximum value to get the longest consecutive dry period.  But that is the theory. When I put this in a script I get an error while adding the image of one iteration to a list.   Does anyone know why this is and how this can be solved?  Code:  var list = []; function drylength(current, previous){   var mask = current.remap([0], [1], 0,"precipitation").rename('precipitation');   var sum = mask.add(previous).multiply(mask);    list.push(sum);   return sum; }  var dataset = TRMM .filterDate("2015-01-01","2015-02-01") .sort('system:time_start:');  var totalPrecipitation = dataset.iterate(drylength, dataset.max() .remap([0], [0], 0, "precipitation") .rename('precipitation'));  print(list); print(totalPrecipitation); Map.addLayer(ee.Image(totalPrecipitation), imageVisParam);   Furthermore it appears only 3 items are stored in the list which makes me assume the iteration is more complex than a literal iteration where all images are calculated one by one?   Here is an image of the error:    Errors written if image is not visible or for search engines:  Failed to decode JSON. Error: Field 'value' of object '{"type":"ArgumentRef","value":null}' is missing or null. Object: {"type":"ArgumentRef","value":null}.   and:  Unknown variable references: [_MAPPING_VAR_0_0, _MAPPING_VAR_0_1].
122910
Whenever I try to load the Google Hybrid layer on QGIS 1.8.0 and 2.0.1, I get this error:     This page was unable to display a Google Maps element. Please contact the site administrator. If you are the administrator of this site, please check the JavaScript console or check the following page for troubleshooting:    How do I correct the error so that the map can load?
11874
I am a beginner using QGIS (1.8.0 Lisboa) on a Mac (OS X 10.6.8 Snow Leopard). I work on a file with two layers in the following sequence (top to bottom):    a vector polygon layer with a few outlines of various buildings in France and Italy (CRS: EPSG:4326 - WGS 84 - "on the fly" re projection is activated ) a Google satellite layer uploaded via open layer plugin.   Sometimes when changing the scale (scrolling in and out) the Google layer updates a little wrong in size or position compared to the polygon layer. But as soon as I "pan" the map everything reconstructs right. Now the problem I have concerns the print composer.  The result of any kind of export - pdf, or image or svg - of my map (vector layer + Google layer in the background) differs from what is shown in the preview of the print composer: the vector layer and the Google layer positions are mismatching and in a different scale. I can send some pictures showing screenshots of the print composer preview and the final results if required.  I tried almost everything:    new files with different CRS settings "cache" update preview "render" update preview different paper sizes,  different scales,   The problem appears only using an open layer map (Google, OpenStreetMap...). If I try the same using two vector layer (shapefile) - one with the buildings, another one with the city in background - everything works out great.  ...exasperating! Since it is a real important research project I would be very grateful for some help and tips.
76614
I've noticed that my cloud mask wasn't working, so I've tried this simple test:   But my data uses the Surface Reflectance Landsat 8 imagery so, I just changed to that, and since there's no fmask band in this, I've changed to the 'pixel_qa' that also make those distinctions. I thought it was the same, but isn't working.    Code:  //Choose country using GEE Feature Collection  var region = ee.FeatureCollection('ft:1tdSwUL7MVpOauSgRzqVTOwdfy17KDbw-1d9omPw').filterMetadata('Country', 'equals', 'Portugal');  //Add region outline to layer ‐ for selected countries  Map.addLayer(region,{}, 'Portugal');  var landsat8 = ee.ImageCollection('LANDSAT/LC08/C01/T1_SR')  // Fmask classification values var FMASK_CLEAR_GROUND = 0; var FMASK_WATER = 2; var FMASK_CLOUD_SHADOW = 3; var FMASK_SNOW = 4; var FMASK_CLOUD = 5;  var mosaic = landsat8   .filterBounds(region)   .filterDate('2017-08-01', '2017-10-11')   .mosaic();  // Update the mask on our mosaic to mask cloud and cloud shadow pixels var fmask = mosaic.select('pixel_qa'); var cloudMask = fmask.neq(FMASK_CLOUD).and(fmask.neq(FMASK_CLOUD_SHADOW)); var maskedMosaic = mosaic.updateMask(cloudMask);  Map.addLayer(fmask, {min:0, max:5, palette:'green, blue, black, cyan, pink, white'}, 'Fmask'); Map.addLayer(maskedMosaic.select('B4'), {min:0, max:0.5, palette:'yellow, green'}, 'Masked NIR');