Hot answers tagged

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


3

List your mxd before you list your dataframe and layers import arcpy import os MxdFolderPath = arcpy.GetParameterAsText(0) if MxdFolderPath == '#' or not MxdFolderPath: MxdFolderPath = "C://Users//enclume//Carto//Cartes//UpdateTest" MxdCount = 0 sourcelypath = arcpy.GetParameterAsText(1) if sourcelypath == '#' or ...


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()


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'


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

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


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


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.


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


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)


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


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);


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.


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


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



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