Hot answers tagged

5

When in doubt follow Paul Ramsey's GeoTiff compression for dummies strategy. gdal_translate \ -co COMPRESS=JPEG \ -co PHOTOMETRIC=YCBCR \ -co TILED=YES \ 5255C.tif 5255C_JPEG_YCBCR.tif and if you need overviews too then add gdaladdo \ --config COMPRESS_OVERVIEW JPEG \ --config PHOTOMETRIC_OVERVIEW YCBCR \ --config INTERLEAVE_OVERVIEW PIXEL \ ...


4

I don't believe qgis is able to process Google Earth cache file. I advise you not to wast your time. Instead use SAS Planet alternative. It stores tiles locally as file:///D:/Software/SAS.Planet/cache_gmt/z{z}/{x}/{y}.jpg Then you may use TileLayer or MBTiles plugin For version under than 3.0. qgis version 3.0 and above : Please use XYZ Tiles configured ...


3

Just use expression to link the attribute as a source for your image like you do in case CROSS SECTIONS attribute [% "Cross-Sect"%] In your case use: <img src=[% "PHOTOS"%] width="600" height="600" > This retrieve the string (path to photo on your drive) from PHOTOS attribute for atlas feature. If you can't see image even with manually inserted ...


3

I got a solution. Converted all the files into lat long wgs84 CRS. By using the code given below- import numpy as np import rasterio from rasterio.warp import calculate_default_transform, reproject, Resampling dst_crs = 'EPSG:4326' with rasterio.open('path/test.tif') as src: transform, width, height = calculate_default_transform( src.crs, dst_crs, ...


3

Assuming your image is black-and-white only, you georeference it and then use extraction - contour lines to extract all the black lines as a shapefile. Since you get rather pixelated polygons, you'll then need to do some manual clean-up and maybe convert the polygons to lines, if you want to process them further.


2

Variable d doesn't exist and sN is not used anywhere within the file. So, changing that line into comment avoid you to get that error. I'm not sure if it works but try these: Open erosionTab.py file in any editor. (C:/Users/Sergio/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\SemiAutomaticClassificationPlugin\maininterface\erosionTab.py) Go ...


1

I used gdal_translate -a_ullr 0 0 8250 4090 -of "BMP" source.bmp target.bmp which solved the problem.


1

You could try using the color option for the Icon style (it might need to be a semi opaque rgba value) this.styleHomeGreen = new Style({ image: new Icon({ src: 'content/map-icons/home-green.png', color: 'red' }) }); or a style array could provide a background and an icon this.styleHomeGreen = [ new Style({ image: ...


1

Conceptually I believe the answer lies in the following filter. ee.Filter.contains() , however, I have never been able to implement it correctly. Having said that, I do have a workaround. If you go to the inspector tab, and then click on the images that you are interested it (the ones that contain your ROI) you can see the WRS_PATH and WRS_ROW in the ...


1

It appears you cannot add or remove picture elements using ArcPy. If it's acceptable you can use a work around and set the element height to 0. pict = arcpy.mapping.ListLayoutElements(mxd, "PICTURE_ELEMENT")[0] pict.elementHeight = 0 Here's a red bar picture element which disappears once I set its height to zero. It sounds like you're working outside the ...


1

If you want you want to make the boundaries look smoother you can apply a low pass smoothing filter or a Gaussian filter using SAGA in QGIS, e.g.: To find these filters in QGIS follow this path: Processing Toolbox -> SAGA -> Raster Filter -> Gaussian filter or Simple Filter Keep in mind though that they will change your data values.


1

Solved by Mike Mike's solution here Thanks to @Mike to his help. I put the solution that Mike did in codesandbox (just in case, in a future may not be available) index.html <!DOCTYPE html> <html lang="en"> <head> <title>Simple Map</title> <!-- The line below is only needed for old environments like Internet ...


1

You cannot get the extent from the center and number of pixels alone. These images all have the same center and number of pixels: You also need to know the resolution (the distance on the ground covered by each pixel) and the rotation (was the image taken with north at the top)


1

I put up some write ups and examples here for a class. http://www.gistechsolutions.com/leaflet/DEMO/ I have some write ups and examples, You can view source and copy/paste my code from the pages, and even get the data if you need it. You may want to check out "Panel Map" and "NY Leg map", both of these apps use links and images that work off the on-click ...


1

In this section var precipNum = lastPrecip.reduceRegion(ee.Reducer.last(), geom) ... The issue is that lastPrecip is a temporary layer only stored in memory and doesn't have a nominal scale so GEE can't determine the scale by itself. There is a simple solution to this i.e. just specify the scale you want. So the code would now be var precipNum = ...


1

Fixed the link http://www.gistechsolutions.com/leaflet/DEMO/basic/popupimage.htm Right click on http://www.gistechsolutions.com/leaflet/DEMO/basic/popupimage.htm view source. note line 43, is where I define the popup. Since the popup is basically HTML I style it with a size and center() it in the popup. The GeoJSON file picture value is stored in feature....


1

Your code is fine, it's doing what you need, but you are not watching right the results: var image = imageCollection.first(); var bad_footprint = image.geometry() Map.addLayer(image, imageVisParam, "Original Image"); Map.addLayer(image.geometry(), {}, "Image footprint (bad)"); Map.centerObject(image); var original_image = ee.Image("COPERNICUS/S2/...


1

I was able to solve the problem using third party software "Geosetter". The software allows users to select geotagged images and export them to GoogleEarth, with several settings to choose from regarding size, style, naming etc. Proper image naming requires some preparation, otherwise the tool is fairly easy to use.


1

I have a suggestion for who are working on leaflet and need SAS planet data integration, you need only to add this line into your code to call the tiles: var SAS = '/cache_gmt1/sat/z{z}/{y}/{x}.jpg',


1

I ran into the same issues as you while georeferencing images. Sadly there were no real helpful books/texts out there which helped to get information on the offset/distortion. I did the georeferencing using ArcGIS 10.2.2 at that time and when I set all my control points I used aerial images/Google Earth/older aerial images from different WMTS servers to ...


1

Suppose you know that pixel (50, 75) is at (8.3, 2.3) degrees and pixel (250, 900) is at (12.3, 6.3) degrees. Then your pixel width W is (12.3-8.3)/(250-50) and your pixel height H is (6.3 - 2.3)/(900-75) Then your top left corner (centre of pixel (0,0)) is at (8.3 - 50*W, 2.3 - 75*H) - i.e. its 50 pixel widths left of the first reference pixel, and 75 ...


1

The overall flow is, you mask the image, convert to array, then sample the arrays at points. Here's a sketch of the solution in Python (where classes is an image in which each pixel stores an integer label 0, 1, 2..., composite is some multi-band image of predictor bands and KERNEL is whatever shape you want: # Get only patches completely covered by the ...


1

First of all, I would remove all locations where there is some vegetation, because NIR and Red are strongly linked with the vegetation, so they cannot be used for direct soil characterisation if there is a vegetation cover. For a quick and dirty first "non vegetation" map, you could use NDVI < 0.1. Then, it depends on how much "expert knowledge" you ...


1

Some functions in Google Earth Engine make the object 'loose' its type. If you have a look at setMulti documentation, it says that returns an Element not an Image. So you have to tell Earth Engine what it is (this is called "cast a variable"). var myImageWithProperties = myImage.setMulti({ Name: "ones", ID: 1234 }); // cast it myImageWithProperties = ...


1

Explanation It looks like your rasters overlap slightly. When you make overlapping rasters transparent, the overlapped area will appear darker than the surrounding area. With an array of rasters, this creates the appearance of a dark border around the each raster. Easy Solution - only works if the rasters are your base layer You can achieve a similar ...


1

First you have to set up the map view exactly as you want the georeferenced image to look. If there are other layers turned on then those will be on the final image too, so turn them all off beforehand. OpenLayers and QuickMapServices both default to CRS epsg:3857 so to be safe you should reproject your project to that too while you create the image(s). ...


1

Reading and plotting works just fine, but the problem is in the warning you get from matplotlib: If an image has integer values matplotlib will clip them to interval [0, 255] If an image has float values matplotlib will clip them to interval [0, 1.0] In your case all values were clipped to either 255 or to 1.0 and that is why you see a white image. Also ...


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