|
POST
|
Thanks, The king of Python Dan ! I was going to show that to you but I didnt have a good screen capture on my laptop.. I have the same thing..if you click the older one it would not show...so the only thing I can is the Pyscripter 2.7 or later....the Pyscirpter for Python 2.6 would not work... Many thanks !
... View more
03-22-2015
08:02 AM
|
0
|
0
|
1860
|
|
POST
|
Would like to check with everyone that when I launched my Pyscripter and it came up asked me... Before I continue to do this, would 2.60 upgrade work ? Thanks
... View more
03-21-2015
11:59 AM
|
0
|
3
|
5506
|
|
POST
|
Can you use Mosaic Dataset instead of Raster Dataset and it is probably why you were having problems with the MrSID as Dan Patterson suggest ?
... View more
03-18-2015
08:01 PM
|
0
|
0
|
1197
|
|
POST
|
Good news ! While I have been figuring it out and looking at the help on this problem..Sigh It is been battle back and forth for me . The problem is in the Creating Mosaic Dataset.. This works ! I have made a lot of change from the original code I post yesterday... I had to copy the code from this reateMosaicDataset example 2 (stand-alone script) ArcGIS Help 10.1 it was giving several problems.... the prjfile does not work... so I add the the SpatialReference with WKID in it and make sure the code in one line..example see 26
################################################################################
# CREATE FILE GEODATABASE AND THEN CREATE MOSAIC DATASET #
################################################################################
# Name: CreateFileGDB_Example2.py
# Description: Create a file GDB
# Import system modules
import arcpy,os,sys
arcpy.env.workspace = "C:/workspace"
# Set local variables
out_folder_path = "C:/workspace"
out_name = "Think.gdb"
# Execute CreateFileGDB
arcpy.CreateFileGDB_management(out_folder_path, out_name)
# Creating new Mosaic Dataset within Existing File Geodatbase
try:
gdbname = "Think.gdb"
mdname = "SeeIfThisWorks"
prjfile = arcpy.SpatialReference(26913)
noband = "3"
pixtype = "8_BIT_UNSIGNED"
pdef = "NONE"
wavelength = ""
arcpy.CreateMosaicDataset_management(gdbname, mdname, prjfile, noband,pixtype, pdef, wavelength)
except:
print "Create Mosaic Dataset failed"
... View more
03-18-2015
10:02 AM
|
1
|
0
|
2316
|
|
POST
|
I am trying to create file geodatabase and create a mosaic dataset; however I do know that creating a file geodatabase works but the mosaic dataset is not... I think there must be a way to force the dataset within the file geodatabase but it is blocking me ? Take a look at my codes Thanks. ################################################################################
# CREATE FILE GEODATABASE AND THEN CREATE MOSAIC DATASET #
################################################################################
# Name: CreateFileGDB_Example2.py
# Description: Create a file GDB
# Import system modules
import arcpy
# Set local variables
out_folder_path = "C:/workspace"
out_name = "test.gdb"
# Execute CreateFileGDB
Test = arcpy.CreateFileGDB_management(out_folder_path, out_name)
# Creating new Mosaic Dataset within Existing File Geodatbase
# Set NAD 1983 UTM Zone 13N
sr = arcpy.SpatialReference(26913)
mdname = "/SeeIfThisWorks"
try:
# To see if the file exists or not
Test = arcpy.CreateFileGDB_management(out_folder_path, out_name)
#Then create the file
mdname= arcpy.CreateMosaicDataset_management(out_folder_path,Test,mdname)
except:
str = "Your Mosaic Dataset" +str2+"" "is done created"
str2 = "Test"
print str + str2
... View more
03-17-2015
02:34 PM
|
0
|
6
|
5769
|
|
POST
|
I would export your polygons to geodatabase first and have the polygon as a backup.. Once you export it to geodatabase then add the topology and that should help you find the overlaps.... To learn about it go here...ArcGIS Help 10.1
... View more
03-16-2015
10:40 AM
|
1
|
0
|
1317
|
|
POST
|
Thank you all. First of all, The file for the FTP server I have checked is no longer there or may have been moved; however, I tweaked and change to a different file to test it. The script is working now . If you compare the scripts I post earlier and the change I made.... I would like to Thank to Owen Earley for pointing me to the missing "else". That worked ! # Import modules
import ftplib
import os
import socket
from ftplib import FTP
HOST = "ftp.nifc.gov"
DIRN = "Incident_Specific_Data/ALASKA/DataRequests/"
FILE = "AK_UIA_polygon_data.gdb.zip"
# Create a block to connection or not
try:
f = ftplib.FTP(HOST)
except (socket.error, socket.gaierror), e:
print "ERROR: cannot reach" % HOST
else:
print '"***Connected to host "%s"' % HOST
# to log in anonymously
try:
f.login()
except ftplib.error_perm:
print "ERROR: cannot login anonymously"
f.quit()
else:
print '***Logged in as anonymous'
# To change to the directory in DIRN
try:
f.cwd(DIRN)
except ftplib.error_perm:
print 'ERROR: cannot CD to" "%s' % DIRN
f.quit()
else:
print '***Changed to "%s" folder' % DIRN
# Use the FTP Directory to retrieve KMZ
try:
f.retrbinary('RETR %s' % FILE, open(FILE, 'wb').write)
except ftplib.error_perm:
print "ERROR: cannot read file" % FILE
os.unlink(FILE)
else:
print "***Downloaded %s to CWD" % FILE
# Disconnect from FTP
f.quit()
... View more
03-15-2015
04:29 PM
|
0
|
0
|
3628
|
|
POST
|
# Import moduels
import ftplib
import os.path
from ftplib import FTP
HOST = 'ftp.nifc.gov'
DIRN = '/incident_Specific_Data/ALASKA/Fire_Perimeters/20090805_1500'
FILE = 'FirePerimeters_20090805_1500.kmz'
# Create a block to connection or not
try:
f = ftplib.FTP(HOST)
except (socket.error, socket.gaierror), e:
print 'ERROR: cannot reach "%s"' % HOST
print '*** Connected to host "%s"' % HOST
# to log in anonymously
try:
f.login()
except ftplib.error_perm:
print 'ERROR: cannot login anonymously'
f.quit()
print '*** Logged in as "anonymous"'
# To change to the directory in DIRN
try:
f.cwd(DIRN)
except ftplib.error_perm:
print 'ERROR: cannot CD to "%s"' % DIRN
f.quit()
print '*** Changed to "%s" folder' % DIRN
# Use the FTP Directory to retrieve KMZ
try:
f.retrbinary('RETR %s' % FILE, open(FILE, 'wb').write)
except ftplib.error_perm:
print 'ERROR: cannot read file "%s"' % FILE
os.unlink(FILE)
else:
print '*** Downloaded "%s" to CWD' % FILE
# Disconnect from FTP
f.quit() Here is the full code Thanks.
... View more
03-15-2015
10:40 AM
|
0
|
4
|
3628
|
|
POST
|
# Use the FTP Directory to retrieve KMZ
try:
f.retrbinary('RETR %s' % FILE, open(FILE, 'wb').write)
except ftplib.error_perm:
print 'ERROR: cannot read file "%s"' % FILE
os.unlink(FILE)
else:
print '*** Downloaded "%s" to CWD' % FILE
Do they seem right to you ? This is from the book Programming ArcGIS 10.1 with Python cookbook. When I ran it in Pyscripter 2.5.3.0 and it gave me the error : Traceback (most recent call last): File "C:\ArcpyBook\Appendix2\ftp.py", line 45, in <module> f.retrbinary('RETR %s' % FILE, open(FILE, 'wb').write) File "C:\Python27\ArcGIS10.1\lib\ftplib.py", line 398, in retrbinary self.voidcmd('TYPE I') File "C:\Python27\ArcGIS10.1\lib\ftplib.py", line 248, in voidcmd self.putcmd(cmd) File "C:\Python27\ArcGIS10.1\lib\ftplib.py", line 178, in putcmd self.putline(line) File "C:\Python27\ArcGIS10.1\lib\ftplib.py", line 173, in putline self.sock.sendall(line) AttributeError: 'NoneType' object has no attribute 'sendall'
... View more
03-15-2015
09:43 AM
|
0
|
6
|
8439
|
|
POST
|
While this is a good tempting to use it on your personal computer it is a good to have; however my computer is under the Government so we are not allowed to download these programs on them. We were able to recovery it by requesting our IT department to restore it.
... View more
03-14-2015
08:03 PM
|
1
|
0
|
1497
|
|
POST
|
Do you have a good website that give the examples ?
... View more
03-14-2015
10:09 AM
|
0
|
1
|
5895
|
|
POST
|
What does it mean hardcorded ? I am trying to get a grasp of what it means ? Thanks
... View more
03-14-2015
09:27 AM
|
0
|
9
|
9650
|
|
POST
|
I am not sure if you are aware that there is another good site for you to read... it is called GIS Stackexchange where everyone share their GIS problems. I looked it up for your similiar situation and found a lot of good information... The website is Geographic Information Systems Stack Exchange Type Mosaic Dataset Good luck.
... View more
03-09-2015
08:11 AM
|
0
|
1
|
714
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-08-2026 10:11 AM | |
| 1 | 09-01-2022 03:43 PM | |
| 1 | 09-28-2020 09:34 AM | |
| 2 | 09-24-2025 09:48 AM | |
| 1 | 09-22-2025 08:29 AM |
| Online Status |
Offline
|
| Date Last Visited |
Monday
|