Hot answers tagged

11

Some approximate numbers: A0 paper is about 1m each side, a 600 sq km area is about a 25x25km square. So your printed map will be at a scale of 1:25000, more or less. I'm not familiar with SAS.Planet, but a Level 18 tiled basemap is 60cm per pixel at the equator (see https://wiki.openstreetmap.org/wiki/Zoom_levels). Labels on the map will (usually) have been ...


9

There is a direct and very easy way to do this. In the Clip tool, press the green cyclic arrows button next to the Overlay layer dropdown menu. That instructs to iterate the operation over the features of the layer. You'll get seperate layers for each polygon. For more details check the "Iterative execution of algorithms" article from the QGIS ...


9

You can use "Vector General -> Save Vector Features to File" tool. In the tool window, you can set the coordinate precision using COORDINATE_PRECISION=NUMBER beneath "GDAL layer options".


8

You can do this in two steps using QGIS. (1) First, use the tool the "Join Attributes by Location" to create a new field in your points layer that describes which polygon each point falls into: (2) Next, run the "Split Vector Layer" tool to write separate shapefiles for each unique value in the new field created by the previous step: ...


7

It had happened to me on QGIS 3.18 as well, the line pattern fill for polygons was missing when exporting as SVG. Example in the Print Composer Example of exported SVG (viewed via Google Chrome) In this case, I would probably follow what is mentioned in the Infobox when exporting as SVG from the Print Composer The SVG export function in QGIS has several ...


6

If you export your features to CSV you can select AS_XY in the Geometry field and it will produce an X and Y column in the output.


6

Use Reproject tool to conver the layers into a single CRS. Merge reprojected layers with the Merge tool. Export merged layers as a CSV-file.


6

You could add two new columns to the shapefile, then use field calculator or better yet the Calculate Geometry tool to populate the values in the new fields. You could then Export the shapefile to csv or Excel. To Export to Excel, use the Table to Excel tool. There are many ways to go about this, but this is a fairly simple workflow (Pro 2.7.0): First Open ...


6

You can create an external world file, which provides the georeferencing information for the raster image you export. ... # save the image img.save('/home/bera/Desktop/test_render.png') # world file content pgw_content = QgsMapSettingsUtils.worldFileContent(ms) with open('/home/bera/Desktop/test_render.pgw', "w") as f: f.write(pgw_content) ...


5

Create a pandas dataframe from your data and use to_csv. A workaround, but you can choose whatever delimiter you want: import arcpy import pandas as pd fc = r'C:\GIS\data\Bakgrundskartor_LMV\Vagkartan.gdb\bs_riks' #fields = ['KKOD', KATEGORI','SRIKT'] #Either list the field names manually fields = [f.name for f in arcpy.ListFields(fc) if f.type not in ('...


5

The qml file style file you get when exporting layer styles is different from the one you get in the "Style manager" when you export. The second format is the accepted one in "Create categorized renderer from style" What is missing is a script to get "Style manager" compatible file from an existing layer style. I've made a ...


5

First, let's emphasis that it is a strange requirement... CRS and axis order are tightly coupled, so the clean solution is to export and load the data using the same CRS. That being said, you can create the (not anymore)Well-known-text using swapped coordinates using a virtual layer. Go the the menu layer / add layer / add-edit virtual layer and enter the ...


5

In GIS: Set a Min Max value for one raster (Right click > Properties... > Symbology). Copy The raster's style Select other rasters Paste the style


5

You have to use like this: QgsVectorFileWriter.writeAsVectorFormatV2(#layer#, #file_path#, #transform_context#, #options#) file_path= "/Path/To/File.shp" transform_context = QgsCoordinateTransformContext() options = QgsVectorFileWriter.SaveVectorOptions() options.driverName = "ESRI Shapefile" QgsVectorFileWriter....


5

Does DxfLayer even support multiple inputs? No. The error QgsDxfExport.DxfLayer(QgsDxfExport.DxfLayer): argument 1 has unexpected type 'list' states that, explicitly. But you can use dxfExport.addLayers([QgsDxfExport.DxfLayer(lyr) for lyr in lyr_names])


4

From QGIS 3.18, you can use "Export to spreadsheet" algorithm available in Processing Toolbox. It enables to export one or more layers in multiple sheets, to overwrite or append them to existing files. Output formats supported are Excel XLSX and Open Document Spreadsheet (.ods) Fine for exporting full layers, otherwise, keep using already mentioned ...


4

Select rows Copy selected rows to clipboard Paste in Excel


4

Most likely, the image editing tools you are using are not expecting floating-point color channel (band) values, but integer. Floating-point color data is unusual outside of scientific (and sometimes game) computing, and many image editing or viewing programs do not support it. You can use Image.visualize to convert the image to RGB, in the same way that Map....


4

For a temporary solution: Navigate to /home/fateme/.local/share/QGIS/QGIS3/profiles/default/python/plugins/simplesvg Open SimpleSvg.py file in a text editor. Find all QgsWkbTypes.GeometryType.LineGeometry text. Change all to 1. Save and restart QGIS.


4

Assuming your shapefile contains point-data and you have categorized this points by field in the data-table (see screenshot 1) you can install the MMQGIS plugin and export als KML file (see screenshot 2). Result is shown (partially) as screenshot3 screenshot 1: screenshot 2: screenshot 3:


4

one simple solution would be to use Layeractions and log the clicked coordinates within the Log Messages from QGIS: Open the Properties of your OSM Street layer and go to the Actions tab Press Add Define a Python Action Enter the Code The Code fragment: QgsMessageLog.logMessage( "[% @click_x %] ,[% @click_y %]", tag='Coordinates', level=Qgis.Info)...


4

If I understand your issue: I would use the Rasterize (Vector to Raster) algorithm in the processing toolbox. Set your polygon layer as the input. Set the burn in value to 1. Set your desired pixel size in georeferecnce units, and your desired extent etc. This will result in a layer that has 1 as the values in the polygon areas and nodata in all other cells. ...


4

Thanks for the thumbs down. In case anyone is facing the same issue, in my case, the problem was that I was trying to use a different page size in the Print Layout, which causes the labels to change position and size. In my case a custom large size was making the labels so small they were barely visible.


3

In GIS, scale is usually expressed as a ratio. So you just need to work out the ratio of the scale you want. 1" = 100', for example, would be a scale (ratio) of 1:1200 (1 inch = 1200 inches), so if you set your scale in GIS to 1:1200, then your printed map will be at a scale of 1:1200. How you communicate that to the map reader is up to you, I don't ...


3

There is a very cool tool in QGIS called "Geometry by expression". It allows you to convert the geometries generated for visualization purpose only with geometry generator to actual geometries. You can use the same expression as in the Geometry generator. You find the toll in Menu Processing / Toolbox / Geometry by expression.


3

There are two things going on here I think: there is a difference between relative and absolute paths: /tmp/ is an absolute path, relative to the root directory. results/... is relative to the directory you are in. This is the same as ./results indeed, you cannot store a file to a folder that doesn't exist yet. thread In stead, you should: create the ...


3

You need to explicitly define the visualization of the exported image. This can be done with visualize() command. Try adding visualization parameters: var greyvis = { min: -1000, max: 1000, palette: ['white', 'black'], }; And in the export command, instead of using dNBR as an image input, use dNBR.visualize(greyvis) Note I made the visualization min, ...


3

The grouped reducer output are always a bit messy. Here is a way to rework your output to a feature collection: // rework output var featureCollection = ee.FeatureCollection(lossperyearperelevation1.map(function(element){ element = ee.Dictionary(element); // cast var list = ee.List(element.get('groups')); var feats = ee.FeatureCollection(list.map(...


3

In the Layout, right click on the page and choose "Page Properties...". In the side panel "Item Properties", make sure "Exclude page from exports" is unticked.


3

Your raster size is 0x0 since your extent is only about 0.08 degrees latitude (the difference between North and South) yet you are asking for a resolution of 2.1174 degrees latitude. Ditto for East-West. I suspect the 2.1174 (etc) is actually intended to be in metres, and you accidentally have the CRS as 4326 (unprojected, in degrees). If you change to a ...


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