POST
|
Hey Jason, I've pretty much given up this approach in favor of a roundabout method of setting the dataframe extent by zooming to selected features. Perhaps I'll go about doing a printout of those properties at some point down the road, but for the time being, I've moved on to other things (partially out of frustration, and partially out of time constraints). I'm shocked that something so simple could be such a challenge to implement.
... View more
02-28-2015
10:04 AM
|
0
|
0
|
718
|
POST
|
Dan, I appreciate your help in all of this. I also tend to see differences in result when I'm using ArcPy with mxd set as "CURRENT" vs running ArcPy via a standalone script.
... View more
02-05-2015
06:17 PM
|
0
|
0
|
718
|
POST
|
Jason - the documentation makes sense in that regard - if the dimensions of the data frame differ from the received coordinates, naturally they're not going to be precise. However, as you know, this goes beyond that problem. The following printout reflects a set of print statements done prior to every line seen above, with an additional set of print statements following the last line. XMin 480718.855003 XMax 487765.034905 YMin -897522.367118 YMax -892753.723682 mapUnits Meters spatialReference <geoprocessing spatial reference object object at 0x0D2102D8> elementWidth 13.6918 elementHeight 9.2662 XMin 480718.855003 XMax 487765.034905 YMin -897522.367118 YMax -892753.723682 mapUnits Meters spatialReference <geoprocessing spatial reference object object at 0x0D210428> elementWidth 13.6918 elementHeight 9.2662 XMin 480718.855003 XMax 487765.034905 YMin -897522.367118 YMax -892753.723682 mapUnits Meters spatialReference <geoprocessing spatial reference object object at 0x0D210410> elementWidth 13.6918 elementHeight 9.2662 XMin -87.6986889715 XMax -87.6353211223 YMin 41.9155057359 YMax 41.9583911976 mapUnits DecimalDegrees spatialReference <geoprocessing spatial reference object object at 0x0D210410> elementWidth 13.6918 elementHeight 9.2662 XMin -87.6986889715 XMax -87.6353211223 YMin 41.9155057359 YMax 41.9583911976 mapUnits DecimalDegrees spatialReference <geoprocessing spatial reference object object at 0x0D210410> elementWidth 13.6918 elementHeight 9.2662 XMin -93.500046392 XMax -93.4999395774 YMin 50.1891561644 YMax 50.1892284534 mapUnits DecimalDegrees spatialReference <geoprocessing spatial reference object object at 0x0D210410> elementWidth 13.6918 elementHeight 9.2662 XMin -5.44407670288 XMax 6.44407996557 YMin -0.0228719610641 YMax 8.02267627373 mapUnits Meters spatialReference <geoprocessing spatial reference object object at 0x0D210410> elementWidth 13.6918 elementHeight 9.2662 I will try setting the extent manually tomorrow when I have more time.
... View more
02-05-2015
06:15 PM
|
0
|
2
|
718
|
POST
|
Dan, I''m not sure I follow. When I reorder the dictionary keys in the following lines: newExtent.XMin, newExtent.XMax = custom_extent[1], custom_extent[2] newExtent.YMin, newExtent.YMax = custom_extent[3], custom_extent[4] I still am not seeing satisfactory results. Is this what you are referring to?
... View more
02-05-2015
04:20 PM
|
0
|
1
|
718
|
POST
|
I'm trying to set the following coordinates to a dataframe: custom_extent = {1:-87.678956, 2: -87.611652, 3:41.867129, 4:41.954932} where `1` is key for `XMin`, `2` is key for `XMax`, `3` is key for `YMin`, and `4` is key for `YMax` However, when I try to set the new extent up, the coordinates are not the results I expect. Here's a code snippet: print data_frame.extent.XMin # prints 480718.855003 original_spatial_reference = data_frame.spatialReference newExtent = data_frame.extent data_frame.spatialReference = arcpy.SpatialReference("WGS 1984") print data_frame.extent.XMin # prints -87.6986700746 newExtent.XMin, newExtent.XMax = custom_extent[1], custom_extent[2] newExtent.YMin, newExtent.YMax = custom_extent[3], custom_extent[4] data_frame.extent = newExtent print data_frame.extent.XMin # prints -93.500018925 data_frame.spatialReference = original_spatial_reference print data_frame.extent.XMin # prints -2.38749449402 Every printout does not match the desired `XMin`: `-87.678956`. Any thoughts?
... View more
02-05-2015
03:54 PM
|
0
|
10
|
4677
|
POST
|
Thanks Dan. You made some good points. Setting up the template manually is pretty trivial.
... View more
12-05-2014
05:49 AM
|
2
|
0
|
541
|
POST
|
Hi Amanda, I appreciate your help. It looks as if I can't do this after all. I found similar questions on the suggested threads section that answered my question. Thanks again.
... View more
12-04-2014
04:04 PM
|
1
|
0
|
541
|
POST
|
Based on the lack of mention with in the documentation, as well the mention within this gis.stackexchange thread, I'm getting the impression that it is not possible to set up data driven pages with ArcPy. This seems a little strange, seeing as how it is such a fundamental component of the Data Driven Pages toolbar. I am specifically trying to Enable Data Driven Pages, and then assigning it to a specific layer.
... View more
12-04-2014
11:29 AM
|
0
|
4
|
3577
|
POST
|
My initial problem was an issue with the layer not loading at all when the page was set to the full extent, despite having changed the Min/Max Scale settings generously when publishing the map service. I corrected this by rectifying the Scale settings in JavaScript: landBaseLayer.on("load", function() { landBaseLayer.minScale = 0; landBaseLayer.maxScale = 0; }); I now have a problem with the layer not loading when entering the page. It loads when I zoom in, and the loaded subset will remain visible when I zoom back out, but everything around it will remain blank. What am I doing wrong? Sorry, I'm totally new to this. I'm using a cached map service, with a Max Record Count of 10,000 (the layer contains just over 7,000 points). The following is the entire code. <!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!--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">
<title>Identify with Popup</title>
<link rel="stylesheet" href="http://js.arcgis.com/3.8/js/esri/css/esri.css">
<style>
html, body, #map {
height:100%;
width:100%;
margin:0;
padding:0;
}
</style>
<script>var dojoConfig = { parseOnLoad: true };</script>
<script src="http://js.arcgis.com/3.8/"></script>
<script>
dojo.require("esri.map");
dojo.require("esri.dijit.Popup");
var map;
var identifyTask, identifyParams;
function init() {
//setup the popup window
var popup = new esri.dijit.Popup({
fillSymbol: new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255,0,0]), 2), new dojo.Color([255,255,0,0.25]))
}, dojo.create("div"));
map = new esri.Map("map", {
basemap: "satellite",
center: [-89.211, 39.977],
zoom: 7,
infoWindow: popup
});
dojo.connect(map, "onLoad", mapReady);
var landBaseLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://localhost:6080/arcgis/rest/services/WeekSample/MapServer",{opacity:.55});
landBaseLayer.on("load", function() { landBaseLayer.minScale = 0; landBaseLayer.maxScale = 0; });
map.addLayer(landBaseLayer);
}
function mapReady(map){
dojo.connect(map,"onClick",executeIdentifyTask);
//create identify tasks and setup parameters
identifyTask = new esri.tasks.IdentifyTask("http://localhost:6080/arcgis/rest/services/WeekSample/MapServer");
identifyParams = new esri.tasks.IdentifyParameters();
identifyParams.tolerance = 3;
identifyParams.returnGeometry = true;
identifyParams.layerIds = [0];
identifyParams.layerOption = esri.tasks.IdentifyParameters.LAYER_OPTION_ALL;
identifyParams.width = map.width;
identifyParams.height = map.height;
}
function executeIdentifyTask(evt) {
identifyParams.geometry = evt.mapPoint;
identifyParams.mapExtent = map.extent;
var deferred = identifyTask.execute(identifyParams);
deferred.addCallback(function(response) {
return dojo.map(response, function(result) {
var feature = result.feature;
feature.attributes.layerName = result.layerName;
if(result.layerName === 'Bloomingdale_Parcel'){
//console.log(feature.attributes.PARCELID);
console.log(feature.attributes.UNIQUEID);
var template = new esri.InfoTemplate("", "<b>Unique ID:</b> <br/> ${UNIQUEID} <br/><br/> <b>Address:</b> <br/> ${PROP_LOC} <br/><br/> <b>Owner of record:</b> <br/> ${OWNER_NAME} <br/><br/> <b>Block ID:</b> <br/> ${BLOCK} <br/><br/> <b>Lot ID:</b> <br/> ${LOT}");
feature.setInfoTemplate(template);
}
//else if (result.layerName === 'Building Footprints'){
//var template = new esri.InfoTemplate("", "Parcel ID: ${PARCELID}");
//feature.setInfoTemplate(template);
//}
return feature;
});
});
map.infoWindow.setFeatures([ deferred ]);
map.infoWindow.show(evt.mapPoint);
}
dojo.ready(init);
</script>
... View more
02-25-2014
04:25 AM
|
0
|
0
|
543
|
POST
|
Issue has been resolved with the help of an ESRI rep. Turns out the person who installed ArcGIS for Server placed it in a drive which we didn't have complete access to. Moving everything to the C: drive resolved the issue.
... View more
01-24-2014
11:59 AM
|
0
|
0
|
428
|
POST
|
Just found out that it may have to do with the site's security settings. However, after setting security to Public, I now get the error message "Server machine '#######' is currently being configured by other administrative operators. Please try again later...", despite having logged off and rebooted. There appears to be a similar issue on this page with one potential solution which I will now try to test.
... View more
01-24-2014
08:50 AM
|
0
|
0
|
428
|
POST
|
I cannot publish a map service because the PublishingTools service is stopped. However, when I try to start the service, it hangs, with the message "System/PublishingTools service is starting..." until I get a "Service startup timeout" message. Any suggestions? Someone posted a similar issue on gis.stackexchange here, but the question was left unanswered. The Server Manager is on Windows 7, the browser is IE, and Windows Firewall is off.
... View more
01-24-2014
08:19 AM
|
0
|
2
|
2581
|
POST
|
Hi Kevin, I have a follow-up question. Our testing environment has both ArcGIS for Desktop and ArcGIS for Server. Before we migrate the process to the production server, we want to know how to invoke ArcGIS for Server with our batch file. We call our Python "master" script with a batch file containing the following line: D:\Python27\ArcGIS10.1\python.exe Z:\WDIA_Production\extra_py\master_script.py If we want to use the ArcPy contained within ArcGIS for Server, is it just a matter of changing the path of the Python executable to the one contained within the ArcGIS for Server directory? If so, what is the directory? D:\Python27\ArcGISx6410.1\python.exe?
... View more
11-25-2013
12:50 PM
|
0
|
0
|
149
|
POST
|
edit: Didn't see your post, khibma, before I posted. To answer your question, the model is being called by the script. Because we do not have access to the server yet, and because ArcGIS for Server is still very foreign to me, I'm unclear how I would be able to copy/paste a model without ArcGIS for Desktop. Are you saying that I can simply place the toolbox that contains it within the production server directory? The model does the following: 1.File rename (Python) 2.File validation (Python) 3.File filter (Python) 4.Geocoding (ESRI) 5.Spatial Joining (ESRI) 6. Quality Filter (Python) Apparently the powers that be will not allow any desktop software on the production server, but the production server will soon be the required environment for weekly processing. Ugh, sounds like a catch-22.
... View more
10-29-2013
11:16 AM
|
0
|
0
|
563
|
Title | Kudos | Posted |
---|---|---|
2 | 12-05-2014 05:49 AM | |
1 | 12-04-2014 04:04 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|