Tag Info

New answers tagged

2

I have tried to understand what you are asking without success. What I can say is that I think your code snippet should start from code like below: l = [[u'OBJECTID', 1.0 , 2.0 , 3.0 , 4.0 ], [u'LENGTH', 56.29, 61.8 , 11.01 ,164.03]] print l[0] From this you can see that a list gets printed: [u'OBJECTID', 1.0, 2.0, 3.0, 4.0] However, I am unable ...


2

This should be all you need: feats = self.layer.getFeatures() self.layer.startEditing() for feat in feats: score = scores[i] feat['F_SCORE'] = score layer.updateFeature(feat) self.layer.commitChanges() You are mixing update via the layer vs at the provider. Generally you should only update via the layer as it provides rollback and error ...


1

While the previous answer is only temporary while the table is open. It is the only method for changing column colors. Table settings are in the arcmap options dialog. These color settings affect selected rows.


2

I believe this is supported in versions > 10. Open up attribute table Access field properties (right click header)


1

I found a solution. To date it does not seem possible to export the attribute table to a csv and keep the value relation at the same time. There is however a way of accomplish it by using a your SQL client. I just made a join between the Child and the Parent table to display the value instead of the numeric id number. Note: If you are working with *.shp ...


0

If you want combine same records with same value in Attributes Table: Step 1) start editing Step 2) select records you want combine together Step 3) Merge selected records (You can find merge in start editing menu)


0

Solved this by establishing the relationship classes directly within each layer in the SDE instead of only within the .mxd. This ensures the relates persist at all times and in any .mxd, feature service they are included in. By default ArcGIS Online cannot handle one-to-many relationships. However, in my case I was working with many features that shared a ...


-1

I am not sure why my profile did not load correctly but my answer was posted as ^user56626. I apologize for the confusion.


-1

After you have done the Spatial Join as was already mentioned you can make a selection of the points will a value and field calculate the data from your polygon. Make sure your fields match and will accept your bulk data load.


2

You could use a Spatial Join This will join attributes from one feature class to another based on spatial location.So you can join the RockType attribute to any points that fall inside of the polygons.


4

In your Field Calculator, have the python parser enabled. You can do some neat things with the Field Calculator. I suggest checking out the Field Calculator Unleashed from ESRI for a bit of a code introduction to the Field Calculator. Then check out their documentation for more advanced ideas. I am using lower() and strip() in case there are values that ...


0

I believe the Interface ITableSort does not actually sort the table, it returns lists or cursors of sorted data, which is subtly different. This has been discussed as far back as 2007 as shown in these ESRI forum threads: http://forums.esri.com/Thread.asp?c=93&f=993&t=212789 http://forums.esri.com/Thread.asp?c=93&f=988&t=238000 One ...


1

In QGIS 2.8.x you can also get rid of specific or all fields. Open attribute table, Toggle editing mode, Click on "Delete column" button, Select all your unwanted attributes and Click "OK". Save edits.


2

You can create a new column as text field and insert your description for each class (1,2, and 3). First you create the column, then you select all objects of the first class (1) (select features using an expression). In the field calculator you can write 'normal route' and click on update selected. You can do the same steps for the other classes.


0

You can use the onEachFeature option of the GeoJSON layer to append the popups to each feature. And you can switch the popup contents inside of the onEachFeature function. I made an example on jsfiddle that you can use to see how it works. As you can see, the example displays a GeoJSON Layer with three markers on the map, two makers are cities with code of ...


2

QGIS can open shape files without the .dbf. So you could just delete the .dbf component and load in the .shp, which will bring in just the geometry.


3

You can simply save it as a new file and tick the "Skip Attribute Creation" box in the "Save as..." dialog. It does exactly what it says. There will be one numeric counter column named FID, apparently the Shapefile format requires at least one attribute? If you can, use something better, spatialite or geopackage.


3

Can't you just copy-and-paste your data into Layer X (a layer/shapefile/feature class/whatever) that has no attributes (besides OID and Geometry) and then copy-and-paste the now "empty" geometry back into your original layer?


6

You can enter the following code in the Python Console to clear ALL attributes to NULL for a shapefile loaded into QGIS. Select the layer from the layers panel (Table of Contents) and run the code: layer = qgis.utils.iface.activeLayer() layer.startEditing() for field in layer.dataProvider().attributeIndexes(): for feature in ...


2

Open the .dbf file with openoffice or others, and remove the data. You can use python to loop over the files and remove all but the headers See dbf python module


2

Perhaps you can edit the *.dbf file with Excel. Then you delete all fields but the geom one. Finally save and quit. It would be useful to keep an archive of the *.shp before doing this.



Top 50 recent answers are included