'get the spatial information from the shapefile and add the new point with attributes to the point file 'Need to look at what projection or lat/long of the shapefile where the point is being created. Dim pSpatialReferenceWebServices As ESRI.ArcGIS.Geometry.ISpatialReference Dim pSpatialReferenceEnvironment As New ESRI.ArcGIS.Geometry.SpatialReferenceEnvironment Dim pGeodataset As ESRI.ArcGIS.Geodatabase.IGeoDataset Dim pSpatialReference As ESRI.ArcGIS.Geometry.ISpatialReference 'Spatial Reference passed from Webservies pSpatialReferenceWebServices = pSpatialReferenceEnvironment.CreateProjectedCoordinateSystem(pSpatialInt) 'Add point to selected layer feautre class Dim pFeatureClass As ESRI.ArcGIS.Geodatabase.IFeatureClass pFeatureClass = pPointLayer.FeatureClass ' runtime will not occur as its in the above if statement checking for selected feature 'get the projection of the featurelayer pGeodataset = pFeatureClass pSpatialReference = pGeodataset.SpatialReference Dim pPoint As New ESRI.ArcGIS.Geometry.Point 'give the point the reference from the WkID given from the webservices pPoint.SpatialReference = pSpatialReferenceWebServices pPoint.PutCoords(pXCoord, pYCoord) 'now project to the featureclass spatial reference pPoint.Project(pSpatialReference)
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.