Tag Info

Hot answers tagged

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


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.refractions.net/documentation/manual-2.0/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

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

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; 4) confirm the version: select postgis_full_version(); should be something like: ...


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

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

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

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


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)


1

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


1

It doesn't work because that's not the proper way of making a UPDATE from a SELECT , You are doing something else... Something like this should work, although I don't understand this part of the query: haryana.the_geom in (select st_centroid(ch_roads.the_geom) ....) or as I rephrased it: st_centroid(ch_roads.the_geom) = haryana.the_geom here is ...


1

Try using the sort_fields parameter of the UpdateCursor function, e.g.: cursor = arcpy.UpdateCursor(fc, , , , "SITE A; SITE_ID_FD A")


1

Now I feel a little silly. I had a map service running which was maintaining a lock on BOTH of the feature classes I was trying to update. I used arcpy.TestSchemaLock to test, and found that it returned false for both feature classes regardless of whether the first was using a searchcursor or an updatecursor. Stopping the service solved my issue. However ...


1

import arcpy, sys, string, os valve = r"C:\valves.shp" services = r"C:\serviceConnectors.shp" fieldname1 = "ValveID" fieldname2 = "ConnectorServiceID" ucur = arcpy.UpdateCursor(valve) for urow in ucur: connectorlist = [] valveid = ucur.GetValue(fieldname) sql = fieldname + " = " + valveid#This syntax ...


1

Having a quick look at your script I would suggest that you break it up into smaller sections. Rather than continually running the loop to find the highest id, how about you run it once when the map opens and store it as an application variable - application.userproperties(yourID). Then everytime you add a new record (Page OnSetActive event) you have it ...


1

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



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