POST
|
I tried to define a CompositeSymbol as a resource in .xaml, like: <esri:CompositeSymbol x:Key="CompositeSymbol">
<esri:CompositeSymbol.Symbols>
<esri:SimpleMarkerSymbol Size="6" Color="Black"/>
<esri:SimpleMarkerSymbol Size="6" Color="Red"/>
</esri:CompositeSymbol.Symbols>
</esri:CompositeSymbol>
This does not compile. I think, this is because Symbols returns the generic IList<T> interface only. I think, I read somewhere that XAML can handle collections only, if they implement the non-generic version as well. Actually, I tested it with an own dummy CompositeSymbol class. If I define Symbols as IList or List<T>, I can define it in xaml. If I define it as IList<T>, it does not work. Maybe, the CompositeSymbol can be enhanced to support IList as well.
... View more
07-11-2017
06:48 AM
|
0
|
0
|
407
|
POST
|
Wow, that got fast responses 🙂 @Morten: I didn't know, other database queries in .NET behave the same. Thanks for sharing background information along with your answer! @Joe: Thanks for your suggestion. I think, in case of an own comparer, the GetHashCode method should be implemented based on the same values as well. At least, that's the case if anyone decides to override Equals within the object itself.
... View more
07-11-2017
06:24 AM
|
0
|
1
|
667
|
POST
|
This code fails, f1 and f2 are not considered to be equal: var gdb = await Geodatabase.OpenAsync(@"mytest.geodatabase");
var ft = gdb.GeodatabaseFeatureTables.First();
var f1 = (await ft.QueryFeaturesAsync(new QueryParameters {WhereClause = "OBJECTID=1"})).Single();
var f2 = (await ft.QueryFeaturesAsync(new QueryParameters {WhereClause = "OBJECTID=1"})).Single();
Assert.AreEqual(f1, f2);
I really wonder, if this is intended behavior or not. I'd say, it's really good that we are not getting the same object here, this helps avoiding memory leaks a lot. But shouldn't two objects of the same type with the same properties be considered equal?
... View more
07-11-2017
06:03 AM
|
0
|
4
|
917
|
POST
|
Just in case, anyone trying the most basic sample and seeing a corrupt basemap, here's an explanation and the solution. Steps to reproduce Use a recent version of Chrome or Firefox (other browsers not tested) Navigate to https://notebooks.esri.com Create a new notebook (New -> Python 3) Enter the following script code from arcgis.gis import *
gis = GIS()
gis.map() Run the cell (<Ctrl-Enter>) The result looks similar to this: Explanation The notebook is running on an https (secured) connection. However, as we didn't authenticate to ArcGIS Online, we're getting the tiles (and some .js-code) from an http (non-secured) connection. Chrome and Firefox block that unsecured JavaScript code. Workaround 1 Instead of using the secured https connection, use http://notebooks.esri.com instead. As everything will be loaded without encryption, Chrome / Firefox are happy with that. However: If you change your script to an authenticated AGOL-Session, you will send your username / password in plain-text through the net! Workaround 2 Both Chrome and Firefox have the option to explicitly allow loading unsecure content. In Chrome, there's a small icon on the right, in Firefox, it's right beside the https-indicator.
... View more
04-11-2017
03:53 AM
|
1
|
1
|
890
|
POST
|
Thanks Joshua and Atma for your findings and explanations! I have a much nicer workaround for now and looking for future conda-bundles 🙂
... View more
04-11-2017
02:23 AM
|
0
|
0
|
3066
|
POST
|
I'm using the conda environment that comes with ArcGIS Pro 1.4 (administrative install in C:\Program Files\ArcGIS\Pro). So I open a cmd-shell and cd into C:\Program Files\ArcGIS\Pro\bin\Python\Scripts (running as normal Windows user, not as an administrative one). Creating and listing a new conda env works just fine: C:\Program Files\ArcGIS\Pro\bin\Python\Scripts>conda create --name JebuTest python=3.5
Fetching package metadata: ......
Solving package specifications: .........
Package plan for installation in environment C:\Users\jebu\.conda\envs\JebuTest:
The following NEW packages will be INSTALLED:
pip: 9.0.1-py35_1
python: 3.5.3-0
setuptools: 27.2.0-py35_1
vs2015_runtime: 14.0.25123-0
wheel: 0.29.0-py35_0
Proceed ( /n)?
Linking packages ...
[ COMPLETE ]|##################################################| 100%
#
# To activate this environment, use:
# > activate JebuTest
#
C:\Program Files\ArcGIS\Pro\bin\Python\Scripts>conda info --envs
# conda environments:
#
JebuTest C:\Users\jebu\.conda\envs\JebuTest
arcgispro-py3 C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3
root * C:\Program Files\ArcGIS\Pro\bin\Python
As I'm not administrator, the environment installs into my user's home directory. But if I try to activate the environment, it fails: C:\Program Files\ArcGIS\Pro\bin\Python\Scripts>activate JebuTest
No environment named "JebuTest" exists in C:\Program Files\ArcGIS\Pro\bin\Python\envs, or is not a valid conda installation directory. Conda info also knows about my user's home directory: C:\Program Files\ArcGIS\Pro\bin\Python\Scripts>conda info
Current conda install:
platform : win-64
conda version : 4.0.11
conda-build version : not installed
python version : 3.5.2.final.0
requests version : 2.11.1
root environment : C:\Program Files\ArcGIS\Pro\bin\Python (read only)
default environment : C:\Program Files\ArcGIS\Pro\bin\Python
envs directories : C:\Users\jebu\.conda\envs
C:\Users\jebu\envs
C:\Program Files\ArcGIS\Pro\bin\Python\envs
package cache : C:\Users\jebu\.conda\envs\.pkgs
C:\Users\jebu\envs\.pkgs
C:\Program Files\ArcGIS\Pro\bin\Python\pkgs
channel URLs : https://conda.anaconda.org/esri/win-64/
https://conda.anaconda.org/esri/noarch/
https://repo.continuum.io/pkgs/free/win-64/
https://repo.continuum.io/pkgs/free/noarch/
https://repo.continuum.io/pkgs/pro/win-64/
https://repo.continuum.io/pkgs/pro/noarch/
config file : C:\Program Files\ArcGIS\Pro\bin\Python\.condarc
is foreign system : False I can workaround this, by manually setting CONDA_ENVS_PATH to my user's home directory, but that hides the default ArcGIS Pro environment.. Is this a bug in conda itself, a bug in ArcGIS Pro's installation of conda or just wrong usage? Best Regards Jens
... View more
04-06-2017
11:40 PM
|
1
|
5
|
14612
|
POST
|
OK, got one step further.. After double checking the system requirements page, I saw "Windows 10 Universal C Runtime" and "Microsoft Visual C++ 2015 Redistributable Update 3" under the deployment targets chapter. Installed both in the development VM and now, the application starts, displays a white are with "Powered by Esri" and... crashes 😞 Call Stack below (includes DirectX11...) > RuntimeCoreNet.dll!0fe2063b() Unknown [Frames below may be incorrect and/or missing, no symbols loaded for RuntimeCoreNet.dll] RuntimeCoreNet.dll!0fe1f7c5() Unknown RuntimeCoreNet.dll!10bdfe33() Unknown RuntimeCoreNet.dll!1117c328() Unknown RuntimeCoreNet.dll!1117c252() Unknown RuntimeCoreNet.dll!10d7cb1b() Unknown RuntimeCoreNet.dll!10cd2e49() Unknown RuntimeCoreNet.dll!103d0ca6() Unknown RuntimeCoreNet.dll!0fe158a5() Unknown d3d11.dll!CContext::ID3D11DeviceContext1_Release_Thk(struct ID3D11DeviceContext1 *) Unknown RuntimeCoreNet.dll!0fd97fec() Unknown RuntimeCoreNet.dll!0fdb0d3d() Unknown RuntimeCoreNet.dll!103d7346() Unknown RuntimeCoreNet.dll!104d602e() Unknown RuntimeCoreNet.dll!104d5fc3() Unknown RuntimeCoreNet.dll!10cd567d() Unknown RuntimeCoreNet.dll!10d7d55c() Unknown RuntimeCoreNet.dll!0ffd76e6() Unknown RuntimeCoreNet.dll!0ffcc980() Unknown RuntimeCoreNet.dll!0fd98e0a() Unknown ucrtbase.dll!thread_start<unsigned int (__stdcall*)(void *)>() Unknown kernel32.dll!@BaseThreadInitThunk@12 () Unknown ntdll.dll!___RtlUserThreadStart@8 () Unknown ntdll.dll!__RtlUserThreadStart@8 () Unknown
... View more
12-14-2016
04:39 AM
|
0
|
1
|
8147
|
POST
|
Morten, here's the StackTrace (partially in German, but the important parts are in english..) System.Windows.Markup.XamlParseException occurred _HResult=-2146233087 _message=Zeilennummer "14" und Zeilenposition "10" von "Durch den Aufruf des Konstruktors für Typ "Esri.ArcGISRuntime.UI.Controls.MapView", der den angegebenen Bindungseinschränkungen entspricht, wurde eine Ausnahme ausgelöst.". HResult=-2146233087 IsTransient=false Message=Zeilennummer "14" und Zeilenposition "10" von "Durch den Aufruf des Konstruktors für Typ "Esri.ArcGISRuntime.UI.Controls.MapView", der den angegebenen Bindungseinschränkungen entspricht, wurde eine Ausnahme ausgelöst.". Source=PresentationFramework LineNumber=14 LinePosition=10 StackTrace: bei System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri) InnerException: System.TypeInitializationException _HResult=-2146233036 _message=Der Typeninitialisierer für "RuntimeCoreNet.GeneratedWrappers.CoreWrapperBase" hat eine Ausnahme verursacht. HResult=-2146233036 IsTransient=false Message=Der Typeninitialisierer für "RuntimeCoreNet.GeneratedWrappers.CoreWrapperBase" hat eine Ausnahme verursacht. Source=Esri.ArcGISRuntime TypeName=RuntimeCoreNet.GeneratedWrappers.CoreWrapperBase StackTrace: bei RuntimeCoreNet.GeneratedWrappers.CoreWrapperBase..ctor(IntPtr handle) bei RuntimeCoreNet.GeneratedWrappers.CoreGeoView..ctor(IntPtr handle) bei RuntimeCoreNet.GeneratedWrappers.CoreMapView..ctor(IntPtr handle) bei RuntimeCoreNet.GeneratedWrappers.CoreMapView..ctor(Int32 width, Int32 height, Single screenScale, CorePulseThread pulse) bei Esri.ArcGISRuntime.UI.Controls.MapView.CreateCoreMapView() bei Esri.ArcGISRuntime.UI.Controls.MapView..ctor() InnerException: System.InvalidOperationException _HResult=-2146233079 _message=Invalid ArcGISRuntime deployment, unable to load native dll. Maybe a missing native dependency, checking with dependency walker may help resolve this issue. C:\src\ArcGISApp1\bin\Debug\arcgisruntime100.0\client32\RuntimeCoreNet.dll HResult=-2146233079 IsTransient=false Message=Invalid ArcGISRuntime deployment, unable to load native dll. Maybe a missing native dependency, checking with dependency walker may help resolve this issue. C:\src\ArcGISApp1\bin\Debug\arcgisruntime100.0\client32\RuntimeCoreNet.dll Source=Esri.ArcGISRuntime StackTrace: bei Esri.ArcGISRuntime.ArcGISRuntimeEnvironment.TryInitialize() bei Esri.ArcGISRuntime.ArcGISRuntimeEnvironment.InitNative() bei Esri.ArcGISRuntime.ArcGISRuntimeEnvironment.Initialize() bei Esri.ArcGISRuntime.ArcGISRuntimeEnvironment.OnBeforeFirstUseOfGeneratedWrapper() bei RuntimeCoreNet.GeneratedWrappers.CoreWrapperBase..cctor() InnerException: System.DllNotFoundException _HResult=-2146233052 _message=Die DLL "RuntimeCoreNet.dll": Das angegebene Modul wurde nicht gefunden. (Ausnahme von HRESULT: 0x8007007E) kann nicht geladen werden. HResult=-2146233052 IsTransient=false Message=Die DLL "RuntimeCoreNet.dll": Das angegebene Modul wurde nicht gefunden. (Ausnahme von HRESULT: 0x8007007E) kann nicht geladen werden. Source=Esri.ArcGISRuntime ResourceId=0 TypeName="" StackTrace: bei RuntimeCoreNet.GeneratedWrappers.CoreArcGISRuntimeEnvironment.CoreRT_ArcGISRuntimeEnvironment_setInstallDirectory(Byte[] installPath, IntPtr& outErrorHandle) bei RuntimeCoreNet.GeneratedWrappers.CoreArcGISRuntimeEnvironment.SetInstallDirectory(String installPath) bei Esri.ArcGISRuntime.ArcGISRuntimeEnvironment.TryInitialize() InnerException: Please note, that the most inner Exception Message "Das angegebene Modul wurde nicht gefunden -> The module has not been found" is wrong. The RuntimeCoreNet.dll exists in the path, even more, it is loaded into the process at the time, the exception is thrown. I haven't gotten a more detailed StackTrace by enabling "Native Code Debugging". But I think I should have gotten at least some obscure Dissamblies (no .pdb available..). I will try bit more to get a real native StackTrace.. Thanks Jens
... View more
12-14-2016
02:00 AM
|
0
|
2
|
8146
|
POST
|
Morten, thanks for your reply. My physical machine does show the Feature Levels in dxdiag, as you said. However, a VM (VMWare) does not show any Feature Level at all, although it claims to be DirectX compatible (DirectX 11). DirectDraw, Direct3D and AGP Texture Acceleration appear all as "Enabled". On that (virtual) machine, ArcGIS Runtime .NET 100.0 doesn't work at all (Call to constructor of MapView crashes). I need to find a way to argue to the system administrator why this machine doesn't meet the system requirements. Although I know, VMs aren't really supported, I haven't found a reference for that. Can you help me out?
... View more
12-13-2016
04:28 AM
|
0
|
5
|
8146
|
POST
|
The system requirements page tells me the machine has to support Direct3D feature level 9_1. How can I test, if my machine does? Is there any generic utility available? Best Regards Jens
... View more
12-12-2016
05:19 AM
|
0
|
11
|
18171
|
POST
|
Sorry, I haven't seen the Beta Program as I first launched the Early Adopter platform and ArcGIS Python API was not listed under Beta Opportunities. I've just overseen the "Join the Beta" link on ArcGIS API for Python | ArcGIS for Developers . Furhtermore, the link "Forum" on ArcGIS API for Python | ArcGIS for Developers links to this GeoNet area. Very confusing but posting in EAP makes absolutely sense, so thanks for the hint.
... View more
09-15-2016
12:26 AM
|
0
|
0
|
1448
|
POST
|
Sorry, I haven't seen the Beta Program as I first launched the Early Adopter platform and ArcGIS Python API was not listed under Beta Opportunities. I've just overseen the "Join the Beta" link on ArcGIS API for Python | ArcGIS for Developers . Furhtermore, the link "Forum" on ArcGIS API for Python | ArcGIS for Developers links to this GeoNet area. Very confusing but posting in EAP makes absolutely sense, so thanks for the hint.
... View more
09-15-2016
12:26 AM
|
0
|
0
|
1341
|
POST
|
I'm trying to display data of a private Feature Service, I acutally just created right before. The data is not shown on the map. If I change the Feature Service to be public, the data displays just fine. Anyone experienced the same behavior? Kind Regards Jens import getpass
pw = getpass.getpass()
from arcgis.gis import *
gis = GIS('https://MyPortal.maps.arcgis.com/', 'MyUsername', pw)
csvitem = gis.content.add({}, 'Fluege.csv')
csvlyr = csvitem.publish(None, {'City':'Ort'})
map = gis.map(location='Deutschland', zoomlevel=5)
map
map.add_layer(csvlyr)
# CSV Data not shown yet..
csvlyr.share(everyone=True)
# CSV Data shown..
... View more
09-13-2016
05:30 AM
|
0
|
3
|
2320
|
POST
|
I currently have two conda environments configured for use with ArcGIS Python API installed on my machine. The first one is based on a full Anaconda install, the later one is based on ArcGIS Pro's Python environment. The installation based on ArcGIS Pro has the following issue when working with the ArcGIS Python API in Jupyter Notebook: Objects do not show their HTML representation. For example, the following script shows a nice Picture in the Anaconda environment: from arcgis.gis import *
gis = GIS()
from IPython.display import display, display_html
item = gis.content.search('Flights')[0]
display(item) However, the ArcGIS Pro based environment just prints this line: <Item title:"flight AH 5017" type:Web Map owner:mista_moneybags> If I change display(item) to display_html(item), the output is all empty. However, if I change to display_html(item._repr_html_(), raw=True) the output is all fine. So the HTML-Rendering basically works, as well as the object is able to represent itself as HTML. Any ideas, why the standard display() / display_html() does not work as expected? Kind Regards Jens
... View more
09-13-2016
05:23 AM
|
0
|
2
|
2520
|
BLOG
|
Vor kurzem ist die erste öffentliche Beta-Version der ArcGIS Python API erschienen. Die API unterscheidet sich deutlich vom bekannten ArcPy und ermöglicht einen völlig neuartigen Zugang zu Karten, Inhalten und Analysefunktionen. Der Anwender der API kann über eine interaktive, graphische Shell Code-Snippets eingeben, bearbeiten und ausführen und erhält unmittelbar ein visuelles Feedback. Das visuelle Feedback geht deutlich über die Möglichkeiten klassischer, textbasierter Shells hinaus und zeigt die Ergebnisse in Form von Bildern, HTML-Strukturen, Videos oder natürlich auch Karten an. Die ArcGIS API bietet dem Nutzer dabei einen sehr fokussierten Blick auf die Inhalte eines ArcGIS Portals und befreit ihn bestmöglich von technischen Implementierungsdetails. So genügt die Eingabe folgendes Code-Snippets im Browser-Fenster, um eine Karte darzustellen: from arcgis.gis import * gis = GIS() gis.map() Jedes dieser Notebooks kann dabei im System gespeichert oder öffentlich zur Verfügung gestellt werden. Dabei kann nicht nur der Script-Code gespeichert werden, sondern auch begleitender Text und die Ausgabe des Skripts. Das Vorgehen der Entwicklung ist damit sehr schnell und einfach für Dritte nachvollziehbar. Bereits in der Beta werden einige Beispiel-Notebooks bereitgestellt, aus denen die unterschiedlichen Zielgruppen für die API ersichtlich werden: Power Users und Entwickler Administratoren GIS Analysten und Data Scientists Content Publisher Die Beispiele werden in das Jupyter-Notebook geladen und können sofort betrachtet, ausgeführt und angepasst werden. Die Anwender können unter Nutzung der bereitgestellten Module Karten anzeigen, Inhalte durchsuchen und in vorhandene Karten einbinden, temporär als auch persistent, oder Dateninhalte aktualisieren. Die Beispiele umfassen die Arbeit mit Grundkarten, Big-Data Analysen, Raster-Analysen, das Klonen von Portal Content und vieles mehr. Der Zugriff auf Nutzungsstatistiken ist dem Portal-Administrator genauso möglich wie das Anlegen oder Zuordnen von Nutzern. Für Analyse-Zwecke steht nicht nur die API selbst, sondern auch der umfangreiche Inhalt aus ArcGIS Online zur Verfügung. Die Integration von SciPy in Kombination mit den vielfältigen Analyse- und GeoProcessing-Funktionen erlaubt dem Analyst eine schrittweise Herangehensweise an die Strukturierung und Visualisierung von Daten. Meldet Euch gleich im Beta-Programm an und testet die neue API.
... View more
07-19-2016
12:08 AM
|
2
|
1
|
744
|
Title | Kudos | Posted |
---|---|---|
1 | 04-06-2017 11:40 PM | |
1 | 04-19-2018 02:45 AM | |
1 | 01-11-2016 03:58 AM | |
1 | 07-17-2017 12:14 AM | |
1 | 04-11-2017 03:53 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|