|
POST
|
Linking or stacking lots of data to a single point can be accomplished by data design using relates. For example pictured below is a point field that is linked to an inspection table. For any one point, we can have many inspections attached to the point. In my geodatabase I have linked the Inspection table to Points. In GIS I would use a relate to joint my points to the Inspection table linking on a common field found in both "LocationID". After you use a relate if you click the point with the information button all of its "related" inspection will show for the one point. Joins and relates There are other ways to address this issue including programming or the carefull use of joins.....
... View more
02-02-2017
07:40 AM
|
4
|
1
|
3755
|
|
POST
|
If you want to stick with a script: def FindLabel ( [Well_Nme], [Sulfate_9_2016] ):
lbl = [Well_Nme] + "\r\n"
if float([Sulfate_9_2016]) > 300000:
lbl = lbl + "<CLR red='255'>" + [Sulfate_9_2016] + "</CLR>"
else:
lbl = lbl + "<CLR red='0'>" + [Sulfate_9_2016] + "</CLR>"
return lbl
... View more
01-23-2017
07:47 AM
|
0
|
0
|
3602
|
|
POST
|
Looking quickly at your question and drawing.... I would say that is something you do not want to do. I am assuming you data is attached to your geometry so any editing would have to occur on the complete geometry segment. That said, and the fact that nothing is impossible, one way to accomplish your desire would involve: 1. Split your geometries at the border of your AOI. 2. By programmatic means lock the geometries that are outside of the AOI (if segment outside of AOI polygon then don't allow edits) HOWEVER, I would highly recommend you do not go down this path. In time your data-set will become unmanageable. The best way may be user training to not edit outside of your AOI's
... View more
01-05-2017
07:36 AM
|
1
|
0
|
586
|
|
POST
|
I am currently designing a dynamic Engineering plan retrieval system that is mapped based... this data design is a work in progress. Linked to the Data components are layers that share common geometries (Project boundaries, Bridges, Roads, Route LRS ....) many of these data fields are common to one or many of the layers so I am designing this data as independent tables that share a link to the "layers". So instead of having one layer with 55 fields or more, each of my geometric layers only contain those field and links to the data. I can bring the data tables into an esri mxd so it will always be available for querying, joining and relating.... Hope this helps you vision your data and your requirements....
... View more
01-04-2017
07:44 AM
|
0
|
0
|
3252
|
|
POST
|
Irregardless, the technique would still apply when dealing with geometry? GEOS API | Django documentation | Django Using the open source GEOS, I believe it is called a linear ring .... In any event, this is ESRI forum and you are correct that this is not the best place for Django questions.
... View more
12-20-2016
07:32 AM
|
0
|
0
|
954
|
|
POST
|
I don't really understand your question but it sounds like you could use a simple buffer and Intersection for your solution... Buffer your starting point by the (distance traveled in 3 minutes) so you would buffer the starting point by 3 Km. Wherever the buffer intersects your roads system NSEW would be the position of the vehicle 3 minutes from start. Hope this helps. Ted
... View more
12-05-2016
08:04 AM
|
0
|
2
|
954
|
|
POST
|
You would have to employ some pattern recognition .... Here is an good write up about going about identifying some basic geometric shapes..... this may get you started in determining what you need if you need real time automation. image processing - 2D Shape recognition algorithm - looking for guidance - Stack Overflow Some other initiatives that looked interesting: https://www.gislounge.com/automating-extracting-gis-data-scanned-maps/ http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.441.6897&rep=rep1&type=pdf
... View more
11-23-2016
07:42 AM
|
0
|
0
|
2374
|
|
POST
|
First of all a screen shot of your code will not get you much help.... it is hard to see for some of us older folks..... formatted code will allow us to cut paste and see if we get similiar errors as yours.... In any event .... I put together some pseudo code taken from some of my applications that perform something like you want.... hopefully this will point you in the right path Sub CalculateField()
'Set the pFeatureClass to be the feature class of the top layer in the active map -- if yours is different
'need to set the Layer index for your layer -- much help on finding the layer on the esri development site
Dim pMxDoc as IMxDocument
Dim pFeatLayer as IFeatureLayer
Dim pFeatureClass as IFeatureClass
Dim pFields as IFields
Set pMxDoc = My.ArcMap.Document
Set pFeatLayer = pMxDoc.FocusMap.Layer(0)
Set pFeatureClass = pFeatLayer.FeatureClass
'Calculate the field values
Dim pCursor As ICursor
Dim pCalculator as ICalculator
'Prepare a cursor with all records from your layer
Set pCursor = pFeatureClass.Update(Nothing, True)
'Define a calculator
Set pCalculator = New Calculator
'--------------
'NOTE: Male_Pop, Female_Pop, and GenderStr MUST Exist within the Cursor so you may want to test for 'existence prior to the calculation with FindFields!
Dim fields as IFields = pFeatureClass.Fields
Dim fieldIndex as Integer
if fields.FindField("Male_Pop") = -1 then
msgbox("Male_Pop not found in layer")
'do something to fix this ...
end if
'... do the same for Female_Pop and for GenderStr
'--------------
'Be sure Female_Pop is not Zero or null
With pCalculator
Set .Cursor = pCursor
Expression = "(([MALE_POP]/[FEMALE_POP]))*100"
.Field = "GenderStr"
End With
'Calculate the field values
pCalculator.Calculate
End sub
... View more
11-21-2016
08:25 AM
|
1
|
0
|
876
|
|
POST
|
Test the field before you set its value? if (String.IsNullOrEmpty(myString))
{
//do something
} x ==null -- x==string.Empty Tests if you need to determine one or the other? Why would you set a field to null when you have an non-null constraint within the database (sounds like a recipe for problems ) Handle nulls and emptyness before doing any database transactions.
... View more
11-18-2016
08:12 AM
|
0
|
1
|
1172
|
|
POST
|
Found this to be a good starting point --- since I did not have python installed when I was learning.... Learn Python - Free Interactive Python Tutorial
... View more
11-16-2016
08:24 AM
|
2
|
0
|
3404
|
|
POST
|
def FindLabel ( [SR], [Shape_Length] ):
myLength = [Shape_Length]
if myLength > 150 :
return [SR] + "-" + str(myLength)
else:
return [SR] + "++" + str(myLength)
... View more
11-16-2016
07:54 AM
|
0
|
0
|
1916
|
|
POST
|
Sometimes a little editing can go a long ways in saving time and headaches.... unless you want to run the cursor script the only other automatize way I can think of is to write a python script that activates on mxd open event which would populate/referesh the "myLength" column for you -- but that would involve writing an add-in.
... View more
11-14-2016
12:15 PM
|
0
|
5
|
1916
|
|
POST
|
ODOT posts some GIS data here ftp://ftp.odot.state.or.us/tdb/trandata/GIS_data/ ....
... View more
11-09-2016
07:51 AM
|
0
|
1
|
1259
|
|
POST
|
You cannot simply pass the geometry into a label string (At least I have never figured out how) so you would have to do something like this: import arcpy
lyrName = "AADT_2015"
shapeDict = {}
with arcpy.da.SearchCursor(lyrName, ("OID@","SHAPE@LENGTH")) as cursor:
for row in cursor:
shapeDict[row[0]] = row[1]
def FindLabel([OBJECTID]):
oid = int([OBJECTID])
if shapeDict[oid] > 50:
return "BIG"
else:
return "Small" Personally I feel that is over kill..... If I were doing it I would create a new field say myLength as a double... use the field calculator to calculate the segment length (!shape.length! I believe )...then pass [myLength] to your label function as you wrote it above using [myLength] instead of [SHAPE.LEN]
... View more
11-08-2016
07:48 AM
|
0
|
7
|
1991
|
|
POST
|
But in practice it does not seems to work out that way! I have a multi page function that I am building that test all sorts of nasties.... that should have been picked up by "None". -- lots of your refresher stuff found its way in my function! (I mean def) Miss my onesize fits all code from vb ... if trim([myfield]) & "" = "" then ... Never really had to test for blank or null stuff.....ahhh but life moves on!
... View more
11-03-2016
12:09 PM
|
0
|
3
|
2827
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-18-2018 09:46 AM | |
| 1 | 05-23-2018 08:30 AM | |
| 9 | 04-18-2019 07:15 AM | |
| 1 | 05-04-2016 08:15 AM | |
| 1 | 03-24-2017 01:22 PM |
| Online Status |
Offline
|
| Date Last Visited |
10-18-2023
06:40 PM
|