|
POST
|
I am trying to modify the JSon code from Esri to enable me use my offline map on my survey 123 for ArcGIS design "http://doc.arcgis.com/en/survey123/desktop/create-surveys/preparebasemaps.htm" But I am having issues with the validation, I am just stuck on one '{' I am not very good with JSON syntax and I need to get the syntax right for the script to work. I would appreciate if anyone can spare a few seconds to look at the script and help me find what I'm not doing right. { "displayInfo": { "map": { "coordinateFormat": null, "defaultType": { "name": null }, "home": { "latitude": 30.358219056799644, "longitude": -97.89650653945787, "zoomLevel": 11.2009 }, "preview": { "coordinateFormat": null, "zoomLevel": 0 } }, "style": { "backgroundColor": "#bfaac8", "backgroundImage": null, "inputBackgroundColor": null, "inputTextColor": "#000000", "textColor": null, "toolbarBackgroundColor": "#000000", "toolbarTextColor": "#5500ff" } }, "imagesInfo": { "captureResolution": 320 }, "publishInfo": { "connectVersion": "2.8.4", "webFormTransform": true }, "queryInfo": { "applySpatialFilter": true, "mode": "", "where": "" }, "displayInfo": { "map": { "mapTypes": { "append": false, "includeLibrary": false, "mapSources": [{ "name": "Steiener Ranch Test Map", "url": "http://traviscountytx.maps.arcgis.com/home/item.html?id=f4770fd5211c49719fa567aeae6f8435", "storeInMapLibrary": false }] } } }, "sentInfo": { "enabled": true }, "serviceInfo": { "itemId": "cd3fe79db7014e8db966833350bb21a2", "type": "Feature Service", "url": "https://services1.arcgis.com/HGcSYZ5bvjRswoCb/arcgis/rest/services/service_6ea10ff2bb15486aa6d943c2c3d1fc6a/FeatureServer" } } Here is the error from JSON Validator (Screenshot)
... View more
07-03-2018
06:37 AM
|
0
|
3
|
2198
|
|
POST
|
Thanks James, I am now able to add images to my Survey 123 Connect for ArcGIS using the Excel sheet, but how do I achieve the same thing on Survey123 for ArcGIS which is the web form. I found Survey123 for ArcGIS more flexible to design but I am not able to attach images to my questions. Is it possible to do so? Thanks once again!!
... View more
07-02-2018
12:05 PM
|
0
|
11
|
12636
|
|
POST
|
I am creating a survey for my users to look at 4 optional routes and provide their choices with comments. The survey choice answers should have an image attached to it (a .png map of each route option). I have seen something similar to what I want on You-tube but all my efforts to configure my survey to achieve that has yielded no positive result. The video was very brief and did not display the excel sheet configurations used to achieve the displayed result. Here is the link for that video. https://www.youtube.com/watch?v=j3Sh31BFXN8 Please I would appreciate any help I can get on this. Thanks
... View more
07-02-2018
10:23 AM
|
0
|
13
|
15254
|
|
POST
|
I have some features (Road, Drainage and Parcels - Line, Point and Polygon) data. The spatial attributes of these features are captured by drawing them into arcmap and then stored feature class in a feature dataset in a geodatabase that is on MSSQL2012 database on Server A. The non spatial attributes of these features are existing on another DEVSQL2012 on Server B. I am able to connect to the different databases using ArcCatalog Database connection and so able to view both the spatial and non-spatial data separately. I am now trying to create a database View from my ArcCatalog to join the spatial table on Server A to the non-spatial table on Server B. But I keep getting various errors. Please does anyone has an idea how I can get this resolved. SELECT [DEVSQL2012].TVR_CIPS.dbo.Projects.Id, TVR_CIPSdboProjectsName TVR_CIPS.dbo.Projects.Name, TVR_CIPS.dbo.Projects.ProjectTypeId, TVR_CIPS.dbo.Projects.ProjectManagerId, TVR_CIPS.dbo.Projects.IsFunded, TVR_CIPS.dbo.Projects.Scope, TVR_CIPS.dbo.Projects.FundSource, TVR_CIPS.dbo.Projects.TotalEstimatedCost, TVR_CIPS.dbo.Projects.Consultant, TVR_CIPS.dbo.Projects.Contractor, TVR_CIPS.dbo.Projects.LocationLimits, TVR_CIPS.dbo.Projects.GISId, TVR_CIPS.dbo.Projects.StatusId, TVR_CIPS.dbo.Projects.PermalinkMapURL, TVR_CIPS.dbo.Projects.CIPDocURL FROM TVR_CIPS.dbo.Projects INNER JOIN [Frussmolt\TVR3PRD02].PublicWorks.TC_USER.CIP_Point_Only ON [DEVSQL2012].TVR_CIPS.dbo.Id = [Frussmolt\TVR3PRD02].PublicWorks.TC_USER.CIP_Point_Only.Project_ID Here is the error I'm getting I don't understand why it is seeing that column as invalid. the column is supposed to be a Yes or No (0 and 1) though the field datatype for this column is 'Short integer', Could this be a problem?
... View more
03-12-2018
08:26 AM
|
0
|
1
|
1616
|
|
POST
|
ooh! I apologize for deleting the post here. I thought the moderator did not want it posted here and so I deleted it. I can still publish it again here and how I got the issue resolved if anyone is interested in it. Please let me know if I am allowed to post it here.
... View more
09-29-2017
06:47 AM
|
1
|
2
|
3520
|
|
POST
|
I created a python script to reconcile all edits on the users versions, then post the reconciled version to a QAQC and then to the sde or dbo default version. After this process the script will proceed to compress analyze and rebuild indexes for the tables in the sde database. This script will be scheduled on windows scheduler to run silently at 2:00am on Thursday and Saturday morning when users are offline. If there should be any error encountered, the script is to print the errors and also generate a log file containing the errors and store the logfile with date and time in the specified drive location. Since the script was scheduled to run behind scene on windows scheduler, it was difficult for me to see errors when it happens. This was a big issue because users edits weren't reflected on our default database after sometime due to the error encountered by the script, his actually necessitated the need for a functional logfile that will enable me identify the errors. The initial problem I had was that the script executed very well but could only print the errors on the screen but it generates an empty logfile. This was corrected by putting in 3 lines at the end of the script to get it to write the printed errors intothe logfile, save it with time and date. The Initial Script - executes but generates an empty log file # This script will reconcile and post all edits made in child versions of Natural Resources Geodatabase to QA\QC and then to SDE default database,it will go further to compress the database, analyze and rebuild the indexes on the database tables.
# Script developed by Irene F. Egbulefu - GIS Analyst ( TNR Dept)
import arcpy
import sys
import os
import datetime
import traceback
# Database Connection
editDB ="Database Connections\\Frogmouth_Natural_ResourcesTC.sde"
# Current Day
Day = time.strftime("%m-%d-%Y", time.localtime())
# Current Time
Time = time.strftime("%I:%M:%S %p", time.localtime())
# Set workspace
workspace = editDB
# Set the workspace environment
arcpy.env.workspace = workspace
arcpy.env.overwriteOutput = True
try:
# Start Time
print 'Process Started at ' + str(Day) + " " + str(Time)
# block new connections to the PublicWorks Geodatabase on Frogmouth Server.
print "Blocking Connections..."
arcpy.AcceptConnections(editDB, False)
# disconnect all users from the PublicWorks Geodatabase on Frogmouth Server.
print "Disconnecting Users..."
arcpy.DisconnectUser(editDB, "ALL")
# Get a list of all child versions besides QAQC and DEFAULT to pass into the ReconcileVersions tool.
ver1List = [ver1.name for ver1 in arcpy.da.ListVersions(editDB) if ver1.name != 'TC_USER.QA/QC' and ver1.name != 'sde.DEFAULT']
# Execute the ReconcileVersions tool with QAQC Target Version and do not delete child versions
print "Reconcile/post versions to QAQC...."
arcpy.ReconcileVersions_management(editDB, "ALL_VERSIONS", "TC_USER.QA/QC", ver1List, "LOCK_ACQUIRED", "ABORT_CONFLICTS", "BY_OBJECT", "FAVOR_TARGET_VERSION", "POST", "KEEP_VERSION")
# Extract QAQC version from the list of versions to pass to ReconcileVersions tool.
ver2List = [ver2.name for ver2 in arcpy.da.ListVersions(editDB) if ver2.name == 'TC_USER.QA/QC']
# Execute the ReconcileVersions tool with DEFAULT Target Version and do not delete QAQC version
print "Reconcile/post QAQC to DEFAULT..."
arcpy.ReconcileVersions_management(editDB, "ALL_VERSIONS", "sde.DEFAULT", ver2List, "LOCK_ACQUIRED", "ABORT_CONFLICTS", "BY_OBJECT", "FAVOR_TARGET_VERSION", "POST", "KEEP_VERSION")
# Run the compress tool.
print "Compressing database..."
arcpy.Compress_management(editDB)
# /////////////////////////////////// ANALYZE DATASETS AND CALC STATISTICS /////////////////////////////////////
# NOTE: Rebuild indexes can accept a Python list of datasets.
# Get a list of all the datasets the user has access to.
# First, get all the stand alone tables, feature classes and rasters.
dataList = arcpy.ListTables() + arcpy.ListFeatureClasses() + arcpy.ListRasters()
# Next, for feature datasets get all of the datasets and featureclasses
# from the list and add them to the master list.
for dataset in arcpy.ListDatasets("*", "Feature"):
arcpy.env.workspace = os.path.join(workspace, dataset)
dataList += arcpy.ListFeatureClasses() + arcpy.ListDatasets()
# reset the workspace
arcpy.env.workspace = workspace
# Concatenate all datasets into a list
datasetList = [ds for ds in dataList]
print "rebuilding indexes"
# Execute rebuild indexes
# Note: to use the "SYSTEM" option the workspace user must be an administrator.
arcpy.RebuildIndexes_management(workspace, "NO_SYSTEM", datasetList, "ALL")
print('Rebuild Complete')
print "analyzing datasets"
arcpy.AnalyzeDatasets_management(workspace, "NO_SYSTEM", datasetList, "ANALYZE_BASE", "ANALYZE_DELTA", "ANALYZE_ARCHIVE")
print "analysis complete"
#Allow the database to begin accepting connections again
print "Set databases to allow connections..."
arcpy.AcceptConnections(editDB, True)
# \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ script initiation, Rec/Post process error handling \\\\\\\\\\\\\\\\\\\\\\\\\\\\\
except:
print 'An error occured'
failMsg = '\nSCRIPT FAILURE IN SCRIPT INITIATION OR RECONCILE-POST PROCESS, \n'
failMsg += 'Most recent GP messages below.\n'
failMsg += arcpy.GetMessages() +'\n'
failMsg += '\nTraceback messages below.\n'
failMsg += traceback.format_exc().splitlines()[-1]
print failMsg
# \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ write error log info\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
# move to working directory
os.chdir (u'Y:\\TOOLS\\Logs\\')
## define function with variable filename and the format of the timestamp
def timeStamped(filename, fmt='%m-%d-%y-%H.%M.%S-{filename}'):
return datetime.datetime.now().strftime(fmt).format(filename=filename)
## assign local variable filename and use whatever file name and extension you need
filename = timeStamped('Natural_ResourcesTC_toQC_Log.txt')
## Create the logfile and assign write permission
Open(filename, "w")
Final corrected script - executes and generates logfile, prints errors on the screen and also writes error information into the logfile it # This script will reconcile and post all edits made in child versions of Natural Resources Geodatabase to QA\QC and then to SDE default database,it will go further to compress the database, analyze and rebuild the indexes on the database tables
# Script developed by Irene F. Egbulefu - GIS Analyst ( TNR Dept)
import arcpy
import sys
import os
import datetime
import traceback
# Database Connection
editDB ="Database Connections\\Frogmouth_Natural_ResourcesTC.sde"
# Current Day
Day = time.strftime("%m-%d-%Y", time.localtime())
# Current Time
Time = time.strftime("%I:%M:%S %p", time.localtime())
# Set workspace
workspace = editDB
# Set the workspace environment
arcpy.env.workspace = workspace
arcpy.env.overwriteOutput = True
try:
# Start Time
print 'Process Started at ' + str(Day) + " " + str(Time)
# block new connections to the PublicWorks Geodatabase on Frogmouth Server.
print "Blocking Connections..."
arcpy.AcceptConnections(editDB, False)
# disconnect all users from the PublicWorks Geodatabase on Frogmouth Server.
print "Disconnecting Users..."
arcpy.DisconnectUser(editDB, "ALL")
# Get a list of all child versions besides QAQC and DEFAULT to pass into the ReconcileVersions tool.
ver1List = [ver1.name for ver1 in arcpy.da.ListVersions(editDB) if ver1.name != 'TC_USER.QA/QC' and ver1.name != 'sde.DEFAULT']
# Execute the ReconcileVersions tool with QAQC Target Version and do not delete child versions
print "Reconcile/post versions to QAQC...."
arcpy.ReconcileVersions_management(editDB, "ALL_VERSIONS", "TC_USER.QA/QC", ver1List, "LOCK_ACQUIRED", "ABORT_CONFLICTS", "BY_OBJECT", "FAVOR_TARGET_VERSION", "POST", "KEEP_VERSION")
# Extract QAQC version from the list of versions to pass to ReconcileVersions tool.
ver2List = [ver2.name for ver2 in arcpy.da.ListVersions(editDB) if ver2.name == 'TC_USER.QA/QC']
# Execute the ReconcileVersions tool with DEFAULT Target Version and do not delete QAQC version
print "Reconcile/post QAQC to DEFAULT..."
arcpy.ReconcileVersions_management(editDB, "ALL_VERSIONS", "sde.DEFAULT", ver2List, "LOCK_ACQUIRED", "ABORT_CONFLICTS", "BY_OBJECT", "FAVOR_TARGET_VERSION", "POST", "KEEP_VERSION")
# Run the compress tool.
print "Compressing database..."
arcpy.Compress_management(editDB)
# /////////////////////////////////// ANALYZE DATASETS AND CALC STATISTICS /////////////////////////////////////
# NOTE: Rebuild indexes can accept a Python list of datasets.
# Get a list of all the datasets the user has access to.
# First, get all the stand alone tables, feature classes and rasters.
dataList = arcpy.ListTables() + arcpy.ListFeatureClasses() + arcpy.ListRasters()
# Next, for feature datasets get all of the datasets and featureclasses
# from the list and add them to the master list.
for dataset in arcpy.ListDatasets("*", "Feature"):
arcpy.env.workspace = os.path.join(workspace, dataset)
dataList += arcpy.ListFeatureClasses() + arcpy.ListDatasets()
# reset the workspace
arcpy.env.workspace = workspace
# Concatenate all datasets into a list
datasetList = [ds for ds in dataList]
print "rebuilding indexes"
# Execute rebuild indexes
# Note: to use the "SYSTEM" option the workspace user must be an administrator.
arcpy.RebuildIndexes_management(workspace, "NO_SYSTEM", datasetList, "ALL")
print('Rebuild Complete')
print "analyzing datasets"
arcpy.AnalyzeDatasets_management(workspace, "NO_SYSTEM", datasetList, "ANALYZE_BASE", "ANALYZE_DELTA", "ANALYZE_ARCHIVE")
print "analysis complete"
#Allow the database to begin accepting connections again
print "Set databases to allow connections..."
arcpy.AcceptConnections(editDB, True)
# \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ script initiation, Rec/Post process error handling \\\\\\\\\\\\\\\\\\\\\\\\\\\\\
except:
print 'An error occured'
failMsg = '\nSCRIPT FAILURE IN SCRIPT INITIATION OR RECONCILE-POST PROCESS, \n'
failMsg += 'Most recent GP messages below.\n'
failMsg += arcpy.GetMessages() +'\n'
failMsg += '\nTraceback messages below.\n'
failMsg += traceback.format_exc().splitlines()[-1]
print failMsg
# \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ write error log info\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
# move to working directory
os.chdir (u'Y:\\TOOLS\\Logs\\')
## define function with variable filename and the format of the timestamp
def timeStamped(filename, fmt='%m-%d-%y-%H.%M.%S-{filename}'):
return datetime.datetime.now().strftime(fmt).format(filename=filename)
## assign local variable filename and use whatever file name and extension you need
filename = timeStamped('Natural_ResourcesTC_toQC_Log.txt')
## Create the logfile and assign write permission
f = Open(filename, "w")
f.write(failmsg)
f.close()
... View more
09-28-2017
01:31 PM
|
0
|
9
|
3899
|
|
POST
|
Hi All I have some datasets: Parks, Park facilities and ParkTrails. These have many-to-many relationship; i.e a park can have multiple facilities and there may be multiple park trails on a single park I would like to publish this data to ArcGIS Server, and issue queries on it, so that I can get a single result for a single Park. Currently, when mapping say a pack I get all other parks and facilities as well as Park line and this is somehow confusing and a lot of information to digest at a time when the result is drawn by a text search. Please does anyone have an idea how I can create a spatial view that will generate a unique Object ID field for repeated geometries to enable me publish a park layer with say uniquely identified facilities and park lines. I am using MSSQL Database server 2012 and ArcGIS 10.4. I would also not want to tamper with my data storage type. I have tried creating the view from my MSSQL interface but on bringing it across to ArcCatalog or ArcMap, I keep getting the OID error (ObjectID)and some other errors as shown in the screenshot attached here. Also at some point, the feature displays on ArcMap to show just one feature either polygon data or the Line data but when I try to view the attribute table it gives me another error screenshot 2
... View more
08-07-2017
07:25 AM
|
0
|
0
|
1529
|
|
POST
|
Thank you very much George! Your advise did work. I rebuilt the geodatabase indexes and then ran my python script which is supposed to reconcile and post versions to QA/QC and then to default SDE, after which it will proceed to compress, rebuild and analyzed the dataset. Everything worked out perfectly well. See result below Python 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> ================================ RESTART ================================ >>> Process Started at 07-11-2017 01:18:25 PM Reconcile/post versions to QAQC.... Reconcile/post QAQC to DEFAULT... Compressing database... rebuilding indexes Rebuild Complete analyzing datasets analysis complete Set databases to allow connections... >>>
... View more
07-11-2017
01:20 PM
|
0
|
1
|
4603
|
|
POST
|
Sure, I will do that once my users are off the server and see if it would help! Thanks and I will get back to you on the outcome
... View more
07-11-2017
09:34 AM
|
0
|
0
|
4603
|
|
POST
|
I am getting this error when trying to compress one of my geodatabases. I have about 5 different geodatabase schemas all existing in the same server MSSQL Server 2012 database on Windows 2012 Server, I am able to reconcile, post, compress and analyze all the other 4 geodatabases successfully without issues but each time I run both my model or script on this particular geodatabase I keep getting the error saying. "Failure to access the DBMS server [[Microsoft][SQL Server Native Client 11.0]Communication link failure] [sde.DEFAULT][STATE_ID = 251] Underlying DBMS error [HY000:[Microsoft][SQL Server Native Client 11.0]Unspecified error occurred on SQL Server. Connection may have been terminated by the server.] [sde.DEFAULT]" I am able to reconcile and post new versions to the default version of this geodatabase but cannot go beyond that, when it gets to the compression stage, it errors out and displays the error message above. I came across some of the recommendations given on this forum and I have tried them all such as running a check on the database schema using the DBCC Check database tool and it ran successfully without error, which confirms the Geodatabase is OK and eliminates possible issue from that end. I have also uninstalled my existing MSSQL Native client and replaced it with a new MSSQL Native Client version 11.3.6538.0 (64bit) and I'm still getting the same error. Please does anyone have new ideas on what else I can do to resolve this issue.
... View more
07-11-2017
08:08 AM
|
1
|
4
|
9236
|
|
POST
|
CAN'T OPEN INSTANCE: sde:sqlserver. Spatial Engine Connection Failed (-409). Cannot Get Access to Instance sde:sqlserver
... View more
03-02-2017
01:58 PM
|
0
|
1
|
1681
|
|
POST
|
I am trying to compress one of my geodatabase on SDE 10.4 but i keep getting this error below. My native client is version 11 and 64 bits and this error is just peculiar to 2 geodatabases out of the 7 geodatabases that I have on my server ERROR 999999: Error executing function. Failure to access the DBMS server [[Microsoft][SQL Server Native Client 11.0]Communication link failure] [sde.DEFAULT][STATE_ID = 15] Underlying DBMS error [HY000:[Microsoft][SQL Server Native Client 11.0]Unspecified error occurred on SQL Server. Connection may have been terminated by the server.] [sde.DEFAULT] Failed to execute (Compress). Rebecca Strauch, gis servers, sde connection microsoft sql server 2012,
... View more
03-02-2017
01:15 PM
|
0
|
5
|
2790
|
|
POST
|
inputFolderPath line 691: \\Hamipool\E$\arcgisserver\directories\arcgissystem\arcgisinput\Public\Bike_Safety_Committee_Project.MapServer inputFolderPath line 693:Hamipool\E$\arcgisserver\directories\arcgissystem\arcgisinput\Public\Bike_Safety_Committee_Project.MapServer\extracted\v101 Step 1: Creating Service Definition Draft (.sddraft) Step 2: Analyzing Service Definition Draft. The following information was returned during analysis of the MXD: MESSAGES: - Layer draws at all scale ranges (CODE 30003) applies to: Is this supposed to be a critical problem 1 : Commissioner Precincts 2 : Public Schools 3 : Bike Safety Committee Recommendations 2013 4 : Existing Bike Routes 5 : CoA's OCG Trail (Built) 6 : Travis County Park Trails 7 : County Maintained Roads 8 : County Rds by Treatment Types 9 : County Rds by Condition 10 : Corridors_TNRs 11 : CAMPO 2035 Plan 12 : Travis_County_Parks 13 : LCRA_Parks_All 14 : COA_Parks_All 15 : Other_Juris_Parkland_All 16 : State_Parks_All 17 : City Limits 18 : ETJs 19 : County_Boundary_Line Service could not be published because errors were found during analysis. In some cases it doesn’t even return any message Step 1: Creating Service Definition Draft (.sddraft) Step 2: Analyzing Service Definition Draft. The following information was returned during analysis of the MXD: MESSAGES: Service could not be published because errors were found during analysis.
... View more
02-24-2017
01:36 PM
|
0
|
0
|
2513
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-10-2025 09:18 AM | |
| 1 | 09-30-2024 08:15 AM | |
| 1 | 11-26-2018 10:06 AM | |
| 1 | 09-29-2017 06:47 AM | |
| 2 | 09-17-2019 12:51 PM |
| Online Status |
Offline
|
| Date Last Visited |
Thursday
|