-
Posts
407 -
Joined
-
Last visited
-
Days Won
28
Everything posted by yousef2233
-
Free Urban Analysis Toolbox Contains ARCPY tools for Urban Planners. Now its Developing and of-coarse FREE. At the moment you can download it at this ADDRESS. Remember before use check out for latest version. 2 tools are available: Land Use Entropy Index Calculator & Modified Huff Gravity Model (added custom Distance Decay Functions). Hope you enjoy Developer is [email protected] which is unknown
-
Hi (Works for Hyperlinks): If your images are in a sub-folder next to your mxd named "Images", Hyperlink field value have to be "Images\Image_1.jpg".
-
do you work with layout.mxd or "current" ? do you save it after adding layers? works fine here import arcpy arcpy.env.workspace = r"C:\Users\Default.gdb" mxd = arcpy.mapping.MapDocument(r"D:\Untitled.mxd") listFC = arcpy.ListFeatureClasses() df = arcpy.mapping.ListDataFrames(mxd)[0] for fc in listFC: layer = arcpy.mapping.Layer(fc) arcpy.mapping.AddLayer(df,layer,"TOP") mxd.save() del mxd
-
dear Reyalino, put df = arcpy.mapping.ListDataFrames(mxd)[0] before "for loop", import arcpy arcpy.env.workspace = "D:/Directory/Map" mxd = arcpy.mapping.MapDocument("D:/Directory/Map/layout.mxd") listFC = arcpy.ListFeatureClasses() df = arcpy.mapping.ListDataFrames(mxd)[0] for fc in listFC: layer = arcpy.mapping.Layer(fc) arcpy.mapping.AddLayer(df,layer,"TOP")
-
With Image Classification toolbar it recognizes objects in images
-
Dear fernandocjr, Check "Integrate" tool in FeatureClass toolset.
-
Request for plotting of route waypoints using Google Map..?
yousef2233 replied to adnan0001's topic in WebGIS
Dear Adnan, Would you send me a sample avl file ? -
If you have access to ArcGIS, using "Warp" in modelbuilder or python could automate your process.
- 1 reply
-
- 1
-
you have to move center of your image which is not georeferenced to the exact location, this is the movement problem and your question about pixels and cm, think about a resolution (100,100) with 2 different pixel sizes 1 - 1*1 cm2 2 - 1000*1000 cm2 do you think calculation in pixels is correct now?
-
I don't have any documents, unfortunately. convert your image into an array. find the x y of the center of the image for example (10 cm, 12 cm) convert them to degrees dx = Long - Xdeg dy = Lat - Ydeg A = move all the cells with this dx and dy B = rotate A (flight azimuth) C = scale B based on flight height and .. (i'm not sure about dz)
-
Use ArcPy instead. I sent you the sample code in pm
-
Its not that easy, it makes some gaps and overlap some times 1 - do you care about topology rules ? 2 - how much is your accuracy ?
-
Multiple buffer with arcpy ArcGIS
yousef2233 replied to sAnSiBaR's topic in Analysis and Geoprocessing
I think you should use cursors like this input_fc="fc" field = "buffer_value_field" output = "fc_somewhere" output_temp = "fc_somewhereElse" cursor = arcpy.da.SearchCursor(input_fc) for row in cursor: arcpy.analysis.Buffer(input_fc,row.getValue(field),output_temp) arcpy.management.Append(output_temp,output,"NO_TEST") arcpy.management.Delete(output_temp) it does not work in the append process, I just made a conceptual example for you -
first thing on my mind is: 1 - convert end of your line to point - (arcpy.management.featurevertiestopoints) 2 - add points based on function(length, deflection) which based on last point on OID list shape@XY it calculates new XY maybe you can do it with tables only 3 - create a line based on points created in last step and then add it to first line you had 4 - do step 2 and 3 over and over again till end of your list
-
I didnt check your file, but the solution is sth like this fc = "your_featureclass" fields = ["road_name_field"] cursor = arcpy.da.UpdateCursor(fc, fields) for row in cursor: full_name = [] full_name = row[0].split(" ") road_type = full_name[-1] if road_type = "ST": full_name[-1] = "STREET" elif road_type = "RD": full_name[-1] = "ROAD" result= full_name[:-1] result.append(full_name[-1]) row[0]= " ".join(result) cursor.updateRow(row)
-
Dear Friends, Me and my colleagues are trying to make an application for routing purposes. This application has to be in a mutual transaction with a GPS tracking device obviously. Here come the issues we encounter 1. We are getting the login data but after that we need to send response to device with a format that device can verify server and then send actual GPS data to server. 2. We are not able to send login data to that device so that's why device not send us GPS data. 3. Login Data we are getting is like :- 2323101501f357367031649441529625060. 4. We are not getting further process what to do to get Device GPS data to our server. We have asked for the GPS device support, no useful information but offering their own portal. and here is the code developed for this transaction : package com.trackit; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.ServerSocket; import java.net.Socket; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; public class ServerListener { public static void main(String[] args) { new ServerListener().startServer(); } public void startServer() { final ExecutorService clientProcessingPool = Executors.newFixedThreadPool(03); Runnable serverTask = new Runnable() { @SuppressWarnings("resource") @Override public void run() { try { ServerSocket serverSocket = new ServerSocket(5094); System.out.println("Waiting for clients to connect..."); while (true) { Socket clientSocket = serverSocket.accept(); clientProcessingPool.submit(new ClientTask(clientSocket)); } } catch (IOException e) { System.err.println("Unable to process client request"); e.printStackTrace(); } } }; Thread serverThread = new Thread(serverTask); serverThread.start(); } private class ClientTask implements Runnable { private final Socket clientSocket; private ClientTask(Socket clientSocket) { this.clientSocket = clientSocket; } @Override public void run() { System.out.println("Got a client !"); try { BufferedReader reader = new BufferedReader( new InputStreamReader(clientSocket.getInputStream())); String clientData = ""; clientData = reader.readLine(); String hex_value = asciiToHex(clientData); System.out.println("Hex Value :-"+hex_value); } catch (IOException e) { e.printStackTrace(); } } private String asciiToHex(String clientData) { char[] chars = clientData.toCharArray(); StringBuffer hex = new StringBuffer(); for (int i = 0; i < chars.length; i++) { hex.append(Integer.toHexString((int)chars[i])); } return hex.toString(); } } } Any kind of tips and help is appreciated. Kindly Regards
- 1 reply
-
- Socket Programming
- Tracking Device
-
(and 1 more)
Tagged with: