|
POST
|
I'll try to clarify: The local SQL Express/ArcGIS Workgroup instance is only there to support local multi-user editing for our core GIS staff. This is a DB replica. The parent of this replica resides in SQL Standard/ArcGIS Enterprise in Azure. From Azure is where our feature & map services will be created/hosted. Does that help explain things better? Again, if you do not have the need for multi user editing, the following are potential options you could use in order to still support local editing but have your eGDB reside in Azure: ArcGIS (Desktop) Database Server ; in this scenario you could still have a 2-way replica with your local copy/replica sitting on SQL Express. Check-out a local copy from your eGDB as you need it. If you're doing this often and/or have to sync your changes often you'd grow tired of this quick. Depending on the gradient of editing needs from your user base, you may be able to offload some or most of your editing to feature services This may help illustrate a few different scenarios you could implement.
... View more
11-28-2018
06:01 AM
|
4
|
1
|
3701
|
|
POST
|
Collin Johnston Johanna Kraus Lourdes Suman UPDATEish: Lots of testing has been done and we're now moving forward with implementation. To be clear: We're not using Azure SQL (Paas) but are instead migrating all of our company DB resources ( currently in a datacenter and this is not just GIS) to an SQL Server instance (on a VM) in Azure (IaaS), and our (current) onprem SQL Standard instance which hosts our eGDB is along for the ride. We will have a separate VM hosting ArcGIS Server federated with ArcGIS Portal (so Base ArcGIS Enterprise Deployment). Previous testing related to eGDB issues revealed the following: 'Local' access of the eGDB/RDBMS over-the-wire to Azure was simply too slow. An eGDB/RDBMS accessed by ArcGIS Enterprise and hosting services all in Azure worked great and services are easily consumed via the web. The only viable solution here in order to continue to support multi-user editing on-prem is to stand-up an ArcGIS Workgroup instance (this sits on SQL Express)**. We will then use a 2-way DB replica to sync changes between the two environments. Now, if you want to talk about handling file data...that's a whole other can of worms.... **If you do not need to support multi-user editing ArcGIS (Desktop) Database Server may have some value to you. ***EDITED: Lots of points of clarity. Happy to provide more details.
... View more
11-27-2018
09:52 AM
|
4
|
3
|
3701
|
|
POST
|
Xander Bakker I know...you are right. I submit to this as like every thread and experienced python developer says this is a better way to go. In an effort to make my code better and to add some value to this thread I will reconfigure my code to use a cursor to do the field calculation. Many thanks. If anyone thinks it would be of value I'll post the final product here.
... View more
11-15-2018
06:16 AM
|
2
|
1
|
3159
|
|
POST
|
Dan Patterson Dan, are you familiar with the proverb For Want of a Nail? Notice that one slight change I underlined? jeez... And the output: Thanks for sticking with me on this one! In the end you were right...it was ultimately about quotes
... View more
11-15-2018
06:13 AM
|
1
|
1
|
12119
|
|
POST
|
Thanks Dan. I'm not firing on all cylinders but I'm gonna try to tackle this again in the AM. I'm also nervous about the format block in the code block. I just wish I knew why this worked in MB. (,I even tried to yank out converted script. I even built a stand alone function that does this same part that works!) Thanks again
... View more
11-14-2018
06:57 PM
|
0
|
3
|
12120
|
|
POST
|
Thanks Dan! We're calculating a field called Q_BEARING, with BEARING being one the inputs to the epression. Not sure if you cought my last blurb but it does indeed appear to be a problem with my notation statement (if I simplify that things work). Can I embed an additional string formatter within the codeblock?
... View more
11-14-2018
06:41 PM
|
0
|
5
|
12120
|
|
POST
|
Dan thanks for the heads-up on the Jive formatting. I looked back at my code and I do have the indentations. However, I did modify the beginning and end of the codeblock a bit. I know images are generally frowned upon when relaying code, but given the formatting issue I'm adding this for verification. Still have the same error: UPDATE: after much picking away it does appear that something is wrong with the 'notation' statement or at least something isn't happy there. If I reduce it down to just notation = prefix + str(degrees) the output is fine. Admittedly the output is a bit over-complicated (but it works in model builder) . Is there a way to insert another string formatting statement w/in the codeblock? I may try that fresh in the AM.
... View more
11-14-2018
05:37 PM
|
0
|
7
|
12120
|
|
POST
|
Dan Patterson After a really long day I came home to try your fix, but to no avail. I was very hopeful on this one too! Same error. i wonder if i try to format my notation statement? too bad because it did work in the model builder prototype but it's probably some kinda issue with quote escaping (although that lingering thing about copying and pasting the code block is bugging me too, i'll redo that but remote access is slow tonight).
... View more
11-14-2018
04:07 PM
|
0
|
9
|
12120
|
|
POST
|
I've spent quite a bit of time looking at all the similar issues on GeoNet and Stack Exchange but I still can't find an answer. I'm sure that someone will be quick to say that I should use a cursor, but this exact same code works in ModelBuilder just fine! Is there the potential for a carriage return or something? I copied and pasted my codeblock so that might be a possibility. Here's my code (the FC in question does indeed have a field called 'BEARING'): # Add Quandrant Bearing Field
arcpy.AddField_management(BoundSplit, "Q_BEARING", "TEXT", "", "", "", "", "NULLABLE", "NON_REQUIRED", "")
# Calculate Quadrant Bearing
expression = """ DD_DMS_Line(!BEARING!,{0}) """.format(correction)
arcpy.AddMessage(expression)
codeblock = """def DD_DMS_Line(bearing, correction=0):
value = bearing + correction
if value <= 90:
numb = value
prefix = "N"
suffix = "E"
elif value > 90 and value < 180:
numb = 180 - value
prefix = "S"
suffix = "E"
elif value >= 180 and value < 270:
numb = value - 180
prefix = "S"
suffix = "W"
elif value > 270 and value <= 360:
numb = 360 - value
prefix = "N"
suffix = "W"
elif value > 360:
numb = value - 360
prefix = "N"
suffix = "E"
degrees = int(numb)
submin = abs( (numb - int(numb) ) * 60)
minutes = int(submin)
subseconds = abs((submin-int(submin)) * 60)
notation = prefix + str(degrees) + u"\u00b0" + str(minutes) + "\'" +\
str(subseconds)[0:5] + "\"" + suffix
return notation"""
arcpy.CalculateField_management(BoundSplit, "Q_BEARING", expression, "PYTHON", codeblock) My expression appears to be fine (highlighted in this image). ugh, been banging my head against the wall on this one!
... View more
11-14-2018
01:46 PM
|
1
|
15
|
18312
|
|
POST
|
Dan Patterson To be clear: the folks I know are using Shiny to generate outputs directly into word docs. I know that ReportLab directs outputs to PDF. To reiterate: the requirements are generally that the table (example here) are included directly in the map document (exported as a PDF). These are often contractual documents so having the categorized acreage values on the map is a requirement. Again, it is silly to me to have to generate a table, export it, only to have to copy & paste it back into the document but that's the required product and I don't currently see a way around it. [Pro Table Frames do not support the required categorization.]. My purpose here is to automate this task of report generation while enforcing a consistent format. We have a number of users generating this kind of content. Even if the user has to copy&paste the (pre-formatted) output and then manually resize to accommodate the various map elements (since record number, scale, and extent all vary) that is still a win. Right now the ability to format Excel with Python appears to be too limited which is why I'm seeking reporting alternatives.
... View more
11-13-2018
06:39 AM
|
0
|
0
|
1145
|
|
POST
|
Starting a 'discussion' (rather than a specific 'question') seems like the best venue for my inquiry. I realize that many of you may have multiple reporting strategies and that other things like the output itself and audience would dictate or impact your choice for reporting. I feel like I'm about to jump into ReportLab with all the talk of future integration into Pro. Some of my colleagues are more on the R side of things and use Shiny which seems light years more advanced than anything I've found for a python implementation (please, tell me I'm wrong! I want to hear about it). That said, Shiny might be overshooting the scope of what I need to accomplish. My needs are mostly tabular outputs of acres/area categorizations but charts & graphs could become something the audience is interested in. Mostly, the product requirement is that the table be included directly on the map document. That creates some limitations & challenges right there. [One specific question I do have is: is there a way to output a Pandas dataframe directly into an ArcMap/Pro document? Having to export solely for the sake of having the ability to copy the content into ArcGIS is less than desirable (if not silly)]. So that's the context from my end. What are you all using? What's your output content requirement? Who's your audience? Thanks!
... View more
11-13-2018
06:02 AM
|
0
|
2
|
2407
|
|
POST
|
Dan Patterson thanks! there's some real gold in there. I've bookmarked these and downloaded your table tools. I ended up getting some help on SE and found an easy way to move the totals. Thanks again Dan!
... View more
11-13-2018
05:17 AM
|
0
|
0
|
18113
|
|
POST
|
Dan Patterson, thanks for that...I didn't know it would be so simple. Here is what I came up with for my test code before I roll it up into a function. I've always got open ears for improvement! Edit: my pivot table fails to include a grand total. Any suggestions? table = "\\\\fileServer\\MAP_PROJECTS\\LV_WEB\\SDE_CONNECTIONS\\LV_NEXUS.sde\\LV_NEXUS.DATAOWNER.NORTHEAST\\LV_NEXUS.DATAOWNER.NE_HARVEST_OPS"
HUID = "669-NMTC-139"
whereClause = """ "LV_HARVEST_UNIT_ID" = '{0}' """.format(HUID)
print(whereClause)
tableArray = arcpy.da.TableToNumPyArray(table, ['STAND_NUMB', 'SUPER_TYPE','STRATA', 'OS_TYPE', 'SILV_PRES', 'ACRES'], where_clause = whereClause)
df = pd.DataFrame(tableArray)
report = df.groupby(['SUPER_TYPE']).apply(lambda sub_df: sub_df.pivot_table(index=['STRATA', 'OS_TYPE', 'STAND_NUMB', 'SILV_PRES'], values=['ACRES'], margins=True) )
np.round(report,1)
... View more
11-12-2018
06:13 AM
|
0
|
2
|
18113
|
|
POST
|
I'm attempting to add in subtotals to a pivot table from a very basic array. The first example I provide I derived on my own, but this has no subtotals for each group. The second example I borrowed and honestly I don't really get how it works just yet, and I cannot get a round to work. pd.pivot_table(df.round({'ACRES':1}),values = 'ACRES', index = ['SUPER_TYPE','STRATA', 'OS_TYPE'], aggfunc=np.sum, margins = True) Returns: 2nd example: df.groupby(['SUPER_TYPE']).apply(lambda sub_df: sub_df.pivot_table(index=['STRATA', 'OS_TYPE'], values=['ACRES'], margins=True) ) I'm guessing there are a number of ways to go about this. Thanks in advance!
... View more
11-09-2018
08:21 AM
|
0
|
4
|
24176
|
|
POST
|
Thanks Kelly. However, I'm still confused. There is a difference in pricing with level 1 users between ArcGIS Enterprise and ArcGIS Online, so there will be no changes with this. There is a change or there isn't?? Could you please expand on this? After the December release of ArcGIS Online, Level 2 users will convert to a Creator which have access to field apps. So if I currently have 30-40 users using Collector for free with AGO (AND assuming we will are about to migrate to Portal [this part may not be relevant but I'm adding for context]), I will need to now budget for an increased cost of $15,000-$20,000 to support the same field staff ($500/Level 2 user)?? Am I missing something? I sure hope so!
... View more
11-06-2018
01:10 PM
|
0
|
1
|
2176
|
| Title | Kudos | Posted |
|---|---|---|
| 9 | 03-24-2026 11:41 AM | |
| 1 | 11-06-2024 06:58 AM | |
| 1 | 12-16-2022 07:01 AM | |
| 1 | 08-09-2024 06:55 AM | |
| 1 | 08-13-2024 05:58 PM |
| Online Status |
Offline
|
| Date Last Visited |
03-24-2026
12:51 PM
|