POST
|
Hi, I am trying to 'Add Data From Server' in ArcPAD 10.2 using ArcGIS Server 10.2 When i use the connection: http://site.domain.com:6080/ it works but then i try and connect to the secure services using https://site.domain.com:6443/ i get 'Error 12029: cannot connect to server. I am able to connect to this address through IE but it says: There is a problem with this website's security certificate. The security certificate presented by this website was not issued by a trusted certificate authority. The security certificate presented by this website was issued for a different website's address. Security certificate problems may indicate an attempt to fool you or intercept any data you send to the server." I can continue to the website but could this be the cause of this error? I am currently trying to use the preconfigured self signed certificate as this is for testing purposes. Thank you for any help with this.
... View more
02-11-2015
06:00 AM
|
0
|
0
|
2816
|
POST
|
Hi, Thank you for this script. It works perfectly. Is there a way i can add an attribute value from the original line to the associated points that are created? I would like to be able to see which points are on each line in a multiple feature featureclass. Many thanks for any suggestions. James
... View more
01-29-2015
11:00 AM
|
0
|
1
|
1623
|
POST
|
Hello, Did you manage to get this to work as i am having the same issue after upgraing to ArcPad 10.2. Thanks
... View more
12-03-2013
05:29 AM
|
0
|
0
|
121
|
POST
|
Hi, I have a script that works in ArcPad 10 but does not work in ArcPad 10.2 I am unable to obtain a value from a field. I am using "objRS.Fields("TREENO").Value" where "TREENO" is the name of the field. Set objRS = Application.map.layers("BatTree").records objRS.Movefirst MsgBox "The value is: " & CStr(objRS.Fields("TREENO").Value) The messagebox is blank. This worked fine in ArcPad 10. Any help will be greatly appreciated.
... View more
12-03-2013
02:15 AM
|
0
|
1
|
630
|
POST
|
Hello, I have converted labels to annotation using IConvertLabelsToAnnotation and i would now like to loop through these text elements and change them. How do i access the annotation labels and loop through them on the map view? Thank you for any assistance.
... View more
08-14-2013
02:49 AM
|
0
|
0
|
384
|
POST
|
Hello, I have managed to get the ymax by using (element.Geometry.Envelope.YMax) However when the legend is updated and i try and get the new ymax it still returns the original ymax. I have tried using: legend.Refresh(); mapSurround.Refresh(); mapDocument.ActiveView.Refresh(); mapDocument.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGraphics, null, null); If i save the mxd and reopen it i can then get the new ymax. Does anyone know how to get the ymax from a legend after it has been updated? Thank you
... View more
07-16-2013
07:15 AM
|
0
|
0
|
151
|
POST
|
Hello, I am hoping for some help/advice. I am trying to get the ymax for a legend using c# but i the value returned is incorrect. The value for the width is correct though. Please can someone explain why this does not return the correct value for ymax and how i can obtain this value? Many thanks.
IGraphicsContainer graphicsContainer = mapDocument.PageLayout as IGraphicsContainer;
graphicsContainer.Reset();
IElement element = graphicsContainer.Next();
while (element != null)
{
if (element is IMapSurroundFrame)
{
IMapSurround mapSurround = ((IMapSurroundFrame)element).MapSurround;
if (mapSurround is ILegend)
{
IEnvelope newEnvelope = new Envelope() as IEnvelope;
mapSurround.QueryBounds(mapDocument.ActiveView.ScreenDisplay, element.Geometry.Envelope, newEnvelope);
MessageBox.Show(newEnvelope.Envelope.YMax.ToString());
MessageBox.Show(newEnvelope.Envelope.Width.ToString());
... View more
07-13-2013
01:01 PM
|
0
|
1
|
1037
|
POST
|
Hi, I have fixed the issue by using: arcpy.ExportMetadata_conversion(line.replace('\r\n',""), translator, "c:\\Metadata\\" + os.path.basename(line.replace('\r\n',"")) + ".xml")
... View more
07-10-2013
02:03 AM
|
0
|
0
|
329
|
POST
|
Hello, Please can somebody provide some advice? I have a text file containing the files i would like to export the metadata from e.g. 'D:\Temp\Cost\10_Kilometers_Buffer.shp' I am trying to loop through this text file and export the metadata for each line. The only issue is on the line arcpy.ExportMetadata_conversion where i get the error "Failed to execute. Parameters are not valid. ERROR 000732: Source Metadata: Dataset D:\Temp\Cost\10_Kilometers_Buffer.shp does not exist or is not supported The value does not exist. ERROR 000732: Source Metadata: Dataset D:\Temp\Cost\10_Kilometers_Buffer.shp does not exist or is not supported Failed to execute (ExportMetadata)." If i change 'line' to r"D:\Temp\Cost\10_Kilometers_Buffer.shp" it works. Any help will be greatly appreciated. James import arcpy, glob, os, string
import codecs
ListofLayers = codecs.open("C:\\Users\\34459jm\\Desktop\\DirPrnInfo.txt",encoding = 'utf-16')
# loop through the translator file
for line in ListofLayers:
dir = arcpy.GetInstallInfo("desktop\\DirPrnInfo.txt")["InstallDir"]
translator = dir + "Metadata/Translator/ESRI_ISO2ISO19139.xml"
arcpy.ExportMetadata_conversion(line, translator, "c:\\Metadata\\" + os.path.basename(line) + ".xml")
... View more
07-10-2013
02:00 AM
|
1
|
3
|
568
|
POST
|
Thank you so much it is working now. I knew it was something to do with that ID but couldn't get my head around it. I have finally managed to create the square buffers and associate the correct id to the polygons now. I find vba much easier to understand but am getting there slowly. Thanks again.
... View more
10-24-2012
07:12 AM
|
0
|
0
|
627
|
POST
|
Hello, As you can see in the code i attached 'FeatID' is the id i would like to assign to the polygons. I am using 'feat.setValue("OW_ID", FeatID)' to populate the OW_ID field with the FeatID value but it doesnt seem to update the polygons correctly. It is like it is missing the first value. Thank you
... View more
10-24-2012
06:33 AM
|
0
|
0
|
2756
|
POST
|
Hi, Thank you for the help. I have now got this working. The problem was that the "coordList" was being created within the loop ratherthan before the loop. I am now using this cose that works. Howver i would like to give a value to each polygon. try:
# Open an insert cursor for the new feature class
#
cur = arcpy.InsertCursor(fcname)
# Create an array and point object needed to create features
#
lineArray = arcpy.Array()
pnt = arcpy.Point()
# Initialize a variable for keeping track of a feature's ID.
#
ID = -1
for line in coordList: # Open the input file
# set the point's ID, X and Y properties
#
pnt.ID, pnt.X, pnt.Y = string.split(line,",")
#print pnt.ID, pnt.X, pnt.Y
if ID == -1:
ID = pnt.ID
# Add the point to the feature's array of points
# If the ID has changed, create a new feature
#
#print ID, pnt.ID
if ID != pnt.ID:
# Create a new row or feature, in the feature class
#
feat = cur.newRow()
# Set the geometry of the new feature to the array of points
#
feat.shape = lineArray
# Insert the feature
#
cur.insertRow(feat)
lineArray.removeAll()
lineArray.add(pnt)
ID = pnt.ID
# Add the last feature
#
feat = cur.newRow()
feat.shape = lineArray
cur.insertRow(feat)
lineArray.removeAll()
del cur
except Exception as e:
print e.message I have tried this: try:
# Open an insert cursor for the new feature class
#
cur = arcpy.InsertCursor(fcname)
# Create an array and point object needed to create features
#
lineArray = arcpy.Array()
pnt = arcpy.Point()
# Initialize a variable for keeping track of a feature's ID.
#
ID = -1
for line in coordList: # Open the input file
# set the point's ID, X and Y properties
#
FeatID, pnt.ID, pnt.X, pnt.Y = string.split(line,",")
print FeatID, pnt.ID, pnt.X, pnt.Y
if ID == -1:
ID = pnt.ID
# Add the point to the feature's array of points
# If the ID has changed, create a new feature
#
#print ID, pnt.ID
if ID != pnt.ID:
# Create a new row or feature, in the feature class
#
feat = cur.newRow()
feat.setValue("OW_ID", FeatID)
# Set the geometry of the new feature to the array of points
#
feat.shape = lineArray
# Insert the feature
#
cur.insertRow(feat)
lineArray.removeAll()
lineArray.add(pnt)
ID = pnt.ID
# Add the last feature
#
feat = cur.newRow()
feat.setValue("OW_ID", FeatID)
feat.shape = lineArray
cur.insertRow(feat)
lineArray.removeAll()
del cur
except Exception as e:
print e.message However this does not populate the fcname with the FeatID correctly. Any help will be greatly appreciated.
... View more
10-24-2012
05:21 AM
|
0
|
0
|
2756
|
POST
|
Thank you for the help. As you can see i tried that but the point contains the coordinates but the polygons that are created do not contain any coordinates. Thanks again.
... View more
10-23-2012
06:23 AM
|
0
|
0
|
2756
|
POST
|
Hi, Sorry i should have explained this a bit better. This is just the last part of the code that i cant get to work. I have created all the variables and have a list containing the coordinates (coordList) required to create a polygon around polylines. For each polyline the list looks like this: ['0,9953.36724322,20031.2536665', '0,9997.81733525,20052.4203769', '0,9993.08806586,20039.092436', '0,9948.63797384,20017.9257255', '0,9953.36724322,20031.2536665'] I am then trying to use these coordinates to create a polygon. Thank you
... View more
10-23-2012
05:41 AM
|
0
|
0
|
2756
|
POST
|
Hello, I am hoping for some help. I am trying to create polygons from coordinates but the code i am using is not working correctly. Please can someone point me in the right direction? I have tried everything example i have found on the internet. Thank you coordList.append(str(row.getvalue(desc.OIDFieldName)) + "," +str(FirstVertexXpoint) + "," + str(FirstVertexYpoint)) coordList.append(str(row.getvalue(desc.OIDFieldName)) + "," +str(ThirdVertexXpoint) + "," + str(ThirdVertexYpoint)) coordList.append(str(row.getvalue(desc.OIDFieldName)) + "," +str(SecondVertexXpoint) + "," + str(SecondVertexYpoint)) coordList.append(str(row.getvalue(desc.OIDFieldName)) + "," +str(FourthVertexXpoint) + "," + str(FourthVertexYpoint)) coordList.append(str(row.getvalue(desc.OIDFieldName)) + "," +str(FirstVertexXpoint) + "," + str(FirstVertexYpoint)) array = arcpy.Array() point = arcpy.Point() featureList = [] for feature in coordList: coordinates = string.split(feature,",") point.ID = coordinates[0] point.X = coordinates[1] point.Y = coordinates[2] array.add(point) polygon = arcpy.Polygon(array) #array.removeAll() featureList.append(polygon) #array.removeAll() arcpy.CopyFeatures_management(featureList, "c:/polygons.shp")
... View more
10-23-2012
05:04 AM
|
0
|
13
|
8365
|
Title | Kudos | Posted |
---|---|---|
1 | 07-10-2013 02:00 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|