|
POST
|
You can't "add" features to OSM, unless you are a subscribed editor to the OSM system. But obviously you can plot any of your data on top of it.
... View more
05-16-2016
01:47 AM
|
0
|
0
|
917
|
|
POST
|
OSM is a standard basemap. Just click on the little arrow next to the add data button. Second options is to add basemap. OSM is one of those.
... View more
05-16-2016
01:45 AM
|
0
|
0
|
917
|
|
POST
|
Not sure what your problem is here. It does look like the output raster is doing exactly as you described. Using the cell centre. All the cells outside your rather artificial example will be no data. What are you trying to achieve and why?
... View more
05-16-2016
01:41 AM
|
0
|
0
|
3432
|
|
POST
|
Then I still think you have messed up the coordinate system of the Lambert data. I think it should look like this : Note, this is the same parameters as your original, but the GCS is specified as WGS84
... View more
05-13-2016
07:44 AM
|
0
|
1
|
1751
|
|
POST
|
Of course Dan, But I am running 10.3.1 (soon moving to 10.4). Haven't got anywhere near Pro yet. Need to buy a deep blue before I do.
... View more
05-12-2016
04:18 AM
|
0
|
2
|
3213
|
|
POST
|
And what are the details of your clip polygon? See that error there - about empty geometry. I think that the underlying raster and your clip geometry are not in the same coordinate system.
... View more
05-12-2016
04:15 AM
|
0
|
1
|
1751
|
|
POST
|
There was a median calculation tool posted here somewhere by Caleb Mackey. But no joy with search. So here it is again. '''
Written By Caleb Mackey
4/17/2013
Calculates Median Statistics
'''
import arcpy, os, sys, traceback
# env settings
arcpy.env.overwriteOutput = True
arcpy.env.qualifiedFieldNames = False
def GetMedian(in_list):
sorted_list = sorted(in_list)
median = int(round(len(sorted_list) / 2))
if len(sorted_list)%2==0:
med_val = float(sorted_list[median-1]
+ sorted_list[median]) / 2
else:
med_val = sorted_list[median]
return med_val
def GetMedianValues(source_fc, new_table, case_field, value_field):
''' Generates a table with Median Values, summarized by case_field. If the
goal is to get the median for the entire table, use a case field that has
the same value for all records.
source_fc - input feature class to compute median statistics for
new_table - output table
case_field - similar to dissolve field, computes stats based on unique values in this field
value_field - field that contains the actual values for statistics; must be numeric
'''
# Get unique value list for query
print 'starting cursor'
with arcpy.da.SearchCursor(source_fc, [case_field]) as rows:
un_vals = list(set(r[0] for r in rows))
lyr = arcpy.MakeFeatureLayer_management(source_fc,'source_layer')
values = {}
# Get Median UseValue for each station name
for st in un_vals:
query = '"{0}" = \'{1}\''.format(case_field, st)
arcpy.SelectLayerByAttribute_management(lyr, 'NEW_SELECTION', query)
use_vals = []
with arcpy.da.SearchCursor(lyr, [value_field]) as rows:
for row in rows:
if row[0] != None:
use_vals.append(row[0])
if len(use_vals) > 0:
median = GetMedian(use_vals)
values[st] = [median, len(use_vals)]
# Create new Summary Statistics table with median
#
if arcpy.Exists(new_table):
arcpy.Delete_management(new_table)
arcpy.CreateTable_management(os.path.split(new_table)[0],os.path.basename(new_table))
# Get field names and types
for field in arcpy.ListFields(source_fc):
if field.name in [case_field, value_field]:
ftype = field.type
name = field.name
length = field.length
pres = field.precision
scale = field.scale
if name == value_field:
if new_table.endswith('.dbf'):
name = 'MED_' + value_field[:6]
else:
name = 'MED_' + value_field
value_field2 = name
arcpy.AddField_management(new_table,name,ftype,pres,scale,length)
# Add frequency field
arcpy.AddField_management(new_table,'FREQUENCY','LONG')
# Insert rows
with arcpy.da.InsertCursor(new_table, [case_field, value_field2, 'FREQUENCY']) as rows:
for k,v in sorted(values.iteritems()):
rows.insertRow((k, v[0], v[1]))
# report results
print 'Created %s' %os.path.basename(new_table)
arcpy.AddMessage('Created %s' %os.path.basename(new_table))
# .dbf's are automatically given a 'Field1' field...Clean this up
try:
if new_table.endswith('.dbf'):
arcpy.DeleteField_management(new_table, 'Field1')
except:
pass
print 'Done'
if __name__ == '__main__':
## # testing
## source_fc = r'C:\Testing\Test.gdb\CSR_by_TWP'
#### new_table = r'C:\Testing\Test.gdb\Median_CSR' #gdb test
## new_table = r'C:\Testing\Median_CSR.dbf' #dbf test
## case_field = 'NAME'
## value_field = 'AVE_CSR'
# Script tool params
source_fc = arcpy.GetParameterAsText(0)
new_table = arcpy.GetParameterAsText(1)
case_field = arcpy.GetParameterAsText(2)
value_field = arcpy.GetParameterAsText(3)
GetMedianValues(source_fc, new_table, case_field, value_field)
... View more
05-12-2016
12:07 AM
|
1
|
1
|
3213
|
|
POST
|
Can you show us the extent of that OSBG raster. Also on the layer properties.
... View more
05-11-2016
11:46 PM
|
0
|
0
|
2719
|
|
POST
|
And, how closely are you expecting these 2 datasets to align anyway. The one has 500m pixels the other 50m...???
... View more
05-11-2016
08:06 AM
|
0
|
1
|
2719
|
|
POST
|
What was the coordinate system for your original GRS80 based data? If you messed it up before reset it back to the original (or get the data again). Then in Catalog, look at the coordinate system tab on the properties page. There you should be able to modify this coordinate system. But only change the GCS part. From GRS 80 to WGS84. Then and only then will you have a transformation available between OGSB and WGS when you do the project.
... View more
05-11-2016
08:05 AM
|
0
|
0
|
2719
|
|
POST
|
So, you are not georeferencing the CAD file, just spatially adjusting it? Is this just a portion of you data, because it looks like you have all those lots already in your main feature?
... View more
05-10-2016
12:46 PM
|
0
|
1
|
5322
|
|
POST
|
And, I assume that you already have a decent connection naming convention? We use something like this for the file name of the connection - data base name @ server name (user) . sde or something like that.
... View more
05-10-2016
12:27 PM
|
0
|
0
|
1890
|
|
POST
|
Well they don't have to live in /users/username/appdata.. etc etc. Simply create a directory and subdirs of your choice on your local or remote drive and copy and organize there.
... View more
05-10-2016
12:24 PM
|
0
|
1
|
1890
|
|
POST
|
You don't mention which Arc version you are on - 10.x ? Pro ? The snapping features, what are they and where do they come from (enterprise geodb, fgdb, shape?) I have had difficulties in the past with sometimes snapping (the auto version) not working properly with various enterprise hosted features, but that was solved by resorting to classic snapping where you actually specified what features were turned on for snapping. Is the CAD file already properly georeferenced and has a defined coordinate system? Or is this part of the georeferencing process - spatial adjustment?
... View more
05-10-2016
12:20 PM
|
0
|
1
|
5323
|
|
POST
|
Either use the integrate tool as Melinda says or in an ArcMap edit session you can use the "planarise" tool on the advanced editing toolbar.
... View more
05-09-2016
11:47 PM
|
0
|
0
|
1916
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-08-2015 11:28 PM | |
| 1 | 12-20-2013 08:59 PM | |
| 1 | 05-14-2014 10:38 PM | |
| 1 | 12-16-2013 09:05 PM | |
| 1 | 05-31-2019 02:50 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|