Tag Info

New answers tagged

0

This is fairly simple to achieve using QGIS (I think any version will do) and a very simple SQL statement in DB manager. But for that your that must be in some kind of spatial database (Postgis or spatialite). Since it's more accessible to most people, I will assume using spatialite, but the SQL statements are the same for Postgis. Create a new Spatialite ...


0

You need to clear the WMS Service Group Layer before adding the single WMSMapLayer. wmsMapLayer.Clear(); wmsMapLayer.InsertLayer(newLayer, 0); Note that this will remove all group/map layers from the WMS Service Group Layer, so if you're adding more than one, it might be advisable to not call wmsMapLayer.Clear() in the body of your loop. I haven't tested ...


0

Thanks everyone for your answers. After having tried some various things I came up with this: a) I overlaid the whole study area with a polygon but made sure that the end points of the rivernetwork was just outside of the polygon. I then cut the polygon with the rivernetwork (features to polygon) and have now a new shapefile, lets call it "Area_Poly". I ...


1

Similar to what the other posters have said. Use arcpy.da.searchcursor and use the where clause. You can then set the where clause to be "where accuarcy > 80" or whatever you want. check out this resource http://resources.arcgis.com/en/help/main/10.1/index.html#//002z0000001r000000


2

You can do this by looping through the shapefile first with a SearchCursor, creating a dictionary item for each "Key" field, where the value is a list of the "Accuracy" field values. Then loop through again with a UpdateCursor, compare with the maximum accuracy value from the dictionary, and delete the row as appropriate. import arcpy # Create dictionary d ...


0

I tried out the Android App "GeoCam" (https://play.google.com/store/apps/details?id=com.myway&hl=en), it takes videos in GeoVid format. There is a possibility to upload the files to http://www.geovid.org/ and share them with the world. Maybe some day there will be more video players or GIS plugins for displaying geovids.


0

There's a (commercial) desktop solution GeoView that creates a spatial database out of GPS-enabled videos and accompanying GPS tracks. The database then can be used to display recorded tracks and extract specific video frames along one.


2

What I usually do Create point layer from midpoints of network segments. Spatial join of points to CLOSEST info line, define distance field name Transfer attributes back to segments, where you think they are close enough


0

Below is a trigger that I set up on the a-tables in SQL when editing data. It automatically updates the Acreage field when a feature is inserted during editing. ESRI does not support modifications on the backend in SQL, but I find that there are times when it is a necessity. This SQL script is based on SQLServer 2008R2, ArcSDE 10.0/10.1, and uses the ...


2

The Generate Near Table tool in ArcGIS will do what you want, but it requires an Advanced license and will do it for all points/polygons - not just those associated with each other. This means for each of your 95 objects you will get the ranked distance for all 211 properties, so 20,045 rows in the table. You'd either have to filter the resulting table or as ...


1

You could combine the select by location query with a comparison of line length. I'm not really sure how feasible it is, but you could cycle through all of the features in the good geometry shp, select each one and then do a select by location on the other layer. Then, for all of the selected features in the bad geometry layer, compare the value in the ...


2

ArcGIS Snap tool will do this for you (standard and up license level). You need to fill in what type of snapping you are looking for in the Type column. Also the Distance of the snapping. Also keep in mind this is a tool with no outputs, so make copies of your input data before trying.


1

Use intersect tool with single input, call result OVERLAPS. Select original that intersect OVERLAPS and dissolve originals. Switch selection in originals and merge with dissolved.


2

If you mean to keep the attributes meaningful, it makes no sense to dissolve the overlapping polygons if you care about those attributes. Since it appears that dissolve has already occurred, then if your problem is sliver polygons, you should perform an Intersect on the one feature class and then select every polygon in the original that overlaps a small ...


2

If you don't mind a few extra geoprocessing steps, I would suggest a workaround. Before dissolving, perform the following steps. Select all features in your shapefile. This is easy to do with the 'switch selection' button in the shapefile's attribute table. Then perform a select by location, with the shapefile as both the input and the selection feature. For ...


2

ArcGIS has some issues with exporting and transparency: http://support.esri.com/em/knowledgebase/techarticles/detail/32379 http://support.esri.com/cn/knowledgebase/techarticles/detail/17336 http://support.esri.com/cn/knowledgebase/techarticles/detail/33011 I suspect your issues are related to some of these issues. Whenever I run into a problem like ...


1

You will not be able to delete a feature class which participates in a topology. You should first exclude this one from the topology. You can either use a GP tool Remove Feature Class From Topology (Data Management) or do it manually via Removing a feature class. If you don't really need to recreate/replace a geodatabase object (such as a feature class), ...


0

Samy, I use sys.argv[n] but GetParameterAsText is the same thing, but be aware that argv[0] is the script, argv[1] is the first parameter as opposed to GetParameterAsText(0) being the first parameter. On each iteration (after the clip) you need to clear the selection or remake the layers "lyr" and "pochoirlyr" otherwise it will only work on the first ...


0

You need to use the arcpy.GetParameterAsText(0) method: See examples from: Understanding script tool parameters


0

As pointed out by @radouxju the search for symbols functionality was introduced at ArcGIS 10.0 and from a blog enitled Symbols and styles in ArcGIS 10.0: Finding appropriate symbols to apply to your features and graphics is easy in ArcGIS 10 because you can search for and use symbols without having to know to which style they belong, nor have that ...


2

This should work better with nested for loops based on the list length, instead of iterating through the entire list. for count in range(tList-1): for cnt in range(tList): arcpy.MakeFeatureLayer_management(os.path.join(workspace, fcList[count]),"fca") arcpy.MakeFeatureLayer_management(os.path.join(workspace, fcList[cnt]), "fcb") ...


1

Please have a look at the second example in here. Most probably your question is related to finding the right term here, which is inline variable substitution.


0

So far the most efficient method I have found to rename fields, change their default order, and a number of other things is to use Microsoft Access: Create new Personal Geodatabase Drag and drop the feature class or table into the p-gdb Open in Access and: Ignoring all tables beginning GDB_, open tables in table design mode rename, change order, add new, ...


2

You cannot assign an output directly to a field in the calculation text, only by selecting the field as the output field of the calculation. [Intact] needs to be changed to Intact (a variable) and the output needs to be to Intact in the field output portion. Parser: VB Script Use Codeblock: Checked Pre-Logic Codeblock: If IsNull([Condition]) Then ...


1

I am assuming you are running this as a field calculate from a table? You don't reference the field you want to change in the pre-logic script section, you apply a variable to it which you compute a value for (in your case a 1 or a 0). Add Dim x to the beginning of the code in the pre-logic script code box then replace all "[Intact] = " with "x = " As you ...


0

You need to change your %Temp% directory, it's trying to save the temporary result of the Con operation to your user folder (C:\Users\User\Documents\Mo Correll\ArcGis\) where is something like xx001258 and tripping over the space in your user name. Make a folder on your 'c' root called MoTemp or something like that and set your temp and tmp environment ...


3

First, when you bring your DWG into ArcMap, there is no need to convert it to another file type, unless you are trying to edit the linework. You can view the file and change the way it looks without doing any conversion. (If you do need to edit it, right-click on the Polyline layer in the DWG and choose "Data" and "Export Data." You can then export it ...


1

IEnumLayer will build an index for you when you initialize it. It indexes all layers in the order that they appear in the TOC (the top layer will be index 0, the next down will be 1, etc). You can use this index as your key as it will always be unique to the layer. Here's the code to initialize and access in ArcGIS Desktop: ...


0

The legend will always reflect the draw order of the map, AFAIK. You can change the draw order using arcpy.mapping.MoveLayer. There is a code example from the ESRI help import arcpy mxd = arcpy.mapping.MapDocument(r"C:\Project\Project.mxd") df = arcpy.mapping.ListDataFrames(mxd, "County Maps")[0] for lyr in arcpy.mapping.ListLayers(mxd, "", df): if ...


0

You could use the raster calculator to have the amount of water per person Con("population" > 0, "water"/"population" , -1) then you can use "reclassify" to set your threshold.


4

With booleans, you need to repeat the query with the name of the field : ("Pop_CL"=8) or ("Pop_CL"=9) or ("Pop_CL"=10) but in your case you could use "Pop_CL" in (8,9,10)


1

The tool is called cell statistics. the statistics type you want is MAXIMUM. If you only want a value where they all overlap set the environment setting (Output Extent) to intersect.


4

You are spot on, this is called "tiled processing of large datasets", as explained here To improve the performance and scalability of feature overlay tools such as Union and Intersect, operational logic called adaptive subdivision processing is used. The use of this logic is triggered when data cannot be processed within the available amount of ...


0

The Discover Spatial platform is new, but already offers two "tips and tricks" style eLearning videos for ArcPy: ArcPy/Python tips for creating test data and performance timing code snippets Using ArcPy Cursors to Split by Attribute and Location (and sharing tools as Geoprocessing Packages) Disclaimer: I am the author and presenter of the above online ...


2

I am late here, but this question was my entry into the forum as I was researching the same question. I think that the original poster may want to calculate for each cell the height above the first stream cell that would be reached by water flowing from the cell. So the 'nearest stream' is calculated along the downslope flow path, not euclidian distance. ...


1

Just as a reminder: also make sure the classes or tables are part of the same geodatabase AND make sure the keyfields on which the join will be operated are of the same type.


0

Here is a simple workaround, (but of course it would be cleaner to do it with an insertcursor in Python). 1) Add the X andd Y coordinates for your points (from field calculator, or with the tool in Data management > features) 2) join the table of your point on your excel file 3) export the excel file to another table, and add it as point using "Make XY ...


1

You have to use the 32-bit version of python. I know this is an old post but someone might stumble on it looking for an answer. See https://geonet.esri.com/thread/94637.


3

The rows of the pochoir cursor can only be read once with a for loop. You need to recreate the cursor for each new feature class. Therefore the code needs to be modified to: arcpy.env.workspace = r"Z:\Documents\SIG\tests\synthese_tocorrect.gdb" fcList = arcpy.ListFeatureClasses() pochoir = r"Z:\Documents\SIG\tests\decoupe.shp"#Clip layer with multiple ...


0

I have now identified the answer. You simply create the feature as a conventional feature in the turn featureclass: A) Create a turn shape as a ratio of the road segments involved. Remember that the roads can be connected in different ways: FromPoint to FromPoint, FromPoint to Topoint, ToPoint to FromPoint or ToPoint to ToPoint. So be careful which ...


0

Connecting to a linux database is absolutely no different from connecting to a database on Windows, or any other platform for that matter. The interconnect protocol (SQL*net) is the same everywhere. The platforms for the client and server play no role here, neither does the fact that one is 32-bit and the other is 64-bit. Also the versions of the Oracle ...


2

Creating a layer file for your clip shapefile and using selection would be how I would accomplish this task. Remember that when a geoprocessing tool is used it will only perform the process on selected features. In the below script, I first create a feature layer from the clip shapefile, to allow for selection. I then iterate through each feature class to be ...


0

What you first want to do is check for a selection. This can be done by checking if arcpy.Describe (layer).FIDSet returns anything. FIDSet is a property of a layer describe object. It returns OIDs of selected features, and nothing if there are no selected features. Try this after you make your selection: if arcpy.Describe ("toselect").FIDSet: ...


5

# I know I repeat myself. Any idea to avoid it ? Move secteur = row.secteur outside the if/else statements (before if nbrow > 0:). Move rows = arcpy.SearchCursor(pochoir) inside the for loop (after for fc in fcList:) I think that you aren't accessing the geometry properly. Reference Reading Geometries and Working with geometry in Python. # tells ...


1

In the absence of a python parser your only real option is: replace(ltrim(replace( [field] ,"0"," "))," ","0") This assumes that you don't have any spaces inside your text, if you do then you need another two replaces: replace(replace(ltrim(replace(replace( [SourceFC] ," ","~"),"0"," "))," ","0"),"~"," ") Again, assuming that you have no ~ characters ...


1

I'm assuming that you are using ArcGIS 10.1 for Desktop or later, but this may also work with 10.0. Open up the Properties of your layer to the Labels tab. Make sure Label features in this layer is ticked on Change the Parser to Python. In the Expression area, if your field is called Name and your data is stored in a file geodatabase feature class, type: ...


1

While this is an old question, the other answers are not appropriate. Converting Distance (Measured Depth), Dip (Inclination), Azimuth to 3D coordinates depends on how you interpret what is happening between the locations where measurements were taken (survey stations). The standard practice today is "Minimum Curvature" where the assumption is that a ...


1

Try this: CadastreOut = "C:\\" arcpy.MakeFeatureLayer_management(Cadastre, "cadastre_lyr") arcpy.MakeFeatureLayer_management(Buffer_5km, "buflayer") field = "SiteName" cursor = arcpy.SearchCursor("buflayer") for row in cursor: geometry = row.getValue("Shape") out = str(row.getValue(field)) ...


2

Here's how you can get Shape.area to display acres if it's in another unit. In ArcMap, go to the layer properties and the Fields tab. Under "Appearance", click "Number Format". Click the little button with the ellipses that is now displayed. Or right-click a field name in the table view, go to Properties, and click the little ellipses button next to ...


1

The where clause is currently evaluating stepos literally as the value stepos, not the variable value 22. Move the stepos variable outside the where clause string, casting the numeric value to a string, like: arcpy.UpdateCursor(stefile, ' "POSITION" = ' + str(stepos))



Top 50 recent answers are included