|
POST
|
It isn't going to save you many characters of code, but if you wanted to expand your array idea make it a multi dimensional array or an array of objects. Instead of a string for a field name you have an array, the items in the array could be the parameters for your add field.
Shapefile = r"C:\xxx\xxx\your shapefile here.shp"
FieldList = [["Field1","TEXT"], ["Field2","DOUBLE"]]
for Column in FieldList:
arcpy.AddField_management(Shapefile, Column[0], Column[1])
... View more
05-31-2013
04:58 AM
|
0
|
0
|
529
|
|
POST
|
You could project the points using a geometry service. http://developers.arcgis.com/en/javascript/jssamples/util_project.html
... View more
05-29-2013
09:17 AM
|
0
|
0
|
5669
|
|
POST
|
I've gotten around the V3 google api not having a maximize button. I've used information from http://www.drcoen.com/2010/12/html-divs-layered-onto-google-streetview-chrome-issue/ to create a new div overlayed on top of my map (like their Hello dialog). The div contains a maximize button which is an image. Clicking on the image uses onclick to call the maximizeStreetView function which is a new function that changes the dimensions of the ArcGIS map and the streetview panorama. The other piece of key information I needed was the function to call once the panorama div is resized to refresh the panorama so it fills the whole div. The function is google.maps.event.trigger(panorama, 'resize'); I need to build another button which will do the same thing, except call the restore function to get out of fullscreen. The concept should be identical though.
function initialize_container()
{
//alert('Container Initialized');
// create container
var obj= getSWF("agsview3");
obj.height = getPageHeight() - streetviewHeight;
var svh = streetviewHeight + "px";
var divTag = document.createElement("div");
divTag.id = "pano";
divTag.style.width = "100%";
divTag.style.height = svh;
divTag.style.position = "absolute";
divTag.style.bottom = "0px";
divTag.style.right = "0px";
divTag.style.left = "0px";
divTag.innerHTML = '<div style="position: absolute; top: 20px; right: 20px; width: 100px; height: 36px; text-align: center; color: #000; z-index: 2; line-height: 36px;"><img width="20px" height="20px" src="assets/images/maximize-button.png" onclick="maximizeStreetView();" /></div>';
document.body.appendChild(divTag);
addEvent(window, "resize", windowResized );
}
function maximizeStreetView()
{
try
{
var theDiv = document.getElementById("pano");
if(theDiv!=null)
{
var obj= getSWF("agsview3");
obj.height = "1";
theDiv.style.display = "block";
theDiv.style.height = "100%";
google.maps.event.trigger(panorama, 'resize');
}
}catch(err){
alert(err);
}
}
... View more
05-29-2013
07:04 AM
|
0
|
0
|
1354
|
|
POST
|
I used the widget found here http://www.arcgis.com/home/item.html?id=b721eec8dde442559e9c17acecd22188
... View more
05-28-2013
08:55 AM
|
0
|
0
|
1354
|
|
POST
|
I've used Citrix and Windows Terminal Services for this issue in the past. It has many advantages including performance, stability (session stays running if the network drops), upgrades (Only upgrade the server).
... View more
05-28-2013
06:43 AM
|
0
|
0
|
416
|
|
POST
|
http://wiki.gis.com/wiki/index.php/System_Design_Strategies This location has the full System Architecture documentation and the Capacity Planning tool. There are a number of links to videos throughout the documentation which will explain each section.
... View more
05-28-2013
06:24 AM
|
0
|
0
|
674
|
|
POST
|
Fiddler can accept regular expressions in it's filter tab. Check the "Show only if URL contains" check box. Enter an expression like "REGEX:(?insx).*[^(css|png|xml)]$" in the text box without quotes. This expression would hide css, png, and xml files. http://fiddler2.com/documentation/KnowledgeBase/Filters
... View more
05-28-2013
04:24 AM
|
0
|
0
|
939
|
|
POST
|
I had a feature class as well that had this error while upgrading from 9.3.1 to 10.1. The prerequisite check did not find anything wrong. The feature class seemed fine in place and I could copy the feature class, but not rename it. Since this was a simple unversioned feature class with no relationships I made a new featureclass and imported all the properties from the original (projection, fields, etc.) and loaded the data from one to the other then deleted the original feature class. At this point I could upgrade the geodatabase. I wasn't able to find a tool to run on the feature class in place to clean up the issue.
... View more
05-28-2013
03:27 AM
|
0
|
0
|
1053
|
|
POST
|
The only reason I could picture that many mxds would be something that could be solved with Data Driven Pages. I use a python script to change queries on an index layer and generate maps based on that. It could be worth some investigation to see if it solves what you're really trying to accomplish.
... View more
05-28-2013
03:21 AM
|
0
|
0
|
958
|
|
POST
|
I have a number of scheduled process which run on 2008 Server 64 bit. They do not use the 'run only when the user is logged on' or the 'run with highest privleges' settings. I do make sure to put the full path to both my script and the python.exe that I want the application to run as which for me is at "C:\python27\arcgis10.1\python.exe pathToMyScript\script.py"
... View more
05-13-2013
09:16 AM
|
0
|
0
|
3656
|
|
POST
|
The fact an input shapefile is being used shouldn't be relevant. As long as you get a pointgeometry object somehow with a defined spatial reference the projectAs should work fine. Your first solution shouldn't have any issue other than something being wrong with your transformation parameter (r'NAD_1983_HARN_To_WGS_1984'). I get your same error if I use the shapefile and your transformation. The samples I provided were simplified to use shapefiles to eleminate the rest of the code as being an issue.
... View more
05-13-2013
09:11 AM
|
0
|
0
|
1831
|
|
POST
|
Check that you're using a valid transformation for the projections you're using by feeding the shapefile to the project tool in a model and exporting it. I tried two variations of a script with different options for the transformation parameter. The transformation you're using blew up with the same error you're getting, and a transformation that I used from the exported script worked perfectly. I got the error you're using when I had a typo in my transformation string as well. This code blows up with your error
import arcpy
theFC = r"c:\temp\myFeatureclass.shp"
g = arcpy.Geometry()
to_sr = arcpy.SpatialReference('WGS 1984')
geometryList = arcpy.CopyFeatures_management(theFC, g)
for geometry in geometryList:
projectedGeometry = geometry.projectAs(to_sr,r'NAD_1983_HARN_To_WGS_1984')
print projectedGeometry.centroid.X, projectedGeometry.centroid.Y
This code works great
import arcpy
theFC = r"c:\temp\myFeatureclass.shp"
g = arcpy.Geometry()
to_sr = arcpy.SpatialReference('WGS 1984')
geometryList = arcpy.CopyFeatures_management(theFC, g)
for geometry in geometryList:
projectedGeometry = geometry.projectAs(to_sr,'NAD_1983_To_NAD_1983_CSRS_4 + NAD_1983_CSRS_To_WGS_1984_2')
print projectedGeometry.centroid.X, projectedGeometry.centroid.Y
... View more
05-13-2013
06:17 AM
|
0
|
0
|
1831
|
|
POST
|
At 10.1 ideally you're moving away from using the SDE service and towards using direct connections. Read the section "Create Database Connection (Data Management)" in the documentation which should suggest how to create a connection file to a 10.1 geodatabase. The 10.1 connections look a bit different than the previous connection dialogs. Below is a sample I used to connect to my Oracle geodatabase that does not have user schema geodatabases in it.
import arcpy
folderName = r"c:\temp"
fileName = "testConnection.sde"
databasePlatform = "ORACLE"
instance = "mydatabase.world"
username = "myusername"
password = "secretpassword"
arcpy.CreateDatabaseConnection_management(folderName, fileName,databasePlatform,instance,"DATABASE_AUTH",username,password,"SAVE_USERNAME","#","#","TRANSACTIONAL","sde.DEFAULT")
... View more
05-13-2013
04:43 AM
|
0
|
0
|
664
|
|
POST
|
I didn't find it either. I ended up using the "Create Enterprise Geodatabase" tool as an alternative for my master geodatabase, then the "Enable Enterprise Geodatabase" tool to setup my user schema geodatabases. You can use it through arccatalog or if you want to script it with python thats there too.
... View more
05-08-2013
04:25 AM
|
0
|
0
|
764
|
|
POST
|
I've used the uncompiled widget and put it into the 3.3 viewer. Looks great. I've found with some research though that in the v3 api of streetview they've removed the full screen button from the top right of the panorama. Now I'm stuck with only the streetviewheight for what I can see. Has anyone tried any work arounds or options for this? I'm going to try a few things with it tomorrow to see what might be possible.
... View more
05-07-2013
11:05 AM
|
0
|
0
|
1354
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-04-2019 09:22 AM | |
| 1 | 07-10-2015 01:01 PM | |
| 1 | 06-30-2015 11:18 AM | |
| 1 | 01-29-2019 01:43 PM | |
| 1 | 01-25-2019 10:04 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|