POST
|
I found a work around in another post that I can't find anymore. Basically you create a temporary table to store the OBJECTIDS, perform a join with your table, and then perform the insert. This approach works well for a small number of records but becomes slow for larger sets (>100,000). I use this approach often so if you can think of improvements please share. ------------------------------ declare @OBJECTID int declare @ids table( OBJECTID INT ) declare @RowCnt int declare @MaxRows int select @MaxRows = count(*) from INPUT_TABLE select @RowCnt = 1 while @RowCnt <= @MaxRows begin EXEC sde.next_rowid 'OWNER', 'TABLENAME', @OBJECTID OUTPUT insert into @ids (OBJECTID) values(@OBJECTID) Select @RowCnt = @RowCnt + 1 end insert into TARGET_TABLE(OBJECTID, COLUMN1, COLUMN2, COLUMN3) select ids.OBJECTID, COLUMN1, COLUMN2, COLUMN3 from ( select ROW_NUMBER() OVER(ORDER BY (select null)) AS RowNumber, COLUMN1, COLUMN2, COLUMN3 from INPUT_TABLE ) as attr join ( select *, ROW_NUMBER() OVER(ORDER BY [objectid]) AS RowNumber from @ids ) as ids on attr.RowNumber = ids.RowNumber
... View more
08-02-2017
08:35 AM
|
2
|
1
|
5126
|
POST
|
I've created a module to provide this functionality. It takes a geometry, distance (meters), and angle and returns a new geometry at that offset. To move lines and polygons it moves each vertex by the offset amount. It works, but I haven't created any unit tests to check all scenarios , so use at your own risk. Attached is the AMD module.
... View more
02-10-2017
05:59 AM
|
0
|
0
|
1097
|
POST
|
This would work for points but not polygons. For a polygon the offset method is similar to the buffer tool, returning a geometry that is inside or surrounding the original feature by the offset amount.
... View more
02-08-2017
11:34 AM
|
0
|
1
|
1097
|
POST
|
I need to be able to move one or more features based on an angle and distance offset. I'm not sure how to approach this. The Edit toolbar allows for moving one feature through mouse interaction, which does not match my workflow. Is there a tool in the geometryEngine that supports this operation? Is there a method on the Geometry class? Ideally the solution is client side but I could support an async operation on the server. User Story: User can nudge (move a small distance in a set direction) one or many features based on button click or keyboard input Thanks!
... View more
02-08-2017
09:58 AM
|
0
|
4
|
1877
|
POST
|
Here is a snippet of code where I manually set the Editor Tracking user info. When I look at the request being sent to the server all Editor Tracking fields were removed from the graphics. var userName = "Alex Magruder";
var userEdits = {
created_user: userName,
last_edited_user: userName
};
on(layer, "before-apply-edits", function(data){
data.adds.forEach(function(graphic){
lang.mixin(graphic.attributes, userEdits);
});
}); Graphic after before-apply-edits ApplyEdits request form data {"attributes":{
"OfflineID":null,
"Comments":null,
"Value1":null,
"created_user":"Alex Magruder",
"last_edited_user":"Alex Magruder"
}} {"attributes":{
"OfflineID":null,
"Comments":null,
"Value1":null
}}
... View more
12-31-2015
07:59 AM
|
0
|
2
|
655
|
POST
|
Robert, I've given this a try but no luck. The applyEdits operation sets both the created_user and last_edited_user to an empty string. Thanks, Alex
... View more
12-21-2015
06:17 AM
|
0
|
4
|
655
|
POST
|
I am exploring Editor Tracking and how it can be used in our production environment. Our arcgis server (10.1) is set to windows authentication which is bound to our companies User Directory. So when we create a web app for external clients, users cannot login using the IdentityManager. All gis services are routed through a proxy and authentication is handled by our windows server using forms authentication. This causes all applyEdits to be tracked as Esri_Anonymous. Is there a way to set the user for an applyEdits operation without using the IdentityManager? Thanks for the help!!
... View more
12-17-2015
10:35 AM
|
0
|
6
|
3174
|
POST
|
I'm using a FeatureLayer created from a featureCollectionObject that is based on a non-spatial table. The featureLayer loads correctly and I can use it in my webApp. I can successfully perform applyEdits that update or delete features on the featureLayer. But it is unsuccessful when I try to perform an applyEdits that adds features. The applyEdits(add) result object has a success: true property and a poplulated objectId property, but the graphic is not added to the featureLayer. The featureLayer's _nextId property is a valid number. Using the same graphic on the applyEdits(add) rest service successfully adds the graphic to the service. TLDR: FeatureLayer is created from a featureCollection based on a non-spatial table FeatureLayer can update and delete graphics using the applyEdits method Adding a feature using the applyEdits method returns with a success true result but the graphic is not added I can successfully add the same graphic to the rest service using applyEdits
... View more
09-01-2015
06:32 AM
|
0
|
1
|
2695
|
POST
|
We’ve been getting this error as well, but intermittently. We are attempting to push batch photos to the server using the Rest service addAttachment. It can get thrown anywhere from 5 to 20 min of successful operation. First assumption was a server problem, but no change to the service config helped. Finally decided to handle it client side. If the Request returns with a 500 error code it waits 30sec and tries again. After 5 tries it stops attempting and produces the error to the user. This works. The error still gets thrown but after waiting the 30sec it successfully pushes. ArcServer 10.1 Mobile Device: Samsung galaxy tab
... View more
10-23-2014
08:07 AM
|
0
|
0
|
879
|
POST
|
Hello, I need to create and populate a domain for an ArcSDE geodatabase. Does the CreateDomain(Data Management) tool allow this? My attempts have failed, with the error not being able to set the workspace to the sde database. Thanks
... View more
05-07-2014
05:33 AM
|
0
|
0
|
450
|
POST
|
You can download the API and run it locally, however the API and any JS applications need to be run on a web server, even if it is a local install. For my app I've already setup offline storage of features using webSQL and feature collection. The only step that's left is the ability to access the arcGIS javascript API offline. Is it possible to save the necessary API resources into local storage when the app is initialized and connected to the internet? Then if the app is opened and it doesn't have internet connection, it would access the api resources stored in the local storage. Thanks for the reply.
... View more
05-01-2014
12:49 PM
|
0
|
0
|
340
|
POST
|
Hey all, I'm building a Phonegap application with ArcGIS javascript for offline data collection. To support offline collection I need a build of ArcGIS javascript that is not dependent on a server. I've found a blog that describes how to do this (http://dotnetspeak.com/2013/05/using-esri-arcgis-in-phonegap-applications), but have had no luck in trying it myself. Does anybody in the community have experience doing this? Can it be done with new releases?
... View more
05-01-2014
04:13 AM
|
0
|
3
|
796
|
POST
|
I'm having python produce a multi-series graph. How do you change the series name in the legend, the default being Vertical Bar, Vertical Bar1, Vertical Bar2.... Thank you for the help!
arcpy.MakeGraph_management(graphTemplatePath,
'''SERIES=bar:vertical DATA={0}
X=ParkUnit Y=Coverage LABEL=ParkUnit SORT=ASC;
SERIES=bar:vertical DATA={1} X=ParkUnit Y=Coverage;
SERIES=bar:vertical DATA={2} X=ParkUnit Y=Coverage;
SERIES=bar:vertical DATA={3} X=ParkUnit Y=Coverage;
SERIES=bar:vertical DATA={4} X=ParkUnit Y=Coverage;
GRAPH=general TITLE={5}, Total Coverage by Unit;
LEGEND=general TITLE=Year Total Coverage;
'''.format(scratchReport + str(year),
scratchReport + str(year-1),
scratchReport + str(year-2),
scratchReport + str(year-3),
scratchReport + str(year-4),
exoticPlant),"graphTemp")
[ATTACH=CONFIG]20585[/ATTACH]
... View more
01-09-2013
03:44 AM
|
0
|
0
|
547
|
Title | Kudos | Posted |
---|---|---|
2 | 08-02-2017 08:35 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|