Quantcast
Channel: Question and Answer » arcgis-10.3
Viewing all 155 articles
Browse latest View live

PDF export issue with ArcGIS 10.3

$
0
0

After exporting a map as PDF in ArcGIS 10.3, the following error shows up in Adobe Acrobat:

“An error exists on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem.”

In the map, there is as well a lack of some features or at least feature parts.

Creating PDFs is a very basic requirement. Do you know any patch or workaround for this, or do I have to go a version back, to 10.2?


Setting input parameter to be float for Python script tool?

$
0
0

I made a Python (2.7.8) script, where one of the parameters is height (float) and I wan to make tool in ArcGIS 10.3 now. However in data type list there is only double. If I input integer value into this parameter field (e.g. -480), the tool works fine. If i input e.g. – 480,5 i get error

Traceback (most recent call last): File “D:HETMANGISProjekt Model
ZłożaSktypy.py”, line 27, in ValueError: invalid literal for
float(): -480,1

Failed to execute (SSKv1).

This is a fragment of code, where i try to convert value to float:

kontakt_dbl = sys.argv[3]
kontakt = float(kontakt_dbl)

How to convert double value into float and not to get error?

Number of events within each elevation class

$
0
0

I’m trying to model how elevation affects fire events for an AOI, I have run my cluster analysis for the fire events and right now I’m trying to calculate how many fire events fall within each elevation class.
I have used the zonal histogram tool in ArcGIS, but I’m not sure I trust the output. Is there a better tool for which to achieve this?

'sdetable' is not recognized as an internal or external command

$
0
0

I try use arcpy.JoinField_management(inFeatures, inField, joinTable, joinField, fieldList) to join SQL server database tables to shapefiles directly, using an ArcSDE connection. The database connection from ArcMap is successful.

Following the tip from
How to run “sdetable register” command in SQL Server? at
How to run "sdetable register" command in SQL Server?

I ran the command:

sdetable -o register -t {table} -c {column} -C {database}

on the desktop that ArcGIS 10.3.1 is installed.

However, it gives error message:

‘sdetable’ is not recognized as an internal or external command..

I searched “sdetable” in the desktop and didn’t find some file. There are a lot of sde*** in the ArcGIS folder, but no “sdetable”.

If “sdetable” command is not available for 10.3.1, is there other alternative option to join the tables? I don’t prefer to export database tables to csv from the SQL Server, then import each one into ArcGIS to make it have ObjectID.

Capturing an event On Sketch Finish in ArcObjects

$
0
0

I am using IEditEvents_Event and IEditor. I invoked the GarciaUI_CreateNewFeatureTask and used:

pID.Value = "esriEditor.SketchTool";
pCommandItem = pCommandBars.Find(pID);
if (pCommandItem != null)
{
  pCommandItem.Execute();
}

It is working and I can create a polygon in edit mode. I want to capture an event after the Polygon Creation is completed.

I also have another button on the same form to Split Polygon. I want to capture an event after the split is completed. But I want to capture both these events separately. Can someone help me to accomplish it?

I have to do it in c# + ArcObjects ArcGIS 10.3.

Giving specific options to user when creating tool in ModelBuilder?

$
0
0

I am making a terrain analysis tool for military use (educational purposes). I am doing a raster analysis, using standardised terrain data in combination with a surface raster to determine the maneuverability in a user specified area.

My model gives a weighted raster output, which I will symbolise in a logical way if/when I get the results I want. Over time I will add more input (especially soil type) to the model, but this is the general design of it.
Model Design

I am struggling to find a way to let the user differentiate between wheeled and tracked vehicles, and dry and wet terrain. My assessment is that these two aspects will affect the result the most, but so far my solution has been to make several different tools with different weighting.

My best guess would be that I have to let the user choose between these options in the weighted overlay:

  • Wheeled vehicles, dry soil
  • Wheeled vehicles, wet soil
  • Tracked vehicles, dry soil
  • Tracked vehicles, wet soil

Is this possible in any way? Or any other workaround that removes the need for several tools?

Cadastral Parcel Fabric

$
0
0

Does anyone know if there is a way to move a group of individual cadastral parcels as a block? I do not wish to merge the parcels.

Correlation between raster values and vector point values

$
0
0

I will be using aerial photography/Object Based Image Analysis to separate plants in a field from their background, creating a polygon for each plant.

I will then convert these polygons to point on centroid and retain each polygon’s area attribute, yielding DATASET 1.

I have a raster map of soil moisture of this field, DATASET 2, upon which I will overlay and georeference DATASET 1.

I will be normalizing the data so all raster pixel values in DATASET 2 and point values in DATASET 1 fall between 0 and 1.

I want to analyze the spatial correlation between the values of the points in DATASET 1 (plant area) collocated with values in DATASET 2 (soil moisture).

Can anyone suggest a technique to execute this? I have done a lot of research yet am finding it hard to find precedent to wrap my head around the problem.

I will be using ArcGIS 10.3 for Desktop to process the datasets.


Is it possible to publish the raster contents of a directory as an ESRI 10.3 Image service?

$
0
0

I am currently experimenting for the first time with ArcGIS Server 10.3.1 and have been told that I can publish contents of a directory (TIF Aerial Images)as an Image Service. In the ESRI Help I can not however see this option.

Can anyone confirm that this can or cannot be done?

SDE GDB Versioning – reconcile and post from DEFAULT to Child

$
0
0

I am relatively new to versioning and think I have made a mistake in my workflow.

I am using a SDE geodatabase, with a DEFAULT and ‘Field Editing’ child version in ArcGIS 10.3.

I received a lot of new data, so populated the DEFAULT version using the Object Loader tool – this works fine. However, I am now setting up a MXD which will be used to publish a map service (surfaced on Collector), and want to use the Field Editing version – but the changes I made are obviously not shown in this version. I don’t seem to be able to reconcile and post the changes to the child version.

Is there a way I can do this automatically? Or is the best method to copy the features to the child version, delete those in the Default, and then post and reconcile the changes?

Trying to print classLables in symbology type UNIQUE VALUES

$
0
0

I have a classified image of 10 classes stacked together. Once I put them into ArcMap they don’t appear as 10 individual classes, they look like one big class.

enter image description here

When I click on unique values the following is the result
enter image description here

Once I compute the unique values the 10 classes are created
enter image description here

After adding all the values these 10 classes appear on table of content
enter image description here

I am trying to do the similar process through arcpy script, but I could not find any methods which could enable me to do the same.


import arcpy
... mxd = arcpy.mapping.MapDocument("current")
... lyr = arcpy.mapping.ListLayers(mxd, "IDSI_2002.img - Layer_1")[0]
... if lyr.symbologyType == "UNIQUE_VALUES":
... #lyr.symbology.valueField = "SUB_REGION"
... #lyr.symbology.addAllValues()
... print "we are not able to reach here"
... print (lyr.symbology.classLables)
...
... print (lyr.symbology.classLables)
... arcpy.RefreshActiveView()
... arcpy.RefreshTOC()
... del mxd

My layer has unique values but still it is now able to show Lables or Values if i try to print Lables without checking the for UNIQUE_VALUES it gives the following error


Runtime error
Traceback (most recent call last):
File "<string>", line 10, in <module>
File "c:program files (x86)arcgisdesktop10.3arcpyarcpyarcobjects_base.py", line 78, in _get
(attr_name, self.__class__.__name__))
NameError: The attribute 'symbology' is not supported on this instance of Layer.

How can I clip a multiband raster and preserve the band names?

$
0
0

I have a Landsat 8 image which I clipped with a polygon shapefile. It works fine, but I’d like to preserve each band name in order to improve my workflow speed. The output raster saves each band as “clip1″, “clip2″… and so on, what I’m looking for is something like “Blue”, “Green”, etc.

I’m working with ArcGIS 10.3 for Desktop.

Replicating Summary Statistics tool with case field using own calculation within ModelBuilder?

$
0
0

I thought this would be a simple problem to solve, by my googling hasn’t provided the answers so far.

I have created a near table (Using the ‘Generate Near Table’ in Arc) comparing two sets of points, and I have included the option to get the 10 closest points for each of the input points. So for each of the input points I have 10 near features(this can be see in the IN_FID column).

near table

I wish to calculate the average distance, plus the average angle (which I have converted to a bearing 0-360) of the 10 points for each unique value in IN_FID. I use the summary statistics tool with the case field set to IN_FID to get the average distance, however to get the average bearing I need to run a calculation that takes into account circular statistics.

My solution thus far within ModelBuilder, is to use the ‘Row Selection’ iterator with the IN_FID set as the ‘Group by Field option’, I then run the calculate field on the output for my average bearing. So for each unique value in the IN_FID column, I have one average bearing (from 10 points). However, this process is very slow, it takes about 3 seconds for each unique IN_FID, and with 10,000 points, is getting on for 8 hours of processing.

The summary statistics tool works in a matter of seconds, so I was wondering if there is a python script I can write and run in the calculate field tool code block, that means I don’t have to use the ‘Row Selection’ iterator and speed up this process? (however, I’m not even sure this will speed it up!). My python isn’t up to much at the moment, but my research has lead me to think I need to use search or update cursor, and some (nested?) for loops, but I don’t have the knowledge to apply and write this yet, but I am learning using various examples I find online.

Does anyone have any python script examples that do a similar task that I could use as a basis for this task or, can point me in the direction of some useful tutorials?

Or do you have some alternative methods to overcoming this problem that I haven’t thought of?

Selecting rows in a layer using arcpy.SearchCursor

$
0
0

I’m working on a project to identify points that fall along lengths of road. The roads are stored a single featureclass within a file geodatabase, as are the points. I’m using ArcGIS 10.3.

I’m trying to use an arcpy search cursor, configured with a for statement to iterate through my roads dataset. Within the for loop I’m using the function row.getValue to return a 3 digit short integer stored within a field called ‘FacilityID’ within the attributes of the roads layer. I wish to then use this value to select the appropriate row within the roads layer. Further down the line I would then use this selected row as the basis of a select by location query. At the moment my code doesn’t iterate through selections. I can get it to print all the 3 digit integers within the ‘FacilityID’ field, but it ceases to work if I use the arcpy.SelectLayerByAttribute_management tool.

As I feel I’m not explaining all of this very well, I will include a cut down version of my code:

import arcpy, os
from arcpy import env
arcpy.env.workspace = "C:TempTest.gdb"

env.overwriteOutput = True

ROADS = "Test_Roads"

FIELD = "FacilityID"

roadcursor = arcpy.SearchCursor(roads_lyr)

for row in roadcursor:
    ROADID = (row.getValue(FIELD))
    print ROADID, type(ROADID)

    expression1 = ""FacilityID" = " + str(ROADID)
    arcpy.SelectLayerByAttribute_management(roads_lyr, "NEW_SELECTION", expression1)

    arcpy.SelectLayerByAttribute_management(roads_lyr, "REMOVE_FROM_SELECTION", expression1)

I’ve changed the selection type to ‘clear selection’ in the second, and get the same result.

How to make a 10.0 ArcMap AddIn project valid for ArcGIS 10.3 SDK?

$
0
0

I have a ArcGIS 10.0 AddIn project that I’ve succeesfully re-targeted to 10.3. I can successfully compile (Visual Studio 2012). and works as expected in ArcMap 10.3.1. But when I attempt to add a new component

enter image description here

I get this error:

Invalid ArcGIS Add-in Project. Unable to add new Add-in item to this
project.

enter image description here

Has anyone else encountered this issue?


Transferring SHP files from Pathfinder to ArcGIS for Desktop?

$
0
0

Does anyone have step by step instructions to bring files from Trimble Pathfinder to ArcGIS 10.3.1 for Desktop?

matplotlib show() suspends ArcGIS

$
0
0

I’ve written a python script to plot a cross-section from a DEM along a line.

Everything works fine except when I Show the plot, ArcGIS hangs and I have to force it to close with Task Manager.

I am working with Windows 7 and ArcGIS 10.3. Following is my code snippet:

import arcpy
from arcpy import env
import matplotlib.pyplot as plt
...
...
...
plt.plot(x,y) 
plt.xlabel('Distance (m)') 
plt.ylabel('Elevation (m)') 
plt.title('X-section along the line') 
plt.grid(True) 
plt.savefig('Xsection.png') 
plt.show() 
plt.close()

How does ArcGIS Server manage deleted Active Directory users that were assigned to a role?

$
0
0

I am creating roles from my active directory users in ArcGIS Server 10.3.1 and would like to know how ArcGIS Server deals with deleted users if they are deleted from the active directory. Do they automatically get removed from the role or do remnants exist?

How to update annotations from fields values to annotations objects

$
0
0

I have annotations feature class and need to update some field offset and alignment values

When I edits them manually at attributes table in ArcMap, new values applies to objects and they changes thrir positions at map.

And when I updates them via script:

with arcpy.da.UpdateCursor(annotations_fc, ['VerticalAlignment', 'YOffset']) as cursor:
    for row in cursor:
        row[0] = 3
        row[1] = 2.0
        cursor.updateRow(row)

del cursor

attributes table has new values but these values doesn’t apply to map objects

Arcpy has UpdateAnnotation_management method for annotations updating. But as I understand, it updates field values from annotation objects when I needs reverse action – update annotation objects from fields values.

Is such method exist? If not in arcpy, at least in arcobjects.net?

Or am I doing something wrong?

Serving imagery with ArcGiS for Server?

$
0
0

I have just updated my ArcGIS Server environment from ArcGIS Server 10.0 to ArcGIS for Server 10.3.1. I am wondering what methods should be used to serve our relatively large amount of image data to clients in my organization. We have installed ArcGIS server on Windows 2012 Server. For the data we have a separate Windows 2012 Server with 16Gb Ram. My Project area is 1800km². We have around 20 years of imagery which we will serve in 20 separate services so that each year can be displayed as a layer in the client software.

Some images are in ECW Format and cover the whole area in one file. Other Images are in TIF and have been georeferenced and are in TIF format in a directory. Others were in an SDE 9.3 mssql database and must be exported. So in ArcGIS Server 10.3.1 I have the opportunity to either;

For single images:

  1. Serve a TIF file directly as Image Service
  2. Import into FGDB as Geodatabase Raster and serve directly as Image Service

For many images:

  1. Import into FGDB managed RasterCatalog and load into mxd project and serve the mxd as a MapService
  2. Reference into unmanaged RasterCatalog and load into mxd project and serve the mxd as a MapService
  3. Reference into unmanaged RasterCatalog and then use a referenced ImageMosaic to serve as a ImageService
  4. Import into ImageMosaic and serve directly as a ImageService

I update my imagery only once a year so I don´t have to constantly import new images. My major concern is performance and speed.

Viewing all 155 articles
Browse latest View live