POST
|
Anyone written python email code that sends an email if the python script fails? I use the email part from this help page with our data base administration, it works well. http://resources.arcgis.com/en/help/main/10.2/index.html#//003n000000v7000000 /M
... View more
11-18-2013
11:39 AM
|
0
|
0
|
1176
|
POST
|
Is there a reason why you are not simply copying them from one filegeodatabase to the other in Catalog? Yes - Two reasons. 1) Copying like that would not append features to an existing feature class, it would create a new feature classe with a '_1' name. 2) It would be time consuming. The data bases have 20-30 Feature classes, with potentially hundreds of subtypes (though they are not all populated). I need to do it often, so I would like it to be automatic. I have used the Batch-Copy-Paste tool. But the data base is multi-scale, and batch-copy-paste don't honour that, it puts the default Production Compilation Scale on all output features. /M
... View more
11-18-2013
11:29 AM
|
0
|
0
|
206
|
POST
|
Hi All I'm writing a arcpy script to copy many feature classes from one workspace (file geo database) to another. It's important for me that the script works between existing feature classes, i.e. Not try to create new feature classes, but appends the copied features as new features to the existing feature classes. If you know Batch-Copy-Paste, this is the same, only without messing up the PLTS_Compilation info. Due to the above requirements it seemed out of the question to use either of: arcpy.CopyFeatures_management() arcpy.FeatureClassToGeodatabase_conversion() arcpy.FeatureClassToFeatureClass_conversion() arcpy.Copy_management() even with the 'overwrite output' turned on, as they all aim at creating a new output feature class. I therefore decided to go row-by-row with a Search-cursor and an Insert-cursor. The two .gdb already exist, and have identical structure (schema) but the output.gdb holds no features in the feature classes The script looks like this: import os, arcpy
def inventory_data(workspace, datatypes):
for path, path_names, data_names in arcpy.da.Walk(workspace, datatype=datatypes):
for data_name in data_names:
yield os.path.join(path, data_name)
def match_feature_names(FA,lstFB):
FAName = FA[FA.rfind("\\")+1:]
for FB in lstFB:
if FAName in FB:
return FB
return False
#Main
genWSA = inventory_data(r"C:\data\input.gdb", "FeatureClass")
lstWSA = list(genWSA)
genWSB = inventory_data(r"C:\data\output.gdb", "FeatureClass")
lstWSB = list(genWSB)
for FCA in lstWSA:
print "Copying:"+FCA
lst_field_names = [fldX.name for fldX in arcpy.ListFields(FCA)]
curWrite = arcpy.da.InsertCursor(match_feature_names(FCA,lstWSB),lst_field_names)
with arcpy.da.SearchCursor(FCA,"*") as curRead:
for row in curRead:
curWrite.insertRow(row)
del curRead,curWrite For some reason it only works well for Point feature classes. Any Line or Polygon feature class have the attributes copied correctely, but the 'shape' is empty. Also the length- and area-field holds only 0 (zero) in all output rows Any suggestion are appreciated. Best regards Martin
... View more
11-18-2013
11:04 AM
|
0
|
2
|
314
|
POST
|
Thanks Chris Snyder The "Production Editing Advanced" toolbar was exactely what I needed! "Intersecting lines (Production Mapping)" was the tool I was looking for. http://resources.arcgis.com/en/help/main/10.1/index.html#//01030000026v000000 🙂 Thanks
... View more
08-16-2013
01:37 AM
|
0
|
0
|
904
|
POST
|
I am guesing that the problem is that your 'network' is not properly intersected. that is: at a river branch, one line continues on past the intersction and the other line ends there. You want both of the branches to end at the upper end of the joined stream (as well they should). You are spot on. This is the description, as I should have written it. You could, I supppose, perform the featute to line (creating a new feature class), delete all the affected features from the source feature class, and append the output features back into the source.... You are right, and I have thought about that. The reason it's not optimal is that this substitution would give all lines new IDs (object ID, GlobalID, etc.) and many complex details in the Esri enterprise production environment rely on these IDs. Replacing them would break many of these connections, or at least initialise a lot of updating procedures. It would look like a lot of rivers have been deleted and a lot of new rivers have appeared.
... View more
08-15-2013
10:46 PM
|
0
|
0
|
904
|
POST
|
What is intersecting the river network? I deliberately avoided the word 'network'. What I have is a polyline feature class, which happens to be rivers, it could just as well have been roads, or something else. I have no other data. What ever you do, using the off the shelf geo-processing tools will result in a new a FeatureClass of split polylines. Exactly. All the standard tools output new feature classes. For the reasons described I can't use that.
... View more
08-15-2013
10:37 PM
|
0
|
0
|
904
|
POST
|
Hi All I have a river feature class. I want it to split at all intersections. This affect can be achieved by use of "Feature To Line (Data Management)" [ATTACH=CONFIG]26721[/ATTACH] I have no idea why this image is so annoyingly small - look in the link above to see full size... But this function will insist to write the result to a new feature class...! I work in a Production environment (specifically a Nautical Information Server) which is a central (enterprise) and Versioned Oracle data base. I want the result of the process to go back to the input feature class, replacing the original rivers. Is there a 'Production' variant of this tool? How do I achieve the desired effect in a Production environment? Best regards Martin
... View more
08-15-2013
01:35 AM
|
0
|
6
|
3368
|
POST
|
Hi Geoff, and others We did a .bat script that do all this for you. Put the lines below in a .bat file and run it. Notice that the log files SDEINTERCEPTLOG.001, SDEINTERCEPTLOG.002, SDEINTERCEPTLOG.003, ... are deleted each time you run the .bat file. So make shure you salvage them to a safe place between each run. 🙂 Martin @echo off
mkdir C:\temp
mkdir C:\temp\SDEINTERCEPTLOG
DEL /F /Q C:\temp\SDEINTERCEPTLOG\SDEINTERCEPT.doslog
DEL /F /Q C:\temp\SDEINTERCEPTLOG\SDEINTERCEPTLOG.*
date /t > C:\temp\SDEINTERCEPTLOG\SDEINTERCEPT.doslog
time /t >> C:\temp\SDEINTERCEPTLOG\SDEINTERCEPT.doslog
SET SDEINTERCEPT=crwTf
SET SDEINTERCEPTLOC=C:\temp\SDEINTERCEPTLOG\SDEINTERCEPTLOG
ECHO Check SET >> C:\temp\SDEINTERCEPTLOG\SDEINTERCEPT.doslog
SET | find "SDEINTERCEPT" >> C:\temp\SDEINTERCEPTLOG\SDEINTERCEPT.doslog
ECHO Starting ArcMap >> C:\temp\SDEINTERCEPTLOG\SDEINTERCEPT.doslog
"C:\Program Files (x86)\ArcGIS\Desktop10.1\bin\ArcMap.exe"
ECHO ArcMap stopped >> C:\temp\SDEINTERCEPTLOG\SDEINTERCEPT.doslog
ECHO Check SET >> C:\temp\SDEINTERCEPTLOG\SDEINTERCEPT.doslog
SET | find "SDEINTERCEPT" >> C:\temp\SDEINTERCEPTLOG\SDEINTERCEPT.doslog
SET SDEINTERCEPT=
SET SDEINTERCEPTLOC=
ECHO Check UNSET >> C:\temp\SDEINTERCEPTLOG\SDEINTERCEPT.doslog
SET | find "SDEINTERCEPT" >> C:\temp\SDEINTERCEPTLOG\SDEINTERCEPT.doslog
date /t >> C:\temp\SDEINTERCEPTLOG\SDEINTERCEPT.doslog
time /t >> C:\temp\SDEINTERCEPTLOG\SDEINTERCEPT.doslog
ECHO Done ... PS. You may need to change the line "C:\Program Files (x86)\ArcGIS\Desktop10.1\bin\ArcMap.exe" if you ArcMap is not installed in that directory...
... View more
06-18-2013
12:37 AM
|
0
|
0
|
186
|
POST
|
Hi Alec We had similar problems with Nautical Sollution. The communication between the Oracle Client and the Oracle Server also have a language setting. I'ts controled by a parameter in the windows registry, but I don't have the details here. Try run regedit from command line to open the regestry editor. Search for Oracle to find NLS_LANG. Turn them away from local language towards US standard. If you cant find it, mail me at work, and I'll find the exact location for you tomorrow. Best regards Martin <MaHvi@gst.dk>
... View more
04-02-2013
11:30 AM
|
0
|
0
|
1248
|
POST
|
Regarding chinese language environment. Contact the office (in china) that makes the Nautical charts for the large chinese rivers. They use Esri in a chinese context, and they are very good at it. 🙂 Martin
... View more
03-22-2013
11:30 AM
|
0
|
0
|
372
|
POST
|
Regarding chinese language environment. Contact the office (in china) that makes the Nautical charts for the large chinese rivers. They use Esri in a chinese context, and they are very good at it. 🙂 Martin
... View more
03-22-2013
11:27 AM
|
0
|
0
|
372
|
POST
|
Thanks, that worked. It created a new (minor) question though: What's the difference between Editor and Debugger? I used Editor and that generated the result I was lookuibg for. Best Regards Martin
... View more
02-08-2013
02:44 AM
|
0
|
0
|
262
|
POST
|
Hi When editing a tool validator class I do as described in the help: " ... to program a ToolValidator class, right-click your tool, click Properties, click the Validation tab, then click Edit. This opens your installed Python editor, such as IDLE or PythonWin. ... " taken from: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00150000000w000000.htm Only on my computer the pyton code opens in Notepad, not in IDLE nor PyWin ... ? QUESTION: Where do I change the setting that controls which editor is used? I run ArcGIS 10.1 on a win7 In the windows environment .py files are set to default open with .../python.exe Best Regards Martin Hvidberg
... View more
02-07-2013
10:20 PM
|
0
|
3
|
417
|
POST
|
I data reviewer, in the check: Validating domains (Maritime Charting) there is an option to do a: "Null Values Check" What, exactely do this option provide. I can't find it described in the documentation: http://resources.arcgis.com/en/help/main/10.1/index.html#/Validating_domains/0106000001sm000000/ Best regards Martin
... View more
12-04-2012
02:49 AM
|
0
|
1
|
2404
|
POST
|
Dear all We feel a need to save data in the NIS, for which there are no Feature Sub Type (FST) in the standard schema. Example (EEZ): The EEZ is a Polygon in the NIS. But we build the polygon from a Line, that is defined in our national legislation. To make sure we preserve the original data we would like to save also the EEZ Line feature in the NIS. Esri have placed the EEZ polygon in: "RegulatedAreasAndLimitsA (50) 'EXEZNE' Exclusive Economic Zone" Obviously a line can not be saved in a polygon feature layer, and the other obvious option: RegulatedAreasAndLimitsL have no FST for EEZ Question: Can I just invent a FSC and decide that I want to use e.g. no. 500 for it: "RegulatedAreasAndLimitsL (500) 'EXEZNE' Exclusive Economic Zone" If this is the way forward, could we (the Esri community) agree to always use e.g. 500-600 for 'local use', so I don't risk future conflicts? Or, should I rather use UserDefinedFeaturesL and e.g. invent "UserDefinedFeaturesL (2) 'EXEZNE' Exclusive Economic Zone" Any body have any experience here? Are there any 'best practise' to be pointed out? Best regards Martin
... View more
11-12-2012
01:50 AM
|
0
|
2
|
1279
|
Title | Kudos | Posted |
---|---|---|
1 | 04-12-2015 12:33 AM | |
4 | 03-30-2020 02:09 AM | |
1 | 10-23-2014 06:03 AM | |
1 | 09-30-2014 05:55 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|