Select to view content in your preferred language

from lat lon values, how to create point layer to use as input to buffer tool?

1543
6
05-19-2014 08:08 AM
WalterEralio
Occasional Contributor
I have the lat lon from only 1 point I need to buffer to clip a layer, but I need to create the shapefile from those 2 double values used as parameters. Any help with the intermediate TOOLS I have to use to do that?
0 Kudos
6 Replies
RichardFairhurst
MVP Honored Contributor
I have the lat lon from only 1 point I need to buffer to clip a layer, but I need to create the shapefile from those 2 double values used as parameters. Any help with the intermediate TOOLS I have to use to do that?


Use the Make XY Event Layer tool to convert the double coordinate values to points and then buffer the points created in the output layer.  You could permanently export the layer to a real point feature class also using Export or Copy Features or several other similar tools.
0 Kudos
WalterEralio
Occasional Contributor
Use the Make XY Event Layer tool to convert the double coordinate values to points and then buffer the points created in the output layer.  You could permanently export the layer to a real point feature class also using Export or Copy Features or several other similar tools.


[ATTACH=CONFIG]33964[/ATTACH]

Thanks! it was helpful however I need a TABLE as input for the XY Event layer, any chance to create that table from a couple of doubles?
0 Kudos
IanMurray
Honored Contributor
You can just put the lat/long values in an excel spreadsheet or a csv file for your table.  Just make sure the first row has the headers for the fields.

Example
Lat                           Long
35.823323    -85.326473
0 Kudos
RichardFairhurst
MVP Honored Contributor
[ATTACH=CONFIG]33964[/ATTACH]

Thanks! it was helpful however I need a TABLE as input for the XY Event layer, any chance to create that table from a couple of doubles?


Create a spreadsheet as suggested.  Out of curiosity, where are these doubles in the first place if they are not in a table, spreadsheet or feature class?  If you mean that they are within a point or polygon feature class already then export the attributes to a Standalone table using the Table to Table tool and use that as an input to the XY Event Layer.
0 Kudos
WalterEralio
Occasional Contributor
Create a spreadsheet as suggested.  Out of curiosity, where are these doubles in the first place if they are not in a table, spreadsheet or feature class?  If you mean that they are within a point or polygon feature class already then export the attributes to a Standalone table using the Table to Table tool and use that as an input to the XY Event Layer.



the 2 values come from the geocoder output.. my idea is to create this geoprocessing tool and deploy it on our arcgis server, so basically I want to call the service that does the spatial query  with those 2 double values as parameters, am I missing something??
0 Kudos
RichardFairhurst
MVP Honored Contributor
the 2 values come from the geocoder output.. my idea is to create this geoprocessing tool and deploy it on our arcgis server, so basically I want to call the service that does the spatial query  with those 2 double values as parameters, am I missing something??


For ModelBuilder, your best options is to create a permanent table in the workspace that your model plans on using for model outputs that contains one record with dummy values for its X and Y coordinates fields, get the 2 doubles as parameters of your model somehow and use them with the Field Calculator or a Python cursor script to overwrite the X and Y coordinate values of the record in the table, then use the Make XY Event Layer tool.  The Select Layer by Location tool requires a point feature class layer also, which would have to take the Make XY Event Layer as input derived from this table.

All other solutions require Python to use the coordinates directly.  You would have to use Python's geometry operations to do this directly from the 2 double parameters, so look into calling a Python script within a model or better yet convert the model to Python and begin writing this in Python.  Python Point and PointGeometry types can be used with feature class geomety or to do spatial operations in memory, but then you would be better off doing the whole thing in Python, since you would need to read the second geometry required from any other feature class into the geometry operation.

There are no real examples for how do to this that don't involve a feature class, so you could have the privilege of being one of the first on the forum to tackle all the problems and help everyone else come up with a way to do this.  It looks like the user in this post tried to do what you want to do, but it does not look like he succeeded.

I have other fish to fry, so I cannot get sidetracked into working the bugs out for you at this time.  My first suggestion would be the easiest for ModelBuilder.
0 Kudos