Hot answers tagged

72

QGIS v3.x Right click on the layer in the Table of Contents (aka. legend or layer tree) and open the Save As... dialog. Once there, click on the Format option list and choose MS Office Open XML spreadsheet [XLSX]. Note that you also have an option for Libre Office files: Open Document spreadsheet [ODS]. ORIGINAL ANSWER (no longer valid): Install the XY ...


46

GPS Visualizer will take a Google Map route (url) and convert to .gpx "You can ignore most the options, just select Gpx and paste the Google Maps URL into the box labelled “provide the URL of a file on the Web” and then press the Convert button" http://www.gpsvisualizer.com/convert_input Guide http://bedsforcyclists.co.uk/articles/2014/04/13/how-...


29

To get a csv file of the attribute table, rightclick on the layer in the legend, select Save As ..., and change the file format from shapefile to CSV. You might need to change the separator from comma to semicolon in a text editor if Excel does not like the default separator.


27

Steps for QGIS 3.6 A few things have been moved and renamed from QGIS 2.x (see below), this is how it works in 3.x: Open a new Print Layout (formerly "Composer"): Menu Project - New Print Layout Right click somewhere on the white empty page, click "Page Properties". In the right sidebar the "Item Properties" tab will be activated, modify the background ...


23

Try this Frida: Create a folder to store your Shapefiles there (e.g., I've created the folder /tmp/data/, I use GNU/Linux). In QGIS, open the QGIS Python console. Write the following line, editing the right hand side to match the full path to your folder (make sure you include the trailing slash/backslash): myDir = '/tmp/data/' Press Enter. Copy the ...


21

The iface module is automatically imported when directly working from the Python Console. In the other cases (for example, when running a script from the Processing Toolbox), you need to manually import it in this way: from qgis.utils import iface


20

In QGIS you can use R-Click and Save As... to save the WMS, and any other service, as a raster image. It saves is at a tiff, and the resolution needs to be set by you. There are other expression and creation options as well.


18

In order to solve this question, we need to use timers or something that delays the execution of the script, so the canvas can reflect the layer arrangement at the time the map is exported. In other words, if you don't use timers you'll end up with 3 PNG images with the same content because everything will happen too fast. In the QGIS map, set the map ...


17

To export a route to KML you'll have to use Google MyMaps. add a route to new or existing layer drag and drop the route to suit your needs Open the maps options menue (3 dots above the layers) Export to KML You can then use any service to convert the KML to GPX. I prefer GPSies. (edit: now acquired by AllTrails)


16

This is possible in QGIS using the print composer. You'll need to both: Remove the background color from the map item. This is done by unchecking the "background" option in the map item's properties. (The default is a white background) Set the page itself to a transparent style. This is done through the composition properties tab.


16

If you're looking to reproject csv files from the Python Console in QGIS then you could use the following script. All you would need to change are the three paths which are mentioned in the comments. Essentially, the script imports your csv files into QGIS as shapefiles (assuming your geometric fields are named X and Y). It then uses the qgis:reprojectlayer ...


13

Use the plugin MMQGIS to export geometry to csv. I just try with your file, it works perfectly.


13

I added aerial imagery from GIS server and created fishnet over the area of interest: I use fishnet as index layer for my data driven pages, making sure the sorting order coincides with record order in fishnet table. I applied script (see below) to travel through pages, export them to temp raster, clip it to PNG raster named after page name. Result shows ...


13

If you want to export to PDF then you will need to create a composer window first. 'File'-> 'New Print Composer'. Once you have done this and have a new print composer then you can add a map. The final step is to export the composer to PDF 'File'-> 'Export to PDF'. The print composer is where you can add your map legend, north arrow, scale, title, etc. You ...


13

For clarity (Windows 10) Download the OSGeo4W (64 bit) https://qgis.org/en/site/forusers/download.html Install as Advanced Install Change the default GDAL to 3.1.0.137 Then in QGIS you should get the option for Exporting to Geo-PDF Hopefully soon (when GDAL/GRASS is updated) this becomes the default in the QGIS install.


12

Quantum GIS now supports this feature, the resolution can be set and can include an optional world file containing georeferencing information. In the print composer check the "World file on" box under Export settings.


12

To create a great circle, you need either a custom azimuthal equidistant (aeqd) projection or a gnomonic (gnom) projection on one of your points. In those projections, the great circle is a straight line, which you can densify to have a curved line in other projections. If the great circle crosses the 180° E/W line or the poles, it might be useful to cut the ...


12

There's also the MMQGIS plugin which, when downloaded and installed from the toolbar (Plugins > Manage and Install Plugins...), has the tool: Attributes Export to CSV File


12

In QGIS versions 3 and above, the easiest way to export an attribute table is to: Right-click the attribute layer in the layers menu Select Export and Save features as... At the top of the program window, select Comma Separated Value [CSV] in the format drop-down menu Type a file name for the file to be saved Click the three-dot button next to the file ...


11

Those files are generated in ArcGIS. Are auxiliary files for georeferencing and visualization, aren't part of GTiff as .shx or .dbf are in a shapefile. .tfw is ESRI World file .ovr are piramid layers .xml is schema look and histogram .cpg is for TIFF interpretation. .dbf is for raster attribute table (thanks to @radouxju) You can add .tfw using GDAL ...


11

You are exporting to Default.gdb. You need to change the location to a folder and the format menu will be activated to choose among the list of formats. [ [


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 ...


10

If you open the attribute table, open an empty excel spreadsheet, Select all or some of the records in the attribute table. to select all the button in upper left gives this pulldown to accomplish that. right click on the left edge (on a box). copy selected. Switch to the spreadsheet. right click in the upper left cell (just one cell) ctrl+V (paste)....


10

Choose Layer > Save As... with format as CSV. Make sure 'Layer Option', 'GEOMETRY' is set to AS_WKT in the 'Save vector layer as...' window. The first column of the CSV file will now include polygon coordinates.


10

Looks like GeoJSON file, You can view it by copy pasting the feature in geojson.io. Save the file with the .JSON extension instead of the .txt and you should be able to use it.


10

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".


9

There is now native export into DXF in newer versions of QGIS which allows to export map layers including the labels: More about the functionality can be found here: https://www.qgis.ch/en/projects/dxf-export The DXF export functionality was developed by Jürgen Fischer (Norbit) and Marco Hugentobler (Sourcepole AG). The project was co-financed by SIGE (...


9

It's used to eliminate any whitespace you may have around your layout in the output file. For example, I have some MXDs set up to print on a specific paper size with specific margins, so that the maps I print can be 3-hole punched or bound without the holes affecting the map window. But sometimes I don't care about that and just want everything to fill the ...


9

from qgis.core import * suffix = "_foo" pathToFile = "/path/to/wherever/" layers = iface.legendInterface().layers() for layer in layers: newName = layer.name() + suffix + ".shp" ret = QgsVectorFileWriter.writeAsVectorFormat(layer, pathToFile + newName, "utf-8", None, "ESRI Shapefile") if ret == QgsVectorFileWriter.NoError: print newName ...


9

If I may suggest an alternative, you could use data from Open Street Map (OSM). From the OSM webpage: "OpenStreetMap is open data: you are free to use it for any purpose as long as you credit OpenStreetMap and its contributors. If you alter or build upon the data in certain ways, you may distribute the result only under the same licence." (http://www....


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