POST
|
The geodatabase is being created via an ArcObjects extension that copies an empty geodatabase that contains the general structure (blank feature classes) in it, and then it populates it using shapefile data that gets converted along the same (field name changes, etc). There doesn't seem to be a problem there with the newly created geodatabase, or at least ArcMap/Catalog doesn't flag it as having any problems when opening it or the feature classes contained within. This is kind of a sporadic problem though. It only seems to happen on select mxd's. So It may be a problem somewhere with the mxd that is getting re-sourced/copied? I don't fully get why the re-sourced data in the TOC shows as non-existing when I can add the same data source again to the same TOC and that version is fine and exists.
... View more
02-26-2015
11:36 AM
|
0
|
0
|
1060
|
POST
|
It all should be the same as my version, v10.2.2.3552.
... View more
02-26-2015
10:29 AM
|
0
|
1
|
1060
|
POST
|
Following your code check I did the following after setting mxd to the current map document... >>> for lyr in arcpy.mapping.ListLayers(mxd, "*Replace*"): ... print lyr.dataSource ... C:\***\*****\F_Geodatabase\*****.gdb\ReplacementTree >>> for lyr in arcpy.mapping.ListLayers(mxd, "*Replace*"): ... print lyr.dataSource ... print arcpy.Exists(lyr) ... C:\***\*****\F_Geodatabase\*****.gdb\ReplacementTree False >>> The layers are being re-sourced via another arcpy script already. Trying to manually change it in the layer properties results in the same output. In order to get it to work, I need to actually hit the add data button to put the data into the TOC. That results in: >>> for lyr in arcpy.mapping.ListLayers(mxd, "*Replace*"): ... print lyr.dataSource ... print arcpy.Exists(lyr) ... C:\***\*****\F_Geodatabase\*****.gdb\ReplacementTree False C:\***\*****\F_Geodatabase\*****.gdb\ReplacementTree <--Put in here by hitting add data button (same file) True >>> The script that fails has a pre-built list of names to look for. It was set up that way since the mapping team was repeating the same process over and over, so they just use a script to resource an existing mxd and save it as a new one. If I can figure out why the simple arcpy.Exists() is failing, then I should be able to adjust the other parts. Does that make sense at all? I don't know how to tell if the mxd itself is corrupt is some manner, or if there is something I am completely missing.
... View more
02-26-2015
09:56 AM
|
0
|
2
|
1060
|
POST
|
I am running into an issue where the `arcpy.Exists()` function returns a `false` for a known good layer in the python interactive window. We are using a map document template for the layers set up in the Table of Contents. I usually would drag the layer from the Table Of Contents into the interactive window so it shows like `r'Work Layers\Replacement Tree'` since it is part of a group in the Table of Contents. If I manually add in the data instead of use a template and resource the layers, the `arcpy.Exists()` function works and returns `true`, but on occasion, it will return a `false`. When it returns `false`, I can check the layer's source, navigate to the location and specified feature class, and see that it is there. I can add it in manually and run it, too. For some reason, it seems using an existing map document as a template and resourcing the Table of Contents breaks this on occasion. The code I am using is a bit more complex than the `arcpy.Exists()`, but I have narrowed it down to that being the issue. My code throws an exception saying a particular layer doesn't exist so that is the easiest way to troubleshoot. I have even gone as far as to drag multiple layers from the Table Of Contents into a list in the interactive window and iterate over it with `arcpy.Exists()` to the same result of `false`. I can set the workspace to the file geodatabase we're using and the using the feature class name (ie. `layer = 'Replacement Tree'`) links to the correct feature class. Is there a bug or a disconnect somewhere when using a map document as a template and resourcing the data from the Table of Contents to the python interactive window so that layers (which show up on the data frame, too!) aren't connected as if they were added in manually? Also posted to: file geodatabase - Arcpy.Exists Fails On Existing Layers - Geographic Information Systems Stack Exchange
... View more
02-26-2015
06:37 AM
|
0
|
9
|
5551
|
POST
|
I am using FeatureLayers in the API to load in a layer. I have an info template set for the layer for identifying individual features. I am trying to disconnect the click event from the layer while I am drawing a polygon for another tool. However, I haven't found a good way to disconnect that handler since it isn't one I assign. I have tried layer.disableMapEvents() which didn't work. I don't have an info template set for the map itself either, so I don't think that one is firing. I have searched through some other posts here, and so far the only solution I have found is to attach another handler to the map click event and call map.infoWindow.hide() while I am doing the drawing. This still goes through the identify process but keeps the window away. I also tried calling the map.graphics.disableMouseEvents() , but that doesn't work either. I am looking for a way to either handle the map click event myself and disconnect ESRI's standard way for the FeatureLayer. I just want to be able to shut off identifying of features temporarily. A way to disconnect the event and hook it up again would be great. That would help if I want to attach it to another mouse event, too. Posted on ESRI JavaScript API FeatureLayer Click Event - Geographic Information Systems Stack Exchange also
... View more
10-28-2014
09:19 AM
|
0
|
0
|
2076
|
POST
|
Thanks for the advice Melita... I panned through a lot more of the data, and the difference isn't uniform throughout the dataset. It does look like a bad georeference issue. I will pan through my other layers to see if the difference is similar like this. If they are more uniform, I will check into NAD27 to see if that adjusts things properly.
... View more
09-10-2014
11:00 AM
|
0
|
0
|
359
|
POST
|
I am having problems getting data to align properly with basemaps layers. The image below shows the difference between roads. The black lines are my centerlines shapefile, which is fairly off from the aerial underneath. The centerlines shapefile's coordinate system is GCS_North_American_1983 while the basemap is WGS_1984_Web_Mercator_Auxillary_Sphere. I have tried projecting the centerlines shapefile into WGS_84 to get it to better align, but I don't believe I have gotten the transformation correct. I have tried using WGS_1984_(ITRF00)_To_NAD_1983 and NAD_1983_To_WGS_1984_5 transformations without much luck. My data is in western Pennsylvania. I am looking for any help I can get so these line up. I am pretty sure it is a coordinate issue rather than the data provider digitized everything like this. I am looking for suggestions on what I am to do next.
... View more
09-10-2014
08:54 AM
|
0
|
2
|
2999
|
POST
|
I am not the most sure on this, but I would check what ports are used by SQL Server Express by default. I had issues with an Apache server I was running when SQL Server Express was running also. The SQL Server Express installation took over the port my Apache server was using. Sorry I am not more help, but that is the first thing that popped into my head.
... View more
09-09-2014
11:01 AM
|
0
|
3
|
601
|
POST
|
How are you sharing the data to your web map? If you are sharing a service from a ArcGIS Server: You can create a custom popup using the popup widget (https://developers.arcgis.com/javascript/jssamples/widget_popupfl.html). You can set the content to be custom depending on what the feature is. You would need some sort of JavaScript check in there or perhaps you iterate over your document on the Google Drive looking for the feature's id or something. I am not sure how you would reference the document from Google Drive, but I am assuming Google or a web search would yield decent results. Else: It will depend how you have your application set up. If you are drawing graphics for the locations without tying to a specific shapefile, you might have more of an issue relating a specific graphic to a record in your spreadsheet. If you had a way of assigning a property to each graphic as an identifier, it would make things easier so you can set a relationship of sorts between the graphics and table. I suppose you could use the lat/long (x/y) as a unique identifier between the graphics and table, but that would make a slightly more complex query and set up process. Best guess... Need more information.
... View more
08-08-2014
09:30 AM
|
0
|
0
|
172
|
POST
|
Ok, I am pretty sure then that it is me using the 9.3.1 server. I guess for some reason it doesn't provide that information to a Dynamic Layer. I get all the info you get except the scale information. It is kind of weird that the server would restrict it because if I break up the layers individually and use FeatureLayer, the data comes along. My list keep growing as to reasons to upgrade to a newer version of server.
... View more
07-22-2014
10:17 AM
|
0
|
0
|
112
|
POST
|
Didn't know of that. I have been playing around in the interactive console window though on Chrome Dev Tools instead of coding it in though. I will definitely keep the dir in mind though when I am debugging in code though. Thanks for that.
... View more
07-22-2014
10:11 AM
|
0
|
0
|
505
|
POST
|
When I get the layerInfo from the DynamicLayer, I get a collection of objects returned: [ Object defaultVisibility: true id: 0 name: "PilotBoundary" parentLayerId: -1 subLayerIds: null __proto__: Object , Object defaultVisibility: true id: 1 name: "Block Groups 2012" parentLayerId: -1 subLayerIds: null __proto__: Object , Object defaultVisibility: true id: 2 name: "Neighborhoods 2012" parentLayerId: -1 subLayerIds: null __proto__: Object etc.etc.etc. I still don't get the minScale property though. I have been drilling down the properties through Chrome Dev Tools, but I still haven't found that yet.
... View more
07-22-2014
10:00 AM
|
0
|
4
|
505
|
POST
|
There are 6 layers in there. The URL is UTC_Viewers/Louisville_Pilot (MapServer). When I go into the individual layers there, it will show the minScale/maxScale, but they probably aren't exposed to the ArcGISDynamicMapServiceLayer in 9.3.1.
... View more
07-22-2014
07:25 AM
|
0
|
0
|
505
|
POST
|
Nicholas Haney --> that is the general idea. I am trying to directly tie it to the checkboxes I am using. Have my checkboxes disabled if the layer can't be viewed at that scale or enabled and checked/not checked if it can be visible at that scale. Jeff Pace --> That is what I thought. Below are the properties I am able to access through the layerInfo. I pulled this out through Chrome's dev tools. I know the property has to be there somewhere, but I cannot find it for anything. I looked at the documentation on layerInfos and the information should be there. I don't know if it would have something to do with my server being 9.3.1, which I have already seen is missing some of the nicer options in the more up-to-date versions. Object {id: 0, name: "PilotBoundary", parentLayerId: -1, defaultVisibility: true, subLayerIds: null…} defaultVisibility: true id: 0 name: "PilotBoundary" parentLayerId: -1 subLayerIds: null __proto__: Object __inherited: function l(a,b,c){var d, constructor: function (){var c=arguments,d=c,e=c[0];if(!(this instanceof c.callee))return v(c);b&&(e&&(e=e.preamble)&&(d=e.apply(this,d)||d),(e=this.preamble)&&e.apply(this,d));a&&a.apply(this,c);(e=this.postscript)&&e.apply(this,c)} declaredClass: "esri.layers.LayerInfo" getInherited: function r(a,c){return"string"== inherited: function l(a,b,c){var d, isInstanceOf: function f(a){for(var c=this.constructor._meta.bases,b=0,d=c.length;b<d;++b)if(c===a)return!0;return this instanceof a} toJson: function (){return h.fixJson({defaultVisibility:this.defaultVisibility,id:this.id,maxScale:this.maxScale,minScale:this.minScale, __proto__: Object
... View more
07-22-2014
07:12 AM
|
0
|
2
|
505
|
Title | Kudos | Posted |
---|---|---|
1 | 07-11-2014 10:24 AM | |
1 | 07-11-2014 09:57 AM | |
1 | 07-14-2014 05:17 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|