POST
|
I am using the arcpy.TableToGeodatabase_conversion to convert a comma-separated .txt file that I download daily to a table in a geodatabase. arcpy.TableToGeodatabase_conversion("2013daily.txt", "C:/Users/smith/Desktop/test/all_observations.gdb") One of the fields in the .txt file contains numbers and text. The above code works in my python script if I am just using the python shell on my PC. It works in that in creates a field in the geodatabase that is text. Therefore it keeps all the values. However, if I run my python script on the ArcGIS Server VM, it just converts the text values into null. It creates an integer field, and all the text values are lost. I am not sure why this happens on the VM. I am using the same set of data. Thank you.
... View more
01-30-2014
09:50 AM
|
0
|
14
|
1721
|
POST
|
Thanks! I was getting an error but I changed the return "" to return None and that works. fieldName = "daily_min" expression = "getClass(!daily_minFlag!, !daily_min!)" codeblock = """def getClass(minFlag, daily_min): if minFlag == 's': return None else: return daily_min""" arcpy.CalculateField_management(out_feature_class, fieldName, expression, "PYTHON_9.3", codeblock) Thank you!
... View more
01-22-2014
05:20 AM
|
0
|
0
|
787
|
POST
|
Hi I have the following code. Basically I am trying to say when the field "daily_minFlag" equals 's', then I want to calculate the "daily_min" field to be null. fieldName = "daily_min"
expression = "getClass(!daily_minFlag!)"
codeblock = """def getClass(minFlag):
if minFlag == 's':
return ""
else:
return !daily_min!"""
arcpy.CalculateField_management(out_feature_class, fieldName, expression, "PYTHON_9.3", codeblock) I am getting an error when using the else statement. If I replace "return !daily_min!" with "return 1", it works fine, but I don't want it to equal 1, I want it to not change the daily_min value. So I think there is something wrong with my !daily_min! syntax. Thank you.
... View more
01-21-2014
12:13 PM
|
0
|
2
|
5075
|
POST
|
Thanks Vince. Do you suggest using a Python script to delete data from ArcSDE? Thanks
... View more
01-13-2014
05:03 AM
|
0
|
0
|
1376
|
POST
|
That is interesting. If you can connect and you can delete from SSMS, permissions seem an unlikely cause, but it might be worth checking. I am curious; are there other ways in which your right-click context menu differs from mine (attached)? I thought that was odd too since I can delete from SSMS. Yes my menu does not contains Import and Export, but otherwise it is the same.
... View more
01-10-2014
12:11 PM
|
0
|
0
|
1376
|
POST
|
Thank you for the quick response! I did right-click, but I do not see "New." Perhaps I do not have sufficient permissions? If not I can talk to someone about that. If I right-click "Administration", "Administer Geodatabase.." and "Compress Geodatabase" are grayed out. Thank you.
... View more
01-10-2014
11:45 AM
|
0
|
0
|
1376
|
POST
|
Hi I am pretty new to SQL server. I just want to create a new feature class in the SQL Server Enterprise Geodatabase. I am able to view my sde connection (obs.sde) in ArcCatalog and connect. There are existing feature classes within the geodatabase. These were created by my predecessor. I was hoping it would be as simple as right-clicking the connection file and selecting 'Create new feature class', but that is not an option. I have used Management Studio to login to the SQL Server in order to create queries to view and delete data. I'm not really sure where to start. I haven't found any tutorials on this. Thank you for any help.
... View more
01-10-2014
11:24 AM
|
0
|
7
|
2087
|
POST
|
Thank you! If my AOI is ever changing (since it will depend on tornado tracks that can vary all over the 48 states) should I just choose a PCS that is centered on the AOI? Such as UTM 15N? Most likely tornadoes will occur between the Great Plains and the southeastern USA. I am incorporating this into a python script. Thank you. Andrew
... View more
11-26-2013
05:25 AM
|
0
|
0
|
693
|
POST
|
Hi I would like to buffer a polyline feature class in Coordinate System of WGS 84 using 300 feet. I am getting the error ExecuteError: ERROR 000599: Falls outside of output geometry domains. I tried to calculate 300ft as decimal degress using a formula found online but the measurement does not come out correctly when measuring in ArcMap. Calculated to 0.00082296 dd, but the measure distance in ArcMap was about 265ft. I did not receive an error however. The polylines cover most of the 48 states. Would I need to reproject this to a new feature class and then do the calculation? Thank you. Andrew
... View more
11-26-2013
05:00 AM
|
0
|
4
|
1311
|
POST
|
Hello. I am trying to convert a KMZ file downloaded from the NWS to a feature class or shapefile using the DI extention. I am getting this error however "error when writing schema: a unique destination feature type name could not be generated for" Does this have to do with the actual data being corrupt or am I missing something? I also tried the KML to layer Conversion tool and get "ERROR 000401: No features were found for processing Failed to execute (KMLToLayer)." I have viewed the KMZ file in Google Earth and it looks fine. Thank you.
... View more
11-19-2013
05:21 AM
|
0
|
2
|
2416
|
POST
|
Hi I'm trying to do a select analysis with a number variable.
x=20131105
arcpy.Select_analysis(daily_stations, daily_stations_Select, "\"daily_YearMonthDay\" = x")
I've tried a number of different ways but keep getting errors. I obtained this code by building the select in modelbuilder and exporting to python. I replaced the number (20131105) that I used in modelbuilder with the variable x. ERROR 000358: Invalid expression daily_YearMonthDay Thank you
... View more
11-11-2013
12:18 PM
|
0
|
3
|
921
|
POST
|
Is it possible to display individual layers of a kmz file on the map? Using this KMZ file from the NWS, I would like to display only Current Day 4 outlook through Current Day 8 outlook (5 folders total). "Current Day 4 outlook" is the name of the folder, and within that folder is a layer called "day_4otlk_20130920_prob" Currently, those layers don't have any data due to low predictability, but in the future they will. This is the code taken from a sample with the KMZ file replaced. Thank you.
<script>
var map;
require([
"esri/map", "esri/layers/KMLLayer",
"dojo/parser", "dojo/dom-style",
"dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dojo/domReady!"
], function(
Map, KMLLayer,
parser, domStyle
) {
map = new Map("map", {
basemap: "topo",
center: [-99, 42.68],
zoom: 4
});
parser.parse();
var kmlUrl = "http://www.spc.noaa.gov/products/outlook/SPC_outlooks.kmz";
var kml = new KMLLayer(kmlUrl);
map.addLayer(kml);
kml.on("load", function() {
domStyle.set("loading", "display", "none");
});
});
</script>
... View more
09-20-2013
06:11 AM
|
0
|
0
|
731
|
POST
|
Hi I would like to label polygons from nws storm outlook services in my application. I have created a test map and added two services to show what I mean. They are basically displaying the same data. One is a KML service and the other is a web service. Looking at the day2otlk cat layer (KMZ service) I would like it to display "General Thunder" and "Slight Risk" rather than having to click on the area to view an infowindow with the information. Or if I look at the legend of SPC Outlooks - Day 2 Convective Outlook (web service) I would like it to display "TSTM", "SLGT" on the map. Whichever option is easier. Is this possible? Thank you. http://bit.ly/1aQwepK
... View more
09-17-2013
08:08 AM
|
0
|
0
|
453
|
Title | Kudos | Posted |
---|---|---|
5 | 11-01-2023 07:21 AM | |
1 | 06-22-2021 06:58 AM | |
1 | 01-11-2019 07:17 AM | |
1 | 04-04-2016 11:08 AM | |
1 | 07-23-2019 01:16 PM |
Online Status |
Offline
|
Date Last Visited |
03-05-2024
07:49 AM
|