Tag Info

New answers tagged

3

Not very elegant but this should work: output = Dir + "\\" + (fc[:2]+"_"+fc.split("_")[1][:-4])[:13] By the way, not sure if there was an indentation issue when you pasted the code in GIS.SE, but the for loop should be something like: # Loop for fc in fcList: output = Dir + "\\" + (fc[:2]+"_"+fc.split("_")[1][:-4])[:13] # Process: Polygon to ...


0

You can also use http://www.gpsvisualizer.com/geocoder/ with your own API key for batch geocoding but there are also the common restrictions if you don't want to pay for the service. (Just one addition in general : Outside the USA where you don't have tiger data you could use http://www.gisgraphy.com/ )


0

I generally use a Tiger Geocoder on PostGIS to do all my geocoding. This approach has several advantages. The biggest that it is free and it is something that you own completely. You won't get surprised by any change in the license or terms of use. I'm not sure if you can get all the fields that the process you were using before will give you, but you should ...


0

GDAl ogr2ogr should do what you want: ogr2ogr -f "GPX" -t_srs EPSG:4326 out.gpx in.shp Note that this will only work for line and point features. Polygons must be converted to lines before. You can use it for whole directories with a FOR loop depending on your operating system. For Windows, it should be something like for %%N in (D:\inputfolder\*.shp) ...


3

Try this Frida: Create a folder to store your Shapefiles there (e.g., I've created the folder /tmp/data/, I use GNU/Linux). In QGIS, open the QGIS Python console. Write the following line, editing the right hand side to match the full path to your folder (make sure you include the trailing slash/backslash): myDir = '/tmp/data/' Press Enter. Copy the ...


3

outRaster = os.path.join(outFolder, rasterFile + "bmp") #THIS LINE?? should be outRaster = os.path.join(outFolder, rasterFile + ".bmp") #THIS LINE?? instead of using glob perhaps use the inbuilt arcpy.ListRasters: rasterpath = r"C:\VMshared\small_example_valley2\snowdepthout" outFolder = r"C:\VMshared\small_example_valley2\snowrast" ...


0

This is bordering on a shot-in-the-dark, but try the following changes. Essentially, your parameters were off and you need to generate a list of TIFFs after they are created, not before. Finally, I assume you are using Copy Raster to convert to 16 bit unsigned, otherwise, you can drop this command entirely. import os,arcpy, glob filepath = ...


3

I don't know what kind of experience you have with Python, but you can read and write a layer's description via the description property of the layer class. The following code snippet iterates through all of the layers in your table of contents, and replaces any blank descriptions with the layer's name: import arcpy, os #Get map document object ...


3

Yes, you can do this with pgRouting. As a starting point I would recommend you to look at the pgRouting Workshop. Most efficient for your case might be the one-to-many shortest path funtion named kDijkstra. You could import your node-pairs into a PostgreSQL database or just write a small application that reads the CSV file and then runs the SQL queries. ...


0

This approach uses a list comprehension to rapidly generate the list of relationship classes. The input name is then split by "_" and reconstructed to your specifications. import arcpy, os workspace = r'C:\Users\OWNER\Documents\ArcGIS\Default.gdb' # Generate the list of relationship classes rc_list = [c.name for c in arcpy.Describe(workspace).children if ...



Top 50 recent answers are included