POST
|
Thank you very much Xander. This has fixed the issue!
... View more
08-29-2016
01:53 PM
|
0
|
0
|
1302
|
POST
|
More digging has unearthed the issue, but not the solution - If the layer name has a space in it (within the multivalue parameter) the tool will fail. If the layer name has the space removed, the tool will complete. However, if not using the multivalue option, the parameter will accept a layer, regardless of whether there is a space in the name or not.
... View more
08-29-2016
04:26 AM
|
0
|
2
|
1302
|
POST
|
Hi I've got a small script that I've turned into an ArcToolbox tool / script / thingy. I would like to be able to pass ArcMap layers to the tool (ie drag the layer directly from ToC into the tool, and have the tool run only on the selected features). By and large, I have this running the way I would expect. However, if I'm trying to pass a layer to the tool that has been renamed in the ToC (ie given a 'proper' name rather than just the feature class name) the tool fails. For reference, I'm using arcpy.GetParameterAsText to pass variables from the tool to the script, and the particular parameter that is causing issues is a type 'Feature Layer' and is a multivalue parameter. Does anyone have any crazy suggestions that may fix this issue? I'm out of my depth! Thanks
... View more
08-29-2016
03:57 AM
|
0
|
3
|
3041
|
POST
|
Hi A curly question that I'm out of my depth with. I have a large series of georeferenced PDF topo maps that I distribute for use on tablets (think iPad using Avenza PDF). The maps have a primary data frame, but also a small locator map as marginalia. The maps are exported from ArcGIS as georeferenced PDF's. The issue I have is that when the PDF is loaded into Avenza or similar, and the app attempts to plot your position on the map and then zoom to your location, it is accessing the locator map in the margin rather than the main map frame. This behavior seems to change with maps, devices and app versions - I can't narrow it down. I'm thinking of solving the problem at the source. Is it possible to control the behavior of the data frame within the MXD to control whether or not it will generate a georeferenced PDF output? If this is possible, I could potentially allow this behavior for the main data frame, but not for the locator map. Do any bright sparks have any bright ideas?
... View more
07-20-2016
11:26 PM
|
0
|
1
|
1375
|
POST
|
For those playing at home, the answer was that each QR had to be loaded as a layer, and georeferenced to the correct location and scale. The georeferencing was able to be batched up as a Python script. More details at arcpy.Warp_management not performing as expected
... View more
07-04-2016
10:17 PM
|
1
|
0
|
735
|
POST
|
Success! 4 reference points has solved the problem. Thanks for the help Dan.
... View more
07-04-2016
05:36 PM
|
0
|
0
|
1030
|
POST
|
Thanks Dan for the information and your prompt reply (as always). The data I am attempting to use is in .png format and does need to be scaled as well as moved, hence the warp function being used. When you say 6 control points - do you mean 3 on the source and 3 on the target? I'm using 2 (or 4, depending on the interpretation). The (p+1)(p+2)/2 formula on the help page tells me 3 points for a 1st order polynomial, so I'll give that a crack tomorrow. Hopefully an extra control point fixes this!
... View more
07-04-2016
04:06 AM
|
0
|
2
|
1030
|
POST
|
For those still interested in this - Dropbox has now upgraded it's API to v2. This has meant updating the module install (no problems there).
... View more
07-03-2016
11:54 PM
|
1
|
0
|
350
|
POST
|
Hi - I'm unsure whether this is a Python question or a geoprocessing question. I'll post it here and see how we go. I am trying to use the 'warp' function in a rather novel way. I have a heap of (~800) individual QR codes, which I'd like to georeference so that they can be displayed as map features. The QR codes are all the same size and I can use the same reference points, whereas the location to georeference the features 'to' (ie where I want them to sit on the map) will change from code to code. This location is determined by the location of a given point. I've cobbled together a script to iterate through the codes, and the script runs correctly, but the output features aren't georeferenced at all. I've also tried georeferencing a single feature via the Toolbox, but that doesn't perform as expected either. The script (snippet of) I'm using is below: ls_inputs = os.listdir(ws_inputs) for i in ls_inputs: if i[0:-4] in dict_mapcentroid: print "Working on", i input = os.path.join(ws_inputs, i) cent_x = dict_mapcentroid[i[0:-4]][0] cent_y = dict_mapcentroid[i[0:-4]][1] target_pt = "'11.5 -158.5';'158.5 -11.5'" source_pt = "'%s %s';'%s %s'" % (cent_x - 1750, cent_y - 1750, cent_x + 1750, cent_y + 1750) output = os.path.join(ws_outputs, "georef_%s" % i) arcpy.Warp_management(input, source_pt, target_pt, output, "POLYORDER1") else: print "Fail on", i (dict_mapcentroid refers to a dictionary with the feature name as key, and the coordinates of the centroid as a [x,y] list) (the reference points are bottom left and top right, the +/- 1750 allow for the scaling of the feature to appear 3 x 3cm at 1:250K) Can anyone shed any light on why this wouldn't be working - or am I simply trying to use a tool in a manner in which it was not intended? Thanks
... View more
07-03-2016
11:52 PM
|
0
|
4
|
3344
|
POST
|
Hi I've got an interesting project that I'm going to start working on next week, and I'm not quite sure how to tackle it. I need to make a series of overview maps with an overlay of the map extents of my topographic map library. This in itself is easy enough to do. The catch is, I would like to label each extent / tile feature with a QR barcode, which will be available as as an image. I know I can use pictures as label features - however there are several hundred map extent features and I don't want to label them all individually! What are my options for using the QR codes as labels? The two options I can immediately think of (but are untested) is either to load the QR code into my map tile FC as a BLOB feature, or include a file path to the QR code. Does anyone have any bright ideas? Thanks!
... View more
07-01-2016
03:22 PM
|
0
|
1
|
2792
|
POST
|
Paul, can't give you a definitive answer on that other than I think it's one of the dependencies - which I found out when I got an error message of the effect of pip not being available. Once I dropped the pip directory in the same folder, it worked. Whether or not it needs the whole module or not I don't know - but I'm putting this in the category of 'it's working - I don't know why - but I won't mess with it any more'.
... View more
06-08-2016
02:49 PM
|
1
|
1
|
1506
|
POST
|
I think for portability and ease of use, I prefer the add-in option. The ability to deploy and install a single .addin file beats the pants off trying to manage the location of multiple files (especially when multiple users of varying technical abilities are involved). Add-in gives the option of the tool being run disconnected from our internal network as well. If I'm really smart, I can add it as an additional tool to a python .addin toolbar I'm already using. Could be a good tinkering job for this weekend.
... View more
06-07-2016
11:53 PM
|
0
|
0
|
350
|
POST
|
Postscript to this: I have tested Luke's proposed fix and it works. There were a couple of additional bits and bobs to copy in to get it to run, but I now have a script that is happily functioning on a clean install machine without have any external dependencies, which should also not cause any administrator type issues. For future reference, I needed the following stored in the same folder as my .py file to get it functioning: dropbox (folder) pip (folder) pkg_resources (folder) (note: duplicate as also inside pip folder) requests urllib3 Also six.py (file) (note:duplicated as also inside pip folder) Huge thanks to Luke. As to packaging and making pretty, I think this is going to have to live inside a Python add-in toolbar, so all the modules etc are packaged together in one location to allow full portability.
... View more
06-06-2016
11:56 PM
|
0
|
3
|
1506
|
POST
|
Fantastic! Thanks mate, you've saved me hours of chaos and confusion.
... View more
06-06-2016
04:26 PM
|
0
|
0
|
1506
|
POST
|
Thanks Luke - really good information to know. At the risk of sounding like a complete dumb-arse - what installer files would I need to put in that location for the dropbox module to work? As I installed the module via pip from the command line, I'm not sure what files actually contribute to the library. In my C:\Python27\Lib\site-packages folder, I have a /dropbox and /dropbox-6.3.0.dist-info folders - do these constitute the module as such?
... View more
06-06-2016
03:45 AM
|
0
|
0
|
1506
|
Title | Kudos | Posted |
---|---|---|
1 | 10-30-2019 10:07 PM | |
1 | 12-01-2020 09:24 PM | |
1 | 01-09-2018 07:17 PM | |
1 | 06-08-2016 02:49 PM | |
1 | 07-03-2016 11:54 PM |
Online Status |
Offline
|
Date Last Visited |
12-01-2020
10:55 PM
|