POST
|
Hello Brian I didn't have any progress with this project, because of another emerging one. I will check again next month and let you know. If you have any progress or want any help, keep in touch. Regards George
... View more
08-26-2011
06:10 AM
|
0
|
0
|
243
|
POST
|
Hello Everyone, I have created some add-ins in order to insert information related to polygons. I dgitize the polygons and at the end (by double clicking) they are stored as geometry fields in SQL server 2008. I am facing prblems in case I need to delete or edit the polygon. Actually I don't know haow to do it. A snaping option will be also very helpful. Please help 🙂 Thank you in advnace Gker
... View more
05-12-2011
01:13 PM
|
0
|
0
|
1876
|
POST
|
I have created the following methods, but still I can't see the polygons on map. Can somebody tell me the missing piece? Thanks private void AddExistingShapes() { string connectionString = "Data Source=.;Initial Catalog=agrosyn;Persist Security Info=True;User ID=sa;Password=sa"; System.Data.SqlClient.SqlConnection con = new System.Data.SqlClient.SqlConnection(); con.ConnectionString = connectionString; System.Data.SqlClient.SqlCommand cmd = new System.Data.SqlClient.SqlCommand("SELECT FLD_POLYGON.ToString() FROM FLDS", con); List<Graphic> _allFldsGrph = new List<Graphic>(); Polygon plgnTmp = new Polygon(); { con.Open(); using (System.Data.SqlClient.SqlDataReader rdr = cmd.ExecuteReader()) { while(rdr.Read()) { string strPlgn = rdr.GetString(0); plgnTmp = StringToPolygon(strPlgn); _allFldsGrph.Add(GeometryToGraphic(plgnTmp)); } rdr.Close(); } con.Close(); _md.Graphics.Add(_allFldsGrph); } } private Polygon StringToPolygon(string strGeom) { strGeom = strGeom.Replace("POLYGON ((", ""); strGeom = strGeom.Replace("(", ""); strGeom = strGeom.Replace(")", ""); strGeom = strGeom.Replace(", ", "#"); strGeom = strGeom.Replace(".", ","); string[] strArr = strGeom.Split(new char[] { '#' }); Polygon poly = new Polygon(); double dblX; double dblY; string strBuffer = ""; for (int i = 0; i < strArr.Count(); i++) { int ialpha = strArr.ToString().IndexOf(' '); strBuffer = strArr.Substring(0, ialpha); dblX=Convert.ToDouble(strBuffer); strBuffer = strArr.Substring(ialpha + 1).Trim(); dblY=Convert.ToDouble(strBuffer); poly.AddPoint(new ESRI.ArcGISExplorer.Geometry.Point(dblX, dblY)); } poly.Close(); return poly; } Where _md is my ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay
... View more
05-12-2011
11:09 AM
|
0
|
0
|
243
|
POST
|
I have a table in SqlServer 2008 R2 with a geometry polygon field. CREATE TABLE FLDS( FLD_ID int IDENTITY(1,1) NOT NULL ,FLD_LABEL VARCHAR(80) NULL ,FLD_POLYGON GEOMETRY NULL ) GO ALTER TABLE FLDS ADD CONSTRAINT PK_FLD_ID PRIMARY KEY CLUSTERED (FLD_ID) GO Can please someone help me with a piece of code to display these polygon in a map at ArcGis Explorer 1500 Desktop? Also I would like the polygons to have the FLD_LABEL column as a label. Thanks
... View more
05-01-2011
03:07 PM
|
0
|
4
|
934
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|