POST
|
Thanks for reply Michael, Yes I already cleared the browser cache (even after publishing a new Service!)
... View more
01-15-2019
09:38 AM
|
0
|
0
|
1002
|
POST
|
Thanks for reply Marisa, I actually did both overwriting and publishing a new service but the result is same! The data is located on a File Geodatabase
... View more
01-15-2019
09:37 AM
|
0
|
0
|
1004
|
POST
|
Using ArcGIS 10.6 and ArcGIS Server 10.6., I have changed the Alias of a Feature Class to ObjectID like and it is showing in the attribute table like (After Saving and even re-booting the MXD) but when I publish the map as Map Service the output still showing old alias (FID) in the Service REST end point! Can you please let me know why this is happening and how I can fix this?
... View more
01-10-2019
11:40 AM
|
0
|
5
|
1077
|
POST
|
I am trying to setup a ESRI Local Server for displaying .mpk . I have a Model like public class Model
{
private string basemapLayerUri = "http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer";
private string mapPackage = "D:\\App\\Data\\Canada.mpk";
public Model() { }
public string BasemapLayerUri
{
get {return this.basemapLayerUri; }
set
{
if (value != this.basemapLayerUri)
{
this.basemapLayerUri = value;
}
}
}
public string MapPackage
{
get { return this.mapPackage; }
set
{
if (value != this.mapPackage)
{
this.mapPackage = value;
}
}
}
} in ViewModel.cs Class I have public class ViewModel : INotifyPropertyChanged { public Model myModel { get; set; } public event PropertyChangedEventHandler PropertyChanged;
public ViewModel()
{
myModel = new Model();
this.CreateLocalServiceAndDynamicLayer();
}
public string BasemapUri
{
get { return myModel.BasemapLayerUri; }
set
{
this.myModel.BasemapLayerUri = value;
OnPropertyChanged("BasemapUri");
}
}
public async void CreateLocalServiceAndDynamicLayer()
{
LocalMapService localMapService = new LocalMapService(this.MAPKMap);
await localMapService.StartAsync();
ArcGISDynamicMapServiceLayer arcGISDynamicMapServiceLayer = new ArcGISDynamicMapServiceLayer()
{
ID = "mpklayer",
ServiceUri = localMapService.UrlMapService,
};
//myModel.Map.Layers.Add(arcGISDynamicMapServiceLayer);
}
public string MAPKMap
{
get { return myModel.MapPackage; }
set
{
this.myModel.MapPackage = value;
OnPropertyChanged("MAPKMap");
}
}
protected void OnPropertyChanged([CallerMemberName] string member = "")
{
var eventHandler = PropertyChanged;
if (eventHandler != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(member));
}
}
} As you can see I am trying to implement the local server and dynamic layer in ViewModel.cs like public async void CreateLocalServiceAndDynamicLayer()
{
LocalMapService localMapService = new LocalMapService(this.MAPKMap);
await localMapService.StartAsync();
ArcGISDynamicMapServiceLayer arcGISDynamicMapServiceLayer = new ArcGISDynamicMapServiceLayer()
{
ID = "mpklayer",
ServiceUri = localMapService.UrlMapService,
};
myModel.Map.Layers.Add(arcGISDynamicMapServiceLayer);
} but I do not know how to bind this service to the Mode ? I tried myModel.Map.Layers.Add(arcGISDynamicMapServiceLayer); but as you know the myModel doesn't have any Map object. Can you please let me know how to fix this?
... View more
11-21-2018
12:17 PM
|
0
|
1
|
653
|
POST
|
I am trying to create a Python Toolbox and I need to load some chekboxes to a parameter ( param2 ) after selecting a value in previous parameter ( param1 ). As you can see I have name of states in param1 and need to load a code like this after changing on param1 inFeature = parameters[0].valueAsText
slectedCounty = parameters[1].valueAsText
counties = []
def unique_values(table , field):
with arcpy.da.SearchCursor(table, [field], '"NAME_1" = \''+slectedCounty+'\'') as cursor:
return sorted({row[0] for row in cursor})
uniques = unique_values(inFeature, 'NAME_2')
for unique in uniques:
counties.append(unique)
# Now Load the checkboxes
param1.filter.list = counties Here is the code def getParameterInfo(self):
"""Define parameter definitions"""
param0 = arcpy.Parameter(displayName="Feature Class",name="in_fc", datatype="Shapefile", parameterType="Required", direction="Input")
param1 = arcpy.Parameter(displayName="States",name="st",datatype="String", multiValue="False", parameterType="Required", direction="Input")
param1.filter.list = ['Alabama','Alaska','American Samoa','Arizona','Arkansas','California','Colorado','Connecticut','Delaware','District of Columbia','Federated States of Micronesia','Florida','Georgia','Guam','Hawaii','Idaho','Illinois','Indiana','Iowa','Kansas','Kentucky','Louisiana','Maine','Marshall Islands','Maryland','Massachusetts','Michigan','Minnesota','Mississippi','Missouri','Montana','Nebraska','Nevada','New Hampshire','New Jersey','New Mexico','New York','North Carolina','North Dakota','Northern Mariana Islands','Ohio','Oklahoma','Oregon','Palau','Pennsylvania','Puerto Rico','Rhode Island','South Carolina','South Dakota','Tennessee','Texas','Utah','Vermont','Virgin Island','Virginia','Washington','West Virginia','Wisconsin','Wyoming']
param2 = arcpy.Parameter(displayName="Counties",name="countyName",datatype="String", multiValue="true", parameterType="Required", direction="Input")
params = [param0, param1, param2]
return params
def isLicensed(self):
"""Set whether tool is licensed to execute."""
return True
def updateParameters(self, parameters):
"""Modify the values and properties of parameters before internal
validation is performed. This method is called whenever a parameter
has been changed."""
return
... View more
10-17-2018
03:37 AM
|
0
|
0
|
378
|
POST
|
I am using following to copy selected feature from a Shapefile to a Dataset in a File Geodatabase As you can see I tried to create layer from shapefile by doing arcpy.MakeFeatureLayer_management(inFeature, 'lyr') and then select the attribute like arcpy.SelectLayerByAttribute_management('lyr', "NEW_SELECTION", '"NAME_1" = \''+slectedCounty+'\' AND "NAME_2" = \''+county+'\'') and eventually I tried to copy selected to the created dataset in the generated File Geodatabase arcpy.CopyFeatures_management("lyr", dataset_path+'\\'+county.replace(" ", "_") ) I am not getting any error message but the created dataset in the Geodatabase is empty. I testes the out message of arcpy.AddMessage('"NAME_1" = \''+slectedCounty+'\' AND "NAME_2" = \''+county+'\'') in ArcMap Select by Attribute window and it is selecting the layer which mean the query is correct but I am not able to load the selection into the dataset. def execute(self, parameters, messages):
"""The source code of the tool."""
inFeature = parameters[0].valueAsText
slectedCounty = parameters[1].valueAsText
counties = []
ws = parameters[2].valueAsText
arcpy.CreateFileGDB_management(ws, slectedCounty)
dataset_path = ws+'\\'+ slectedCounty +'.gdb'
sr = arcpy.SpatialReference(4326)
arcpy.AddMessage(dataset_path)
arcpy.MakeFeatureLayer_management(inFeature, 'lyr')
def unique_values(table , field):
arcpy.AddMessage('Proccess Started ...')
with arcpy.da.SearchCursor(table, [field], '"NAME_1" = \''+slectedCounty+'\'') as cursor:
return sorted({row[0] for row in cursor})
uniques = unique_values(inFeature, 'NAME_2')
for unique in uniques:
counties.append(unique)
for county in counties:
arcpy.AddMessage(county)
arcpy.CreateFeatureDataset_management(dataset_path, county.replace(" ", "_"), sr)
arcpy.AddMessage('The ' + county + ' County Added to the Geodatabase')
arcpy.AddMessage('Adding Layer to GDB Started')
arcpy.AddMessage('"NAME_1" = \''+slectedCounty+'\' AND "NAME_2" = \''+county+'\'')
arcpy.SelectLayerByAttribute_management('lyr', "NEW_SELECTION", '"NAME_1" = \''+slectedCounty+'\' AND "NAME_2" = \''+county+'\'')
arcpy.CopyFeatures_management("lyr", dataset_path+'\\'+county.replace(" ", "_") )
return Can you please let me know what I am doing wrong or missing here?
... View more
10-16-2018
10:42 AM
|
0
|
0
|
272
|
POST
|
Thanks Curtis, the code is working now but can you please let me know what are the other issues which you noticed them?
... View more
10-15-2018
09:48 PM
|
0
|
1
|
1401
|
POST
|
Can you please take a look at this snippet and let me know why I am not able to properly pass the Where Clause ('"[NAME_1]" = Ohio') in SearchCursor? import arcpy
from arcpy import env
def unique_values(table , field):
with arcpy.da.SearchCursor(table, [field], '"[NAME_1]" = Ohio') as cursor:
return sorted({row[0] for row in cursor})
uniques = unique_values(r'C:\arcgis\ArcTutor\AAA\src\USA.shp' , 'NAME_2')
for unique in uniques:
print (unique) I am getting this error on runtime Traceback (most recent call last): File "<module1>", line 8, in <module> File "<module1>", line 7, in unique_values File "<module1>", line 7, in <setcomp> RuntimeError: Unspecified error Same error on this format as well with arcpy.da.SearchCursor(table, [field], '"NAME_1" = Ohio') as cursor:
... View more
10-15-2018
09:24 PM
|
0
|
4
|
1882
|
POST
|
Can you please take a look at this demo and let me know why I am not able to create new feature class from a shapefile based on selecting by attribute and saving the new future in a Geodatabase? The file is adding to the GDB but it is empty on attributes and geometry # Import arcpy module
import arcpy
# Local variables:
Dataset = "D:\\GIS\\TPK\\src\\New Folder\\lui.gdb\\Dataset"
Louisiana = "Louisiana"
Louisiana__3_ = Louisiana
mm = "D:\\GIS\\TPK\\src\\New Folder\\lui.gdb\\Dataset\\mm"
# Process: Select Layer By Attribute
arcpy.SelectLayerByAttribute_management(Louisiana, "NEW_SELECTION", "\"NAME_2\" = 'Acadia'")
# Process: Create Feature Class
arcpy.CreateFeatureclass_management(Dataset, "mm", "POLYGON", "Louisiana", "DISABLED", "DISABLED", "", "", "0", "0", "0")
... View more
10-12-2018
11:45 AM
|
0
|
1
|
541
|
POST
|
I have install ArcGIS Server 10.6 on top of Ubuntu Server 18.4 ,gusting on a VM. I was able to create a new site after installation on Server Manager page but after restarting the VM I am not able to access the Server Manager and rest services any more! I tried to check if the server is running siteadmin@lingisserver:~$ cd arcgis/server
siteadmin@lingisserver:~/arcgis/server$ ./startserver.sh
Attempting to start ArcGIS Server...
*** Notice: There are still server processes running. Please run
stopserver.sh to kill these processes and run startserver.sh again.
[ OK ]
siteadmin@lingisserver:~/arcgis/server$ which means service is running but I am not sure which one is ArcGIS Server here (as is not as clear on Winsows with clear name of ArcGIS Server): siteadmin@lingisserver:~$ service --status-all
[ + ] acpid
[ - ] alsa-utils
[ - ] anacron
[ + ] apparmor
[ + ] apport
[ + ] atd
[ + ] avahi-daemon
[ - ] bluetooth
[ - ] console-setup.sh
[ + ] cron
[ - ] cryptdisks
[ - ] cryptdisks-early
[ + ] cups
[ + ] cups-browsed
[ + ] dbus
[ - ] dns-clean
[ + ] ebtables
[ + ] gdm3
[ + ] grub-common
[ - ] hwclock.sh
[ - ] irqbalance
[ + ] iscsid
[ + ] kerneloops
[ - ] keyboard-setup.sh
[ + ] kmod
[ - ] lvm2
[ + ] lvm2-lvmetad
[ + ] lvm2-lvmpolld
[ + ] lxcfs
[ - ] lxd
[ - ] mdadm
[ - ] mdadm-waitidle
[ + ] network-manager
[ + ] networking
[ - ] open-iscsi
[ + ] open-vm-tools
[ - ] plymouth
[ - ] plymouth-log
[ - ] pppd-dns
[ + ] procps
[ - ] rsync
[ + ] rsyslog
[ - ] saned
[ - ] screen-cleanup
[ + ] speech-dispatcher
[ - ] spice-vdagent
[ + ] ssh
[ - ] tomcat8
[ + ] udev
[ + ] ufw
[ + ] unattended-upgrades
[ - ] uuidd
[ + ] whoopsie
[ - ] x11-common
siteadmin@lingisserver:~$ eventually when I navigate to the ArcGIS server URL I am getting this error meesage
... View more
07-20-2018
11:38 AM
|
0
|
1
|
569
|
POST
|
Having Maximum Number of Records Returned by Server set to 1000 on ArcGIS Server - Feature Service as How can I force the Returned Records to be on current extent of viewDiv var layer = new FeatureLayer({
portalItem: {
id: "961a56d51afa42df9acsd88b8a7e01b13f"
},
definitionExpression: "",
title: "Building Footprints",
minScale: 72223.819286
});
var map = new Map({
basemap: {
portalItem: {
id: "4f2e99ba65e34asbb8af4d33d9778fb8e"
}
},
layers: [layer]
});
var view = new MapView({
map: map,
container: "viewDiv",
center: [-123.110722, 49.249793],
zoom: 14,
constraints: {
snapToZoom: false,
minScale: 72223.819286
},
resizeAlign: "top-left"
}); Right now what is happening is 1000 recorded are returning to the map regardless of extent view so I have lots of Gaps on the basemap and feature service overlay while there some records loaded to map which are not in the view port
... View more
05-11-2018
09:37 AM
|
0
|
0
|
422
|
POST
|
I tried to set all points transparent on load by using setVisualVariables var renderer = new TemporalRenderer(observationRenderer, null, null, null);
renderer.setVisualVariables([{
type: "opacityInfo",
field: "Ht_DBH_ft",
"stops": [{
"value": 1,
"opacity": 0
}, {
"value": 2,
"opacity": 0
},
{
"value": 3,
"opacity": 0
},{
"value": 4,
"opacity": 0
},{
"value": 5,
"opacity": 0
},{
"value": 6,
"opacity": 0
}]
}]);
featureLayer.setRenderer(renderer); but I am still seeing all the points on the Map!
... View more
05-10-2018
10:19 AM
|
0
|
0
|
769
|
POST
|
Thanks for reply Ken, but by setting featureLayer.setOpacity(1); will apply the opacity to entire featyrelayer which I do not mean to. What I want to do is filtering display of features based on addBreak values and slider move
... View more
05-10-2018
09:31 AM
|
0
|
2
|
769
|
POST
|
I am trying to apply opacity to Breaks of ClassBreaksRenderer based on jQuery UI Slider and I used the transRange1.setOpacity(1) for setting this but I am getting this error sandbox.html:57 Uncaught TypeError: transRange1.setOpacity is not a function Can you please let me know how to fix this? require([
"esri/map",
"esri/layers/FeatureLayer",
"esri/renderers/ClassBreaksRenderer",
"esri/symbols/SimpleMarkerSymbol",
"esri/symbols/SimpleLineSymbol",
"esri/symbols/SimpleFillSymbol",
"esri/Color",
"esri/renderers/TemporalRenderer",
"dojo/domReady!"
],
function(
Map,
FeatureLayer,
ClassBreaksRenderer,
SimpleMarkerSymbol,
SimpleLineSymbol,
SimpleFillSymbol,
Color,
TemporalRenderer
) {
var map = new Map("map", {
basemap: "topo",
center: [-82.44109, 35.6122],
zoom: 17
});
var featureLayer = new FeatureLayer("https://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/Landscape_Trees/FeatureServer/0",{
mode: FeatureLayer.MODE_SNAPSHOT,
outFields: [ "*" ]
});
var transRange1 = 0;
var transRange2 = 0;
var observationRenderer = new ClassBreaksRenderer(new SimpleMarkerSymbol(), "Ht_DBH_ft");
observationRenderer.addBreak(3, 6, new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 10, new SimpleLineSymbol().setStyle(SimpleLineSymbol.STYLE_SOLID).setColor(new Color([55,0,55])),new Color([55,0,55,transRange1])));
observationRenderer.addBreak(0, 3, new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 10, new SimpleLineSymbol().setStyle(SimpleLineSymbol.STYLE_SOLID).setColor(new Color([65,105,225])),new Color([65,105,225,transRange2])));
var renderer = new TemporalRenderer(observationRenderer, null, null, null);
featureLayer.setRenderer(renderer);
$( "#slider-range" ).slider({
min: 1,
max: 6,
step: .0001,
value: 3 ,
slide: function( event, ui ) {
$( "#range" ).val( ui.value );
if(ui.value > 1 && ui.value < 3 ){
transRange1 = 1;
transRange2 =0;
transRange1.setOpacity(1)
}
if(ui.value > 4 && ui.value < 6 ){
transRange2 = 1
transRange1 =0;
}
}
});
$( "#range" ).val( $( "#slider-range" ).slider( "value" ) );
map.addLayer(featureLayer);
});
... View more
05-10-2018
09:11 AM
|
0
|
5
|
881
|
POST
|
Starting with 3.24 of ArcGIS API for JavaScript we can opt in to render FeatureLayer with WebGL. According to ESRI This allows to display more data in the map and update the visualization of features more rapidly. To enable WebGL rendering of FeatureLayer, we need to paste the following script in the application prior to loading the ArcGIS API for JavaScript: <script> var dojoConfig = { has: { "esri-featurelayer-webgl": 1 } }; </script> but looking at This sample I am not really seeing any difference between having the webgl or not on performance speed. Can you please let me know what I am doing wrong?
... View more
05-04-2018
11:12 AM
|
0
|
2
|
3420
|
Title | Kudos | Posted |
---|---|---|
1 | 07-25-2017 08:32 AM | |
1 | 07-04-2017 01:47 PM | |
1 | 08-15-2017 02:44 PM | |
1 | 05-19-2017 02:36 PM | |
1 | 02-09-2017 12:37 PM |
Online Status |
Offline
|
Date Last Visited |
12-31-2020
08:22 PM
|