POST
|
I am writing a python script that checks for a dataset before deleting the previous output. I have found that arcpy.Exists returns true if a dataset exists regardless of whether the user has permissions to that dataset. Is there a way to check that the dataset exists AND that the specific user established in the sde connection file actually has permission to that dataset in python? Trevor
... View more
07-01-2015
01:47 PM
|
0
|
1
|
2727
|
POST
|
I am attempting to append data from AutoCAD DWG into existing FGDB feature classes using python/arcpy. The CAD drafter has set specific Layers to "frozen" or "off" to eliminate them from his view and I would like to keep these settings upon import. ArcGIS reads these settings when I view the same AutoCAD file in ArcMap/ArcCatalog, however, I cannot get arcpy to respect these settings while importing the data using python. Here is my boiled down code: outFC = "<outGDB>\\<outFC>" inputDrawing = "<path>\\<file>.dwg" inputLayer = os.path.basename(inputDrawing) + "_layer" arcpy.MakeFeatureLayer_management(inputDrawing,(inputLayer + _FI), desc = arcpy.Describe(inputLayer + _FI) field_info = desc.fieldInfo #this is dumb but allows me to get the field info dynamically arcpy.MakeFeatureLayer_management(inputDrawing,inputLayer,<layer information>,"","",field_info) arcpy.SelectLayerByAttribute_management(inputLayer, "NEW_SELECTION", "NOT \"Layer\" LIKE 'S_Grid%' AND NOT \"Layer\" = '0'") # This list of exclusions is what I want to avoid arcpy.Append_management(inputLayer, outFC, "NO_TEST") Has anyone done this before?
... View more
11-13-2014
01:46 PM
|
0
|
0
|
4301
|
POST
|
Can this known limitation of the Flex Viewer be added to the help documentation so that future users won't waste hours trying to find this simple answer?
... View more
09-11-2014
12:15 PM
|
0
|
0
|
755
|
POST
|
As far as I remember, this was a limitation of the map service responding to the specific request. This may have changed with 10.1+ but in earlier versions the map service request was either answered correctly or it responded with nothing. That is, if the viewer is asking for 1:141 scale tile and the service isn't set up to respond with that exact scale tile then the service responds with nothing (or an blank PNG?). The server doesn't know how to substitute the 1:1128 tile for the missing 1:141 tile so that the viewer can display that. I doubt the viewer could be programmed to handle the non-standard request. This may have been a ADF problem but I think rest has it too. However, I ran into the opposite problem a couple of years ago (v9.3.1) using a tiled WMS/WFS service. The service always responded with a dynamic map because the JS based request to the service was different than how I had set up my tile scheme (the projection requested was different than the service). I matched the service projection to the one the application was expecting (outside vendor's application) it started using the cache (a really good thing over a slow cellular network). ArcMap's communication is more robust and ArcMap performs the substitute request when it's denied the tile it needs (which is why you're not limited to the tiled scales in ArcMap).
... View more
01-24-2014
12:36 PM
|
0
|
0
|
201
|
POST
|
Could this maybe be an option in the config.xml of the compiled version?
... View more
09-27-2013
08:45 AM
|
0
|
0
|
410
|
POST
|
To wrap up this problem with a solution I'll post what I discovered. It ended up being a problem with setting the opacity of one of the layers added to the map. No matter what other options I set, this service would print with a white background when I set the opacity to less than 1 so I removed the opacity option and the map prints correctly now. Not really the solution I wanted but it works.
... View more
06-18-2013
07:56 AM
|
0
|
0
|
440
|
POST
|
i added the css style to make the div background color blue and tested this by commenting out my raster layer. With the imagery layer on, the map shows up on screen just like before but still prints without the raster but now with a blue background. Unfortunately, I don't have a computer on the network that can have other browsers to eliminate that source of trouble.
... View more
06-06-2013
01:08 PM
|
0
|
0
|
440
|
POST
|
The only place I found it is under Internet Options and it was not checked. I turned this option on and have no change.
... View more
06-06-2013
07:45 AM
|
0
|
0
|
440
|
POST
|
I have searched for an answer for this but all of the discussions on printing focus on the new printTask method using v10.1. Perhaps this has been answered in the old forums but I can't find anything anymore. Basically, I have a web report that is query results in a table and a map. The map is simply zoomed into the query results and the map includes the hybrid basemap, local high resolution imagery when zoomed in, and a couple of vector based layers. Everything looks great in the browser but when I attempt to print the page, only the vector layers print, the raster layers won't print. This happens when i send the page to a printer and when I print to pdf using acrobat's print object. Currently, I am using a simple javascript method and I am stuck using AGS v10.0 and IE8 (no choice in the matter for now): <A HREF="javascript:window.print()">Print Page</A> I don't know if it's the print method or something else (CSS) that is causing this. Is there something I can use with AGS v10.0 to print out the map including the raster layers or is the only solution to upgrade my AGS to v10.1 and use the printTask? Thank you,
... View more
06-06-2013
07:21 AM
|
0
|
6
|
720
|
POST
|
I think I inserted your code correctly, however, if I have var extent = esri.graphicsExtent(results); anywhere in the "showResults" function, the map fails- even if I don't use extent anywhere else.
... View more
06-04-2013
12:07 PM
|
0
|
0
|
909
|
POST
|
HELP! I am working on a JavaScript web page that does two things: 1) Query a rest service for the attribute information from a single record and then presents it in a table. 2) Builds a map and zooms to the results from the query. I used the "Query State Info without Map" to start with and to accomplish the first task. I added a map (basemap plus a couple of additional layers for display). However, I am unable to extract the geometry from the query results as a point to use when creating the map. The rest service I'm using for the query is not exposed to the internet so I have reworked and simplified my code (using just the sample code and internet services) to the basics so I can learn what I'm doing and apply it to my actual page: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=7, IE=9, IE=10"> <!--The viewport meta tag is used to improve the presentation and behavior of the samples on iOS devices--> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"> <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.5/js/dojo/dijit/themes/claro/claro.css"> <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.5/js/esri/css/esri.css"> <title>Query State Info with Map</title> <script src="http://serverapi.arcgisonline.com/jsapi/arcgis/3.5/"></script> <script> dojo.require("esri.tasks.query"); dojo.require("esri.map"); var queryTask, query, centerPoint, stateName; var stateName = "Colorado" /* stateName for QueryTask */ function init() { /* Setup query */ queryTask = new esri.tasks.QueryTask("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5"); query = new esri.tasks.Query(); query.returnGeometry = true; query.outSpatialReference = new esri.SpatialReference({wkid : 102100}); query.outFields = ["STATE_NAME","SQMI","SUB_REGION"]; query.text = stateName; queryTask.execute(query, showResults); } function showResults(results) { var s = ""; for (var i=0, il=results.features.length; i<il; i++) { var featureAttributes = results.features.attributes; for (att in featureAttributes) { s = s + "<b>" + att + ":</b> " + featureAttributes[att] + "<br />"; } } dojo.byId("info").innerHTML = s; /* Extract Geometry From Query */ centerPoint = new esri.geometry.Point(getPoint(results)); //Does NOT work- Actual use will be a point layer // centerPoint = [-122.45, 37.75] //fake point for testing /* Build Map */ map = new esri.Map("map",{ basemap: "topo", center:centerPoint, zoom:13 }); map.addLayer(new esri.layers.ArcGISDynamicMapServiceLayer("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer", { "opacity":0.2, spatialReference: map.spatialReference })); /* Add ESRI Census Map */ } dojo.ready(init); </script> </head> <body class="claro"> <div id="info" style="padding:5px; margin:5px; background-color:#eee;"></div> <div id="map"></div> </body> </html> Can someone please help me understand how to extract the geometry of the results to a variable that can then be used to create a center-point in a map? Thank you,
... View more
06-04-2013
09:07 AM
|
0
|
6
|
5721
|
POST
|
I'm new to JavaScript and DOJO and I am looking for a way to display the results from the find Task example as a vertical table rather than as a horizontal one. I'm using the code from the " ap.html'>Find features without a map" example and just want to pivot the table so that the page scrolls and prints right. Can anyone point me in the right direction? Thanks in advance.
... View more
03-20-2013
09:18 AM
|
0
|
0
|
459
|
POST
|
@kmacleod - ArcGIS.com for personal use is free, however, for organizational use it is not- nor is it cheap ($17,500 per year for 100 users). The self-hosted portal concept is interesting but just over the horizon. Discussing it is difficult as so much of how it will function is yet unknown- will be worth standing up a web server, maintaining the software, and administrating user accounts will be an organizational decision when we are able to evaluate this product. It will not be costless regardless of what ESRI charges. I don't know if the self-hosted portal concept is a good substitute for a Sample Viewer.
... View more
01-03-2013
07:16 AM
|
0
|
0
|
518
|
POST
|
ESRI seems to be moving away from the sample type viewers and towards the arcgis.com based templates. ESRI might be just trying to reach a wider market (ie non-ArcGIS Server customers) or make Web GIS more GIS professional friendly, however, I wouldn't rule out the profit motivation in charging customers for arcgis.com accounts.
... View more
01-02-2013
06:42 AM
|
0
|
0
|
518
|
Online Status |
Offline
|
Date Last Visited |
08-02-2023
06:30 PM
|