Tag Info

12

You would select the rows which are NULL (sounds like you have done that) then simply run the calculate field tool. Right Click the field you want to modify (while objects are selected) Then input your value "newvalue" NOTE: 1. if you don't have a selection this will work on "ALL" rows in your table! 2. Double quotes in this area on your text/date ...

10

If you are convenient with Python then writing script for this task is preferred. Take a look at these key things: Get a list of featureclasses/shapefiles in gdb/folder - ListFeatureClasses. In the bottom of this help article there is also an example "Copy shapefiles to a geodatabase" which you can use to start writing script. Check for existence of ...

7

Have you tried: if row[i] == 9999: row[i] = None cursor.updateRow(row)

7

Never, never, never use embedded cursor loops. Never! It is bad for performance, memory, data safety, etc. It is very, very bad. See my blog on Turbo Charging Data Manipulation with Python Cursors and Dictionaries. Load the look up table into a dictionary with a data access search cursor, then update the other table with an update cursor by matching it ...

6

for getting one popup info, you should do this: map.popups[0]; // the firstly added popup for removing one popup: map.removePopup(map.popups[0]); // it will destroy firstly added popup map.popups[0].destroy() // the same thing for removing all popup from maps: var pops = map.popups; for(var a = 0; a < pops.length; a++){ ...

6

Make a view in PostgreSQL, where the age column can be dynamically created using some useful functions: SELECT date_trunc('month', age(now()::date, '1994-03-19'::date)) AS age; age ----------------- 19 years 5 mons (1 row)

6

No problem, you only need to download QGIS 2.4 and install it. the application (QGIS.app) is placed in /Applications/ the frameworks are in /Library/Frameworks/ (/Library/Frameworks/GDAL.framework for example) the extensions are in /Users/you/.qgis2/python/plugins (hidden folder, /Users/me/.qgis2/python/plugins/tablemanager for example) the Python ...

6

Ryan, You should be able to with the SQLite dialect: $ogrinfo -ro -geom=no -where "TZID='America/Boise' OR TZID='America/Denver'" tz_world.shp tz_world INFO: Open of tz_world.shp' using driver ESRI Shapefile' successful. Layer name: tz_world Metadata: DBF_DATE_LAST_UPDATE=2012-06-25 Geometry: Polygon Feature Count: 3 Extent: (-179.999900, -89.999900) ... 6 You can use the following code which connects the attributeValueChanged event to a function we can define which inserts the results of the$now expression. Highlight your layer and copy/paste the following into the Python Console: layer = qgis.utils.iface.activeLayer() def update(): field = layer.fieldNameIndex('mod') e = QgsExpression( " $now " ) ... 4 I've updated the instructions on the website. Hope it's a bit clearer. Nicklas is right you don't really need the makepostgis.bat if you just copy the like folders to your postgresql install (you could also remark out the create db in it since it does copy all the files). You should be able to just overlay ontop since the zip structure is the same as ... 4 Using Field Calculator$x and $y operators, you can over-write the old coordinates in attribute table. Just run it once - after you have moved all points to the desired locations. Field Calculator v.2.x: http://docs.qgis.org/2.0/en/docs/user_manual/working_with_vector/field_calculator.html Field Calculator v2.4+: ... 4 May be an overkill, but I tried Python with the Field Calculator: 4 Yes, eco is an object. You need to iterate to see its element. arcpy.env.workspace = "C:\\Users\\Documents\\Scoring\\Ecodis_clip_split" #set workspace to folder with values eco = arcpy.SearchCursor ("NAME.shp", "", "", "area_ha", "") #search for the value in attributetable for row in eco: print(row.getValue("area_ha")) 4 I finally made it with a little extension of the ol.Map object: if (ol.Map.prototype.getLayer === undefined) { ol.Map.prototype.getLayer = function (id) { var layer; this.getLayers().forEach(function (lyr) { if (id == lyr.get('id')) { layer = lyr; } }); return layer; ... 3 Here's a simple script that would run in same directory and check for and delete shapefiles... You can just run it from IDLE or ArcGIS python window or you could create a toolbox and add it as a script and add parameters. import arcpy, sys OutputFC = sys.path[0] + "\\downloaded1.shp" if arcpy.Exists(OutputFC): ... 3 The two versions can be installed in parallel, but the connection of file appendix .qgs will be set to the latest installation. The older version may break if plugins will be installed that are not compatible with that. 3 Thanks to Jeff's help we got the answer via the ArcGIS Discussion Forum: Public Sub SetZValueOnPoint(ByVal point As ESRI.ArcGIS.Geometry.IPoint, ByVal zValue As System.Double) If point Is Nothing OrElse point.IsEmpty Then Return End If Dim zAware As ESRI.ArcGIS.Geometry.IZAware = CType(point, ESRI.ArcGIS.Geometry.IZAware) ' ... 3 This does not seem like a clear question to me, but I think what you are asking is that now you have the rows in the feature class and the csv data, how do you update the row? The crows variable is the cursor by the way. That is easy, you just need to add in your if-else statement: crows.updateRow(crow) so here is an example in your code, this is ... 3 During configuration PostGIS is looking for GDAL, the GDAL-config-file that is: http://postgis.net/docs/postgis_installation.html#installation_configuration So yes, I think you need to build PostGIS again; I don't know about a way to point PostGIS to a different/new version of GDAL. 3 Following the instructions from Installing PostGIS 2.0 on ubuntu on linfiniti.com: 1) sudo apt-add-repository ppa:sharpie/for-science # To get GEOS 3.3.2 sudo apt-add-repository ppa:sharpie/postgis-nightly sudo apt-get update sudo apt-get install postgresql-9.1-postgis 2) create a new database. 3) create postgis extension: CREATE EXTENSION postgis; ... 3 Edit: The reason that you don't have the extension folder is that you are not on PostgreSQL 9.1 when the extension feature was introduced. What you should do is put the binaries in the bin-folder as described in the beginning of the readme-file. Then running postgis means that you are supposed to run the sql-code in the file postgis.sql to install the ... 3 del(insprow) should be: del(inspectionRows) 3 Your input geometry needs to be built from the existing geometry. If I want to just change the Y coordinate (i.e. Latitude) to 66.23, I can use the following command (when data is of type geometry): update mytable set the_geom=ST_SetSRID(ST_MakePoint(ST_X(the_geom), 66.23), 4326) where gid=9; Since your data is in Geography ... 3 Provided that the points and polygons overlap (or it is clear which point is closest to each polygon) you should use Spatial Join for this analysis. It will give you all (or specified) columns from your join features (polygons) to your target features (points). You should probably use Join one to one for Join Type and Intersect or Within if your points are ... 3 I dont which one is better idea rule or trigger but here how it is done using trigger CREATE TRIGGER updatetable INSTEAD OF UDATE ON table_name_here FOR EACH ROW EXECUTE PROCEDURE do_magic(); CREATE OR REPLACE FUNCTION do_magic() RETURNS trigger AS$BODY\$ DECLARE -- if you need variables they are here ta text := 'table_name' BEGIN ...

3

You forgot to specify the arcpy module when calling UpdateCursor. rows = arcpy.UpdateCursor ("Table2.shp", "", "", "area_eco", "") I second Aaron regarding using the with statement Also, I would reference one of my OS answer regarding using either the "classic" cursor or the data access (da) one. Finally, I would like to point you to a few resources to ...

3

What you want is available starting from QGIS 2.6 and is called Virtual Field. Just create a new attribute, select "Virtual Field" and insert the expression used to calculate the new column. For your case: CASE WHEN "Age" < 18 THEN 'Child' ELSE 'Adult' END You can use a recent nightly build / test build to use this new feature. The value relation ...

3

Try using ... set rows = arcpy.UpdateCursor("qcPoints") instead of setting rows to qcPoints_lyr. You should be able to do away with the Append that way. I thought that might work and it sounds like you confirmed it. MakeFeatureLayer is needed for doing selections but you don't need to set your updateCursor to the output.

3

Not sure I am understanding the workflow correctly but like Beck said I think this is does the trick. Foo is the original shapefile you are deleting all the features from, Bar is the layer you are copying features from. import arcpy # Data foo = r'C:\Path\to\layer\that\will\be\blank.shp' bar = r'C:\Path\to\layer\that\gets\copied.shp' # Delete Features ...

3

Those coordinate differences are measured in Angstroms. File geodatabase uses a technique similar to the integer storage representation conversion in enterprise geodatabases (ArcSDE) to snap 64-bit floating-point coordinate values to a feature class coordinate resolution grid. This coordinate resolution is established at feature class creation (and it's ...

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