New answers tagged

4

You simply have to save your style file(.qml/.sld). and everytime you import a new shape file, just load that style file.


2

You should save it as a template, so that each time you need it you can click project -> new from template. Just save your .qgs template file and copy it in the template directory (which can be found or specified in the General tab)


0

It's difficult to use one unic tool to get this result. You could merge layers and realize juste one geographic request and later, split your result....but it's not the beter way and it's time consuming. It's possible to get a result from many layers through many solutions : SQL : Use postgis + Qgis to request layers (= table) and save results to ...


1

Yes it's possible to do this in python. Check out the documentation on the Make Query Layer tool http://pro.arcgis.com/en/pro-app/tool-reference/data-management/make-query-layer.htm You can also use the make query table tool (http://pro.arcgis.com/en/pro-app/tool-reference/data-management/make-query-table.htm); if you specify a shape field the query table ...


2

You can use an adaptation of the next code (by using the path of your particular raster): from osgeo import gdal import numpy as np raster = "/home/zeito/pyqgis_data/utah_demUTM2.tif" dataset = gdal.Open(raster) band = dataset.GetRasterBand(1) print "rows = %d columns = %d" % (band.YSize, band.XSize) BandType = gdal.GetDataTypeName(band.DataType) print ...


1

Try UNION ALL for collecting all the geometries before running ST_COLLECT. SELECT ST_Collect(geometry) FROM (SELECT geometry from tbl1 UNION ALL SELECT geometry from tbl2 UNION ALL SELECT geometry from tbl3 UNION ALL SELECT geometry from tbl4);


0

As you noticed in the previous discussion GeoTools used to have a complex event system to handle updates but it fell into disuse and no one has felt the need to fix it. The majority of GeoTools users manage the GUI (if they have one at all) themselves and "know" when to do a redraw based on the internal logic of the program. You can directly call redraw on ...


3

There is a handy option in the QgsLayerTreeGroup class that you can use: findGroup. It traverses the whole tree. So, in your case, this would be enough: root = QgsProject.instance().layerTreeRoot() subGroup1A = root.findGroup('Sub_Group_1A') for child in subGroup1A.children(): if isinstance(child, QgsLayerTreeLayer): child.layerName()


1

Eugh, I guess one method is to: Search the children of Main_group, then Search the children of Sub_Group_1 and then Search the children of Sub_Group_1A. Basically repeating the loops, I'm hoping there is a much nicer and efficient way of accessing those layers but for now, here's the code I used: root = QgsProject.instance().layerTreeRoot() for child ...


1

There is a plugin called "changeDataSource", you can download it from Plugin Manager. After installing the Plugin right click the target file and update its data source, or you click the icon in the toolbar and update the data source of all files.


1

No such option as far as I know. Quick & dirty solution: Open QGIS project file with a text editor, search & replace.


3

After selecting the features you want, go to Layer -> Save as -> Under Encoding check 'save only selected feature'. A shortcut to the above process right-click the layer you selected features from, then go to save as -> Under Encoding check 'save only selected feature'


0

A MXD contains references to the datasources. The only way to get the data is to ask the person who send you this MXD for the source data. Source data can be a shapefile, a GDB or other kind of sources.


3

All I can suggest is that you find someone who knows where the data on that H: drive might be accessible on your system. If it is, then review Repairing broken data links. If it is not, then ask whoever sent you the MXD to send the necessary folders of data so that you can repair its layers. For a simplified workflow consider asking them for a map package ...


2

You didn't get the data in MXD format, you got an MXD. MXD's do not contain the data, just references to the data. Talk to whoever sent you the MXD and ask them for the data.


2

Follow the map panes tutorial and create an explicit separate pane for the labels.


1

This works with labels of features Right click on layer in table of content and convert to annotations in file geodatabase Use feature outline mask with mask kind = exact to convert annotations to polygons


2

Save to Layer File saves a Layer (in memory, layer from disk, or layer from ArcMap) to a layer (.lyr) file. It won't work directly on a feature class or shapefile. You need to first use Make Feature Layer. See Save to Layer File and Make Feature Layer on ArcGIS Desktop Help. import arcpy from arcpy import env env.workspace = r"D:/core i 5 data/symon ...


1

ArcGIS Desktop already has a tool that does this. It's called Feature Compare. You can limit it to only compare the Geometries. You could use the output from this tool to further scrutinize the geometry. For example, if Feature Compare finds geometry differences for features with ObjectID 142 (in both feature classes), you could then pump those features ...


0

A quick and easy way to detect geometry changes is to compare Centroid locations. Feature to Point is a good tool to create Centroids from Lines or Polygons. If the closest Centroid in the compare layer is greater than .001 (whatever tolerance you choose) then the geometry changed.


0

If I understand your code right, you are using a JSON representation of your geometry to compare old and new geometry. If python can't match the string to your list of strings, it then adds a -1 to your change field. I think using a json representation, or WKT or string, to compare geometry for changes might get tricky. What if the change was a reordering ...


0

Simply create an SLD style with a MaxScaleDenominator set to the value that you want the labels to be added and a TextSymbolizer with a reference to the traffic volume attribute. You will probably want to set some of the options listed at the bottom of the TextSymbolizer section of the documentation.


0

"/Edit 1: Data from GPS sources are usually in wgs1984 by default. Check that first then you can skip the reproject step. Rightclick on the layer in ArcMap and choose "Properties" click tab "Source" and check if the projected coordinate system is WGS 1984." Not directly on the fly, you need to export it to kmz then open it in Google Earth. If this dont work ...


0

To do this there is a Layer To KML tool: This tool converts a feature or raster layer into a KML file containing a translation of Esri geometries and symbology. This file is compressed using ZIP compression, has a .kmz extension, and can be read by any KML client including ArcGIS Explorer, ArcGlobe, and Google Earth.


6

You need to understand that there is no such thing as a QGIS Shapefile, A Shapefile is a shapefile regardless of what software was used to create it. According to ArcGIS Online Help: A shapefile is an Esri vector data storage format for storing the location, shape, and attributes of geographic features. It is stored as a set of related files and ...


2

If you give your friend the shapefile, and it contains a suitable *.prj, then it should be usable in ArcMap but will need to be symbolized anew. The best thing will be to perform a test transfer of data and see if it works for you. If you are planning to share the shapefile and a layer definition file (*.qlr) to try and preserve its layer properties I would ...



Top 50 recent answers are included