POST
|
Came across these plus codes on Google Maps lately. I think this would be handy to locate Assets on the ground where there are no street addresses. https://plus.codes/5R4MG2JF+337 is the our Office’s entry off the George Street! https://github.com/google/open-location-code/wiki/Evaluation-of-Location-Encoding-Systems This system, which is similar to What3Words, developed by Google addresses some of the shortcomings. This is available as a Open Source so anyone can build on it. The adoption rate seems to be picking up compared to W3W as it is easily located on Google Maps (Driving Directions etc). I would like this system to include the third dimension (3D addressing) too (above or below ground and how far from ground level etc). Perhaps, throw in time too (4D addressing) for scenarios such as deliver my parcel to my office between certain hours or deliver it to my home on weekends/public holidays etc. Handy for drone deliveries 🙂 What do you think of this Plus Code as an alternate addressing system? Welcome your thoughts.. Thanks, Thiru
... View more
10-28-2018
06:10 PM
|
1
|
2
|
2993
|
POST
|
Hi, if its not too late, have you tried Optimized Hot Spot Analysis—Help | ArcGIS for Desktop Cheers, Thiru
... View more
10-10-2018
08:40 PM
|
0
|
0
|
767
|
POST
|
Hi everyone, Anyone attending OZRI, Australian-version of ESRI User Conference next month? Australian Esri User Conference – Ozri 2018 | Esri Australia Sydney 13 Nov Brisbane 16 Nov Melbourne 21 Nov I am looking forward to attend OZRI (Brisbane) for the first time!
... View more
10-09-2018
07:17 PM
|
0
|
0
|
742
|
POST
|
Hi Sam, How old is the database? I had similar issue with a database that had too much old geoprocessing history and old metadata. Ask your DBA to do a backup before you do this (Just in case) If you want to remove the geoprocessing history from the database, use the following tool Clear Geoprocessing History (Pre10.5) https://www.arcgis.com/home/item.html?id=45a59e9590484709bca7b5de83d957ce You can run the tool in batch mode if there are many feature classes in your SDE. If you are able to run python scripts, you can refer to the following article. SDE root takes forever to load? Check Documentation field on GBD_Items table (SDE WORKSPACE METADATA). – JING THE GIS GU… Let me know if this resolves the issue. Good luck, Thiru
... View more
09-13-2018
10:41 PM
|
1
|
1
|
1517
|
POST
|
Thanks Dan Patterson for your help. I could not mark two entries as Correct Answers. I am choosing to go with dictionary approach in this case. Once I finish my script, I will add it here so it might benefit someone else. This is what I love about GeoNet. I am not alone when it comes to learning. Hopefully, I can share my python expertise when I learn enough. Regards, Thiru
... View more
08-20-2018
08:55 PM
|
0
|
0
|
275
|
POST
|
Hi Randy, thanks for the reply. I tried your code. It works but I have got duplicate Projects. #import modules
import os
import arcpy
from arcpy import env
from datetime import datetime
import numpy as np
#assign variables
in_fc = r'C:\Working\airphoto.gdb\airphoto_index'
fields = ['FLYING','FILM']
gdb = 'C:\Working\images.gdb'
sourceDir = "O:\\airphoto\\75dpi\\"
in_mosaic = 'C:\Working\images.gdb\test'
prjfile = arcpy.SpatialReference(3857)
d = {}
#create lists
Years = []
Films = []
YearFilmString = []
FilmList = set()
#read feature class columns and iterate through rows
with arcpy.da.SearchCursor(in_fc,fields) as cursor:
for row in cursor:
#extract year from datetime field
if str(row[0])[:4] not in d:
d[str(row[0])[:4]] = [row[1]]
else:
d[str(row[0])[:4]].append(row[1])
print d
'''
for k in d.keys():
print k
print d
''' Result: '1974': [3005, 3008, 3008, 3008, 3008, 3005, 3005, 3005, 3005, 3008, 3008, 3006, 3006, 3004, 3004, 3004, 3004, 3004, 3004, 27027, 2775, 3021, 3021, 3005, 3005, 3008, 3008, 3008, 3008, 3008, 3005, 3005, 3008, 3008, 3008, 3006, 3006, 3004, 3004, 3004, 3021, 3021, 2775, 3005, 3008, 3005, 3005, 3004, 3004, 3004, 3005, 3005, 3005, 3005, 3005, 3008, 3008, 3008, 3005, 3005, 3005, 3005, 3005, 3005, 3008, 3008, 3008, 3008, 3008, 3006, 3004, 2985, 3021, 2775, 3005, 3005, 3005, 3008, 3008, 3008, 3008, 3008, 3005, 3005, 3005, 3005, 3005, 3006, 3004, 3004, 3004, 3004, 3005, 2983, 3021, 3021, 27027, 2775, 2775, 3005, 3005, 3005, 3004, 2983, 2983, 3005, 3005, 3008, 3008, 3008, 3008, 3008, 3008, 3005, 3005, 3005, 3005, 3005, 3005, 3005, 3005, 3008, 3006, 3006, 3004, 3004, 3004, 3004, 3004, 3004, 3008, 3005, 2985, 2985, 2983, 3021, 3021, 2775, 3005, 3005, 3008, 3008, 3005, 3008, 3008, 3008, 3008, 3004, 3004, 2983, 3005, 3005, 3005, 3005, 3008, 3008, 3008, 3008, 3008, 3005, 3005, 3006, 3006, 3006, 3006, 3004, 3004, 3004, 2985, 3005, 3005, 3005, 3005, 3005, 3008, 3008, 3008, 3008, 3008, 3008, 3008, 3008, 3005, 3005, 3005, 3005, 3005, 3005, 3008, 3006, 3006, 2985, 2985, 2985, 2985, 3021, 3021, 3021, 27027, 3021], '1973': [2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618, 2618], '1972': [2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626, 2626], '1970': [2183, 2183, 2183, 2183, 2183, 2183, 2183, 2183]} I am trying to get unique values for each key. e.g., '1974': [3008, 3005, 3006, 3004, 27027, 2775, 3021, 2985, 2983]
... View more
08-16-2018
10:46 PM
|
0
|
2
|
275
|
POST
|
Dan's method: #import modules
import os
import arcpy
from arcpy import env
from datetime import datetime
import numpy as np
#assign variables
in_fc = r'C:\Working\airphoto.gdb\airphoto_index'
fields = ['FLYING','FILM']
gdb = 'C:\Working\images.gdb'
sourceDir = "O:\\airphoto\\75dpi\\"
in_mosaic = 'C:\Working\images.gdb\test'
prjfile = arcpy.SpatialReference(3857)
#create lists
Years = []
Films = []
YearFilmString = []
FilmList = []
#read feature class columns and iterate through rows
with arcpy.da.SearchCursor(in_fc,fields) as cursor:
for row in cursor:
#extract year from datetime field
yearString = (str(row[0])[:4])
Years.append(yearString)
filmString = row[1]
Films.append(filmString)
keys = sorted(list(set(Years)))
a = np.array(list(zip(Years, Films)), dtype = [('Years', '<i4'), ('Films', 'U2')])
out=[]
for i in keys:
kv = [i]
idx = np.where(a['Years'] == i)
vals = a[idx]['Films']
kv.append(vals.tolist())
out.append(kv)
print out
... View more
08-16-2018
10:32 PM
|
0
|
1
|
1614
|
POST
|
Hi Dan, tried this. I am getting empty list for the Projects. [['1944', []], ['1948', []], ['1956', []], ['1957', []], ['1958', []], ['1959', []], ['1962', []], ['1963', []], ['1964', []], ['1968', []], ['1969', []], ['1970', []], ['1972', []], ['1973', []], ['1974', []], ['1976', []], ['1977', []], ['1978', []], ['1979', []], ['1980', []], ['1981', []], ['1982', []], ['1983', []], ['1984', []], ['1985', []], ['1986', []], ['1988', []], ['1989', []], ['1990', []], ['1991', []]] Here's a subset of my FILMS list- 5042, 2985, 2985, 2985, 2985, 3021, 3021, 3021, 4095, 4095, 4095, 4095, 3604, 2020, 3930, 2004, 798, 798, 2584, 2593, 3825, 3825, 2618, 27027, 572, 798, 798, 798, 798, 1317, 1317, 1317, 3825, 890, 890, 798, 798, 3614, 1317, 1317] I suspected it might be due to array data type U2 being wrong. Tried substituting with string equivalent S10. Did not work. I got an empty list for the Projects. Will post the python code as a reply to the original question.
... View more
08-16-2018
10:30 PM
|
0
|
2
|
1614
|
POST
|
Hi Dan, it works fine. All the mosaics (T1960, T1972..) are created with prefix "T" just because, the mosaic names cant start with a number. I have not figured out how to construct the list of films (projects) for each year and this is where I need help from. I was reading your List Comprehension posts (Great contributions, btw) and could not figure how I can apply it. Do I use array or dictionary?
... View more
08-16-2018
06:30 PM
|
0
|
0
|
1614
|
POST
|
Thanks, Dan. I copied and pasted partial code. My bad. Checked it. I have updated the snippet now.
... View more
08-16-2018
06:01 PM
|
0
|
2
|
1614
|
POST
|
Hi Python experts, I am writing my first python script and would need some advice on how to read and manipulate a list. On my network drive, I have several folders named after Project and they belong to one or more Years. I have a FGDB feature class in which I have 2 desired columns FLYING, FILMNAME representing Year, Project respectively. For e.g., Year Project 1960 A 1972 B 1980 C 1972 D 1980 E 1980 F 1960 G 1972 H 1972 I 1960 J I would like to read all the rows and create one mosaic data set for each Year and add the Project into each Year's mosaic . e.g, 1960 will have A;G;J 1972 will have B;D;H To do this, I would like to get two lists 1. a list of unique Years - to create empty mosaics 2. a list of Projects per Year - to append airphoto folders to each mosaic Below is the code that does the first list. Any pointers on how to progress further would be much helpful. Thanks in advance. #import modules
import os
import arcpy
from arcpy import env
from datetime import datetime
#assign variables
in_fc = r'C:\Working\airphoto.gdb\airphoto_index'
fields = ['FLYING','FILMNAME']
gdb = 'C:\Working\images.gdb'
sourceDir = "O:\\airphoto\\75dpi\\"
in_mosaic = 'C:\Working\images.gdb\test'
prjfile = arcpy.SpatialReference(3857)
#create lists
Years = []
Films = []
YearFilmString = []
FilmList = []
#read feature class columns and iterate through rows
with arcpy.da.SearchCursor(in_fc,fields) as cursor:
for row in cursor:
#extract year from datetime field
yearString = (str(row[0])[:4])
Years.append(yearString)
filmString = row[1]
Films.append(filmString)
uniqYears = sorted(set(Years))
uniqYearsList = list(uniqYears)
#for each year, create one mosaic
for i in uniqYearsList:
x = "C:\Working\images.gdb\T"+i
if arcpy.Exists(x):
print "mosaic already exists, skipping..."
continue
else:
arcpy.CreateMosaicDataset_management(gdb,i,prjfile,'','','','')
print i, "mosaic created"
... View more
08-16-2018
12:07 AM
|
0
|
14
|
2708
|
POST
|
Hi, what stops you from uploading an "audio only" video to Youtube? Use any video editing program such as Windows Movie Maker and add a static picture and audio, then your 'video' will play from Youtube.
... View more
06-25-2018
12:08 AM
|
0
|
0
|
1020
|
POST
|
The long-winded solution that I came up with so far is this: I have used the Graduated Symbols approach and use Area field and have one symbol to capture from the range (smallest area to largest area polygon) in the layer. Unable to edit the range manually, I had to create a fake layer that represented a smallest possible polygon and a largest possible polygon and created a symbology layer file and applied it against the real layers. I would appreciate if anyone has a better solution. Thanks.
... View more
03-20-2018
05:28 PM
|
0
|
1
|
2735
|
POST
|
In ArcCollector, our field staff are having difficulty seeing the polygons at regional scale. So, I thought of symbolising them as point flags (i.e., represent the polygons as points on-the-fly) in ArcMap and publish them as WMS so they will be visible regional scale . I could not do this easily as I could do in QGIS. Tried Representations in ArcMap, without any success. How do you symbolise polygons as points (centroids ideally but corner points will do sufficient) in ArcMap or ArcCollector. I have tried ArcGIS Desktop 10.2 and 10.3 to solve this issue unless there is something better in later versions.
... View more
03-20-2018
05:26 PM
|
0
|
3
|
4798
|
Title | Kudos | Posted |
---|---|---|
1 | 05-08-2022 10:43 PM | |
1 | 09-13-2018 10:41 PM | |
9 | 02-28-2018 07:37 PM | |
2 | 08-29-2018 05:14 PM | |
1 | 10-28-2018 06:10 PM |
Online Status |
Offline
|
Date Last Visited |
05-22-2023
04:40 AM
|