|
POST
|
Hi Michael, Unfortunately I am not a Java Script programmer so I am not going to be of much help here, but let me try to give you some help any way. you can go to Query a feature layer | ArcGIS API for JavaScript 4.16 to find the documentation for Java Script as well as examples ArcGIS Online is basically just a newer version of the ArcGIS Enterprise system so this is how it looks when you query a layer. What you want to research is the Result Offset which basically means from 0 how may records to skip and Result Record Count which means how many records to return E.G if the offset is 10 start at record 10 and return 5 records. Info: Query (Map Service/Layer)—ArcGIS REST API | ArcGIS for Developers Example: https://some_server.esri-southafrica.com/server/rest/services/Hosted/SubDist16T_Layer_WFL1/FeatureServer/0/query?where=1%3D1&resultOffset=10&resultRecordCount=1&f=json Returns { "exceededTransferLimit": true, "features": [{ "attributes": { "municname": "City of Tshwane" }, "geometry": { "rings": [[...]] } } ], "fields": [{ "name": "municname", "type": "esriFieldTypeString", "alias": "MUNICNAME", "length": 100, "defaultValue": "", "modelName": "MUNICNAME" } ], "geometryType": "esriGeometryPolygon", "spatialReference": { "wkid": 102100, "latestWkid": 3857 }, "objectIdFieldName": "objectid_12", "hasZ": false, "hasM": false }
... View more
08-26-2020
04:03 AM
|
0
|
0
|
2032
|
|
POST
|
Good Day Michael, To answer your question why are you not getting all the records? This is because there is a limit on the records that you can query at one time, the reason behind this is simple because it is quite heavy to query all the records in a table at one time. Then using the Rest API's is quite complex if possible try using the Python API for ArcGIS it is free index | ArcGIS for Developers To Answer your question you have to step trough the data E.G query record 1-4000 then 4001 to 8000 you can achieve this in REST as well in python you can do this as follows the below code will iterate trough a feature service and print out all the lines from arcgis.features import FeatureLayer from arcgis.gis import GIS class BuildPacks: def __init__(self, list_of_items, pack_size=500😞 self._list_of_items = list_of_items self._length = self._list_of_items.__len__() self._pack_size = pack_size self._packs = None def build_packs(self😞 if self._length > self._pack_size: self._packs = int(self._length / self._pack_size) for pack in range(self._packs): idx_start = pack * self._pack_size idx_end = idx_start + self._pack_size yield self._list_of_items[idx_start:idx_end] idx_start = self._pack_size * self._packs remainder = self._length - idx_start if remainder > 0: yield self._list_of_items[idx_start:self._length] else: yield self._list_of_items gis = GIS("https://www.arcgis.com", "username", "password") con = FeatureLayer("https://serviceurl/server/rest/services/Hosted/myservice/FeatureServer/0", gis) rows = con.query(return_ids_only=True) # gets all the ids in a table row_ids = rows['objecIds'] packs = BuildPacks(row_ids) # builds packs of 500 # Quries 500 records at a time for pack in packs.build_packs(): id_strings = [str(x) for x in pack] records = con.query(where=f'ObjectId IN ({id_strings})') #e.g "ObjectId IN (01234,01235)" # this is standard SQL for record in records.features: print(record.__dict__) #prints the records
... View more
08-24-2020
10:33 PM
|
0
|
1
|
2032
|
|
POST
|
Hi Jay, Thank you for the update, I have not come across this specific issue before and your feedback helps a lot there where major changes between 10.4.x and post 10.5.x I am thinking that is where it slipped in. This information is very helpful. Kind Regards Henry
... View more
02-25-2020
10:00 PM
|
0
|
1
|
2412
|
|
POST
|
Hi Jay, Just install SQL Server Management Studio and connect to your Database Navigate to the Database There is a table called SDE_server_config and check what is the value under Auth_key If the data has expired then your DB license has expired
... View more
01-27-2020
10:58 PM
|
0
|
1
|
2412
|
|
POST
|
Hi Jay, So It seems to be a database error, since you also get the error when you create a new FC it might be that the license in the DB has expired. This would be a possibility if you have a term license for ArcGIS server. The tool to update the license is under Data Management Tools > Geodatabase Administration > Update Enterprise Geodatabase License Now usually you get a warning about this so it is a long shot. I know we have had problems where the version tree was never reconciled, posted back and those trees got very large and eventually broke, but I am not very well versed with the inner working of the SDE yet. How large is your current state tree? I do know that you can have different rights applied to children so that might also be a avenue to explore. Hope it helps Regards Henry
... View more
01-24-2020
07:05 AM
|
0
|
1
|
2412
|
|
POST
|
Hi Jay, Ok are you using the same version of ArcMap as your Server or are you using ArcGIS Pro. If ArcMap Geodatabase version when you go to the properties of your Database Connection what version is the Geodatabase if the version is below 10.4.1 i would recommend upgrading it Data Store Are you publishing to a ArcGis Data Store E.G managed database ? If yes you can check if the Data Store is up and working correctly. Navigate to the server where data store is installed C:\Program Files\ArcGIS\DataStore\tools open a administrative command prompt and run describedatastore.bat It should look like this make sure Data store mode is ReadWrite if not you either ran our of disk space or some other error can can place it back in read write by running changedatastoremode.bat Kind Regards
... View more
01-15-2020
10:53 PM
|
0
|
0
|
4043
|
|
POST
|
Hi Jay, You mentioned that you are using a join and that the database is a SQL server. Q: is the join coming form the same database? I am thinking that the layers or the users have a rights problem on the data. what some times happen is that a person connects to the data-source in database_1 and the other using database_2 but not both are registered or the ArcGIS server. Also make sure that the instance and user specified in the Database connection is the one registered with the server some time the database is registered but with the wrong user or only using the server name and not the full name "FQDN" Right click your server connection in ArcMap go to server properties, select Data Store then the MSSQL server that is used then click properties -the finger under the x- then click edit the details must be the same as the Database connection is ODBC 13 for SQLServer installed on both the server and the station that publishes? I don't think this is your problem but a common problem. Deleting the connection Strings and recreating them might also solve the problem as they corrupt every now and then I hope something helps Regards Henry
... View more
01-09-2020
03:32 AM
|
0
|
1
|
4043
|
|
POST
|
Hi Jay, You can first try to just publish a blank feature class E.G create a new FC and just place a point in it if that publishes then you probably have an error in your data. Where is your data hosted? If it is not hosted on the server then that can also cause a problem. Are you using a SQL database of a FGDB ? Regards Henry
... View more
01-08-2020
03:59 AM
|
0
|
1
|
4043
|
|
POST
|
Hi Brian, When you install your web adaptor you should use the DNS name that you intent to use for your system because localhost will only be available on the server that the application is installed on. If you don't have content or customisation then Like Jonathan indicate the best option is to reinstall the environment. If you get a 404 on this url http://localhost/server/webadaptorit might indicate that you have a problem with IIS or you are trying to access the service from another server can you access your server on http://localhost:6080/arcgis/manager or http://my_server_name.local_fqnd:6080/arcgis/manager? You should also use Https instead of http for any production system.
... View more
01-08-2020
03:49 AM
|
0
|
0
|
1489
|
|
POST
|
Hi everyone, I have a 10.6.1 datastore that has almost 7000 hosted FC in the store this is +- 30GB but I am getting a problem when I try to add a failover. Problem: After adding the failover the wizard copies over the datastore and unpacks it. It then fires up one thread to read through the content now because of the volume and a slow server it fails to read through all the content and start up the datastore before the timeout it then fails. Workaround I had to copy out most of the data to get the failover to configure but this is a very time-intensive script. Question Is there a setting to extend the timeout of the wizard when adding the datastore?
... View more
10-18-2019
12:02 AM
|
0
|
0
|
1143
|
|
POST
|
You just add the query string inside the quotes. search_result = gis.content.search(query="owner:some_user NOT Feature Service") Search reference—ArcGIS REST API: Users, groups, and content | ArcGIS for Developers inside the () you can only use = it is just an assignment parameter_1=some_value
... View more
09-18-2019
07:31 AM
|
0
|
0
|
1248
|
|
POST
|
So Before you even go into the Arcpy or ArcGIS Modules build up a base understanding of python ArcGIS Desktop is using Python 2.7 ArcGIS Pro is using Python 3.x I came across this excellent course in Udemy it is well worth your time for learning python. https://www.udemy.com/share/1000dOAkQddFhXRnQ=/ A Great Resource for ArcGIS module is the ArcGIS API for Python | ArcGIS for Developers site t because this module is becoming more and more relevant and is definitely the future of Python GIS in my opinion. for tools in ArcGIS pro have a look at this. https://pro.arcgis.com/en/pro-app/tool-reference and for ArcMAP https://desktop.arcgis.com/en/arcmap/latest/tools And Keep in mind python 2.7 is retiring Python 2.7 Countdown
... View more
09-18-2019
07:11 AM
|
0
|
3
|
1663
|
|
POST
|
also have a look at InsertCursor—Help | ArcGIS for Desktop
... View more
09-17-2019
11:00 PM
|
0
|
0
|
1366
|
|
POST
|
import arcpy
import os
# Set Parameters
inFiles = arcpy.GetParameterAsText(0)
inTable = arcpy.GetParameterAsText(1)
inField = arcpy.GetParameterAsText(2) # inField must be in list format ['myField']
outTable = arcpy.SetParameterAsText(3)
# Iterate through files in folder, insert rows based on file names, and make table view layer
with arcpy.da.InsertCursor(inTable, inField) as cursor:
# inField must be a list of fields
# List Files
# a list can be represented as []
flist = [inFiles]
for f in flist:
# Get filename(s)
# if a file name use split then split on the spaces
file_name = f.split('/')[-1] # get the last name in the file path
arcpy.AddMessage("file to add {0}".format(file_name))
# Insert values and rows in table
cursor.insertRow([file_name])
del cursor
# Add Message
arcpy.AddMessage("This row {0} was added.".format(f))
... View more
09-17-2019
10:59 PM
|
1
|
1
|
1366
|
|
POST
|
Hi So in pure python you just want this import arcpy
cursor = arcpy.da.InsertCursor('E:/temp/test.gdb/test', ['inField'])
list_of_files = ['file', 'file1', 'file2']
for file in list_of_files:
cursor.insertRow(['file Path'])
del cursor Hope it helps
... View more
09-17-2019
10:48 PM
|
0
|
0
|
1366
|
| Title | Kudos | Posted |
|---|---|---|
| 3 | 2 weeks ago | |
| 1 | 06-16-2025 09:33 PM | |
| 1 | 10-30-2024 05:58 AM | |
| 2 | 02-15-2024 10:09 PM | |
| 1 | 07-23-2024 10:07 PM |
| Online Status |
Offline
|
| Date Last Visited |
2 weeks ago
|