title: android app using a mapping service published on MY OWN PC as an ArcGIS Server IssueS

text: I have this problem been suffering from for a month I'm developing an Android ArcGIS App using the latest esri android sdk , I need to make my app get the map I want to show which is stored in an ArcGIS server that I PHYSICALLY posses; I can't store anything on the arcgis online site, Ican't use portals as well, the esri video lecture about publishing services talked about my case about 2 minutes of the lecture whose duration is more than an hour what I got is it's called enterprise architecture when you have access to all the infrastructure and is independent from the internet. changing the way I'm working is not an option so please don't tell me to do so cause I can't I'm using ArcGIS Server 10.0   in this page: System requirements for 10.2.3—ArcGIS Runtime SDK for Android | ArcGIS for Developers in the last pargraph something is said about apps connecting to a data server offline is that my issue here? Am I obliged to use ArcGIS server 10.2 or later? I'm trying to use Mapping service if not: every time my app tries to inilize the mapview using the url of the service I've published connection is to be refused I'd really appreciate any kind of help any page to read or anything * * *               public class HelloWorldActivity extends Activity {          MapView mMapView;          /** Called when the activity is first created. */     @Override     public void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.main);      // Retrieve the map and initial extent from XML layout     //  mMapView = new MapView(this);         mMapView = (MapView)findViewById(R.id.map);      // Add dynamic layer to MapView         mMapView.setEsriLogoVisible(true);         mMapView.addLayer(new ArcGISDynamicMapServiceLayer("" +         "http://10.0.2.2:8080/syriaBD10/MapServer/MobileServer"));          }      * * * LOG: * * *               08-07 20:59:20.469: D/ActivityThread(11276): setTargetHeapUtilization:0.25     08-07 20:59:20.469: D/ActivityThread(11276): setTargetHeapIdealFree:8388608     08-07 20:59:20.469: D/ActivityThread(11276): setTargetHeapConcurrentStart:2097152     08-07 20:59:20.649: D/dalvikvm(11276): Trying to load lib /data/data/com.esri.arcgis.helloworld/lib/libruntimecore_java.so 0x41943b50     08-07 20:59:20.899: D/dalvikvm(11276): Added shared lib /data/data/com.esri.arcgis.helloworld/lib/libruntimecore_java.so 0x41943b50     08-07 20:59:21.109: E/ArcGIS(11276): url =http://10.0.2.2:8080/syriaBD10/MapServer/MobileServer     08-07 20:59:21.109: E/ArcGIS(11276): org.apache.http.conn.HttpHostConnectException: Connection to http://10.0.2.2:8080 refused     08-07 20:59:21.109: E/ArcGIS(11276):    at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:183)     08-07 20:59:21.109: E/ArcGIS(11276):    at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)     08-07 20:59:21.109: E/ArcGIS(11276):    at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)     08-07 20:59:21.109: E/ArcGIS(11276):    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)     08-07 20:59:21.109: E/ArcGIS(11276):    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)     08-07 20:59:21.109: E/ArcGIS(11276):    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:653)     08-07 20:59:21.109: E/ArcGIS(11276):    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:627)     08-07 20:59:21.109: E/ArcGIS(11276):    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:616)     08-07 20:59:21.109: E/ArcGIS(11276):    at com.esri.core.internal.io.handler.h.a(Unknown Source)     08-07 20:59:21.109: E/ArcGIS(11276):    at com.esri.core.internal.io.handler.h.a(Unknown Source)     08-07 20:59:21.109: E/ArcGIS(11276):    at com.esri.core.internal.tasks.ags.s.a(Unknown Source)     08-07 20:59:21.109: E/ArcGIS(11276):    at com.esri.android.map.ags.ArcGISDynamicMapServiceLayer.initLayer(Unknown Source)     08-07 20:59:21.109: E/ArcGIS(11276):    at com.esri.android.map.ags.ArcGISDynamicMapServiceLayer$1.run(Unknown Source)     08-07 20:59:21.109: E/ArcGIS(11276):    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442)     08-07 20:59:21.109: E/ArcGIS(11276):    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)     08-07 20:59:21.109: E/ArcGIS(11276):    at java.util.concurrent.FutureTask.run(FutureTask.java:137)     08-07 20:59:21.109: E/ArcGIS(11276):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)     08-07 20:59:21.109: E/ArcGIS(11276):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)     08-07 20:59:21.109: E/ArcGIS(11276):    at java.lang.Thread.run(Thread.java:856)     08-07 20:59:21.109: E/ArcGIS(11276): Caused by: java.net.ConnectException: failed to connect to /10.0.2.2 (port 8080) after 1200000ms: connect failed: ENETUNREACH (Network is unreachable)     08-07 20:59:21.109: E/ArcGIS(11276):    at libcore.io.IoBridge.connect(IoBridge.java:114)     08-07 20:59:21.109: E/ArcGIS(11276):    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192)     08-07 20:59:21.109: E/ArcGIS(11276):    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:460)     08-07 20:59:21.109: E/ArcGIS(11276):    at java.net.Socket.connect(Socket.java:832)     08-07 20:59:21.109: E/ArcGIS(11276):    at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:119)     08-07 20:59:21.109: E/ArcGIS(11276):    at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:144)     08-07 20:59:21.109: E/ArcGIS(11276):    ... 18 more     08-07 20:59:21.109: E/ArcGIS(11276): Caused by: libcore.io.ErrnoException: connect failed: ENETUNREACH (Network is unreachable)     08-07 20:59:21.109: E/ArcGIS(11276):    at libcore.io.Posix.connect(Native Method)     08-07 20:59:21.109: E/ArcGIS(11276):    at libcore.io.BlockGuardOs.connect(BlockGuardOs.java:85)     08-07 20:59:21.109: E/ArcGIS(11276):    at libcore.io.IoBridge.connectErrno(IoBridge.java:144)     08-07 20:59:21.109: E/ArcGIS(11276):    at libcore.io.IoBridge.connect(IoBridge.java:112)     08-07 20:59:21.109: E/ArcGIS(11276):    ... 23 more     08-07 20:59:21.199: D/libEGL(11276): loaded /system/lib/egl/libEGL_adreno200.so     08-07 20:59:21.209: D/libEGL(11276): loaded /system/lib/egl/libGLESv1_CM_adreno200.so     08-07 20:59:21.219: D/libEGL(11276): loaded /system/lib/egl/libGLESv2_adreno200.so     08-07 20:59:21.219: I/Adreno200-EGL(11276): <qeglDrvAPI_eglInitialize:299>: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_JB_REL_2.0.3.1_RB1.04.01.01.45.000_msm8625_JB_REL_2.0.3.1_Merge_release_AU (Merge)     08-07 20:59:21.219: I/Adreno200-EGL(11276): Build Date: 01/11/13 Fri     08-07 20:59:21.219: I/Adreno200-EGL(11276): Local Branch:      08-07 20:59:21.219: I/Adreno200-EGL(11276): Remote Branch: m/jb_rel_2.0.3.1     08-07 20:59:21.219: I/Adreno200-EGL(11276): Local Patches: NONE     08-07 20:59:21.219: I/Adreno200-EGL(11276): Reconstruct Branch: NOTHING     08-07 20:59:21.259: D/OpenGLRenderer(11276): Enabling debug mode 0      * * * ![enter image description here](http://i.stack.imgur.com/jUlMG.png)


title: Cleaning GPS track data

text: I have data captured with a GPS tracking unit. Some track have bad/cold starts and the only way to determine the track quality is by using the altitude. Unfortunately I don't have the raw GPS data and only an array or Lat, Long & Altitude. A typical bad start will have an altitude that start at negative with a steep ramp up to the proper altitude. Is there any maths gurus and/or libraries (code) out there that can help me with an algorithm to detect and clean my track data?


title: Mosaicing indexed colour rasters with independent colour tables

text: I have a large number of single band rasters that are colour indexed TIF files. I want to mosaic them using GDAL (or similar non-proprietary software with a Python API I can call as part of a bigger script). The images all represent the same sort of thing but the information is embedded in the colour tables for each image and not the raster pixel value as such (i.e. all the colour tables are independent). So, sky-blue (say) always means the same thing but does not always have the same position in the different colour tables. Mosaicing them is easy as a greyscale image, but then I lose the colour information which is vital. I can't use the '-pct' switch in gdal_merge.py because that only grabs the first colour table and causes some or all of the other tiles in the mosaic to display incorrectly. My gut feeling is that there is nothing for it but to convert all the images to three-band RGB (and consequently balooning the data volume) and mosaic the images with a possible post process step to create a new unified colour table and swap the mode back to single band indexed colour. However, I'd value opinion and work-flow suggestions on this (the process must be automatable). Is there a better way of doing it? **EDIT:**   To be clear, I have no way of knowing whether any particular tile contains the full range of colours represented by all the tiles together.


title: Qgis C++ plugin translation

text: I'm having issues with the translation of my Qgis plugin.   ` static const QString sName = QObject::tr( "Editeur Monoscopique 3D" ); `MyClass::MyClass( QgisInterface * theQgisInterface ): QgisPlugin( sName) {`      ` QSettings tSettings;   QString qsUserLocale = tSettings.value( "locale/userLocale", "" ).toString(); `                   if ( ( qsUserLocale != "fr_FR" ) && ( qsUserLocale != "fr" ) )         {                 QString qsTranslationPath = ":/prefix/en_US.qm" ;                 QFileInfo tFileInfo (qsTranslationPath) ;                 if (tFileInfo.exists())                 {                         //QTranslator translator;                         if (m_tTranslator.load( "en_US", ":/prefix" ) )                                 qApp->installTranslator(&m_tTranslator);                 }         }      } ` The problem is that `sName` is declared before installing the translator   `qApp->installTranslator(&m_tTranslator);` and so its text is not translated !   How can I fix this?


title: GDAL RasterIO grabbing memory

text: I have written an application in c++ to read LiDAR files and convert to various rasters using GDAL; this worked very well on small scale tests (47 LAS files) however, when used on a live task the memory usage climbs although no further memory is allocated by the application. It appears that the memory is ending up in "mapped file" memory (using RamMap by sysinternals). Given that this is a 32bit application on a 64bit system I suspect the next call for memory goes beyond the 4GiB limit from the initial memory allocation and the application is no longer able to continue; debug shows that the memory is unallocated with an address of 0x0000. Going into the read loop the application is approximately half to three quarters of a gigabyte (hard to tell from task manager) after reading 8000 LAS files memory is 9+ GB (7GB of "mapped file" with less than 1MB in the standby column). During the looping I am using fstream to read the LAS file and GDALDataset->RasterIO with GDALRWFlag::GF_Read and GDALRWFlag::GF_Write to handle raster reading and writing. Can anyone advise on what is causing the memory to be used by RasterIO and more importantly how to reduce this or free up the memory after I/O. If anyone has encountered similar situations would I be best to write to blocks emulating rasters (like ESRI BIL format) using fstream and making them into real rasters at the last possible moment or is hanging onto the memory a windows 7 problem? Some stats that may help: OS : Windows 7 Professional 64bit. RAM : 16GB. PageFile : None. i7 CPU, I/O occurs on RAID 5 volume (but has been tested on single drive with similar results) Sorry, no code is available.. I might get into trouble for sharing. I'll try my best to express as pseudo code..               I start by reading all of the LAS files in a directory and then using a min/max      combine into an overall extent called unimaginatively Xmin,Ymin,Xmax and Ymax then      create the rasters to cover this extent.              double GeoTransform[6];         GeoTransform[0] = Xmin;          GeoTransform[1] = CellSize;         GeoTransform[2] = 0;                             GeoTransform[3] = Ymax;                      GeoTransform[4] = 0;                             GeoTransform[5] = -CellSize;              GDALDataset* MinRasDS; // There's an if statement before initializing this         MinRasDS = (GDALDataset*) IMGdriver->Create(MinRastName,Cols,Rows,1,GDALDataType::GDT_Float32,NULL);         MinRasDS->SetGeoTransform(GeoTransform);         MinRasDS->SetProjection(SR_Text);          Create a memory block big enough to contain enough of the big raster to cover a single LiDAR tile     float* MinRastData; // also an if statement here, the memory is only allocated if min raster is selected     MinRastData   = new float[ArrayElements];          Create a memory block big enough to grab some LAS records     char* RecordBlock = new char[Gulp * SizeOfRecord]; // always created          then loop for each file     for (fCnt = 0;fCnt < FileCount;fCnt++)     {         establish the extent of this file using the header +/- 50 cells as LiDAR extents are imprecise         pFile.open(NodeIndex[fCnt]->FullPath,ios::in | ios::binary);         pFile.read(Fpart,sizeof(LAShdrFirst));         pFile.seekg(131,ios::beg); // Header spatial starts at 131         pFile.read(SpatPrt,sizeof(LAShdrSpatial));         LAShdrFirst* HeadrFirst  = (LAShdrFirst*) Fpart;         LAShdrSpatial* HeadrSpat = (LAShdrSpatial*) SpatPrt;              TileXmin = HeadrSpat->MinX - (50 * CellSize);         TileYmax = HeadrSpat->MaxY + (50 * CellSize);         TileXmax = HeadrSpat->MaxX + (50 * CellSize);         TileYmin = HeadrSpat->MinY - (50 * CellSize);              calculate the offset and the size of this extent to the larger raster and         then read in the values; there is no guarantee tiles are not overlapping         BlockCols = (TileXmax - TileXmin) / CellSize;         BlockRows = (TileYmax - TileYmin) / CellSize;         ColOff = (TileXmin - Xmin) / CellSize; // how many cells to get here!         RowOff = (Ymax - TileYmax) / CellSize; // top-down reference              MinRasDS->RasterIO (GDALRWFlag::GF_Read,ColOff,RowOff,BlockCols,BlockRows,             MinRastData,BlockCols,BlockRows,GDALDataType::GDT_Float32,1,NULL,0,0,0);              pFile.seekg(HeadrFirst->Offset_to_Data,ios::beg); // go to the first record              Read a chunk of las records          pFile.read(RecordBlock,Gulp * SizeOfRecord);         for (pCnt = 0;pCnt < Gulp;pCnt++)         {             Type1 = (LASrec1*) &RecordBlock[pCnt*SizeOfRecord];             modify the values in the array using each point         }         MinRasDS->RasterIO (GDALRWFlag::GF_Write,ColOff,RowOff,BlockCols,BlockRows,             MinRastData,BlockCols,BlockRows,GDALDataType::GDT_Float32,1,NULL,0,0,0);         MinRasDS->FlushCache();         pFile.close();     }          delete[] RecordBlock;     delete[] MinRastData; // provided it was created first      I call FlushCache() every time to ensure the data is written and ready for the next read which due to alphanumeric ordering is almost certain to be adjacent and overlapping by at least 100 pixels. This pseudo code is very simplified, in truth there is up to 7 rasters being created and only the min raster is shown. I have several printf statements within the block to show progress so I can track where the process is up to. It is while the program is reading the LAS files that the memory increases, from 4GB used on the first file up to 9GB used on the 8000th file. Using SysInternals RamMap I found that the data building up is in the _system working set_ which I could empty periodically with no detriment to running processes. This is not an ideal situation as most of this processing is done overnight.


title: How modify text labels in layout qgis 2 from python code

text: I am a beginner in python. How modify text labels in layout(composer) qgis 2.0.1 from python code? in cookbook - http://www.qgis.org/en/docs/pyqgis_developer_cookbook/composer.html no solutions


title: How to speed up batch watershed delineation?

text: Hi this is probably a longer-winded question than it needs to be, but please bear with me. I have a large number of pour points - approximately 250,000 for which I want to delineate the upstream watershed area using ArcHydro's "Batch Watershed Delineation". Given that it takes roughly 4-5 hours for 1000 points to delineate on my system I need to find a faster way than just running these as individual processes on my computer. Currently I am testing out running 4 sets of 1000 side-by-side on my 64bit windows i7 system, so that will likely speed up the process, but I think it could be sped up even more through an opportunity to access a "condor" type system which runs multiple applications of a program at any given time. The catch is that I need to talk to ArcGIS from a command line and also get ArcHydro to work from command line to do the upstream watershed delineation. I know the files that I require, so would likely just need to know if it is possible to extract the code that ArcHydro uses to define the entire upstream catchment area of points. I can't seem to find that easily within the ArcGIS GUI. Would anyone know of a way to identify/extract the code that ArcHydro is using to run "Batch Watershed Delineation", and if so would you also know how to call to ArcGIS to do that process without opening ArcGIS and running it from a command line? Any ideas or suggestions would be greatly appreciated! Thank you.


title: Most useful program to create an accurate city map for printing?

text: I googled around and several sources said this would be a good place to ask about mapping so here goes. Thanks in advance for reading! I want to make my own city map (specifically Paris) as a gift to the girlfriend before she visits later this year. I would like for it to be aesthetically pleasing and as professional as possible since I'm planning to make a foldout map-sized professional print of the final product and perhaps place it inside a notebook containing other useful travel things. At first, I thought of hand-drawing the map, but figured it would be much too time-consuming to draw every street in Paris by hand. Then I considered using Illustrator or a similar image creation/editing program to fill in the details of an available map. But, I think using some sort of more professional mapmaking software with GIS capabilities would actually be best, since I'd like to accurately place landmarks, sights, museums, and other destinations of interest, as well as metro stations, street names, and the other bread and butter features of a good city map. I know I could easily find a good city map of Paris, but I'd like to make it a more personal gift, as well as do my own customizations, like specifying the color scheme and selecting which features to include and label. Also, I really enjoy geography and love to learn new things, so why not get my hands dirty with GIS and mapping while making this gift? So, what are your suggestions for a good program to use? One which allows accurate placement of features and landmarks, has color and style palettes and tools to customize the appearance, and exports to high quality image files for large-format printing. Thanks for your input!


title: Issue with branching model

text: I am having an issue with a branching model when the iteration tool is used. The test code/scripts/models are in Google docs or arcgis forums It runs and creates both versions of the process whereas it should only have either _GradedNULL or GradedDown. The test is simple and works. The reason to do this is that the grading down set of processes takes a few hours to complete on each of the input text file and each area has more than 70. So if this branching worked it would save days of processing time.


title: Getting XY map coordinates on mouse clicks as input variables into a python script

text: This is my first time coding in python, so bear with me. I wrote a script to calculate an analytical solution to find the orientation of a plane based on three points. I'm using ArcGIS 10.1.               # Input points     x1 = float(arcpy.GetParameterAsText(1)) # Point 1     y1 = float(arcpy.GetParameterAsText(2))     z1 = float(arcpy.GetParameterAsText(3))     x2 = float(arcpy.GetParameterAsText(4)) # Point 2     y2 = float(arcpy.GetParameterAsText(5))     z2 = float(arcpy.GetParameterAsText(6))     x3 = float(arcpy.GetParameterAsText(7)) # Point 3     y3 = float(arcpy.GetParameterAsText(8))     z3 = float(arcpy.GetParameterAsText(9))          # Plane equation     A = (y1*z2) + (z1*y3) + (y2*z3) - (z2*y3) - (z3*y1) - (z1*y2)     B = (z2*x3) + (z3*x1) + (z1*x2) - (x1*z2) - (z1*x3) - (x2*z3)     C = (x1*y2) + (y1*x3) + (x2*y3) - (y2*x3) - (y3*x1) - (y1*x2)     D = (z1*y2*x3) + (z2*y3*x1) + (z3*y1*x2) - (x1*y2*z3) - (y1*z2*x3) - (z1*x2*y3)     E = np.sqrt(A**2 + B**2 + C**2)          AZ = np.arctan(A/B) * (180/np.pi) # Preliminary azimuth for dip direction     dip = np.arcsin(-np.cos((np.pi/2) + np.arccos(C/E))) * (180/np.pi) # True dip          # Test for quadrant     alpha = A/E     beta = B/E          # Place dip-direction in proper quadrant     if alpha > 0 and beta > 0:       DD = AZ     elif alpha > 0 and beta < 0:       DD = 180 + AZ     elif alpha < 0 and beta < 0:       DD = 180 + AZ     elif alpha < 0 and beta > 0:       DD = 360 + AZ          # Right-hand rule strike     if DD - 90 < 0:       RHR = 360 + (DD - 90)     else:       RHR = DD - 90          # Centroid coordinates     Cx = (x1+x2+x3)/3     Cy = (y1+y2+y3)/3     Cz = (z1+z2+z3)/3          # Insert centroid point     cursor = arcpy.InsertCursor(arcpy.GetParameterAsText(0)) # Feature class must already exist     row = cursor.newRow()     row.Shape = arcpy.Point(Cx,Cy,Cz)          # Populate table     row.X = Cx     row.Y = Cy     row.Z = Cz     row.DD = DD     row.dip = dip     row.RHR = RHR     cursor.insertRow(row)     del cursor, row          # Refresh MXD     arcpy.RefreshTOC()     arcpy.RefreshActiveView()      This works, except that the user has to hover each point and manually enter the coordinates. Ideally, I would like: (1) the user initially define the target feature layer in a pop-up menu, and hit OK; (2) click on the map to extract the first XY map coordinates; (3) pop-up queries the user for the first Z, hit OK; (4) click on the map to extract the second XY map coordinates; (5) pop-up queries the user for the second Z, hit OK; (6) click on the map to extract the last XY map coordinates; (7) pop-up queries the user for the last Z, hit OK; then (8) the script runs to completion. I found the ESRI tool tutorial that allows the map XY to be displayed on a message box after a mouse-click:               import arcpy     import pythonaddins          class MC(object):         """Implementation for MouseClickSample_addin.MCtool (Tool)"""         def __init__(self):             self.enabled = True             self.shape = "NONE" # Can set to "Line", "Circle" or "Rectangle" for interactive shape drawing and to activate the onLine/Polygon/Circle event sinks.         def onMouseDownMap(self, x, y, button, shift):             message = "Your mouse clicked:" + str(x) + ", " + str(y)             pythonaddins.MessageBox(message, "My Coordinates")       I cannot figure out how this Python Add-in can pass the XY variables as input to my script.


title: How to calculate sums for all fields in a table?

text: > **Possible Duplicate:**   >  are there any methods can choose all field and make the SUM for each fields > or I must do it one by one? Are there any methods that can calculate the summary statistic table for all the fields existing in a table with summary type **SUM** I have a feature class with about 300 fields and I need an automatic method to sum all these fields once or must I choose one by one?


title: trouble deleting data in an fgdb using python

text: I am trying to use delete_management to delete files in a gdb based on whether or not they are in a list. I keep getting an error with the delete_management tool that says the file either does not exist or is not valid. I can't figure out what the problem is?               import arcpy, os, easygui, sys     mxd_path = easygui.enterbox("Enter directory where mxds are located:",title='Search for Data Sources')     lyr_lst = []     lyr_lst_files = []     fl_nm_lst = []     FCList = []     RList =[]     #out_loc = easygui.enterbox("Enter ouput directory for copying files:")     out_loc = r'C:\GIS\Assimilate_Mxd_Data\Assimilate_Mxd_Data_TESTING\Output Data\test_output.gdb'          #set mxd and output geodatabase directory paths, exit if not specified     if mxd_path == None or mxd_path == '':         sys.exit()     if out_loc == None or  out_loc == '':         sys.exit()               #generate a list of feature classes and a list of rasters already exist in     #output geodatabase     for gdb, fd, fc in arcpy.da.Walk(out_loc,datatype='FeatureClass'):         for f in fc:             FCList.append(f)     for gdb, fd, rasters in arcpy.da.Walk(out_loc,datatype='RasterDataset'):         for rstr in rasters:             RList.append(rstr)          #walk through mxds in mxd path and generate unique list of layers sourced in all     #mxd documents     for dirpath, dirnames, filenames in os.walk(mxd_path):         for filename in filenames:             fullPath = os.path.join(dirpath, filename)             basename, extension = os.path.splitext(filename)             if extension == ".mxd":                 mxd = arcpy.mapping.MapDocument(fullPath)                 LyrList = arcpy.mapping.ListLayers(mxd)                 for item in LyrList:                     if item.supports("DATASOURCE"):                        lyr_lst.append(item.dataSource)          lyr_lst_unique = list(set(lyr_lst))          #retrieve file names without extension from unique mxd layers lists, to compare     #with contents of output gdb     for lyr in lyr_lst_unique:         path, file = os.path.split(lyr)         fl_nm = os.path.splitext(file)[0]         fl_nm_lst.append(fl_nm)          #compare file names in lyr_list_unique to lists of feature classes and rasters that     #already exist in output gdb. If file names are not in FCList and RList, meaning     #they do not already exist in the gdb, copy files to output gfb         if fl_nm not in FCList and fl_nm not in RList:             try:                 arcpy.FeatureClassToGeodatabase_conversion(lyr,out_loc)             except:                 print 'Input file ' + lyr + ' is not a feature class'                 try:                     arcpy.RasterToGeodatabase_conversion(lyr,out_loc)                 except:                     print 'Input file ' + lyr + ' is not a feature class or a raster'               #compare file names in fl_nm_list to lists of feature classes and rasters that     #already exist in output gdb. If files exist in gdb that are not found in mxd     #unique layers list, delete         for gdb, fd, fc in arcpy.da.Walk(out_loc):             for f in fc:                 if f not in fl_nm_lst:                     arcpy.Delete_management(f)


title: Splitting Shapefiles

text: I am trying to create a code that will accept the input of a shapefile, and separate each of its features into separate shapefiles into a specified directory location. Can anyone help ? I am trying to use pyshp module, but it is only able to delete one file.


title: Can't open ArcCatalog Database Connection SQL database Tables with field names greater than 31 characters

text: I am using SQLEXPRESS as a test environment. My issue: I have a database connection in ArcCatalog to a SQL database. Some tables in the SQL database have field names greater than 31 characters and these tables will not open in ArcCatalog. Is there a way to work around this? Can the greater than 31 character SQL Field names be given aliases using Server Management studio and then re-connected to ArcCatalog? Or do the field names in the SQL database simply need to be shortened (which will be tough as it is owned by a 3rd party). Thank you


title: How to sum up all field values in QGIS modeler

text: I am building a model to generate two zones around a point, a 250m-buffer, and a ring of 250 to 1000m, where i recalculate values from an other layer according to the intersections share. The purpose is to examine if values in the 1. buffer are smaller than in the second. The rest of explanations would take too long and everything goes fine so far. ![enter image description here](http://i.stack.imgur.com/LTGch.png) The final step would now be, to sum up the values for each layer, but somehow I can't find a solution. There is the "Statistics by categories" function in the modeler which produces a stats-table i could join back to my layers and then dissolve them, but ... for whatever reason ... this only produces values for min, max, mean and stddev, but no sum of values!! All dissolve functions available, do not offer any summing or whatever actions. Anyone got any idea? I'm stuck 1 meter in front of the finish line ... P.s: there is NO option to do anything manually there. Simply too many points with too many other parameters to check each time. Thats why I made the model ... UPDATE: Now I had the ideas to create centroids from all intersected polygons and then do a SAGA Points in Polygon statistic (which includes a SUM !!!!) with the un-intersected buffer a few steps before ... but this time the SAGA function is buggy and doesn't work.


title: How can I print Openlayers with base OSM and Geoserver WMS layers?

text: I have a map I want to print once the user open some layers. The layers are geoserver wms and the base layer is OSM. I know geoserver has printing module (which is installed and working because I get reply from geoserver/pdf/info.json?var=printCapabilities What I dont understand is how I use it to print the current map with visible layers. I've looked at GeoExt example (mapfish) but it didn't help me understand. **Update 1 :** I've generated the following URL by code :               http://77.235.53.170/geoserver/pdf/print.pdf?spec={%22units%22:%22degrees%22,%22srs%22:%22EPSG:4326%22,%22layout%22:%22A4%22,%22dpi%22:%22300%22,%22mapTitle%22:%22This%20is%20the%20map%20title%22,%22comment%22:%22This%20is%20the%20map%20comment%22,%22resourcesUrl%22:%20%22http://77.235.53.170/img%22,%22layers%22:[{%22baseURL%22:%22http://77.235.53.170/geoserver/Lehavim/wms%22,%22opacity%22:1,%22singleTile%22:true,%22type%22:%22WMS%22,%22layers%22:[%22%D7%A7%D7%95%20%D7%9E%D7%99%D7%9D%22],%22format%22:%22image/jpeg%22,%22styles%22:[%22%22]}],%22pages%22:[{%22center%22:[3875254.1134954,3680894.557955],%22scale%22:32000,%22rotation%22:0}]}      and I'm getting empty PDF (only with title)... What could be wrong ?


title: Loading postgresql tables in Arcgis for Desktop 10.1

text: I have postgresql version 9.0.5 installed and configured. Also in my ArcGIS for Desktop 10.1 in "Add Database connection" I have my postgresql connected and I can see all the tables in it (figure1). ![enter image description here](http://i.stack.imgur.com/m7p79.jpg) When I used "Add Data" and select lets say "database.sde.part9" the table is added to the table of contents , but I can't see the data in the table,its like empty. ![enter image description here](http://i.stack.imgur.com/99WlK.jpg) Also for another table (database.sde.dauid2011) , when I add it to the table of contents I couldn't see it and I did not get any errors! I tried to use "Load Data" option by right clicking on the tables , but for some dauid2011 table I got this error "cannot load into non simple data" and for part1 to part9 tables I got this error: "Attribute column not found" I want to use join theses tables with the shape files I imported before based on a common column. I have chosen "UTF-8" encoding for the database. all the tables are under "sde" schema. following figure shows what is under schema "sde". ![enter image description here](http://i.stack.imgur.com/GZiUT.jpg) I appreciate any help.


title: Batch script converting and resampling orthophotos

text: I would like to convert more than 300 orthophotos produced at scale `1:8.000` with a pixel size of 0.8m X 0.8m from Ecw format to Tiff format and after resampling pixel values. My aim is to batch convert the input format (Ecw) to output format (Tiff) and after to resample the pixel size (values) 10mX10m. How could I right this script using gdal to batch process this raster files. I'm using FWTools on Windows XP Thanks


title: Phenological event extraction in IDL

text: I’m doing phenological study using a threshold method in IDL. I have a twelve- band image in 2005 (format is in .tiff not ENVI format). Twelve-band means that monthly images (Jan to Dec) have been stacked in ARCGIS. I know how to set threshold value on a single image. But I don’t know how to set a threshold value on multiband image to determine the date when growing season starts and ends. Start of the season is determined as the day when the NDVI value is return to threshold value in a given year. So what I’d like to ask:   1. Can the stacked image be in .tiff format to be imported into IDL via the `envi_open_data_file` procedure. Or is an ENVI-formatted file required as input?   2. What kind of procedure and function should I use to extract start and end of season using threshold method on multiband image? The start/end date of season varies by vegetation type. Basically I want one image showing different places are different phenological date. Is there anyone who can help me for this?  Thanks a lot


title: WMS,WFS Services in Mapserver

text: I am new at Mapserver. I was trying to get `WMS` and `WFS` services started but could not get any simple article to start the services from scratch and display service data into openlayers. Please suggest some simple article to start the WMS and WFS services on MapServer and use in openlayers. Thank you in advance.


title: How to create more networking osm

text: Using localhost page generated by osm2po roteamente noticed that the link is made to link even disabling snapping. ![enter image description here](http://i.stack.imgur.com/dURdR.png) Logically thought to create more nodes in the network, but how can I do this without losing the topology of the data?


title: MapServer (MS4W) test page from shapefile shows only blank white square?

text:
I am trying to create a test page with mapserver and shapefile. At the moment I just want to get the map shown on my test page. I have gotten the EXTENT coordinates by opening shapefiles with QGIS - I am sure those are correct. I have followed this tutorial as an example. I am accessing my test page via this link:               http://localhost:1025/cgi-bin/mapserv.exe?map=C:\MS4W\ms4w\Apache\htdocs\mapfile.map      Problem I have - map is not loaded - I only see a blank white square. When I look at contents of ms4w\Apache\htdocs\output , I see that images are actually getting generated but all of them are white (empty), for example:               lat_pmts_region13941906093724.png     lat_pmts_region13941910095144.png     lat_pmts_region13941913405500.png     ...      Shapefiles are located at this location: **C:\MS4W\ms4w\Apache\htdocs\shapefiles**. An example of what is logged to error file:               [Fri Apr 11 11:19:32 2014].883000 CGI Request 1 on process 7888     msWCSDispatch20(): wrong service (none)     msWCSParseRequest(): request is KVP.     msWCSDispatch(): SERVICE and REQUEST not included     msDrawMap(): rendering using outputformat named png (AGG/PNG).     msDrawMap(): WMS/WFS set-up and query, 0.000s     msDrawMap(): Layer 0 (lat_pmts_region), 0.001s     msDrawMap(): Drawing Label Cache, 0.000s     msDrawMap() total time: 0.002s     msSaveImage(C:/MS4W/ms4w/Apache/htdocs/output/lat_pmts_region13972043727888.png) total time: 0.138s     [Fri Apr 11 11:19:33 2014].24000 mapserv request processing time (loadmap not incl.): 0.141s     [Fri Apr 11 11:19:33 2014].24000 msFreeMap(): freeing map at 0246EFD8.      ms4w\Apache\htdocs\template.html:                    <title>Mapserver Template HTML Document</title>
Template
                     It looks like this: ![Test page looks like this](http://i.stack.imgur.com/iixVl.png) C:\MS4W\ms4w\Apache\htdocs\mapfile.map:               MAP         CONFIG "MS_ERRORFILE" "C:/MS4W/ms4w/tmp/ms_error.txt"         DEBUG 5         NAME lat_pmts_region         STATUS ON         SIZE 800 600              EXTENT 286878.53 142087.25 799084.10 481123.75         #   lat_pmts_region              UNITS METERS         SHAPEPATH "shapefiles"         IMAGECOLOR 155 155 155              WEB         TEMPLATE "template.html"         IMAGEPATH "C:/MS4W/ms4w/Apache/htdocs/output/"         IMAGEURL "/output/"         END              LAYER         NAME "lat_pmts_region"         DATA lat_pmts_region         STATUS DEFAULT         TYPE POLYGON         END     END      I will gladly provide more information if it's asked.


title: Does anyone know of a good unaffiliated review of Rockworks?

text: I've been struggling to find a good software package for drillhole data management, subsurface geology modelling, and visualization (both 2D and 3D): something that can also be used to produce sophisticated vertical and inclined cross sections. I took the Gemcom GEMS course and found the software too complex (database setup, plotting) and rigid. It's also astronomically expensive. I evaluated Target for ArcGIS by Geosoft using their tutorial and data and found it lacking features, buggy and slow. (Dumbed down version that works with ArcGIS.) As I was to evaluate the full standalone version of Target I stumbled over a recommendation for Rockworks by RockWare. The videos on their site look amazing. Too good to be true to be honest. **I would like to read some unaffiliated reviews of the software but am having a difficult time finding anything valuable.** Can someone please provide a link a share a few thoughts about the software package?


title: What are the advantages of pgSQL+PostGIS+pgRouting over a simple MySQL+handwritten routing algorithms?

text: **Goal:** To have a routable set of roads in a database and to have a software that can calculate the shortest path (e.g. simple Dijkstra) through this set in a reasonable amount of time (up to 2 seconds). Required to be usable in the real world by real vehicles. **Problem:** I have written a few parsers to parse .osm nodes and edges into a MySQL database. Then I applied a Java application that loads all the nodes and edges into memory, creates a graph from those and does a Dijkstra's algorithm routing on it. I am satisfied with the speed that it has. Recently I found out that Openstreetmap project has switched from MySQL to PostgreSQL. Then I found the pgRouting project. http://www.slideshare.net/antonpa/shortest-path-search-for-real-road-networks- and-dynamic-costs-with-pgrouting-1097533 I was impressed by the possible advantages:   * it can take traffic lights into account;   * it can take crossings into account;   * it can take signs and restrictions into account;   * it even can take slopes into account!   * it can take turn restrictions into account;   * it even promises to take weather conditions into account. **So the questions are:**   1. Are all those advantages real?   2. Isn't pgRouting a kind of a blackbox? There are just a few tutorials on how to use it, and even these tutorials introduce even more unanswered questions. Isn't it simpler to build the desired [Goal] system from scratch?   3. What's the whole purpose of storing routable data the PostgreSQL/PostGIS way (geometry columns, strange database schema) instead of having just two tables - nodes and edges in a simple MySQL database?


title: Reprojected MODIS NDVI has range from -32768 to 32767, expected -1 to 1

text: I'm new to StackExchange and to remote sensing. I am working with MOD13Q1 250m 16-day MVCs. My goal is to use NDVI time-series to classify cropping pattern and crop type, then link this data to water issues and rainfall. I am working with ENVI 5.1, which is also new to me. I have used the Modis Reprojeciton Tool to reproject and mosaic two MODIS tiles covering Sri Lanka. The data has been reprojected into WGS84_UTM_44N. I output the data as a GeoTiff and have successfully loaded this into ENVI. Here's my question: the pixels in the reprojected/mosaicked raster for the NDVI band (which is what i will need for the time-series analysis) run from -32768 to 32767, not from -1 to 1. Is this just some silly misinterpretation on my part, do I need to manipulate the raster somehow with ENVI, or have I distorted the data when reprojecting it?


title: R packages for deriving spatial clusters from origin-destination matrix

text: I have a matrix of origin-destination flows and I am trying to figure out the best way to derive X number of functional spatial clusters from the data. I haven't done this particular type of analysis before, but can I treat the O-D matrix as a dissimilarity matrix and simply use a hierarchical clustering algorithm as discussed here? What, if anything, do I need to do to the O-D matrix if I'm going to go this route? Thanks in advance.


title: Is there a way to force leader lines to polyline centroids in ArcGIS Desktop 10?

text: I'm making a pretty standardized set of maps that include alphabetical labels for specific stream segments. As it stands, all my label leader lines snap to the downstream end of my polylines. My current workaround is to convert labels to annotation and hand-place them but this is getting to be a real time sink. Thus I ask: is there a setting I'm missing, or other way to get leader lines to snap to a line centroid? Full disclosure: [edited to add] Running ArcEditor license level. I don't have the Maplex extension and am not likely to get it.


title: Is it possible to undo and redo outside edit session in ArcObjects?

text: I would like to know if it is possible to undo and redo changes outside of an edit session? If yes, how can I do it in ArcObjects using .NET? I am working on an ArcSDE 10.1 versioned geodatabase?


title: Map missing in map composer and when I print map

text: I am new to QGIS and am probably missing something but when I set up a new composer and add a map to the page nothing appears. I have pressed the render button and the up date with no results. When I print the map there is no map but the legend I added to the page is there. Any help would be appreciated. I am using the latest version of GGIS on a MAC running Lion. Andy


title: How can I convert my scale bar from milimetres/ degree into metres or kilometres using QGis?

text: I am making a map in print composer. I am trying to add the scale bar and it's appearing as a box with a zero digit inside it. What should I do to make it display properly?


title: How to get raw values from OGC Web Coverage Service (WCS) via ArcGIS for Desktop 10.1?

text: I posted this a few days ago to the ArcGIS Discussion Forum but have had no response so thought I would try here as well. I'm new to Web Coverage Services (WCS) but have found it easy to add one using ArcGIS for Desktop 10.1 and this service URL: http://nsidc.org/cgi- bin/atlas_south?service=WCS&request=GetCapabilities&version=1.1.1 I add the service by Liu et al. and get a nice display. However, when I use Identify to look at the values for any cell on the grid/coverage all Stretched Values and Pixel Values are in the range 0-255. I would expect to see 0-255 used for the Stretched Values but thought the Pixel Value would be holding raw data with values well in excess of 255. When I export data from the WCS to a file geodatabase raster the values there are 0-255 too. Is it possible to access the raw values held in a WCS? (Hopefully I am just misunderstanding how to get my desired result) **UPDATE** NSIDC have said that their server is configured to provide data in GeoTIFF format. Their **docs** make it appear that GeoTIFFInt16 and GeoTIFFFloat32 are both options but they suspect that the GetCoverage request generated by ArcGIS for Desktop 10.1 is using a format that maps the data into an 8-bit format instead. As a supplementary question, does anyone know if there is an option within ArcGIS for Desktop to select the GeoTIFF format used by GetCoverage or a way to trap the GetCoverage URL that it is passing to the WCS server?


title: Are geotiffs with the embedded georeferencing information supported?

text: I am able to load raster data into my postrgreSQL data base however when I display in Quantum GIS the pixel height and width of the image is being translated into real world lat/lon coordinates, as a result my image appears 1000 degrees wide and 600 degrees high which is obviously wrong. The Image I am loading is a geotiff ie the coordinate header is embedded in the file rather than a world file. I am using the following combination of database and software: Quantum GIS 1.8.0 Postgis 2.0 PostgreSQL 9.1 Can anyone elaborate or point me in the direction of an explanation of how to get the image to load correctly? **Update:** This is now working for me as I have tried loading using a tiff file which includes the separate world file (.tfw). So I take it geotiffs with the embedded georeferencing information are not supported?


title: How to get full path of layer selected in drop-down box for ArcGIS Python tool

text: I have a Python script-based tool in ArcGIS. One of the parameters for the tool is an input raster file, which I've set (using the properties of the tool within the toolbox) to be a Raster Layer. This means that when I execute the tool I get the option to select that parameter from a dropdown list of currently loaded raster layers, or by navigating to find a new raster layer within the filesystem. I am then using the standard `arcpy.GetParameterAsText(0)` code to get the parameter into my Python script. This works fine when I select a file by browsing through the filesystem, as the text in the dialog is the full path to the file, but when I just select from the dropdown list the text I get back is just the filename (eg. `file.tif`). The code I am running needs to know the full path to the file - how do I get this? If I could assume that the file was always in the workspace then I could append the filename to `arcpy.env.workspace`, but I can't assume that. Do I need to iterate through all of the layers that are loaded until I find one with the same name, and then find its full path, or is there an easier way?


title: Geoserver - Oracle Plugin not Working....?

text: I am using Geoserver 2.2.5 & added 'geoserver-2.2.5-oracle-plugin.zip' at '..\geoserver 2.2.5\webapps\geoserver\WEB-INF\lib' to connect with oracle data. **after restarting Geoserver, No datastore like 'Oracle/Oracle NG' is found.** The two jar files(in 'lib' directory) are - 1) ojdbc.jar ;   2) gt_jdbc_oracle_8.7.jar. kindly,note that in the same process I installed 'MySql'Plugin & it is working fine. Thanks in advance


title: "Couldn't load PyQGIS" Error running QGIS on Ubuntu 14.04

text: I have installed QGis on Ubuntu 14.04 from the QGis stable repository; it went fine with no errors reported. But when I launch QGis I get this huge window with the following message: > Couldn't load PyQGIS.   > Python support will be disabled. > > Traceback (most recent call last):   >  File "", line 1, in   >  File "/usr/lib/python2.7/dist-packages/qgis/ **init**.py", line 35, in   >  from qgis.core import QgsFeature, QgsGeometry   >  ImportError: /usr/lib/python2.7/dist-packages/qgis/core.so: undefined > symbol: _ZN16QgsComposerShape12setSceneRectERK6QRectF > > Python version:   >  2.7.6 (default, Mar 22 2014, 23:03:41) [GCC 4.8.2] > > QGIS version:   >  2.2.0-Valmiera 'Valmiera', exported > > Python path:   >  ['/usr/share/qgis/python', u'/home/desousa/.qgis2/python', > u'/home/desousa/.qgis2/python/plugins', '/usr/share/qgis/python/plugins', > '/usr/local/lib/python2.7/dist- > packages/MapScript-6.0.1-py2.7-linux-x86_64.egg', > '/usr/local/lib/python2.7/dist-packages/virtualenv-1.8.4-py2.7.egg', > '/usr/local/lib/python2.7/dist-packages/pip-1.2.1-py2.7.egg', > '/usr/local/lib/python2.7/dist-packages/pytz-2012j-py2.7.egg', > '/usr/local/lib/python2.7/dist-packages/python_dateutil-2.1-py2.7.egg', > '/usr/local/lib/python2.7/dist-packages/six-1.3.0-py2.7.egg', > '/usr/lib/grass64/etc/python/grass/script', '/usr/lib/grass64/etc', > '/usr/lib/grass64/etc/python', '/usr/lib/grass64/lib', > '/usr/lib/grass64/bin', '/usr/lib/grass64/scripts', '/usr/lib/python2.6', > '/home/desousa/Eclipse/Workspace.Tudor/OWSLib', '/usr/lib/python2.7', > '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', > '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', > '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist- > packages', '/usr/lib/python2.7/dist-packages/PILcompat', > '/usr/lib/python2.7/dist-packages/gst-0.10', '/usr/lib/python2.7/dist- > packages/gtk-2.0', '/usr/lib/pymodules/python2.7', '/usr/lib/python2.7/dist- > packages/ubuntu-sso-client', '/usr/lib/python2.7/dist- > packages/wx-2.8-gtk2-unicode'] The packages I have installed:               $ dpkg -l | grep qgis     ii  libqgis2.2.0                                          2.2.0-1~precise1                                    amd64        QGIS - shared libraries     ii  python-qgis                                           2.2.0-3+trusty1                                     amd64        Python bindings to QGIS     ii  python-qgis-common                                    2.2.0-3+trusty1                                     all          Python bindings to QGIS - architecture-independent files     ii  qgis                                                  2.2.0-3+trusty1                                     amd64        Geographic Information System (GIS)     ii  qgis-common                                           2.2.0-3+trusty1                                     all          QGIS - architecture-independent data     ii  qgis-plugin-globe                                     2.2.0-3+trusty1                                     amd64        OSG globe plugin for QGIS     ii  qgis-plugin-globe-common                              2.2.0-3+trusty1                                     all          OSG GLOBE plugin for QGIS - architecture-independent data     ii  qgis-plugin-grass                                     2.2.0-3+trusty1                                     amd64        GRASS plugin for QGIS     ii  qgis-plugin-grass-common                              2.2.0-3+trusty1                                     all          GRASS plugin for QGIS - architecture-independent data     ii  qgis-providers                                        2.2.0-3+trusty1                                     amd64        collection of data providers to QGIS     ii  qgis-providers-common                                 2.2.0-3+trusty1                                     all          collection of data providers to QGIS - architecture-independent files


title: How to set up a 3D plane in ArcGIS?

text: I need to model a fault plane below the earth's surface and find distances from different points on the surface of the earth. I know the dimensions of the plane and its orientation but I can do that on a paper. How to set this up in ArcGIS and find the distances I need?


title: Where to buy shapefiles of North America (US and Canada)?

text: Wasted hours trying to find simple polygon data of North America (US AND Canada) states and provinces. Downloaded a bunch and nothing but problems trying to import to SQL/SSRS Anyone know where I can buy something like this (doesn't have to be exploded) for US AND Canada combined? I really want a single file that I can use directly in SSRS, or at least two files with same structure that I can import to SQL and then use in SSRS. (SQL and SSRS 2008 R2) ![US Shapes](http://i.stack.imgur.com/osxhP.jpg)


title: search for examples of plugin of Multiple buffers

text: I am loooking for examples of plugin for Multiple buffers to help me to create a new one .


title: Merge or Intersect Shapefiles based on a Field Attribute

text: I have three shapefiles of building footprints for a city. Each shapefile has a field called "Status" with attributes 1, 2, or 3. For example:   * Shapefile A, Polygon 1 = 1    * Shapefile B, Polygon 1 = 2   * Shapefile C, Polygon 1 = 1 Is there a way to merge the three shapefiles together based on the field attributes, so that Shp A and Shp C will be one, but not include Shp B? In the end I only want one shapefile (let's call this Shp D) where only the polygons that has the same attribute across Shp A, B, and C to be included. In the example above, since Shp B Polygon 1 doesn't equal the same as Shp A Polygon 1 and Shp C Polygon 1, I do not want it in the new shapefile (Shp D).


title: Algorithm to implement for batch processing in ArcMAP modelbuilder

text: I have a directory with about 10 polygon shapefiles. I need ArcMAP to take all these shapefiles and union them all into one layer using the model builder. I know I need to use some sort of iterator, however the basic one does not successfully union them all, but rather only the last one. What am I doing wrong here? Here is the model: ![enter image description here](http://i.stack.imgur.com/AHR3W.jpg)


title: How to preserve arc linetype when exporting from .dwg to ArcGIS for Desktop?

text: I have a closed polyline in a .dwg that I need to export to a feature class as a polygon. The polyline is composed of straight segments as well as arcs. The arcs, however, get converted to many short, straight line segments when exported to shapefile. It is required that the arc line type be preserved. How can this be done? I am using/have access to AutoCADMap3d, ArcGIS 10.2.2, and FME Desktop 2014 tools.


title: Writing In-memory IFeatureLayer to Shapefile using ArcObjects (Engine SDK)

text: I've been working on this for a little while now, and can not seem to get this thing working. I've managed to export a geodatabase feature class and shapefile to a shapefile, but what I'm struggling with right now is writing an in-memory feature layer (one that is created based on a selection of features) to a shapefile/geodatabase. If anyone can help me with a code snippet (doesn't matter the language), or some links to some dark corner of the ESRI docs, I would be much obliged. **UPDATE** I used the following code to create the IFeatureLayer:               IFeatureSelection featureSelection = (IFeatureSelection)layer;     if (featureSelection.SelectionSet.Count > 0)     {         IFeatureLayerDefinition2 featDef = (IFeatureLayerDefinition2)featureSelection;         IFeatureLayer fLayer = featDef.CreateSelectionLayer(             String.Format( CultureInfo.InvariantCulture,                 "{0}_Selection", layer.Name ),             true, "", "" );              featureSelection.Clear();              if (fLayer != null)         {             _hook.FocusMap.AddLayer( fLayer );             _hook.ActiveView.Refresh();         }     }      This creates and adds a new layer to the TOC. What I'm missing now is taking that Feature selection and saving this to a Shapefile (for now). The code example I've been working with is from esri code snippets but I'm getting stuck on the following:               IDataset sourceDataset = (IDataset)_layer;          IWorkspace sourceWorkspace;     IPropertySet propertySet = sourceDataset.Workspace.ConnectionProperties;     sourceWorkspace = sourceDataset.Workspace.WorkspaceFactory.Open( propertySet, 0 );          if (sourceDataset.FullName != null)     {         // HERE - Invalid Cast Exception.         IWorkspaceName sourceWorkspaceName = (IWorkspaceName)sourceDataset.FullName;     }      The full exception is here: > Unable to cast COM object of type 'System.__ComObject' to interface type > 'ESRI.ArcGIS.Geodatabase.IWorkspaceName'. This operation failed because the > QueryInterface call on the COM component for the interface with IID > '{FADD975C-E36F-11D1-AA81-00C04FA33A15}' failed due to the following error: > No such interface supported (Exception from HRESULT: 0x80004002 > (E_NOINTERFACE)). I guess the exception is thrown because the FullName property though is not empty is not compatible because of the type of COM object it is wrapping. Any thoughs? Thanks for your help


title: How to load or query data directly to R from a PostGIS database using RPostgreSQL and rgdal

text: Is it possible to load/query a shapefile to R, which is stored in a postgres/postgis database? I've built up a connection to my postgres database via DBI, RPostgreSQL and I want to make some geoprocessing with my shapefiles using rgdal.               library(RPostgreSQL)     drv <- dbDriver("PostgreSQL")     con <- dbConnect(drv, host="localhost", user="...", password="...", dbname="...", port="5432")     rs <- dbSendQuery(con, "SELECT something FROM something")      table <- fetch(rs)      Like the way I usually query for my database data in R.


title: How to convert a shapefile to WKT with GeoTools snapshot 9?

text: > **Possible Duplicate:**   >  Write out a WKT file from a loaded shapefile I need to convert a shapefile to WKT to be read in OpenLayers. The shapefile is one that has been created by Geotools. Basically, I draw on the map, save it as a shapefile, and stash it in a directory. Then, I read all the files, put them out, and when clicked on they open in OL. I had GeoScript outputting the shapefiles but it causes Grails to take a dump when used with Maven (which I have to use) so I can't use Geoscript for it, anymore. All of the tutorials I found for GeoTools were version 2 which is incredibly old and virtually none of the Library calls are correct in them. Does anyone know how to do this with Snapshot 9? Or even Geotools 8? It was literally about 8 lines of code with Geoscript. Any help will be appreciated.


title: Can Quantum GIS (QGIS) be used behind a paywall or barrier page?

text: The company I work for is a pay-for-subscription news website. Is it legal to use Quantum GIS (QGIS) to host maps that would be only available on our site to paying subscribers? I'm having trouble figuring out the GNU license. Any help would be appreciated. Thanks.


title: Python Script calling custom model failing during model execution

text: I have a python script that calls a model I built in model builder. If I run the model by itself it runs perfectly. If I call the model in the python script, the model errors in various locations. Python is definitely calling the model and running some portions of it.               for GDBThatOverLaps in GDBWithDataOnInstallation:             addMessage("Appending data from " + GDBThatOverLaps)             inputWaterArea = GDBThatOverLaps + "\\" + WA             inputWaterbody = GDBThatOverLaps + "\\" + WB             arcpy.AddToolbox(r"E:\Scripts_Calculations_and_Tools\RTAM_Tools_Models.tbx")             arcpy.appendNHD2_rtamModels(installationBoundary, ie, inputWaterArea, targetWaterArea)             arcpy.appendNHD2_rtamModels(installationBoundary, ie, inputWaterbody, targetWaterbody)      The model is called appendNHD2 and it is found in rtamModels toolbox which is properly imported using the add toolbox method of the arcpy module. I have checked that all of my variables are proper paths and reference valid data. Has anyone encountered, and overcome calling a model in python and it erroring?


title: Some items have coordinates switched when loading PostGIS layers in QGIS

text: I am having problem with strange coordinates switching when loading PostGIS layers in QGIS. First, I thought, that problem may be cause by the use of `GROUP_BY` feature in layer query, but later the problem started to appear in other queries not using this feature and finally it happens also with single table actually containing the geometry multilinestring data (with srid 4326). The problem sometimes strangely disappear when local copy of the sama data (shapefile) is already loaded. When the problem appears, coordinates of some items are switched, like this: Correct: `LINESTRING(16.87593599289347779 49.7559793078007857, ...` Switched:`LINESTRING(49.7559793078007857 16.87593599289347779, ...` The data themselves are fine, because if I export table to shapefile, all coordinates are correct. I tried to look at PostgreSQL log (all statements are logged) but no errors were found. I am using:   * PostgreSQL 9.1    * PostGIS 2.1 (full version "POSTGIS="2.1.0 r11822" GEOS="3.3.3-CAPI-1.7.4" PROJ="Rel. 4.7.1, 23 September 2009" GDAL="GDAL 1.9.0, released 2011/12/29" LIBXML="2.8.0" TOPOLOGY RASTER")   * QGIS 2.4 EDIT: Some further observations:   * problem appears when I add multiple PostgreSQL layers to QGIS. Some of the objects become "switched" instantly. The other layer usually brake after I remove the first one from the view (same "switching behavior").    * problem also appears when I try to create virtual layer in QGIS DB manager plugin (in most simple cases such as table with spatial column loaded twice - once through PostGIS layers dialog, once through DB manager   * There also seems to be another related issue, which is likely different, because when the features can't be seen, they can still be selected. In this case, "switching" happens on reload (or zoom). On another one, lines appear correctly, only to disappear again on another reload. Also, the problem appeared on PostGIS 2.0 ("POSTGIS="2.0.1 r9979" GEOS="3.3.3-CAPI-1.7.4" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.9.0, released 2011/12/29" LIBXML="2.7.8" TOPOLOGY RASTER") To help understand my issue better, I created screencast at http://youtu.be/rqS6kaFfUaQ


title: arcmap open map via add in using C#

text: I just started working with arcmap and I have a question: How can I make the add in I made in C# to open a map automatically in arcmap? Just want to know what function to use or if it's even possible.


title: Difference between azimuth degrees when i use st_project in postgis

text:
![difference degrees](http://i.stack.imgur.com/K20gS.png) I have two points p1 and p2.                SELECT ST_GeomFromText('POINT(92.78488163381019 55.9757874622428)',  4326) as p1,             ST_GeomFromText('POINT(92.78482645521103 55.97564239375992)', 4326) as p2      **degree** between points equal 200.824 and **distance** between points equal 16.492               SELECT degrees(ST_Azimuth(p1, p2)) as degree,            ST_Distance_Sphere(p1, p2)  as distance
      But i have different degree when i use st_Project with this arguments:               SELECT degrees(ST_Azimuth(p1, _p2)),            ST_Distance_Sphere(p1, p2)     FROM (       SELECT (ST_Project(p1, distance, radians(degree))::geometry as _p2 FROM ...     )      It returns:                 st_distance_sphere  ||       degrees     ======================||====================       16.4661410575154    ||  214.150581571718      Distance difference between (p1,p2) and (p1,_p2) changing only by 0.02 meter. But degree changing by 13 degrees. Why degrees are not equal between other?


title: Adding control to wfs layer disable panning and zooming on double click

text:
I can zoom and pan wfs layer when I don't have added control but I can't pan the map or zoom the layer with double click when I add a control to map: code for control is :               var select = new OpenLayers.Control.SelectFeature(district);         map.addControl(select);         select.activate();         district.events.on({             featureselected: function(event) {                 feature = event.feature;                 feature.popup = new OpenLayers.Popup.Anchored                         ("dis_pop",                                 feature.geometry.getBounds().getCenterLonLat(),                                 new OpenLayers.Size(285, 250),                                 '

' +                                 '
' +                                 '
' +                                 '' +                                 'Item' +                                 '	' +                                 '' +                                 'Value' +                                 '	'                                  '
' +                                 '

',                                 null,                                 true                                 );                 map.addPopup(feature.popup);             },             featureunselected: function(event) {                 var feature = event.feature;                 map.removePopup(feature.popup);                 feature.popup.destroy();                 feature.popup = null;             }         });      The code is working file but I can't zoom on double click. I also can't pan the map with mouse cursor.


title: how to for loop a folder to batch clip rasters by polygon using python and QGIS

text: I am using python and QGIS 2.0. I am trying to clip rasters in a folder by one polygon feature. It's the first time for me using (let's say) "PyQGIS", I was used to arcpy before. Anyway, I don't get my simple script to work, any suggestion would be very appreciated!               import qgis.core, qgis,utils     QgsApplication.setPrefixPath("C:/OSGeo4W64/apps/qgis", True)     QgsApplication.initQgis()          CLIP= "C:/Users/unim/Documents/Umberto/Universita/PhD/Guglielmin/Permafrost/Alta_Valtellina/Landsat_ita/study_area_foscagno.shp"     INPUT_FOLDER="C:/Users/unimi/Documents/Umberto/Universita/PhD/Guglielmin/Permafrost/Alta_Valtellina/Landsat_ita/LE71930282000259EDC00"     OUTPUT= "C:/Users/unim/Documents/Umberto/Universita/PhD/Guglielmin/Permafrost/Alta_Valtellina/Landsat_ita/foscagno_pyqgis/"               for RASTER in INPUT_FOLDER.tif     do         echo "Processing $RASTER"         gdalwarp -q -cutline CLIP -crop_to_cutline -of GTiff RASTER OUTPUT+ "clip_"+ RASTER     done          QgsApplication.exitQgis()      Below are the improvements I've done since now, not getting the script to work though, but I think I might be getting closer...               import qgis.core, qgis.utils, os, fnmatch     from osgeo import gdal          CLIP= "C:/Users/unimi/Documents/Umberto/Universita/PhD/Guglielmin/Permafrost/Alta_Valtellina/Landsat_ita/study_area_foscagno.shp"     INPUT_FOLDER= "C:/Users/unimi/Documents/Umberto/Universita/PhD/Guglielmin/Permafrost/Alta_Valtellina/Landsat_ita/LE71930282000259EDC00/DNs2Reflectance_LE71930282000259EDC00"     OUTPUT= "C:/Users/unimi/Documents/Umberto/Universita/PhD/Guglielmin/Permafrost/Alta_Valtellina/Landsat_ita/Cloud_mask_AltaValtellina/clip_2_foscagno"          def findRasters (path, filter):         for root, dirs, files in os.walk(path):             for file in fnmatch.filter(files, filter):                 yield os.path.join (root, file)          for raster in findRasters (INPUT_FOLDER, '*.tif'):         print (raster)         outRaster = OUTPUT + '/clip_' + raster         cmd = 'gdalwarp -dstnodata 0 -q -cutline CLIP -crop_to_cutline %s %s' % (raster, outRaster)         os.system (cmd)      I think there might be something wrong in the "gdal" command, as the "print" function does its job properely, but no file is written to the output, neither I receive any error. By the way, it's been hard to fond an easy documentation on gdal coding...


title: Geoserver outputs latin1, even though utf-8 is set as encoding

text: I've been told, by the administrator, that this geoserver is outputting utf-8: http://wfs-kbhkort.kk.dk/web/, however I can only get good results when parsing WFS from latin1 to utf-8. Can anyone confirm that the geoserver is correctly outputting utf-8 or confirm that it is latin1. If it is latin1, then how can I tell the administrator to change it to utf-8? I know this perhaps is a rather odd question, but I'm very new to geoserver (and GIS in general)...


title: String Size/Query in Mapbasic

text: I want to select many objects on the screen and select other objects that share the same attributes with the chosen group. So I'm creating a tool to select many object based in five tables' columns attributes. The tools works fine but when I select 3 or more objects the query became much bigger and I lost part of them. Is there a way to do a query using to variables? Something like: "Run command varA + varB" Or is there a way to increase the string's size?


title: Ok to measure and union a projected-on-the-fly shapefile in ArcMap?

text: I have a dataframe in arcMap 10.0.4 that is of Africa Albers Equal Area Conic PCS. I bring in a census shapefile of WGS 1984 CS and it is projected on the fly. I do 2 things:   1. I use the calculate geometry option to overwrite the "Shape_Area" field in the census shapefile so that I may obtain the planar measurements of the shape area (i.e. square Km as opposed to Decimal Degrees).    2. I 'union' an existing polygon grid projected as Africa Albers Equal Area Conic with the WGS'84 Census shapefile. The result of this union is a shapefile with the Africa Albers Equal Area Conic PCS.  I ask both these questions because they seem to me to stem from the same issue: error propagation. Am I creating measurement and geometric errors because I should be instead projecting the census shapefile to Africa Albers Equal Area Conic PCS? What is the capabilites of ArcMap to handle this issue?


title: st_clip and gdal_translate: "Error browsing database for PostGIS Raster properties" - Why?

text: Im using shell-script, postgis2.0 and gdal for trying to clip raster apart, using an overlapping raster and a the_geom-object. At first I create a view to clip the overlapping part of the raster. It gives me several raster-tiles as results, which I bundle with st_union as one raster. It works all fine and i can see results in the tables. `psql -h localhost -p 5432 -d testlauf -U postgres <<EOF CREATE OR REPLACE VIEW profilschnitt.cliptest AS SELECT st_union(st_clip(a.rast, b.the_geom)) FROM rastertable a JOIN tiletable b ON (st_envelope(a.rast) && b.the_geom); EOF` Now i want to see how the unified raster looks in GIS and try to export the raster via gdal_translate into SAGA-rasterformat: `gdal_translate -ot Float32 -of SAGA PG:"host=localhost port=5432 dbname=testlauf user=postgres password=postgresdb schema=profilschnitt table=cliptest mode=2" ~/Desktop/cliptest.sdat` Problem is, that gdal tells me the following: `ERROR 1: Error browsing database for PostGIS Raster properties GDALOpen failed - 1` My db-connection is set up correctly and gdal-translate already worked with other raster-views/-tables too. So I assume that the problem must be somewhere within the query-view... For any ideas i would be grateful :)


title: QGIS How to use Query Builder with a Joined table

text: When I join a layer with another layer all the attributes are correctly displayed in the first layer. However when I use the Query builder (Layer - Query) and then use Zoom to layer, nothing is displayed. * * * sgrieve - thank you for you guys taking the time to help us newbies.I have added a vector layer with attribute values from Excel and joined it with another layer consisting of polygons. The polygon layer then displays all the attributes in its table from the Excel imported layer. When I want to view only selected polygons using the Layer > Query using the joined attribute values and use Zoom to Extent nothing happens. brydypus. Thanx. Rule-based styling seems to be the answer.


title: Draw line as a text in wfs

text: I have a WFS for addresses where geometry is a line with 2 points. Is it possible to have an SLD that draws a text (i.e. house number) along the line using the line as vector defining the text direction?


title: How to save ArcGIS process output to variable?

text: I've created script in Python for ArcGIS that simplify Line, and make buffer from processed line.               input = "input.shp"     name = "bord"     buffer = "buffer.shp"          gp.SimplifyLine_management(name, input, "POINT_REMOVE", "2000 Meters", "FLAG_ERRORS", "NO_KEEP", "NO_CHECK")          gp.Buffer_analysis(input, buffer, "10 Meters", "FULL", "ROUND", "NONE", "")      but it this case, I have to create 2 shapefiles (one for intermediate results, and one for output). But is it possible to save for ex. intermediate results to variable, and then use it as parameter for buffer, and print out geometry of buffer(as array of vertexes) to the screen? I'm using ArcGIS 9.3


title: How to select segment of linestring using PostGIS?

text: i have PostgreSQL+PostGIS. I have a linestring:               "LINESTRING(60.7014631515719 56.8441322356241,60.7023117507097 56.8445673405349,60.702948200063 56.8447993944193,60.703902874093 56.8448574076656,60.706236521722 56.8447993944193,60.7094187684889 56.8449444273664,60.7121236782406 56.8450894597515,60.715571112238 56.8452925041466,60.718382096882 56.8454085290207,60.7204505572805 56.8453505166286,60.7222538304482 56.8450314468649,60.7246405155233 56.8444513130533,60.7260194891224 56.8440742212539,60.7260194891224 56.8440742212539,60.7260194891224 56.8440742212539,60.7260194891224 56.844045214035)"      Now i want to get a substring of this linestring. It is possible get a substring if i have a beggin point and end point of substring what i want to create? But the more I wonder if I have a point of the line can I get it the next point and create a line of this segment?


title: How to set Content for ArcGIS Server Identity Manager signin dialog in JSAPI

text:
I am trying to change the content for the signin dialog of Identity Manager and something seems to be off. I used `dialog.set("content",newContent);` Similar title method worked for title-but not for content. The double quote within the content might be throwing the error. So, I tried using format character of `"` in the place of double quotes and still no luck. This is what I was doing:               IdentityManager.on('dialog-create', function(info)         {         var dialog = dijit.byNode(dojo.query(".esriSignInDialog")[0]);             var newContent="

Welcome to Test Applucation!
If you're authorized to view this application, please sign in with your User Credentials to access the secured contents of the application.

The username or password you entered is incorrect.

User Name:
<input data-dojo-type='dijit.form.ValidationTextBox' data-dojo-props='type:"text", "class":"esriIdUser", required:true, trim:true, style:"width: 100%;"' />

Password:
<input data-dojo-type='dijit.form.ValidationTextBox' data-dojo-props='type:"password", "class":"esriIdPwd", required:true, style:"width: 100%;"' />

<button data-dojo-type='dijit.form.Button' data-dojo-props='type:"button", "class":"esriIdSubmit"'>OK</button><button data-dojo-type='dijit.form.Button' data-dojo-props='type:"button", "class":"esriIdCancel"'>Cancel</button>
"          dialog.set("content",newContent);         // dialog.show();         });      Any thoughts?


title: Recovering Latitude and Longitude from Albers to Compute Distance

text: I have a shapefile of U.S. counties in USA Contiguous Albers Equal Area Conic. I want to do distance calculations. For example, distances from one county to another. I do not know how to interpret the coordinates. In another thread, I understand that the distance is in meters. Is that correct? The ultimate goal is to use the distance as a part of a statistical procedure. Specifically, I am using it in a regression discontinuity design, in which I restrict the sample to counties that are a given distance from a particular line in the U.S. (e.g., the Central Time Zone). So, I'd like the distance to be fairly accurate because I am restricting the sample to be say 20 miles on either side of this line, and the distance should be accurate from a symmetrical perspective. How may I recover a latitude and longitude? I wanted to recover them so that I can apply the distance formula for coordinates by hand to get the distances in miles in a way that I can interpret. I've come across projections and UTM when searching, but I do not know what that means. I use ArcMap in ArcGIS 10.1. Thank you very much for any help!


title: Converting from shp to geojson fails

text: I'm following Mike Bostock's tutorial, let's make a map, but for a map of Mexico. I want to display state boundaries. I was able to get the map of Mexico from Natural Earth Data's world maps. My source for the state boundaries is here: http://duopixel.com/LIMITE_ESTATAL.shp NOTE: this should be the same file as here, but INEGI's server seems to be down for days. I was able to convert it from ogr2ogr into geojson. When you convert from geojson into topojson, this notice comes up:               duopixel$ topojson -s 5 -o estados_simp.json -- estados.json     quantization: maximum error 78.607km (0.707°)     simplification: retained 1130 / 454450 points (0%)      It still seems to generate the file and it looks like it's correct. This is the file it generates. This is my javascript code:               d3.json("estados.json", function(error, mex) {            var estados = mex.objects.estados.geometries            svg.selectAll(".estado")         .data(estados)         .enter().append("path")         .attr("class", "estado")         .attr("d", path)     });      However, I get an error when running this code...               Uncaught TypeError: Cannot read property 'length' of undefined       Now, since I'm not even sure what I'm doing, I have no idea where the failure point is. I'm stuck at this point and any help is appreciated.


title: function, return, 'instancemethod' object has no attribute '__getitem__'

text: I'm still trying to write a python plugin to create an input file for an urban climate model out of three shape files. Now I stumbeled into another problem, that I think is an easy one, but I just can't see whats wrong. I wrote a little function to get me the path and file name of the current project file (as I want the result file of my calculations to be called like the project file by default).               def projectfilepathname():          # function to extract the file path and name of the current project file         qgis.mainWindow().statusBar().showMessage("Getting project name and path")         prjfi = QFileInfo(QgsProject.instance().fileName())         path_name = []         if prjfi:             path_name.append(str(prjfi.absolutePath()))                 filename = str(prjfi.fileName())                 if filename.count(".") > 0:                   path_name.append(filename.split(".")[0])                 else:                   path_name.append(filename)                 path_name.append(prjfi.fileName())         else:                 path_name.append(r'C:\Users')                 path_name.append(r'test')         return path_name      I call the function by               currentprofile = self.projectfilepathname      but that doesn't seem to work. At least I get an error for the next line               currentprofile_dir = currentprofile[1]      telling me 'instancemethod' object has no attribute ' **getitem** '. Maybe I'm wrong, but I have the impression that the function is not called, but its name is saved to currentprofile. Whats wrong?


title: TMS or WMS source(s) for DEM data tiles?

text: I'm spinning my wheels trying to find an existing, free source for TMS or WMS elevation data that doesn't involve a long-winded clickabout or an emailed url. This question has a similar purpose, but the answers offered aren't compatible with what I want to accomplish. My goal isn't to show tiles in a map, rather I want to automatically calculate some details about a user-selected drainage corridor (stretches people want to canoe/float, to be specific). For example, once the user sets an area (+/- 10 miles ^2) and choses their endpoints, I'd like to derive information like drop in elevation between endpoints, overall slope of the run, and graph of the longitudinal profile for the reach would be a nice start. ..my thinking is, maybe I can implement difficulty metrics. **Ideal data traits** :   * 30-meter pixels,    * png or tiff, tiles to mosaic or a custom BBox area is fine   * source offers full coverage of the US (at least the 48 contiguous)   * actual elevation values _(i.e. I'm **not** looking for hillshades or textures._) **Example bounding area** : `bbox=-93.424564,36.993675,-93.331009,37.056170` Alternatively, any approach conducive to auto-download of DEM tiles or clips based on a fixed grid or path/row combination would work, so long as there is either a preexisting grid to work with, or enough theory to pre-generate a grid. Of course, key to this is access to a repository of data that allows direct url or ftp access. I'm very curious to see what people think. Thanks so much for any help or insights! * * * **Edits and Followup** :   * ~~USGS published a Landsat Path/Row shapefile ("ascending" means nighttime, and "descending" means daytime), this could be helpful.~~ ..Landsat does not include DEM, I was confusing that with the panchrome band.. ::shakes head::   * ~~DEM Explorer may provide a solution. I conducted an area download while running Fiddler; the data requests is performed via HTTP Post, and it responded with some cool feedback. It's definitely readable and parseable, only I'm not sure (yet) if any cookies or session stuff would prevent me from automating it. Time will tell.~~ Shucks.. it seems to require sessions.   * http://geobrain.laits.gmu.edu/wcs4dem.htm It seems the makers of DEM Explorer (above) provide a WCS gateway that serves geotiff DEM clips for BBox regions. Thanks to @BradHards for finding this. Here's an example call to the WCS service against the example bounding region I noted above: `http://geobrain.laits.gmu.edu/cgi-bin/gbwcs- dem?service=wcs&version=1.0.0&request=getcoverage&coverage=SRTM_30m_USA&bbox=-93.424564,36.993675,-93.331009,37.056170&crs=epsg:4326&format=image/geotiff&store=true`


title: How to access mysql data from python built-in console?

text: I'm writing a QGIS Plugin, and somewhere I want to present data from a `MySQL` database. It's simple data(strings,etc), not Geospatial, or vector data. I'm familiar with querying databases from python scripts, and now I want to present data inside a `TextBrowser QT Widget` inside QGIS. However, I can't import `MySQLdb` from built-in console, neither from my `xxx.py` file inside my plugin folder. From the Apple Terminal i can import MySQLdb with no problems. I've read Why can't I import my script from the python console?, but still have no success, because when I call `import MySQLdb` inside a script that resides on a folder added to `sys.path`, it still fails. Calling `import MySQLdb` from built-in console tells:               import MySQLdb     Traceback (most recent call last):       File "<input>", line 1, in <module>       File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 309, in _import         mod = _builtin_import(name, globals, locals, fromlist, level)       File "build/bdist.macosx-10.8-intel/egg/MySQLdb/__init__.py", line 19, in <module>       File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 309, in _import         mod = _builtin_import(name, globals, locals, fromlist, level)       File "build/bdist.macosx-10.8-intel/egg/_mysql.py", line 7, in <module>       File "build/bdist.macosx-10.8-intel/egg/_mysql.py", line 6, in __bootstrap__     ImportError: dlopen(/Users/Arthur/.python-eggs/MySQL_python-1.2.3-py2.7-macosx-10.8-intel.egg-tmp/_mysql.so, 2): no suitable image found.  Did find:         /Users/Arthur/.python-eggs/MySQL_python-1.2.3-py2.7-macosx-10.8-intel.egg-tmp/_mysql.so: mach-o, but wrong architecture      Thanks for reading! ACKNOWLEDGE: ..mach-o, but wrong architecture -> this reveals a mismatch between python- mysqldb-mysql architecture! The problem is that MySQLdb, does not support python2.7, as compiling for x86_64! Even if python and mysql-server are 64bits. Switching to python2.6, MySQLdb compiles a x86_64 binary; but QGIS 1.8 is built against python 2.7, so still does not work. Is it possible to select python framework inside QGIS? This was very helpful -> http://stackoverflow.com/questions/12327737/error- importing-mysqldb-in-python-2-7-2-on-mac-osx-10-8-1 Thanks


title: ArcGIS Javascipt Api Printing

text: I've got a webpage which prints a web map via the ArcGIS Javascript API. The DPI of the print is 72. To debug I added three different types of symbols 1. The default (most of them are) 2. One custom symbol created at large scale 3. A red icon created by ArcGIS As you can see on the image it looks really pixel imperfect. While the background is nice, you can almost count the pixels in the symbols. Does anyone has some kind of idea what's causing the pixelastion of the symbols and how to avoid that? ![enter image description here](http://i.stack.imgur.com/cgucN.png)


title: ArcExplorer - possible connect to a non-SDE database?

text: In ArcExplorer, I'm wondering if you can connect to a non-SDE database, like SQL Server, with geometry or geography columns?


title: Bulk lookup of address census tract and block

text: Is there a free or cheap way to code a large number of addresses and return or append the census tract and block data? There are a number of ways to geocode an address and get the lat long, but I really need to get the census tract and block data.


title: Can ArcPy test for availability of SDE Connection before trying to use it?

text: In a Python script that I use to publish ArcGIS 10.0 Geoprocessing Services I have some code:               arcpy.AddMessage("If process hangs here, check for ArcSDE connections issue by trying to open " + mapFile + " in ArcMap")     mxd = arcpy.mapping.MapDocument(mapFile)      The reason I have it is that from time to time the maximum number of SDE Connections that the server can support may have been exceeded. Before I hit this I would like to have ArcPy test for:   1. Whether the SDE Connection can be reached at all?   2. Whether the SDE Connection is to an ArcSDE which is responding within a reasonable time? Does ArcPy have any means of testing SDE connections before trying to use them?


title: What should QGIS course for advanced ArcGIS Desktop users cover?

text: I will build a 16 hour (2 day) course on QGIS for ArcGIS users. The target users that breathe and sleep ArcGIS. As we're trying to reduce our costs, we're thinking of switching some people to QGIS and having a floater ArcGIS license rather than have everyone with it. I've used QGIS extensively and very familiar with it (versions 0.7 to 1.8) Are there any course materials that are specific to "QGIS to ArcGIS" or that target advanced operations in QGIS?


title: Is there a way to render 3D map tiles?

text: I am looking for a way to create map tiles from OSM data but I would like the resulting map tile images rendered at a 45 degree angle. Is there any way this can be done? I have never see such an example.


title: pgRouting for postgresql 9.0?

text: Is pgRouting 1.05 compatible with postgresql9.0 Win32? I am a newbie, and I have spent three days trying to build it for postgresql9.0, but without success in the end. Thanks. * * * Yes, you are right. I am using postgresql 9.0. Building all of those dependent libraries has obviously done something to my head. LOL. I had to build everything from scratch, since I don't do C/C++ development. I followed the instructions here for Win32 (http://www.pgrouting.org/docs/howto/build_on_windows.html: Win32 build instruction), and with changes here and there because the instruction is quite old, and some of the libs I am using are newer. After 3 days, I was able to progress to the final build of pgrouting, but got the following errors(see below). I am actually ready to go back to postgresql 8.4, but it just seems a lot of time wasted, and I had gone this far, and if someone can point out where things might have been wrong, maybe we can get a binary build to share. Thanks. Here are some other libraries info: boost 1.47, cgal 3.8, gaul 0.1849, cmake 2.8, MinGW/msys 5.?                   [  8%] Building C object extra/tsp/src/CMakeFiles/routing_tsp.dir/tsp.obj     In file included from C:/postgresql/include/server/postgres.h:47:0,                      from d:/pgroute/pgrouting-1.05/extra/tsp/src/tsp.h:25,                      from d:/pgroute/pgrouting-1.05/extra/tsp/src/tsp.c:22:     C:/postgresql/include/server/c.h:284:2: error: #error must have a working 64-bit integer datatype     In file included from d:/pgroute/pgrouting-1.05/extra/tsp/src/tsp.h:25:0,                      from d:/pgroute/pgrouting-1.05/extra/tsp/src/tsp.c:22:     C:/postgresql/include/server/postgres.h:550:34: error: expected ')' before 'X'     In file included from C:/postgresql/include/server/access/genam.h:21:0,                      from C:/postgresql/include/server/nodes/execnodes.h:17,                      from C:/postgresql/include/server/executor/execdesc.h:18,                      from C:/postgresql/include/server/utils/portal.h:49,                      from C:/postgresql/include/server/executor/spi.h:17,                      from d:/pgroute/pgrouting-1.05/extra/tsp/src/tsp.c:25:     C:/postgresql/include/server/storage/lock.h:400:2: error: expected specifier-qualifier-list before 'int64'     C:/postgresql/include/server/storage/lock.h:412:2: error: expected specifier-qualifier-list before 'int64'     In file included from C:/postgresql/include/server/nodes/execnodes.h:17:0,                      from C:/postgresql/include/server/executor/execdesc.h:18,                      from C:/postgresql/include/server/utils/portal.h:49,                      from C:/postgresql/include/server/executor/spi.h:17,                      from d:/pgroute/pgrouting-1.05/extra/tsp/src/tsp.c:25:     C:/postgresql/include/server/access/genam.h:147:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'index_getbitmap'     In file included from C:/postgresql/include/server/utils/timestamp.h:21:0,                      from C:/postgresql/include/server/access/xlog.h:19,                      from C:/postgresql/include/server/access/heapam.h:20,                      from C:/postgresql/include/server/nodes/execnodes.h:18,                      from C:/postgresql/include/server/executor/execdesc.h:18,                      from C:/postgresql/include/server/utils/portal.h:49,                      from C:/postgresql/include/server/executor/spi.h:17,                      from d:/pgroute/pgrouting-1.05/extra/tsp/src/tsp.c:25:     C:/postgresql/include/server/pgtime.h:23:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'pg_time_t'     C:/postgresql/include/server/pgtime.h:43:51: error: expected ';', ',' or ')' before '*' token     C:/postgresql/include/server/pgtime.h:44:48: error: expected ';', ',' or ')' before '*' token     C:/postgresql/include/server/pgtime.h:45:49: error: expected ';', ',' or ')' before '*' token     In file included from C:/postgresql/include/server/utils/timestamp.h:23:0,                      from C:/postgresql/include/server/access/xlog.h:19,                      from C:/postgresql/include/server/access/heapam.h:20,                      from C:/postgresql/include/server/nodes/execnodes.h:18,                      from C:/postgresql/include/server/executor/execdesc.h:18,                      from C:/postgresql/include/server/utils/portal.h:49,                      from C:/postgresql/include/server/executor/spi.h:17,                      from d:/pgroute/pgrouting-1.05/extra/tsp/src/tsp.c:25:     C:/postgresql/include/server/utils/int8.h:26:53: error: expected declaration specifiers or '...' before 'int64'     In file included from C:/postgresql/include/server/access/xlog.h:19:0,                      from C:/postgresql/include/server/access/heapam.h:20,                      from C:/postgresql/include/server/nodes/execnodes.h:18,                      from C:/postgresql/include/server/executor/execdesc.h:18,                      from C:/postgresql/include/server/utils/portal.h:49,                      from C:/postgresql/include/server/executor/spi.h:17,                      from d:/pgroute/pgrouting-1.05/extra/tsp/src/tsp.c:25:     C:/postgresql/include/server/utils/timestamp.h:48:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Timestamp'     C:/postgresql/include/server/utils/timestamp.h:49:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'TimestampTz'     C:/postgresql/include/server/utils/timestamp.h:50:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'TimeOffset'     C:/postgresql/include/server/utils/timestamp.h:62:2: error: expected specifier-qualifier-list before 'TimeOffset'     C:/postgresql/include/server/utils/timestamp.h:195:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PgStartTime'     C:/postgresql/include/server/utils/timestamp.h:198:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PgReloadTime'     C:/postgresql/include/server/utils/timestamp.h:315:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'GetCurrentTimestamp'     C:/postgresql/include/server/utils/timestamp.h:317:45: error: expected ')' before 'start_time'     C:/postgresql/include/server/utils/timestamp.h:319:52: error: expected ')' before 'start_time'     C:/postgresql/include/server/utils/timestamp.h:323:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'time_t_to_timestamptz'     C:/postgresql/include/server/utils/timestamp.h:324:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'timestamptz_to_time_t'     C:/postgresql/include/server/utils/timestamp.h:326:51: error: expected ')' before 't'     C:/postgresql/include/server/utils/timestamp.h:328:67: error: expected declaration specifiers or '...' before 'Timestamp'     C:/postgresql/include/server/utils/timestamp.h:329:35: error: expected ')' before 'dt'     C:/postgresql/include/server/utils/timestamp.h:331:31: error: expected ')' before 'dt'     C:/postgresql/include/server/utils/timestamp.h:336:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'SetEpochTimestamp'     C:/postgresql/include/server/utils/timestamp.h:339:45: error: expected ')' before 'dt1'     In file included from C:/postgresql/include/server/access/heapam.h:20:0,                      from C:/postgresql/include/server/nodes/execnodes.h:18,                      from C:/postgresql/include/server/executor/execdesc.h:18,                      from C:/postgresql/include/server/utils/portal.h:49,                      from C:/postgresql/include/server/executor/spi.h:17,                      from d:/pgroute/pgrouting-1.05/extra/tsp/src/tsp.c:25:     C:/postgresql/include/server/access/xlog.h:249:2: error: expected specifier-qualifier-list before 'TimestampTz'     C:/postgresql/include/server/access/xlog.h:285:44: error: expected ')' before '*' token     C:/postgresql/include/server/access/xlog.h:288:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'GetSystemIdentifier'     In file included from C:/postgresql/include/server/executor/execdesc.h:18:0,                      from C:/postgresql/include/server/utils/portal.h:49,                      from C:/postgresql/include/server/executor/spi.h:17,                      from d:/pgroute/pgrouting-1.05/extra/tsp/src/tsp.c:25:     C:/postgresql/include/server/nodes/execnodes.h:1537:2: error: expected specifier-qualifier-list before 'int64'     C:/postgresql/include/server/nodes/execnodes.h:1616:2: error: expected specifier-qualifier-list before 'int64'     C:/postgresql/include/server/nodes/execnodes.h:1758:2: error: expected specifier-qualifier-list before 'int64'     In file included from C:/postgresql/include/server/executor/spi.h:17:0,                      from d:/pgroute/pgrouting-1.05/extra/tsp/src/tsp.c:25:     C:/postgresql/include/server/utils/portal.h:169:2: error: expected specifier-qualifier-list before 'TimestampTz'     make[2]: *** [extra/tsp/src/CMakeFiles/routing_tsp.dir/tsp.obj] Error 1     make[1]: *** [extra/tsp/src/CMakeFiles/routing_tsp.dir/all] Error 2     make: *** [all] Error 2


title: Can a USGS 6 inch orthoimage be given a higher resolution, like 1 foot, to improve GeoServer processing time?

text: The USGS orthoimage is a 6 inch resolution quadrangle that is loaded into GeoServer as a WorldImage. GeoServer has an extremely hard time processing this compared with a 1 foot resolution quadrangle. How can this orthoimage be edited?


title: Vertices of Polygon

text: I am trying to get vertices of a polygon and having some issues with it. I have PolygonN object and would like to get PointCollection and get access to each points that make up the polygon, any ideas?                           var records = client.QueryFeatureData(mapName, layerId, queryDef);                 var recordsEnumerator = records.Records.GetEnumerator();                      while (recordsEnumerator.MoveNext())                 {                     Record attributes = recordsEnumerator.Current as Record;                          for (int i = 0; i < attributes.Values.Count(); i++)                         if (attributes.Values[i] is PolygonN)                         {                             PolygonN featureExtent = attributes.Values[i] as PolygonN;                             // Problem here >>>                             PointCollection vertices = featureExtent as PointCollection;                          }                 }


title: How to group points into a user-provided number of clusters?

text: I am looking for a process in ArcGIS that takes a point feature class and groups the points into a user-provided number of clusters. I am working in ArcGIS but I'd welcome any suggestions that utilized other means. Thanks


title: Create shp file from data postgis / kml using java

text: I'm working on a geographic information system project, whose products form shp file. I am using java language, and PostGIS database. Is there a way to generate a shp file from PostGIS or kml using java language?


title: How to debug Live GPS and base layer alignment issues in QGIS?

text: I am trying to use a bluetooth GPS with a couple of base layers in QGIS. The GPS/bluetooth connection seems to be working great...I can connect and disconnect without issue. I've set my project CRS to WGS84, and I've enabled OTF CRS transformation. I've confirmed the CRS for my base layers is set properly. However, I can't zoom to my base layers to know if my GPS point is lining up where I think it should be with the base layers. Whenever I click 'Zoom to Layer Extent', nothing happens. Any thoughts on what I might be doing wrong? I am using QGIS ver. 2.0.1 on a Windows 8 32-bit tablet.