Tag Info

Hot answers tagged

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


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)


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


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

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

You have to include quotes within your expression string. Try this: fcList = arcpy.ListFeatureClasses() fieldName1 = "Author" expression1 = "\"John Doe\"" for fc in fcList: arcpy.AddField_management(fc,fieldName1, "TEXT") arcpy.CalculateField_management(fc, fieldName1, expression1) By adding in escaped double ...


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

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++){ ...


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

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


2

You should be able to easily achieve that by: implement an on insert/update trigger which puts changed features on a work queue a worker that periodically wales up and grabs stuff to do from the queue and refreshes tiles Item 1 can be easily written in pure sql in postgres by means of a trigger. As for item 2 you just need to call the seed program (all ...


2

Your issue has to do with the Locking action that happens when an UpdateCursor is called. From the help document: Summary The UpdateCursor function creates a cursor that lets you update or delete rows on the specified feature class, shapefile, or table. The cursor places a lock on the data that will remain until either the script completes or ...


2

I assume that you want to reconcile the crude statelines with the GSHHS data. If your licence allows you to use the Integrate Tool, there is a relatively simple solution: Massively buffer your statelines, but obviously don't dissolve. Then use ArcMap's Integrate tool to integrate the buffered statelines with itself. This will put back all the internal ...


2

Probably not in one step but this is what I would do: join the master attribution shapefile to the updated, detailed boundary shapefile using the reference number as key. save the joined data as a new shapefile now with full attribution and detailed boundary remove the join. select the records to be updated in the master shapefile delete those records (you ...


2

Patrick, if you have brought the point data in from a non-spatially-enabled source, you will need to save to a new, spatially-enabled format (and load that into QGIS) before you start your editing. After that, you'll want to use either the Move Feature(s) or Node Tool. Once in edit mode for your point layer, make your adjustments with either of those ...


2

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


2

Have you downloaded the correct file? This might be what you are looking for: http://winnie.postgis.net/download/windows/pg92/buildbot/postgis-pg92-binaries-2.1.0w32.zip Or the 64-bit version, of course. From the README.txt -- Upgrading extension -- To upgrade an extension, it's just as easy. If you are using PgAdmin, go to the extensions section and ...


2

I found a two-part explanation and solution to this problem. First, my colleague had apparently reversed the input/clip feature classes for a clip earlier in the overall process. Fixing the clip inputs resulted in the update tool working as expected. Second, it appears that the root cause of the update issue was that the clip input problem created invalid ...


2

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


2

My problem was solved by me, but I am not glad with how I did it. OpenSUSE provided a patch to Postgres 9.1.7 which assumes different directory structure on the disk: / usr/share/postgresql91 / and not as before / usr / share / postgresql / This is the official upgrade OpenSSUSE number 775. However, Postgis (at now - 2012 NOV 18) is not prepared for this ...


2

In my case, I found this solution to updating features. It's working very well: 1) In javascript I create a refresh method in every 5 seconds: window.setInterval(loadUnits, 5000); 2) Create the layer : function createUnitsLayer() { var def_style = new OpenLayers.Style({ pointRadius : "${size}", fillOpacity: 0.5, }); var ...


2

It's almost always a lot more computationally efficient to convert the points to a grid and apply a conditional grid operator. This assumes--as appears to be the case in the question--that there is at most one point per grid cell (for otherwise the conversion of points to a grid is problematic with Arc* software). All grid processing frameworks need a way ...


2

You can open the attribute table, toggle layer editable (if not yet done) open the field calculator and check Create a new field, give it a type / name and use an expression to fill it with values based on existing attributes.


1

If the desire is to make the polyline the same Z value all the way from start to finish then use IZ interface. This interface has a method SetConstantZ ( Double ZLevel ) which works for polygons and polylines that will set every vertex to the same Z value. This approach is much simpler than the GeometryCollection / PointCollection / IZaware approach which I ...


1

Thanks to Jeff's help we have got the answer - please see the link below: http://forums.arcgis.com/threads/77013-arcobjects-update-geometry-Z-values-of-line-vertices-with-a-given-number Thanks, Meryloo


1

The problem is with "NAME_3" = NULL, since NULL is not "equal to" NULL. This should instead use the proper SQL construct "NAME_3" IS NULL. See the documentation for more details.


1

you should check out this answer - OpenLayers Cluster Recalculate here. It adds a method recluster which, when called, will cause the strategy to recalculate its clustering. Since we are altering the Cluster base class, any derived class should appropriately inherit the recluster method. i hope it helps you...


1

Re run both the GIS and Web post installs is a good place to start after any issues after a post install. My bets are that that will fix it. I can edit this answer with more information if you can provide more information about the error your getting when starting the servive into your answer (see Michael Todds comment)



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