Jump to content

yousef2233

Members
  • Posts

    407
  • Joined

  • Last visited

  • Days Won

    28

Everything posted by yousef2233

  1. 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
  2. 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".
  3. 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
  4. 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")
  5. With Image Classification toolbar it recognizes objects in images
  6. Dear fernandocjr, Check "Integrate" tool in FeatureClass toolset.
  7. dear zsoooc, It seems your problem is Capacitated maximal covering location problems and for the stated problem my recommendation is Esri Arcgis Network Analyst Location Allocation tools.
  8. If you have access to ArcGIS, using "Warp" in modelbuilder or python could automate your process.
  9. http://stackoverflow.com/questions/1613117/resizing-an-image-in-cm-c-sharp bmp.HorizontalResolution , bmp.VerticalResolution "HorizontalResolution and the VerticalResolution are pixel per inch
  10. Sorry my bad take a look http://stackoverflow.com/questions/6455979/how-to-get-the-image-dimension-from-the-file-name
  11. System.Drawing.Image img = System.Drawing.Image.FromFile (@"my image.jpg") now you have img.Width and img.Height
  12. 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?
  13. 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)
  14. As far as I know, yes you can you have image size, camera elevation, camera focus length, so you can solve Scale problem, you have flight azimuth, so you can solve Rotation problem if you have delta X, delta Y and delta Z, so you can solve Movement problem.
  15. I dont know about that. But there is another angle on the top right of the image. I dont remember these courses but my guess is information on top are about flight and on the bottom are about camera settings!!
  16. Hi, Pixel size will solve the problem of scale, How about the rotation problem? Is that Azimuth angle? It seems like an imagery from a water body with an elevation near to zero. do you have the elevation of the camera (1114.1 meters?)? and size of the image? is it tilted?
  17. Use ArcPy instead. I sent you the sample code in pm
  18. 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 ?
  19. 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
  20. 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
  21. 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)
  22. 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
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.

Disable-Adblock.png

 

If you enjoy our contents, support us by Disable ads Blocker or add GIS-area to your ads blocker whitelist