POST
|
Back once again. I additionally am looking to give the tool the capability to offset the address point after it's created, so that ArcObjects picks up spatial location fields (Zip Code, City Boundary, etc) and auto-populates the respective fields. # Import arcpy module
import arcpy
# Local variables:
FIREADM_Parcels_MCT = "PARCELS MCT UPLOAD"
Points = "%scratchGDB%\\Points"
FIREADM_AddrPoints = Points
FIREADM_AddrPoints__3_ = "FIREADM.AddrPoints"
# Process: Feature To Point
arcpy.FeatureToPoint_management(FIREADM_Parcels_MCT, Points, "CENTROID")
# Process: Append
arcpy.Append_management("%scratchGDB%\\Points", FIREADM_AddrPoints__3_, "NO_TEST", "STREET_NUMBER \"STREET_NUMBER\" true true false 4 Long 0 10 ,First,#,%scratchGDB%\\Points,SITUS_STREET_NUMBER,-1,-1;PG_APN \"PG_APN\" true true false 12 Text 0 0 ,First,#,%scratchGDB%\\Points,APN,-1,-1;STREET_PREFIX \"STREET_PREFIX\" true true false 2 Text 0 0 ,First,#,%scratchGDB%\\Points,SITUS_STREET_DIRECTION,-1,-1;STREET_NAME \"STREET_NAME\" true true false 40 Text 0 0 ,First,#,%scratchGDB%\\Points,SITUS_STREET_NAME,-1,-1;STREET_TYPE \"STREET_TYPE\" true true false 12 Text 0 0 ,First,#,%scratchGDB%\\Points,SITUS_STREET_TYPE,-1,-1;STREET_SUFFIX \"STREET_SUFFIX\" true true false 10 Text 0 0 ,First,#,%scratchGDB%\\Points,SITUS_STREET_SUFFIX,-1,-1;SUITE \"SUIT\" true true false 40 Text 0 0 ,First,#,%scratchGDB%\\Points,SITUS_SUITE,-1,-1;CITY \"CITY\" true true false 40 Text 0 0 ,First,#;NAME \"NAME\" true true false 30 Text 0 0 ,First,#;ESN \"ESN\" true true false 5 Text 0 0 ,First,#;ET_X \"ET_X\" true true false 8 Double 8 38 ,First,#;ET_Y \"ET_Y\" true true false 8 Double 8 38 ,First,#;MODIFY_USER \"MODIFY_USER\" true true false 20 Text 0 0 ,First,#;ADDRESS \"ADDRESS\" true true false 60 Text 0 0 ,First,#,%scratchGDB%\\Points,ADDRESS,-1,-1;AVLZONE \"AVLZONE\" true true false 8 Double 8 38 ,First,#;MAPPAGE \"MAPPAGE\" true true false 16 Text 0 0 ,First,#;SUBZONE \"SUBZONE\" true true false 16 Text 0 0 ,First,#;SOURCE \"SOURCE\" true true false 20 Text 0 0 ,First,#;GLOBALID \"GLOBALID\" false false false 38 GlobalID 0 0 ,First,#;FLAG \"FLAG\" true true false 10 Text 0 0 ,First,#;MODIFY_DT \"MODIFY_DT\" true true false 36 Date 0 0 ,First,#;FLAG_REASON \"FLAG_REASON\" true true false 250 Text 0 0 ,First,#;SUBZONE_OVERRIDE \"SUBZONE_OVERRIDE\" true true false 16 Text 0 0 ,First,#;ACPOINT_X \"ACPOINT_X\" true true false 8 Double 8 38 ,First,#;ACPOINT_Y \"ACPOINT_Y\" true true false 8 Double 8 38 ,First,#;ACPOINT_INFO \"ACPOINT_INFO\" true true false 90 Text 0 0 ,First,#;UNIT_TYPE \"UNIT_TYPE\" true true false 10 Text 0 0 ,First,#;BUILDING \"BUILDING\" true true false 10 Text 0 0 ,First,#;ZIPCODE \"ZIPCODE\" true true false 5 Text 0 0 ,First,#;ACPOINT_INFO2 \"ACPOINT_INFO2\" true true false 300 Text 0 0 ,First,#", "")
def XYsetVALUE( shape, X_value, Y_value):
myMoveX = 0.001
myMoveY = 0.001
point = shape.getPart(0)
point.X = X_value + myMoveX
point.Y = Y_value + myMoveY
return point
... View more
05-03-2017
12:10 PM
|
0
|
0
|
1297
|
POST
|
Hello Micah, Within Model Builder, I was able to successfully create address points within a test Geodatabase. I appreciate the support, I should be good to go.
... View more
04-26-2017
02:31 PM
|
1
|
1
|
1296
|
POST
|
Is there a way to take a set of polygons and have ArcMap append an already existing point feature class from the center of the polygons(centroid)? Basically what I want to do is select 40 parcel features and create individual address points based off of parcel layer into our existing address point feature class. The current way that I accomplish this task is to add each point manually. I have look at this tool, but it creates a new feature class rather than adding to an existing feature class. Feature To Point—Data Management toolbox | ArcGIS Desktop
... View more
04-26-2017
09:12 AM
|
2
|
4
|
2036
|
POST
|
Joshua, That's exactly what I need! Formatting the "For Loop" was confusing me. Like you mentioned in the previous response I would have gone the route of using AGOL to query the data but for scripting purposes, I needed to make the code.
... View more
03-26-2017
10:04 AM
|
0
|
1
|
1549
|
POST
|
Unfortunately, the class I am taking requires submiting a python document.
... View more
03-26-2017
08:30 AM
|
0
|
3
|
1549
|
POST
|
I am stuck with what step I need to take to create a loop statement to automate the process of creating lines of graticule in python/arcpy. What the end result is to create a shapefile that draws a polyline every 10 degrees for lines of latitude/longitude. An example would be the first line drawing at (-90,180), (90,180) and second line drawing at (-90,170), (90,170) until it gets to -180. Here's my current status of my code. # Import ArcPy
import arcpy
# Create empty shapefile
arcpy.CreateFeatureclass_management('C:/Python_Testing/Week5/Week5/Data', 'line1.shp','POLYLINE',spatial_reference=arcpy.SpatialReference(4326))
# Create cursor to insert data
cursor = arcpy.da.InsertCursor('C:/Python_Testing/Week5/Week5/Data/line1.shp', ["SHAPE@"])
# Writing a multipart feature from an array of points from the same cursor
firstPart = arcpy.Array([arcpy.Point(180, -90),
arcpy.Point(-180, -90)])
secondPart = arcpy.Array([arcpy.Point(180, -90),
arcpy.Point(180, 90)])
array = arcpy.Array([firstPart, secondPart])
polyline = arcpy.Polyline(array)
cursor.insertRow([polyline])
... View more
03-25-2017
10:30 PM
|
0
|
6
|
2632
|
POST
|
Hello I am new at JS, so I would figure this would be a good place to start. I was able to successfully get popups to show for my feature layer on my first HTML script. When I introduced a Dynamic Service Layer to the script it went bad and I am not able to get the popups to show. I wanted to know where in my script I am getting held up when trying to get my feature layers popups enabled. Thanks. java script api web-mappingjs-api <!DOCTYPE html> <html># <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"> <title>Create Map</title> <link rel="stylesheet" href="https://js.arcgis.com/3.18/dijit/themes/claro/claro.css"> <link rel="stylesheet" href="https://js.arcgis.com/3.18/esri/css/esri.css"> <style> html, body, #mapDiv{ padding:0; margin:0; height:100%; } #BasemapToggle { position: absolute; top: 20px; right: 20px; z-index: 50; } </style> <script src="http://js.arcgis.com/3.18/"></script> <script> var map; require([ "esri/map", "esri/InfoTemplate", "esri/layers/ArcGISDynamicMapServiceLayer", "esri/dijit/BasemapToggle", "esri/layers/FeatureLayer", "esri/layers/ImageParameters", "dojo/parser", "dojo/domReady!" ], function ( Map, InfoTemplate, ArcGISDynamicMapServiceLayer, BasemapToggle, FeatureLayer, ImageParameters, parser ) { parser.parse() map = new Map("mapDiv", { basemap: "hybrid", center: [-112.058785, 33.452663], zoom: 14 }); var toggle = new BasemapToggle({ map: map, basemap: "streets" }, "BasemapToggle"); toggle.startup(); map.on("load", initOperationalLayer); function initOperationalLayer() { var infoTemplate = new InfoTemplate("FIRE STATION: ${STATION}", "ADDRESS: ${ADDRESS} ${CITY}, AZ ${ZIP}" ); var featureLayer = new FeatureLayer("http://pfdvma21:6080/arcgis/rest/services/Stations_3857/MapServer/0",{ mode: FeatureLayer.MODE_ONDEMAND, outFields: ["*"], infoTemplate: infoTemplate }); var imageParameters = new ImageParameters(); imageParameters.format = "jpeg"; var dynamicMapServiceLayer = new ArcGISDynamicMapServiceLayer("http://pfdvma21:6080/arcgis/rest/services/Eric/BATTALIONS_FIRSTDUES/MapServer", { "opacity" : .75, "imageParameters" : imageParameters }); map.addLayer(dynamicMapServiceLayer); map.addLayer(featureLayer); map.infoWindow.resize(250,200); }); </script> </head> <body class="claro"> <div id="mapDiv"> <div id="BasemapToggle"></div> </div> </body> </html>
... View more
10-03-2016
03:06 PM
|
0
|
2
|
1515
|
POST
|
I have two datasets of road polylines and they do not line up. What geoprocessing function is there to obtain "connectedness" between the two datasets? Thanks.
... View more
08-31-2015
07:36 PM
|
0
|
2
|
3478
|
Title | Kudos | Posted |
---|---|---|
2 | 04-26-2017 09:12 AM | |
1 | 04-26-2017 02:31 PM |
Online Status |
Offline
|
Date Last Visited |
12-07-2020
04:04 PM
|