|
POST
|
>>> arcpy.ExtractData_production("'C:\\Temp\\Python\\GRSM_20140326075058.gdb\\Boundaries_And_AOIs\\grsm_bndry_polygon'","C:\\Temp\\Python\\GRSM_20140326075333.gdb","DO_NOT_REUSE","NO_FILTER_BY_GEOMETRY","INTERSECTS","")
<Result 'C:\\Temp\\Python\\GRSM_20140326075333.gdb'>
Works fine in the Arc Map Python window. Per the ESRI help for Extract Data (Production Mapping) one could conclude that >>> import arcpy
>>> arcpy.CheckOutExtension("Foundation")
u'CheckedOut'
>>> arcpy.ExtractData_production("C:/Temp/Python/GRSM_20140326075058.gdb/Boundaries_And_AOIs/grsm_bndry_polygon","C:/Temp/Python/GRSM_20140326075333.gdb","DO_NOT_REUSE","NO_FILTER_BY_GEOMETRY","INTERSECTS","") Would work as well in Python Shell. Nope. Traceback (most recent call last):
File "<pyshell#26>", line 1, in <module>
arcpy.ExtractData_production("C:/Temp/Python/GRSM_20140326075058.gdb/Boundaries_And_AOIs/grsm_bndry_polygon","C:/Temp/Python/GRSM_20140326075333.gdb","DO_NOT_REUSE","NO_FILTER_BY_GEOMETRY","INTERSECTS","")
AttributeError: 'module' object has no attribute 'ExtractData_production' Tried numerous variations of back, forward, double-slash as per http://resources.arcgis.com/en/help/main/10.1/index.html#//002z0000000r000000 None worked. So what special trick is required to get arcpy.ExtractData_production to work in Python Shell?
... View more
03-26-2014
07:05 AM
|
0
|
11
|
5044
|
|
POST
|
We have a very specific user requirement in a public safety application that allows a user to "Point and Click" on a map in a Flex Viewer Application (3.6, ArcGIS Server 10.2) and the Coordinates of the location (Lat/Lon, Decimal Degrees, which is the default) where the user click are displayed in a pop-up. This is very, if not exactly, similar to the Arc Map Identify Tool Function, which displays the XY coordinate of where the user click on the map with the mouse pointer in addition to whatever else they were trying to identify. The functionality of the Coordinate Widget does NOT meet this requirement, as it only displays the XY pair in the lower left portion of the map, and requires the user to move the mouse pointer to the desired location, let go of it, and write the coordinates down on a piece of paper. In testing during a "High Operational Tempo" scenario, we found that incident responders using the application quickly become confused and/or slowed down when they have to pause to write down coordinates and/or "jiggle" the mouse and transcribe the wrong coordinate pair. The Locate Widget is the opposite of this requirement, as it allows the user to ENTER coordinate pairs and find them on the map, and we've already implemented that in this application. I've been looking at all the ESRI out of box flex samples, as well as what folks (mostly Robert S) have posted in the Gallery, and I can't seem to find a widget or a configuration setting that allows this functionality, which leads me to believe that ESRI may have disabled this in the Flex Viewer for some reason? Unfortunately, we do not have the ability to create a custom Widget using the SDK due to cost restraint associated with purchasing the Adobe tools. I'm thinking that one way to approach this would be to add a feature service to the map, tied to SDE, which allows users to create a new feature (a Point FC) which would include an X and Y attribute field, which I can easily autopopulate at "Save Edits". Then, using the standard Identify Tool in the viewer, a user would click on the point they just created and the coordinate pairs would display. Thoughts? Thanks for any input.
... View more
03-21-2014
07:14 AM
|
0
|
7
|
3654
|
|
POST
|
I'm sure there's a tool for this, I just cant find it! Creating a 3D profile graph from a line is easy enough, but what I'm looking to do is include points of interest, as reference points, along that line. We're updating our trail/hiking maps, and the idea is to have a 3 profile (from Lidar) of a trail or series of trails, with things like campgrounds, stream crossings, prominent landmarks, road crossings, etc....superimposed along the profile graph. Doing this "manually" by eyeballing the locations and updating the graph would be impossible, as there are over 1000 miles of trail and hike combinations, with about 4000 points of interest. Thanks!
... View more
12-29-2013
05:57 AM
|
0
|
0
|
1354
|
|
POST
|
Hmm....not working for me at all. When I enter 85-50.50 W, 33-39.50 N, the results screen is blank and there is no zooming/panning to the location. So there is no table of abbreviations? Is the "abbr" tag even used? I just guessed at it. What about state plane systems? "spal" is obvious, but what about states that have multiple zones? (Texas?)? Here is my complete pointunits sections. All others work except for DDM, which is the one we really need for aviation operations. <pointunits>
<pointunit abbr="map" wkid="102100" ylabel="Northing (Y):" xlabel="Easting (X):" example="-9555431.36, 3982180.11">Map</pointunit>
<pointunit abbr="spnc" wkid="2264" ylabel="Northing (Y):" xlabel="Easting (X):" example="656036.27, 1147053.29">NAD83 NC. (SP Feet)</pointunit>
<pointunit abbr="sptn" wkid="2274" ylabel="Northing (Y):" xlabel="Easting (X):" example="656036.27, 1147053.29">NAD83 TN. (SP Feet)</pointunit>
<pointunit abbr="wgs84dd" wkid="4326" ylabel="Latitude:" xlabel="Longitude:" example="-85.8337, 33.6531">Decimal Degrees (WGS84)</pointunit>
<pointunit abbr="wgs84dms" wkid="4326" ylabel="Latitude:" xlabel="Longitude:" example="85-50-1.45 W, 33-39-10.99 N">Degrees Minutes Seconds (WGS84)</pointunit>
<pointunit abbr="wgs84dm" wkid="4326" ylabel="Latitude:" xlabel="Longitude:" example="85-50 W, 33-39 N">Degree-Minutes (WGS84)</pointunit>
<pointunit abbr="wgs84ddm" wkid="4326" ylabel="Latitude:" xlabel="Longitude:" example="85-50.50 W, 33-39.33 N">Degrees Decimal-Minutes (WGS84)</pointunit>
<pointunit abbr="utm17n" wkid="26917" ylabel="Y:" xlabel="X:" example="290905.642, 3955265.123">NAD 1983 UTM 17N</pointunit>
</pointunits>
... View more
11-14-2013
04:00 AM
|
0
|
0
|
501
|
|
POST
|
In setting a coordinate system to use for point units, I can look up the WKID here http://resources.esri.com/help/9.3/arcgisserver/apis/rest/pcs.html but where is the lookup table for "abbr"? I'm trying "<pointunit abbr="wgs84ddm" wkid="4326" ylabel="Latitude:" xlabel="Longitude:" example="85-50.50 W, 33-39.33 N">Degrees Decimal-Minutes (WGS84)</pointunit>" with no success
... View more
11-14-2013
03:07 AM
|
0
|
3
|
2819
|
|
POST
|
If you're using an enterprise geodatabase, e.g. MS SQL, you could set the field type to uniqueidentifier, and default it to newid() or newsequentialid(). THen write an instead of insert trigger, including ALL columns EXCEPT for the GUID column.
... View more
09-12-2013
04:43 AM
|
0
|
0
|
2965
|
|
POST
|
Here's one I use to find duplicate coordinates: WITH
EventsCTE(loc_name,x_coord, y_coord, Ranking)
AS(SELECT
loc_name,x_coord, y_coord, Ranking =DENSE_RANK()
OVER(PARTITIONBY x_coord, y_coord ORDERBYNEWID()ASC)
FROM
dbo.tbl_locations )Select*FROM EventsCTE WHERE Ranking > 1 and x_coord isnotnull
Or SELECT
a.*
FROM
dbo.TBL_LOCATIONS As
INNER
JOIN
(
SELECT X_Coord
, Y_Coord
FROM dbo.TBL_LOCATIONS
GROUP
BY X_Coord
, Y_Coord
HAVINGCount(*)>1
)As
ON a.X_Coord = b.X_Coord
AND a. Y_Coord= b.Y_Coord
Or: WITH
t(OBJECTID, Ranking)
AS
(
SELECT
OBJECTID, Ranking =DENSE_RANK()
OVER
(PARTITIONBY OBJECTID ORDERBYNEWID()ASC)
FROM
dbo.TWIN_CREEKS_UNDERGROUND_UTILITIES)deleteFROM t WHERE Ranking > 1
... View more
08-27-2013
06:21 AM
|
0
|
0
|
614
|
|
POST
|
Using sequential GUID's "mostly" eliminates your fragmentation problem, but there still is a performance hit just due to the size of the GUID column.
... View more
07-22-2013
07:31 AM
|
0
|
0
|
3582
|
|
POST
|
Using the latest 3.3 version on 10.1 SP1, is it possible, using the Flex Edit Widget, to enter XY coordinates at object creation time? If Not, is it possible, via the default Flex Editor widget, to EDIT the XY coordinates of an already-created point feature? I realize it is very easy to create X and Y attribute field, goal here is allow people to enter XY at creation time so that the point feature reflects XY obtained, from say, a GPS or other coordinate source.
... View more
05-25-2013
10:04 AM
|
0
|
2
|
2443
|
|
POST
|
I'm trying to populate a search (Esearch 3.3) with uniquevalsfromfield, and it's not working. The field in the GDB uses a domain. I see from the documentation that there are xml config params for domain and subtype, but the documentation does not explain how to use those XML flags, nor include any examples. Has anyone used domain or subtype in the esearch config xml and can post an example? Thanks.
... View more
05-24-2013
04:02 AM
|
0
|
0
|
1735
|
|
POST
|
Using Flex 3.2 on ASrcGIS 10.1 with a dynamic map service, I configured a pop-up to show related records. When the pop up is activated, it sizes correctly to show feature attributes, however, when showing related records, the columns are truncated and only a portion of the related record attribute columns are shown (cut off vertically). There appears to be no way to click-drag-resize the pop up window. Is there a way to alter the size of the pop up window so that contents will not be truncated? I hope this is possible without having to write code in Flex and compile, which we do not have the ability to do (no access to Flex Dev tools).
... View more
05-11-2013
06:02 AM
|
0
|
1
|
2058
|
|
POST
|
[/HR]I am ONLY using the code posted previously, with no other code, and it returns the error message. Perhaps this warrents a call to ESRI tech support?
... View more
05-02-2013
04:42 PM
|
0
|
0
|
3211
|
|
POST
|
Running this entire code: import arcpy, os
mxd = arcpy.mapping.MapDocument(r"X:\GIS_Final\data\basedata\basemap\Maps\ArcGIS\Blockhouse\Blockhouse.mxd")
arcpy.mapping.ExportToPDF(mxd, r"X:\GIS_Final\data\basedata\basemap\Maps\ArcGIS\Blockhouse\Blockhouse.pdf")
del mxd Returns this error: Traceback (most recent call last):
File "C:/Temp/TopoMaps.py", line 3, in <module>
arcpy.mapping.ExportToPDF(mxd, r"X:\GIS_Final\data\basedata\basemap\Maps\ArcGIS\Blockhouse\Blockhouse.pdf")
File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\utils.py", line 181, in fn_
return fn(*args, **kw)
File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\mapping.py", line 1139, in ExportToPDF
layout.exportToPDF(*args)
AttributeError: 'NoneType' object has no attribute 'exportToPDF'
... View more
05-01-2013
10:35 AM
|
0
|
0
|
3211
|
|
POST
|
I have this long-running, works like clockwork py script, which I decided to snip a few lines from to do one-off map exports to PDF: for pgNumLeft in range(1, tempDDPLeft.pageCount + 1, 2):
temp_filename = r"X:\GIS_Projects\1205_Map_Book\MB_" + \
str(pgNumLeft) + ".pdf"
if os.path.exists(temp_filename):
os.remove(temp_filename)
tempDDPLeft.exportToPDF(temp_filename, "RANGE", pgNumLeft, "PDF_SINGLE_FILE", "720","BEST","CMYK","NONE","NONE","VECTORIZE_BITMAP", "FALSE","TRUE", "LAYERS_ONLY", "FALSE") So I try, as per the example at http://resources.arcgis.com/en/help/main/10.1/index.html#/ExportToPDF/00s300000027000000/: import arcpy, os
mxd = arcpy.mapping.MapDocument(r"X:\GIS_Final\data\basedata\basemap\Maps\ArcGIS\Blockhouse\Blockhouse.mxd")
arcpy.mapping.ExportToPDF(mxd, r"X:\GIS_Final\data\basedata\basemap\Maps\ArcGIS\Blockhouse\Blockhouse.pdf")
del mxd which returns: Traceback (most recent call last):
File "C:/Temp/TopoMaps.py", line 3, in <module>
arcpy.mapping.ExportToPDF(mxd, r"X:\GIS_Final\data\basedata\basemap\Maps\ArcGIS\Blockhouse\Blockhouse.pdf")
File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\utils.py", line 181, in fn_
return fn(*args, **kw)
File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\mapping.py", line 1139, in ExportToPDF
layout.exportToPDF(*args)
AttributeError: 'NoneType' object has no attribute 'exportToPDF' Adding: arcpy.mapping.ExportToPDF(mxd, r"X:\GIS_Final\data\basedata\basemap\Maps\ArcGIS\Blockhouse\Blockhouse.pdf", "PAGE_LAYOUT") ...same error. However, the same line interestingly works in the ArcMap Python Window (I'm trying this in the Python GUI). So I try
arcpy.mapping.ExportToPDF(mxd, r"X:\GIS_Final\data\basedata\basemap\Maps\ArcGIS\Blockhouse\Blockhouse.pdf", "PAGE_LAYOUT", 720, "BEST", "CMYK", "FALSE", "NONE", "VECTORIZE_BITMAP", "FALSE" , "TRUE", "NONE", "FALSE") Which returns Traceback (most recent call last):
File "C:/Temp/TopoMaps.py", line 3, in <module>
arcpy.mapping.ExportToPDF(mxd, r"X:\GIS_Final\data\basedata\basemap\Maps\ArcGIS\Blockhouse\Blockhouse.pdf", "PAGE_LAYOUT", 720, "BEST", "CMYK", "FALSE", "NONE", "VECTORIZE_BITMAP", "FALSE" , "TRUE", "NONE", "FALSE")
File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\utils.py", line 153, in fn_
arg_name].keys())))
ValueError: Invalid value for image_quality: 'FALSE' (choices are: ['BETTER', 'FASTEST', 'FASTER', 'BEST', 'NORMAL'])
>>> ...and many, many, many permutations of variables in many, many, many permutations of where they should go, all with a varation of Invalid value for ... . What is frustrating is that I followed the ESRI example for data-driven page export to PDF, and the syntax in the online-documentation worked, however, the example for exporttopdf is misleading. map has 2 DF's, 10.1 SP1
... View more
04-30-2013
05:48 PM
|
0
|
11
|
7764
|
|
POST
|
So I have managed to resolve most of these problems, but at the expense of a new one...which I'm posting over in the flex thread.
... View more
04-05-2013
01:54 PM
|
0
|
0
|
462
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-14-2019 06:24 AM | |
| 1 | 07-12-2018 09:29 AM | |
| 1 | 06-27-2019 12:08 PM | |
| 2 | 09-23-2019 11:03 AM | |
| 1 | 08-08-2019 07:02 AM |
| Online Status |
Offline
|
| Date Last Visited |
06-28-2024
02:40 AM
|