Tag Info

Hot answers tagged

4

Try.. ## This script will look for all the layers that have feature selected in them in the TOC and export them in seperated shapefile. ##output layer name will be the original name+ _selected e.g. luzon_loss_selected import arcpy arcpy.env.overwriteOutput = True mxd = arcpy.mapping.MapDocument("CURRENT") df = ...


3

To process large files, you need to use a generator which only read/write one line at a time and Python has a command that does that: with. The with statement handles opening and closing the file, including if an exception is raised in the inner block. The for line in f treats the file object f as an iterable, which automatically uses buffered IO and ...


2

I had same problem. I solved the problem. My solution: StringBuffer tmpStr = new StringBuffer(); tmpStr.append("ID,date,tstamp,X_prj,Y_prj,NEAR_FID,NEAR_DIST\n"); SimpleFeature f = null; int index = 0; String ID = null; while(simpleFeatureIterator.hasNext()){ f = simpleFeatureIterator.next(); index = f.getID().lastIndexOf('.'); ...


1

ogr2ogr **-F** MySQL MySQL:mapas,user=xxxx,password=xxxx \ -nln test -nlt MULTIPOLYGON \ -update -overwrite \ -lco ENGINE=MyISAM \ -lco MYSQL_FID=ogr_fid -lco GEOMETRY_NAME=geometry \ /Users/Seph/Downloads/TM_WORLD_BORDERS-0.3/TM_WORLD_BORDERS-0.3.shp The letter f has to be capitalized. regards


1

I've been faced with a similar bug using QGIS v2.6, and have been googling round to no avail. For some reason the pie wouldn't display. I found a way to get it working through trial and error by switching on a blank label (''). Don't know why this worked but the diagram seems to be displaying fine when the label is switched on, then it disappears when the ...



Only top voted, non community-wiki answers of a minimum length are eligible