|
POST
|
Or is there anyway that I can view the source code of dissolve or merge process tool? There is no need to use any scripting. You can do this with the basic geoprocessing tools and a simple ModelBuilder model that chains the tools together. 1. Use the buffer tool to make your parcels have a 100 feet buffer around them. 2. Dissolve the buffered output on owner name with the option that makes single part polygons. 3. Use the Spatial Join Tool on the original parcels and the Buffered and Dissolved output using the One to Many option (make sure the original parcels are the primary input and the Dissolved polygons are the sencondary input). 4. Select all the results of the Spatial Join where the Owner name of the original polygon is the same as the owner name of the dissolved polygon. 5. Dissolve the Spatial Join output selection using the Owner Name together with the FID of the dissolved polygon and use the multi-part option. The final dissolve will have all parcels with the same owner name that are within 100 feet of each other dissolved using the original parcel boundaries. Multiple polygons for the same owner name will exist in the output if there were multiple areas that did not dissolve together when the buffer was applied.
... View more
05-09-2013
06:04 AM
|
0
|
0
|
10568
|
|
POST
|
Hi, Solved this myself in the end if anyone may be interested.. Maybe not the slickest of models as no iterators involved but it works. Select by attributes (analysis) set output to use in memory results Input results to Calculate field tool Repeat the select and calculate for the various group selections and finally merge all the calculate field results into a new feature class. Mark You did not need to do any Select by Attribute if you had created a single Field Calculator expression that used a Select Case structure. The Output field would be your URL field. Parser: VB Script Use Codeblock: checked Codeblock: If IsNull([Route_ID] Then Output = [URL_Field] ' Don't change URL field value Else Select Case [Route_ID] Case "Mon1", "Mon2", "Mon3" Output = "The URL for Monday" Case "Tue1", "Tue2", Tue3" Output = "The URL for Tuesday" ' Etc. Case Else Output = [URL_Field] ' Don't change URL field value End Select End If Expression: Output
... View more
05-09-2013
05:49 AM
|
0
|
0
|
2119
|
|
POST
|
In VB Script you would do the following: Parser: VB Script Use Codeblock: checked Codeblock: If [Other_Field] = 1 Then
Output = "Minor"
ElseIf [Other_Field] = 2 Then
Output = "Major"
Else
Output = [Layer] ' Use the existing value of the field being calculated so that it won't change.
End If expression: Output
... View more
05-07-2013
10:45 AM
|
4
|
2
|
3576
|
|
POST
|
Hello all I have a problem that I believe can be solved with model builder, however I have limited experience using model builder and need some help putting it together. Problem: My business is in highways maintenance. Everything we do is located by using 'Sections' and 'Chainage'. A section is simply a defined length of road which has a unique reference and the chainage is the distance in mtrs along the section. I have a polyline shp for my roads. Sections have a defined direction and the lines are digitised accordingly so that the start and end are always the right way around. When any new road surface is laid, we need to know the start and end points of the new road surface in 'section & chainage' format. It is difficult to record measurements in this way on site as sometimes the beginning of a 'section' will not be accessible and so a measuring wheel can not be used, but we will log GPS locations on site. Solution: My idea is to build a model that allows a user to input a GPS location (preferably in 12 figure OSGB e.g. NZ 12345 12345) and for the model to output the 'section' and 'chainage' of that point (or closest possible). Method: I think the 'core' tool in the model is going to be 'locate features along routes'. I have used this tool before with existing data in tables. What I'm stuck with is providing an input because there is no 'feature' as such. So perhaps I need the first step in the model to create the feature (a point shp)? Is there a tool that creates a point shp by entering coordinates? I thought about 'Make XY Event layer' but does that need a table as an input? This is where I am up to. I think I know what I want; I just don't have the experience to throw a model together knowing which tools to use. Any help appreciated!!!!!!! Thanks Chris You do need a table as input to Make XY Event Layer, and that is the tool to use. You are going to have to take the data entered by the user and create a table or feature class at some point, but you can create an in memory table and/or feature class to generate the point event table and locate features along route table if you do not intend to store these values. 1. Basic starting point is to copy a table in memory by borrowing a schema already built to store the Lat Long of the user. http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Using_in_memory_workspace/002w0000005s000000/ To make it simple the copied table should have a single record in it with blank data. 2. Use Field Calculator to fill in the Lat Long fields from user input into the in memory table. 3. Generate the XY point event table (set your environment to the same coordinate system as your routes). 4. Process locate feature along route to an appropriate output (in memory, temporary or permanent table). 5. Do whatever other process you need to do to translate the Route ID and measure to your section and chainage (if the routes are not already built to output this information). 6. Append the final output to a QC database.
... View more
05-07-2013
06:52 AM
|
0
|
0
|
1718
|
|
POST
|
An invalid SQL statement was used - I've never seen this before. Has anyone else? What is the cause and how can I fix it. It seems to be map specific. I know I can make a new map and it isn't happening in all my maps. I'm very curious as to why it's happening and if there is a way to fix it. It normally occurs if you have a label expression that was stored on a layer that no longer makes sense. If field names were dropped or changed this error will occur when the label engine fires up if the label property of the field is still enabled. It should list the Feature Class that is failing in the error message, which should lead you to the layer that is failing. If this is not it, then the definition query of a layer is similarly corrupted.
... View more
05-06-2013
03:20 PM
|
0
|
0
|
2400
|
|
POST
|
Hey Guys, I am trying to join three different layers. I have one layer of my state (Florida), one layer that i created from the Florida layer where i used the dissolve tool to break the state up into several regions, and then i have an excel file that i am working with that has population data. What i need to know is how many regions have a population greater than xyz and a population density of xyz...Now, to do this i joined my spreadsheet of population data to the Florida layer. Then, i took my dissolved layer and put it on top of the Florida/Spreadsheet joined layer. My idea was that if i spatial joined the dissolved layer with the underlying layer it would aggregate the data and tell me the population (since its by county) of all the counties that make up say Region 1 so i can then tell how many people there are in Region 1....well when i added up the population from my spreadsheet of the counties in Region 1 i get like 490,000 people but when i spatial join it says that the population for Region 1 is like 800 something thousand. I have used the quick right-click join you can do in the TOC and i also used the Spatial Join tool in the toolbox and they both yield the same results. Can anybody help because i can't figure it out to save my life right now... You cannot use Spatial Join for Polygon to Polygon matches like this, because every boundary touch will cause a join, even if the interior of the two shapes has no overlap. Export the centroids of the county's first and then to the method you are attempting. The points should fall within only one region polygon and when they are summed they should add up to the correct amount.
... View more
05-02-2013
03:20 PM
|
0
|
0
|
742
|
|
POST
|
I forgot to mention that in the final join, before the export, that you should also hide the joined table's ObjectID field. The objective is to make sure that no field names of the two tables are duplicated so that when you export you get normal field names in the output. If any field names duplicate, then the original table name gets appended to the field name, which you don't want.
... View more
05-02-2013
06:22 AM
|
0
|
0
|
1441
|
|
POST
|
Just started in with Linear Referencing, and have set up a Route, and was wondering if there is a way to extract information (measure) from the route to another feature, i.e. a culvert intersecting the route to obtain the SLM location of that feature. Use the Intersect tool with the points option and the Routes as the primary geometry. The M value of the intersection will be in the point together with the Route ID and the culvert information. Calculate the M value to a field using a Python Field Calculator calculation of: !Shape.Centroid.M!
... View more
05-01-2013
11:19 AM
|
0
|
0
|
616
|
|
POST
|
Hi Richard, I believe I am open to that... The data that I will be working with will be a temporary copy anyway, so there is no need to keep the attribute table uncluttered. Can you elaborate on hte process a bit? What we're trying to do, in a nutshell, is create a model that will convert our segmented lines into unsegmented lines (so that AB1.1, AB1.2, AB1.3 simply becomes AB1). We need to keep some attributes from the inital segment and some from the end segment. All of the outputs and intermediate files will be a copy. So for this step we just need to identify the last segment, grab some attributes, and apply them to the unsegmented geometry. Actually the process I was envisioning was more like: identify the last segment, delete all fields BUT the few we need, convert to midpoint, spatial join to the unsegmented geometry. It's the "identify the last segment" part that I am having trouble with. Thank you for the help! Sean That description of your process is best suited to splitting the field into two fields. On the original create 2 fields with the first a string field long enough to hold every master number and the second a Long field (assuming all values after the period are numeric). In the Field Calculator fill the Master number field using a VB calculation of: Split([SEG_ID], ".")(0) ' Change SEG_ID to the actual field name holding the values you are splitting. Fill the second field with a calculation of: Split([SEG_ID], ".")(1) ' Change SEG_ID to the actual field name holding the values you are splitting. Now Dissolve on the new Master number or probably better yet use Create Route to make an LR route line with measures. Use the Master Number field as the unique case field or the Route ID field. On the original data use Summary Statistics. For the Summary Value get the Max of the new Segment Number field and for the Unique Case field use the new Master number field. Join the Original data to the Summary output on the new Master ID field and select all records where the segment number field equals the Max Segment number of each master line. Export that record set from the tableview to create a table. Join the Dissolved line with the exported record set. Hide the second Master Number field so only one of them will appear in the tableview. Right click the Dissolved feature class in the Table of Contents and export it as a feature class. You should now have a feature class of dissolved lines with a line for every master number and all of the fields associated with the last segment for the master record.
... View more
05-01-2013
06:42 AM
|
0
|
0
|
1441
|
|
POST
|
"Then I would locate the point on the line to get M values for the points " I'm a bit confused by this part. What do you mean and how exactly do I locate the point on the line to get M values for the points? Use the Locate Features Along Route tool to get the M values of the points once you have an LR route system or roads established. http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//003m00000007000000.htm Probably this step is optional, since I believe the split at points tool will interpolate the M values of the line ends automatically.
... View more
04-30-2013
03:05 PM
|
1
|
0
|
3379
|
|
POST
|
Hi folks, I am looking for a tool that I can use to select the highest value within a set of similar values. The values are alphanumeric, and are essentially two parts merged into one field - a master ID to the left of a decimal and a segment ID to the right of the decimal. Each "master" has a different number of segments. I would like to select the feature with the higest segment ID for each unique master ID. There are roughly 5000 unique values in this field. For instance, in a series of AB1.1, AB1.2, AB1.3, YZ4.1, YZ4.2, both AB1.3and YZ4.2 would be selected. I would prefer to do this operation with the out-of-the- box functionality & GP tools, but could work with Python if necessary (I am an absolute novice). Any suggestions on how to approach this?? Thanks!! Sean The only way to do this without use of Python would be to split the master and segment ID portions into two separate fields. Then you could use the Summary Statistics tool on the master field with Max for the Segment number field. Parsing it would be easy enough using the period as the split character (examples will follow if you want to go this route). However, if maintaining parallel field values does not work for your workflow, then you need to use Python to handle the single field values.
... View more
04-30-2013
02:03 PM
|
0
|
0
|
1441
|
|
POST
|
Use the Create Route tool. If each end touches another end the line will rebuild successfully from one end to the other. THe only caveat is for lines that are perpendicular to the corner you specify to build from. Then it may grab a position closest to that corner and double back. I assume you kept your original lines? If so build the Route from that. That will assign measures to the lines before you split them. Then I would locate the point on the line to get M values for the points (just as a precaution), then split at points. Calculate the M values to each segment (Python field calculation of !Shape.FirstPoint.M! for the from measure and !Shape.LastPoint.M! for the end measure) and that value should be your sort order for a given original Line_ID. I believe that the split of the line will cause an interpolation of measures at the split points. However, if NAN values appear at the end points of the split, then prior to using the Create Route tool create vertices at the split point positions so that they will have vertices where measures will be assigned (probably using a Snap tool). Back up your data if you have to use any destructive tools like Integrate. The Centroids of the split lines you are currently working with should allow you to do a Spatial Join to the resplit lines, assuming you have attributes you have created since splitting the lines that you need to preserve or transfer.
... View more
04-30-2013
01:45 PM
|
0
|
0
|
3379
|
|
POST
|
The problem is, if I do a spatial join of points to polygons, ArcGIS grabs the info from either polygon, so I can't be sure that a given point is related to the proper polygon. If I do a spatial join of polygons to points, ArcGIS grabs the info from whatever point is "closest" to the polygon, whether or not the point belongs to the polygon. So no matter which way I perform the join, I can't trust ArcGIS to have joined polygons to the points that generated them. How can I get the proper polygons' identifier into the attribute table for the points, but only if the point belongs to the polygon? Much head scratching here. Thanks for any ideas. What is wrong with the Join One-To-Many option for Spatial Join? As long as there is a species attribute in both the polygons and points you spatial join you can easily select the set of resulting records that had a match. Just extract those points or polygons from the result when you are done and disregard the rest. Then do what ever additional analysis you want to do with the extracted feature set. Since the buffers contain the original point's id value you can also eliminate self intersecting polygon/point combinations in those results from the extracted set. You probably can do it in a single Spatial Join using the point data with a copy of itself using a 100 foot tolerance. Or possibly dissolve the original buffer polygons using the species attribute as the unique value and uncheck the multi-part feature option to create separate contiguous polygons that are all for the same species and then run the spatial join to the points and do the above.
... View more
04-22-2013
11:40 AM
|
0
|
0
|
5288
|
|
POST
|
Many thanks for your reply. I had read about linking "Summary Statistics" with a tabular join. When you say "join back to the original to do selections" do you mean a tabular join? The problem is that after the summary statistics, all I have is the Maximum value and an ID value - is there a simple means by which I can also return the value of that polygon which has the maximum value? Thanks again for your help, Paul Actually, normally for this type of analysis I do not use the ID value, because every record will be exported in the summary or an arbitrary min or max ID value will be outputted. I usually create a dummy field and make every record have the same value in that field (for example all records have 1 in that field). That is that case field that I summarize and tabular join to. The summary produces the Max value for the table or current selection. I use the join and a select by Attribute (Select from current selection if the summary was on a selection set) and find the record with a value equal to the max summary value (actually I really us a range relative to the Max value that is very small if the field is a double, i.e., Table.NumberField >= SummaryTable.MAX_NumberField - .0001 AND Table.NumberField <= SummaryTable.MAX_NumberField + .0001, because there can be slight rounding of the value during the summary that prevents the use of = ).
... View more
02-20-2013
05:20 AM
|
0
|
0
|
1943
|