title: Having trouble linking VS 2008 C++ application

text: I am trying to resolve a few last exgternal link references in my program. Help in locating the correct libraries for Windows would be thanked. I may have incorrect versions of some of my current libraries. The link errors are:               1>------ Build started: Project: shpFOD, Configuration: Release MinDependency Win32 ------     1>Compiling...     1>ShapePublisher.cpp     1>.\ShapePublisher.cpp(789) : warning C4996: 'QgsMapLayerRegistry::addMapLayer': was declared deprecated     1>        C:\OSGeo4W\apps\qgis\include\qgsmaplayerregistry.h(66) : see declaration of 'QgsMapLayerRegistry::addMapLayer'     1>Linking...     1>libshp.lib(wpoly.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance     1>   Creating library ReleaseMinDependency/shpFOD.lib and object ReleaseMinDependency/shpFOD.exp     1>ShapePublisher.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QgsMapLayer::staticMetaObject" (?staticMetaObject@QgsMapLayer@@2UQMetaObject@@B)     1>ShapePublisher.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QgsCoordinateTransform::staticMetaObject" (?staticMetaObject@QgsCoordinateTransform@@2UQMetaObject@@B)     1>ShapePublisher.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QgsMapRenderer::staticMetaObject" (?staticMetaObject@QgsMapRenderer@@2UQMetaObject@@B)     1>ShapePublisher.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QgsVectorLayer::staticMetaObject" (?staticMetaObject@QgsVectorLayer@@2UQMetaObject@@B)     1>ShapePublisher.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QgsApplication::staticMetaObject" (?staticMetaObject@QgsApplication@@2UQMetaObject@@B)     1>ShapePublisher.obj : error LNK2001: unresolved external symbol "private: static bool QgsApplication::mRunningFromBuildDirVERSION_INT" (?mRunningFromBuildDirVERSION_INT@QgsApplication@@0_NA)     1>ShapePublisher.obj : error LNK2001: unresolved external symbol "private: static class QString QgsApplication::mCfgIntDirVERSION_INT" (?mCfgIntDirVERSION_INT@QgsApplication@@0VQString@@A)     1>ShapePublisher.obj : error LNK2001: unresolved external symbol "private: static class QString QgsApplication::mBuildSourcePathVERSION_INT" (?mBuildSourcePathVERSION_INT@QgsApplication@@0VQString@@A)     1>ShapePublisher.obj : error LNK2001: unresolved external symbol "private: static class QString QgsApplication::mBuildOutputPathVERSION_INT" (?mBuildOutputPathVERSION_INT@QgsApplication@@0VQString@@A)     1>ShapePublisher.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QgsMapLayerRegistry::staticMetaObject" (?staticMetaObject@QgsMapLayerRegistry@@2UQMetaObject@@B)     1>ShapePublisher.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QgsMapCanvas::staticMetaObject" (?staticMetaObject@QgsMapCanvas@@2UQMetaObject@@B)     1>ShapePublisher.obj : error LNK2001: unresolved external symbol "private: static class QStringList QgsApplication::mGdalSkipListVERSION_INT" (?mGdalSkipListVERSION_INT@QgsApplication@@0VQStringList@@A)     1>.\../bin/Release/shpFOD.dll : fatal error LNK1120: 12 unresolved externals     1>Build log was saved at "file://c:\SGIS\newshpfod\ReleaseMinDependency\BuildLog.htm"     1>shpFOD - 13 error(s), 1 warning(s)     ------ Starting pre-build validation for project 'shpSetup' ------      ------ Pre-build validation for project 'shpSetup' completed ------     2>------ Build started: Project: shpSetup, Configuration: Release ------     Building file 'C:\SGIS\Setup1\Release\shpSetup.msi'...     WARNING: Unable to create registration information for file named 'mpsuomlib.tlb'     WARNING: Unable to create registration information for file named 'fodmlib.tlb'     ERROR: Could not find file 'c:\SGIS\bin\Release\shpFOD.dll' 'The system cannot find the file specified.'     ========== Build: 0 succeeded, 2 failed, 1 up-to-date, 0 skipped ==========


title: How to load shapefile in Oracle Spatial

text: I am newbie to oracle spatial. I want to load shapefile into oracle spatial. I am using oracle 11g. I have already look at the following examples and answers               http://docs.oracle.com/cd/E11882_01/appdev.112/e11830/sdo_shapefile_converter.htm#SPATL1430      How do use the Shapefile Converter in Oracle 12c to load a Shapefile? Where I found the following example to load a shapefile > java -classpath > %ORACLE_HOME%\jdbc\lib\ojdbc5.jar;%ORACLE_HOME%\md\jlib\sdoutl.jar;%OR > ACLE_HOME%\md\jlib\sdoapi.jar > oracle.spatial.util.SampleShapefileToJGeomFeature - h gis01 -p 1521 -s orcl > -u scott -d tiger -t states -f states -r 8307 -g geom I have the files on the following directory `ojdbc14.jar - D:\app\user\product\11.2.0\dbhome_1\jdbc\lib` `ojdbc5.jar - D:\app\user\product\11.2.0\dbhome_1\jdbc\lib` `sdoutl.jar -D:\app\user\product\11.2.0\dbhome_1\jdbc\lib` `sdoapi.jar - D:\app\user\product\11.2.0\dbhome_1\jdbc\lib` Java - C:\Program Files\Java\jdk1.7.0_21\bin `shapefile (bd.shp) - E:\data\bd.shp` So I used the following codes `java -classpath D:\app\user\product\11.2.0\dbhome_1\jdbc\lib\ojdbc5.jar;D:\app\user\product\11.2.0\dbhome_1\jdbc\lib\sdoutl.jar;D:\app\user\product\11.2.0\dbhome_1\jdbc\lib\sdoapi.jar oracle.spatial.util.SampleShapefileToJGeomFeature -h localhost -p 1521 -s hr -u hr -d password -t bd -f E:\data\bd -r 8307 -g geom` Would anyone help me to run this code with those directory?


title: Is there a maximum number of feature classes at File GDB?

text: Is there a maximum number of feature classes at File GDB ? I'm running a script that creates FC's, after around 1000 a get error of a schema lock ERROR 000210: Cannot create output.


title: error in data read in OSMembrane osmosis

text: I am just learning to use OSMembrane, and i created a simple pipeline to read an .osm file and write the same in another file. But it says error in reading the file. The report is like this and I can't understand what is wrong here.               Dec 06, 2012 11:48:04 AM org.openstreetmap.osmosis.core.Osmosis run     INFO: Osmosis Version 0.41     Dec 06, 2012 11:48:04 AM org.java.plugin.registry.xml.ManifestParser <init>     INFO: got SAX parser factory - org.apache.xerces.jaxp.SAXParserFactoryImpl@449afc     Dec 06, 2012 11:48:04 AM org.java.plugin.registry.xml.PluginRegistryImpl configure     INFO: configured, stopOnError=false, isValidating=true     Dec 06, 2012 11:48:04 AM org.java.plugin.registry.xml.PluginRegistryImpl register     INFO: plug-in and fragment descriptors registered - 1     Dec 06, 2012 11:48:04 AM org.java.plugin.standard.StandardPluginManager activatePlugin     INFO: plug-in started - org.openstreetmap.osmosis.core.plugin.Core@0.41.0     Dec 06, 2012 11:48:04 AM org.openstreetmap.osmosis.core.Osmosis run     INFO: Preparing pipeline.     Dec 06, 2012 11:48:04 AM org.openstreetmap.osmosis.core.Osmosis run     INFO: Launching pipeline execution.     Dec 06, 2012 11:48:04 AM org.openstreetmap.osmosis.core.Osmosis run     INFO: Pipeline executing, waiting for completion.     Dec 06, 2012 11:48:05 AM  org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskManager waitForCompletion     SEVERE: Thread for task 1-read-xml failed     org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (FATAL: database "osm" does not exist)     at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80)     at org.openstreetmap.osmosis.pgsnapshot.common.DatabaseContext.doesTableExist(DatabaseContext.java:215)     at org.openstreetmap.osmosis.pgsnapshot.v0_6.impl.DatabaseCapabilityChecker.initialize(DatabaseCapabilityChecker.java:34)     at org.openstreetmap.osmosis.pgsnapshot.v0_6.impl.DatabaseCapabilityChecker.isWayBboxSupported(DatabaseCapabilityChecker.java:61)     at org.openstreetmap.osmosis.pgsnapshot.v0_6.PostgreSqlCopyWriter.initialize(PostgreSqlCopyWriter.java:72)     at org.openstreetmap.osmosis.pgsnapshot.v0_6.PostgreSqlCopyWriter.process(PostgreSqlCopyWriter.java:102)     at org.openstreetmap.osmosis.xml.v0_6.impl.BoundsElementProcessor.end(BoundsElementProcessor.java:84)     at org.openstreetmap.osmosis.xml.v0_6.impl.OsmHandler.endElement(OsmHandler.java:107)     at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)     at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)     at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)     at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)     at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)     at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)     at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)     at javax.xml.parsers.SAXParser.parse(Unknown Source)     at org.openstreetmap.osmosis.xml.v0_6.XmlReader.run(XmlReader.java:111)     at java.lang.Thread.run(Unknown Source)     Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (FATAL: database "osm" does not exist)     at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549)     at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)     at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)     at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)     at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)     ... 21 more     Caused by: org.postgresql.util.PSQLException: FATAL: database "osm" does not exist     at org.postgresql.core.v3.ConnectionFactoryImpl.readStartupMessages(ConnectionFactoryImpl.java:469)     at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:112)     at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)     at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)     at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)     at org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:22)     at org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:30)     at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:24)     at org.postgresql.Driver.makeConnection(Driver.java:393)     at org.postgresql.Driver.connect(Driver.java:267)     at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)     at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)     at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)     at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)     ... 25 more     Dec 06, 2012 11:48:05 AM org.openstreetmap.osmosis.core.Osmosis main     SEVERE: Execution aborted.     org.openstreetmap.osmosis.core.OsmosisRuntimeException: One or more tasks failed.     at org.openstreetmap.osmosis.core.pipeline.common.Pipeline.waitForCompletion(Pipeline.java:146)     at org.openstreetmap.osmosis.core.Osmosis.run(Osmosis.java:92)     at org.openstreetmap.osmosis.core.Osmosis.main(Osmosis.java:37)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)     at java.lang.reflect.Method.invoke(Unknown Source)     at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)     at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)     at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)     at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)     at org.codehaus.classworlds.Launcher.main(Launcher.java:47)


title: using gdal2tiles 2 tile a png longlat. keep getting wrong coordinate box in google kmls

text: I have tried lots of variations, but can't seem to get gdal2tiles to do what it used to do. Prior version? images are 60N to 60S and 180W to 180E 9000 pix x 3000 lines. gdal2tiles keeps outputting doc.kml like so:               <LatLonAltBox>       <north>85.05112877980660</north>       <south>-85.05112877980659</south>       <east>180.00000000000000</east>       <west>-180.00000000000000</west>     </LatLonAltBox>      used to output:               <LatLonAltBox>      <north>60.02000000000000300000</north>      <south>-59.97999999999999700000</south>      <east>179.97999999999999000000</east>      <west>-180.02000000000001000000</west>     </LatLonAltBox>      any help is appreciated. The old codes worked fine. New setup requires specifying -z -s and nothing works anymore.


title: What might cause OpenLayers plugin to hang on windows 8.1?

text: I'm trying to add OpenStreetMap layer to the map through OpenLayers plugin and then application hangs. The problem occures on Windows 8.1 QGIS 2.0.1. On Windows 7 everything works correct. Does anyone know what might be problem and how to fix it or how to add OSM another way?


title: Calculate Slope of Street Segments

text: Using a DEM, I need to assign slope to individual segments in a street centerline feature class. It will be used to account for increased travel time for steep slopes in a network analysis. I am using ArcGIS 10.0, ArcInfo license, with 3D Analyst and Spatial Analyst extensions available. My initial attempt was to use the "Add Surface Information" tool. However, the resulting average slope values seem suspect in some areas, for example if a stream crosses the street segment. I would like to try assigning elevations to street segment endpoints then calculating slope. I have read about this method (this question) but need further details on the process.


title: Network Analyst Loading Origins/Destinations and wait times

text: I'm having a difficult understanding the loading times when loading origins/destinations into Network Analyst. I have many network datasets that all vary slightly. They were created in batches so the process used to create them is the same and reproducible... For some networks, the points for the origins load rapidly (perhaps 100pts/sec). Others load as slow as 10pts/min. There is no pattern to which networks load faster than others. It's incredibly frustrating to deal with the slower ones. The same point feature class is used for all Origins and Destinations, a set of about 40,000 points. Any insights into the cause of this and/or solutions?


title: When using arcpy can I only calculate fields of a subtype and not the entire feature class?

text: I'm appending two sepearte shapefiles into one feature class with different subtypes. Is there a way to only calculate fields from a certain subtype?


title: Is it possible to retrieve lost versioned data in SQL Server Management Studio?

text: One of my staff accidentally deleted a feature class she was creating in her version before I reconciled it. I have grabbed a back up of the database from yesterday in SQL Management Studio. Is there a way to locate the table with the unreconciled data and restore it? I'm using ArcGIS 10.1


title: How to insert a feature using WFS-T based on a criteria?

text: I am pretty new to WFS/WFS-T and need help with some suggestions on how the following requirement can be implemented. We have a need to insert a feature into a PostGIS database based on the following condition. The user provides a geometry along with other data to be inserted. But before doing so: 1.Check if there is any existing feature in the table whose geometry intersects with the one that is provided. 2.If there is any, throw an exception/error. 3.If successful, then insert record and return success message. I read that OGC Filters can be used to query intersections, and WFS-T can be used to insert features, but I do not know how to implement query and an insert together. Can some one shed some light on how this can be done?


title: When a raster is clipped to a polygon with Python, why does it still take on the extent of the entire shapefile?

text: I am clipping a raster image to each polygon row in a shapefile in ArcMap 9.3 using the Clip tool (Data Management) in Python with Clipping Geometry set. While the clipped raster successfully depicts the intersection of the raster and the polygon, the extent of the clipped raster is still that of the original raster. Here is my code:               # Import system modules      import sys     import string     import os     import arcgisscripting       # Create the Geoprocessor object     gp = arcgisscripting.create(9.3)     # Load required toolboxes...     gp.AddToolbox("C:/Program Files (x86)/ArcGIS/ArcToolbox/Toolboxes/Data Management Tools.tbx")     # Designate a workspace     gp.workspace = "L:\Clip"  # Assign variables...      clipto = "test.shp"  # shapefile to clip to      clipit = "vfcm.tif" # features to be clipped            # Cursor time     rows = gp.SearchCursor(clipto)     row = rows.Next()          # clip management     while row:         n = str(row.VAHU6) # assign a variable for the processing message based on a field         clipgeo = row.Shape         print "clipping to: " +n # tells what row was clipped         # Clip_management <in_raster> <rectangle> <out_raster> {in_template_dataset}   {nodata_value} {NONE | ClippingGeometry}          outputname = str(row.VAHU6) + "_c"          extent=str(clipgeo.extent)         gp.Clip_management(clipit, extent, outputname, clipgeo, "", ClippingGeometry)          #update str if necessary         print str(row.VAHU6)         row=rows.next()          # reset the array...     del rows     del gp      Do you know why I am having this problem? When I run the tool in Model Builder, it works correctly. This problem is evident both in the file size (which is 10x greater than when correctly clipped) and when I "zoom to layer" in ArcMap. If you know how to adjust the code to work, I'd be very appreciative! Thank you! UPDATE: Even if I export one polygon from the shapefile manually, look up the extent in the source tab, and then type those coordinates directly into the extent in my code, it still doesn't clip properly.


title: How to clip raster image by the extent of each row in a shapefile with ArcGIS 9.3

text: I'm using Python to clip a raster image by each row in a shapefile with ArcGIS 9.3. I am hoping to end up with one raster image for each polygon row, clipped to the extent of the polygon row. However, my current script clips the raster to the entire shapefile, instead of setting the extent by each polygon row. My script is as follows:               # Import system modules     import sys     import string     import os     import arcgisscripting          # Create the Geoprocessor object     gp = arcgisscripting.create(9.3)          # Load required toolboxes...     gp.AddToolbox("C:/Program Files (x86)/ArcGIS/ArcToolbox/Toolboxes/Data Management Tools.tbx")          # Designate a workspace     gp.workspace = "L:\Clip"          # Assign variables...     clipto = "test.shp"          # grids to clip to     clipit = "vfcm.tif" # features to be clipped          # Cursor time     rows = gp.SearchCursor(clipto)     row = rows.Next()          # clip management     while row:         n = str(row.VAHU6) # assign a variable for the processing message based on a field     print "clipping to: " +n # tells what grid was clipped          # Clip_management <in_raster> <rectangle> <out_raster> {in_template_dataset}   {nodata_value} {NONE | ClippingGeometry}     outputname = str(row.VAHU6) + "_c"     desc = gp.Describe(clipto)     extent = str(desc.Extent)     gp.Clip_management(clipit, extent, outputname, clipto, "", ClippingGeometry) #update str if necessary     print str(row.VAHU6)     row=rows.next()          # reset the array...     del rows     del gp      Any ideas how to fix it? Thanks!


title: ArcObjects C++ - Has anyone successfully used AoToolbarAddCommand?

text: I am working with the C++ API for ArcObjects (Linux, QT), and I am running into problems with when creating a custom button on a toolbar. I have read up on the C++ specific implementation of creating a custom command (inheriting from `AoCommandBase` and adding the button with `AoToolbarAddCommand`). After many hours of fiddling around, I have come to the conclusion that `AoToolbarAddCommand` simply isn't doing its job. I can add ESRI predefined commands with no problem, but my custom command shows up as a useless grey square (my icon doesn't even display). My debug output suggests that none of the functions defined in my command are being called during setup (or ever for that matter), and they definitely should be. If it helps, excerpts from my code are below: From the add_toolbar_items function:               CComVariant varTool;          long itemindex;          varTool = L"esriControlCommands.ControlsOpenDocCommand";     ipToolbar->AddItem(varTool, 0, -1, VARIANT_FALSE, 0,             esriCommandStyleIconOnly, &itemindex);          panRight = new PanRight(); /*panRight is global, PanRight is my command class*/          AoToolbarAddCommand(ipToolbar, panRight, esriCommandStyleIconOnly);      The PanRight class (my custom button) is stolen from a sample, but I changed the code for loading bitmaps because the provided code did not work. All the other functions remain unchanged, except for a cout statement letting me know if the function were ever to run.               PanRight::PanRight()     {       m_ipHookHelper.CrreateInstance(CLSID_HookHelper);       std::cout<<"panright constructor\n";            //load bitmap       IPictureElement3Ptr ipPict(CLSID_PictureElement);       HRESULT hr = ipPict->ImportPictureFromFile(CComBSTR(L"<pathToPic>"));       if(SUCCEEDED(hr))       {         OLE_HANDLE hBitmap;         hr = ipPict->get_Handle(&hBitmap);         if(SUCCEEDED(hr))           {m_hBitmap = hBitmap;}       }     }      Does anyone have any ideas as to why `AoToolbarAddCommand` might not be doing its job? Has anyone successfully added a custom command using the C++ API?


title: OpenLayers doesn't show an overlay with a different SRS than the base layer

text: I need to add an overlay layer that uses EPSG:4326 to a map with a base layer that uses EPSG:32628. Every time I add the overlay OpenLayers automatically switches the SRS param of the overlay to EPSG:32628 (SRS of baselayer); I can see the base layer, but the overlay isn't shown. My code is this:               baselayer = new OpenLayers.Layer.WMS(                    baselayername, baselayerurl,                    {                       width: varmap.size.w,                       srs: 'EPSG:32628',                       layers: baselayername,                       height: varmap.size.h,                       styles: style,                       format: format                    }                    );          overlaylayer = new OpenLayers.Layer.WMS(                    overlaylayer name, overlaylayer url,                    {                       width: varmap.size.w,                       srs: 'EPSG:4326',                       layers: layername,                       height: varmap.size.h,                       styles: style,                       format: format,                       transparent: true                    }                    );          varmap.addLayers([baselayer,overlaylayer]);      How can I do this?


title: Why is the CSVT file changing my real values to null?

text: I made a CSVT file to change desired real data to string data. After importing the original CSV file, that was linked by file name to the CSVT file, the string data appears as normal however all the real data has been replaced with NULL values! Why is this happening? With in the CSVT I have made sure there are no spaces, and I have also made sure the file name is exactly the same as the CSV. Any suggestions would be helpful!


title: Adding layers with different WKIDs to ArcGIS API for Silverlight application?

text: In Esri Silverlight application, how can a map layer with a different WKID than the one used in the application be added? Will Esri 's Silverlight application handle the re-projection?


title: Table calculation in QGis

text: I have a shape file with the attribute "yield".   I need to know the math difference between yield (id1) and yield (id2)...then yield (id2) and yield (id3) and so on... I hope you understand what I mean.   In Excel it is easy to handle. But I do not want to export and import the files. Thank you.


title: How to draw into selection cache in ArcMap

text: I have a tool,something like Edit Tool in ArcMap,when I double click on mouse,and it selects a feature(polyline for example) and draw a sketch on it too,but if I change zoom,the sketch disapears because I draw sketch on the scrren.I know if I can draw sketch on into selection cache(bitmap) it will stay till selection changes,so it doesn't disapear with changing zoom. here are the steps i pass to draw the sketch with current situation: 1.I take cache count into cachecount variable using screen display object 2.I take a handle to device countext for cacheIndex=cachecount-1 3.start drawing using 2 parameters in steps 1 and 2 4.draw polyline using screen display DrayPolyline 5.FinishDrawing .............................................               HRESULT hr;          //Get handle to memory device context          HDC HandleDC;          short cacheCount;          this->m_ipSDisp->get_CacheCount(&cacheCount);          short cacheIdx=cacheCount-1;          this->m_ipSDisp->get_CacheMemDC(cacheIdx,(OLE_HANDLE*)&HandleDC);          if(FAILED(hr=this->m_ipSDisp->StartDrawing((OLE_HANDLE)HandleDC,cacheIdx)))     return hr;          //Draw feature here               this->m_ipSDisp->FinishDrawing();      ............................................. Because ArcMap has at least 3 caches,1st for feature,2nd for annotation and graphics and 3rd for selection,i supposed the last feature index must be for selection cach,if I choose another index less than this,it doesn't even draw any thing.I checked this number and it always returns 2 for cachecount,I think because I don't have any graphics or annotation on map,it returns 2(at least I wish it is a true consumption). but unfortunately it draws polyline on the screen because drawn polyline disapears at the first refresh of map. Is there something wrong with these procedure?May you tell me how I can draw a sketch on the selected feature just like Edit Tool in ArcMap? Regards


title: flex to java trying to get started on the plan

text: I have as suggested recently on this forum been "playing" with arcgis server. For reasons perhaps not obvious to "real" programmers I have built a fairly extensive series of web mapping applications (not real applications) based on flex sample viewer.   It has been very difficult for me to understand the ins and outs of flex but am beginning to get a grip on it.   I stated these are not real applications meaning - when I get an "application working with all the widgets and layers, etc working.   I simply copy that folder structure and rename it to a new application name.   I then edit config.xml (notepad) and default.htm to reflect the new application name.   I don't own any programming software i.e. msvs, flashbuilder, etc. Because of the power and marketing of apple, I am now in the delimna of whether to find an x-code programmer to help with the esri IOS application, or switch to Java for all applications, and websites.   One problem I have is even understanding the java terminology. Java, javascript, etc. My question is. Is there an easy to understand resource for Java.   I'm certain there is nothing to convert my flex applications to java.   But has any had experience with what I am going through? Any direction or comment is appreciated.


Is there an advanced way to label in ArcMap so that the label will not be dropped?


title: Georeferenced image goes "out of scale" upon reopening in ArcMap

text: We have several ArcGIS 10 map documents containing fully georeferenced images (projected UTM 16N). We also digitised them by tracing over features in the image into shapefiles. Everything seems to save correctly. However, when we re-open the map document in ArcMap, the georeferenced image goes completely off scale. It is still rotated correctly, but sometimes it ends up multiple times bigger (or smaller!) than it should be, and is not at the right place. We are baffled by this phenomenon. Can anyone help with this? Thanks.


title: Simple OpenLayers WFS

text: > **Possible Duplicate:**   >  How to add a simple WFS layer from GeoServer to OpenLayers map? I'm trying to simply add a WFS layer in OpenLayers. But completely stuck! Could someone please take a look at my code and suggest what I'm doing wrong? I have a fresh install of GeoServer on a Linux (Ubuntu) VM. I'm trying to connect to one of the default layers (medford:hospitals). I'm fairly confident I have all the parameters correct. The layer previews fine in GeoServer. My webserver is on a seperate server to GeoServer so hopefully no proxy issues? Starting to wonder if this is some weird server issue? Anyhow - the code:                           //Add WFS Layer             var wfs = new OpenLayers.Layer.Vector("Medford Hospitals",                     {                         strategies: [new OpenLayers.Strategy.Fixed()],                         projection: new OpenLayers.Projection("EPSG:4326"),                         protocol: new OpenLayers.Protocol.WFS({                             version: "1.1.0",                             url: "http://squirrel.bis.local:8080/geoserver/wfs",                             featurePrefix: 'medford', //geoserver worspace name                             featureType: "medford:hospitals", //geoserver Layer Name                             featureNS: "http://medford.opengeo.org", // Edit Workspace Namespace URI                             geometryName: "the_geom" // field in Feature Type details with type "Geometry"                         })                     }             );             map.addLayer(wfs);      Any help and advice gratefully accepted! Thanks, Steve


title: No primary key or unique index found?

text: I have a store created from oracle database in geoserver. Now after I create layer out of the store. And when I try to access the layer or try to preview the layer, I get the warning message in console as > No primary key or unique index found for 'mylayer' I see in oracle db, i have created the primary key and I have an index too. Can anybody suggest, what I am doing wrong, or am I missing something to setup in geoserver? I see the option > Primary key metadata table while creating datastore. Is it anything to do with warning I am getting? Thanks


title: Find the majority area within another area

text: I have a survey grid overlaid unto several administrative areas. Both are polygon features and I have performed a union on both features in order to determine the areal contribution of the segments created within each survey grid square. The purpose of doing this is so that I can assign each survey grid to an administrative area based on which administrative area is of a majority within each survey grid. How can I perform this using the operators in the search query builder WHERE clause? So I have an example extracted from the table: 'CCAFS_ID' is the survey grid and 'prcntArea' is the areal contribution to 'Area' calculated by dividing 'segArea' by 'Area'                   CCAFS_ID    Area    NAME_0  NAME_2  segArea     prcntArea         3138    0.00203158  Uganda  Bugahya 0.00063856  31.43169356         3138    0.00203158  Uganda  Buhaguzi  0.00060369    29.71529548         3138    0.00203158  Uganda  Kiboga  0.00078933  38.85301096         2373    0.00203777  Kenya   Kwale   0.00026393  12.95190331         2252    0.00203429  Kenya   Makueni 0.00076357  37.53496306         2252    0.00203429  Kenya   Taita Taveta    0.00064302  31.60906262         2252    0.00203429  Kenya   Kajiado 0.0006277   30.85597432         2419    0.00203864  Kenya   Kwale   0.00070346  34.50633756         2457    0.00203889  Kenya   Kwale   0.00088593  43.45158395         2567    0.00203911  Kenya   Kwale   0.00015073  7.39195041


title: Flex 2.4 login page with tokens

text: I am using AGS security and a 2.4 flex application.   I would like to login with a login screen like available in the samples.   Then utilize tokens for fc security on my services. I see a sample for both of these on esri.resources.com but nothing for both together.   Has anyone done this that can share?


title: How to trace a line layer (road network) through points?

text: OK. I've been reluctant to post this, but I've just about given up. I have a road network (purple), Point files (green) and a beginning point (yellow). I want to trace the point files based on the road network. Think of the points as telephone poles, but what I want is a map showing telephone lines (line shapefile). There is a numbering scheme for the "telephone poles" but it isn't great and for this instance I would just as well assume they are not numbered. Does anyone have a solution? One that looks pretty good is just buffering the points and then clipping the road network from the buffers. But I want something more complete. It needs to be automated since there are 12,000 of the "telephone poles" ![enter image description here](http://i.stack.imgur.com/qKJrQ.jpg)


title: How to define filter in WFS layer in order i can show new filter reult layer for new filter condition (i.e.redraw the layer according to filter)

text: I am using openlayer 2.12 for this wfs filter purpose. I wanted to redraw filter layer as conditions in filter changes dynamic. Following is my code in for wfs:                var ty=OpenLayers.Filter.Comparison.EQUAL_TO;        var propertyOP="name";         var valOP="buil2";         build1 = new OpenLayers.Layer.Vector("WFS", {             strategies: [new OpenLayers.Strategy.BBOX()],             filter: new OpenLayers.Filter.Comparison({                  type: ty,                 property: propertyOP,                     value: ValOP             }),             protocol: new OpenLayers.Protocol.WFS({                 srsName:"EPSG:4326",                 version: "1.1.0",                 url:  "http://localhost:8080/geoserver/sol/wfs",                 featureType: "ch",                 featurePrefix:"sol",                     featureNS: "http://localhost:81/sol"/*,                 geometryName:"geom"*/             }),             projection: geographic,             styleMap: styleMap             });         map.addLayer(build1);      Now i wanted to make this filter to update and show new filter layer result. In my current code previous filter result remain but show result on previous result. My Filter type,property and value get change.


title: In GIScience, is there a generally agreed list of top tier conferences?

text: In many fields, such as computer sciences, it seems to be quite clear which conferences are top tier and how a paper accepted to those conferences compares to journal publications in the same field. Is there a general agreement in GIScience about which conferences are considered top tier? And how do publications at those conferences compare to papers in, e.g. Transactions in GIS or the International Journal of Geographical Information Science?


title: How to convert a multi-band landsat RGB to a kml file using MAPTILER

text: I was able to use maptiler for converting a single raster (ortofoto geotiff obtained with UAV) into a kml file. Now I want to convert a RGB landsat into kml for visualisation in Google Earth. It is not clear to me, how this can be done as the raster has tree bands now. In addition, how I can assure that the nice visualisation of the LANDSAT in QGis, obtained after setting manually min/max values with'Colourmap', is maintained during conversion Maptiler?


title: How to determine storage type (ST_Geom/Oracle) from arcpy/python

text: We're migrating some feature classes from SDELOB (or some older binary format) to ST_Geometry. As we write our arcpy script to use the ESRI Migrate Storage Tool we'd like to test whether or not something already is ST_Geom...Other than writing hooks into the database, using the comtypes package etc., does anyone know of a simple way to determine this?


title: Web Mapping using the ESRI Javascript API

text: So I've been tasked with coding the interactive map for the city I'm interning at. I'm still a beginner with Javascript but I learn best "one the fly" by just getting started. I just need to know how to get started because I've never done any sort of web design. Do I need to start by coding in an .html or a .js? What's the best IDE for designing web applications? Visual Studio for Web? Eclipse EE? Well I need access to the web server to see how my map actually looks? I've played with the sandbox located here: http://developers.arcgis.com/javascript/sandbox/sandbox.html?sample=map_create However, I'm ready to make more progress. Any help/suggestions/insights is appreciated.


title: What Spatial Reference System do I store Google Map's Lat/Lng in

text: I am new to PostGIS, Spatial Reference Systems and projections and want to store lat/lng coordinates retrieved from Google Maps and its services like the Geocoder. I'm working with data in America and the main calculations are for nearest neighbors. Results will be plotted back on a web map (eg: via Google maps API or leaflet) **Question:** What spatial reference system is Google map using? I figured out so far that its the WGS 84 datum with the Mercator projection in the geographic coordinate system. Should I store the location data as it is, or transform to US National Atlas Equal Area EPSG:2163? Since I will be calculating distances and finding nearest neighbors, if I guess correctly that doing nearest neighbor search requires transforming the entire table to EPSG:2163, then will the solution be to store the data in both Mercator and EPGS:2163?


title: Extracting street segments from google maps?

text: I'm using the google maps v3 api and am trying to extract a list of intersections and street segments from an overlay created from a KML file. Ideally, I'd like to be able to get the poly lines in a manner similar to the way Google Mapmaker works currently when you right click and go to 'find near this point'(http://www.google.com/mapmaker?hl=en) How can this be accomplished?


title: How to create a line from more than two points?

text: I have a loop which calculates two points for each iteration (x3,y3) and (x4,y4). As seen in the code these two points are added for each iteration, which gives i-1 lines. Each line has a individual id. What I want is to add all these points at the same time, so it makes **one polyline** with only one id. This is done by adding all the points in the line:               fet.setGeometry( QgsGeometry.fromMultiPolyline([[QgsPoint(x3,y3), QgsPoint(x4,y4)]]))      instead of only these two points at the time. But I can not figure out how to change the loop to make it work. I guess for each iteration, I have to save a string with QgsPoint(x3,y3), QgsPoint(x4,y4) for the given iteration and add the next two points as a string in the next iteration. But I can not see how?               for i in range(0,len(points)-1):         coor1 = points[i]         x1 = coor1[0]         y1 = coor1[1]         dist = 0         coor2 = points[i+1]         x2 = coor2[0]         y2 = coor2[1]         dn = ((x1-x2)**2 + (y1-y1)**2)**0.5         x3 = x1 + dist*(y1-y2) / dn         y3 = y1 - dist*(x1-x2) / dn              x4 = x2 + dist*(y1-y2) / dn         y4 = y2 - dist*(x1-x2) / dn                fet.setGeometry( QgsGeometry.fromMultiPolyline([[QgsPoint(x3,y3), QgsPoint(x4,y4)]]))         pr.addFeatures( [ fet ] )


title: Transfer USGS overlays to Google Earth?

text: How to transfer aerial archives from USGS earth explorer onto GoogleEarth?


title: For Loop - Map Algebra (ArcGIS) using Python

text: **ORIGINAL QUESTION** * * * Im relatively new to python and these fourms but Im am having trouble utilizing for-loops for spatial analyses within ArcGIS. It does not appear to recognize the variable, RasterImage! Here is a part of the code im having trouble with...               import arcpy, os, sys, string     from arcpy import env     from arcpy.sa import *          arcpy.CheckOutExtension("spatial")          arcpy.env.workspace = r'O:\DATA\test'     InputFolder = arcpy.env.workspace          Temp4 = InputFolder + '\\' + 'temp4'          RasterList = arcpy.ListRasters()     for RasterImage in RasterList:         print (RasterImage)         Temp4 = FocalStatistics('RasterImage', NbrRectangle (9, 9, 'CELL'), "RANGE", "DATA")         print ('Focal Statistics Done')      I receive the following error               "Traceback (most recent call last):     File "O:\test.py", line 67, in <module>     Temp4 = FocalStatistics('RasterImage', NbrRectangle (9, 9, 'CELL'), "RANGE", "DATA")     File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\sa\Functions.py", line 4796,   in FocalStatistics     ignore_nodata)     File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\sa\Utils.py", line 47, in   swapper     result = wrapper(*args, **kwargs)     File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\sa\Functions.py", line 4790,    in wrapper     ignore_nodata)     File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\geoprocessing\_base.py", line 474, in <lambda>     return lambda *args: val(*gp_fixargs(args))     ExecuteError: Failed to execute. Parameters are not valid.     ERROR 000865: Input raster: RasterImage does not exist.     Failed to execute (FocalStatistics)."      It does not seem to recognize my for in loop of the RasterImage - any ideas? The print statment after the loop shows that it is recognizing the file (in python) but that the spatial analyses used in arcpy are not. I thought it might have to do something with the workspace used so I thought that adding               RasterImage = InputFolder + '\\' + RasterImage       might help locate the full path of the raster datasets but to no avail! Im lost for ideas and the only help files that utilize spatial analyses on the ArcGIS resource page do not utilize loops in their scripts. ¨ **UPDATE** * * * Issue has been resolved by implementing the following: The original question displaying the error 'RasterImage' does not exist was cause in part due to the '' marks and the spaces around the NbrRectangle. I have implemented part of my new code using the suggestions by nmpeterson whereby the geoprocessing is called through the function               def focalStats(raster):          Temp4 = FocalStatistics(raster, NbrRectangle(9, 9, 'CELL'), "RANGE", "DATA")                  return Temp4       While methodologies in which several temporary files rely on one another (i.e. a geoprocess within another geoprocess) i've used the .save function into a temporary directory as shown by om_henners before deleting all those contents afterwards.


title: RT Sql Layer plugin giving an error

text: I am trying to use the aforementioned plugin with QGIS 1.7 and Postgres 9.0/PostGIS 1.5. Added a PostGIS spatial layer w/out a problem and then clicked on the RT Sql layer button which displayed the main dialog. When I select Database-> , I got this error BTW - the **...** 's is the QGIS plugin path. Left it out for clarity):               An error has occured while executing Python code:          Traceback (most recent call last):       File ".../python/plugins\rt_sql_layer\ManagerWindow.py", line 112, in dbConnectSlot         self.dbConnect( self.sender() )       File ".../python/plugins\rt_sql_layer\ManagerWindow.py", line 163, in dbConnect         self.refreshTable()       File ".../python/plugins\rt_sql_layer\ManagerWindow.py", line 272, in refreshTable         model.loadFromDb(self.db)       File ".../python/plugins\rt_sql_layer\DatabaseModel.py", line 250, in loadFromDb         self.tree.constructTreeFromDb(self.db)       File ".../python/plugins\rt_sql_layer\DatabaseModel.py", line 96, in constructTreeFromDb         list_tables = db.list_geotables()       File ".../python/plugins\rt_sql_layer\connectors\postgis.py", line 275, in list_geotables         items[i] = geo_item     IndexError: list assignment index out of range          Python version:     2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]               QGIS version:     1.7.0-Wroclaw Wroclaw, 63ecdd7      I never used python in the past but I had a look at the source code and it seems that the query the plugin is running to get the spatial tables into a tree view is not returning anything? Had a go to running the sql statements in PostGIS and they all seem to return data. Then again- not sure if I am looking at the right place! Have you seen this before? Has it got anything to do with the s/w versions? Plugin was developed for an earlier version and **something** has changed in the latest?


title: JavaScript API - Query and Edit point from Feature Layer

text: I am attempting to recreate the ESRI example for attribute inspections (https://developers.arcgis.com/javascript/jssamples/ed_attribute_inspector.html). I am having an issue when I create my feature service that contains a point feature class vs. the polygon feature class the example uses. My initSelectToolbar(evt) function isn't "seeing" the point from the feature layer. If I only change the urls to the feature/map services (noted in commented out service declaration) the selection works successfully. Am I missing something obvious here? Why can I not grab the point? > Blockquote                           var map;                 var updateFeature;                 var map, geocoder, currentBaseMap;                 var locatorUrl = "http://gisaprd/ArcGIS/rest/services/SDE.AddressLocator_Comp/GeocodeServer";                      require([                   "esri/map",                   "esri/layers/FeatureLayer",                   "esri/dijit/AttributeInspector",                   "esri/symbols/SimpleLineSymbol",                   "esri/symbols/SimpleFillSymbol",                   "dojo/_base/Color",                   "esri/layers/ArcGISDynamicMapServiceLayer",                   "esri/layers/ArcGISTiledMapServiceLayer",                   "esri/config",                   "esri/tasks/query",                   "dojo/parser",                   "dojo/dom-construct",                   "dijit/form/Button",                   "dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dojo/domReady!"                 ], function (                   Map, FeatureLayer, AttributeInspector,                   SimpleLineSymbol, SimpleFillSymbol, Color,                   ArcGISDynamicMapServiceLayer, ArcGISTiledMapServiceLayer, esriConfig,                   Query,                   parser, domConstruct, Button                 ) {                     parser.parse();                     // refer to "Using the Proxy Page" for more information:  https://developers.arcgis.com/en/javascript/jshelp/ags_proxy.html                     esriConfig.defaults.io.proxyUrl = "/proxy";                          // Create the map                     map = new Map("mapDiv")                     map.on("layers-add-result", initSelectToolbar);                     //aerialsLayer = new esri.layers.ArcGISTiledMapServiceLayer("http://gisaprd/ArcGIS/rest/services/Aerials_4inch_12inch_Cached/MapServer", { "id": "Aerials", "visible": false });                     //map.addLayer(aerialsLayer);                     streetsLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://gisaprd/ArcGIS/rest/services/SRSLandbase/MapServer", { "id": "Streets" });                     map.addLayer(streetsLayer);                     currentBaseMap = "Streets";                          var ISS_Inspections = new ArcGISDynamicMapServiceLayer("http://gisadev:6080/arcgis/rest/services/ISS_Inspections/MapServer", { "id": "ISS_Inspections" });                     ///////////////////////////////////////////////////////////////////////////////////////////////////////////////                     ///////////////////////////////////////////////////////////////////////////////////////////////////////////////                          // If I use a map service with only polygons this works                     //var ISS_Inspections = new ArcGISDynamicMapServiceLayer("http://gisadev:6080/arcgis/rest/services/testDeleteMe2222/MapServer", { "id": "ISS_Inspections" });                          ///////////////////////////////////////////////////////////////////////////////////////////////////////////////                     ///////////////////////////////////////////////////////////////////////////////////////////////////////////////                     ISS_Inspections.setDisableClientCaching(true);                     map.addLayer(ISS_Inspections);                          var ISS_InspectionsFL = new FeatureLayer("http://gisadev:6080/arcgis/rest/services/ISS_Inspections/FeatureServer/0", {                         ///////////////////////////////////////////////////////////////////////////////////////////////////////////////                         ///////////////////////////////////////////////////////////////////////////////////////////////////////////////                         // If I use a feature service with only polygons this works                         //    var ISS_InspectionsFL = new FeatureLayer("http://gisadev:6080/arcgis/rest/services/testDeleteMe2222/FeatureServer/0", {                         ///////////////////////////////////////////////////////////////////////////////////////////////////////////////                         ///////////////////////////////////////////////////////////////////////////////////////////////////////////////                         mode: FeatureLayer.MODE_SELECTION,                             outFields: ["*"]                              });                     highlightSymbol = new esri.symbol.SimpleMarkerSymbol().setColor(new dojo.Color([255, 255, 0]));                     ISS_InspectionsFL.setSelectionSymbol(highlightSymbol);                     ISS_InspectionsFL.on("edits-complete", function () {                         ISS_Inspections.refresh();                     });                     map.addLayers([ISS_InspectionsFL]);                               function initSelectToolbar(evt) {                         var ISS_InspectionsFL = evt.layers[0].layer;                         var selectQuery = new Query();                              map.on("click", function (evt) {                             selectQuery.geometry = evt.mapPoint;                                  ISS_InspectionsFL.selectFeatures(selectQuery, FeatureLayer.SELECTION_NEW, function (features) {                                 if (features.length > 0) {                                     //store the current feature                                     updateFeature = features[0];                                     map.infoWindow.setTitle(features[0].getLayer().name);                                     map.infoWindow.show(evt.screenPoint, map.getInfoWindowAnchor(evt.screenPoint));                                 } else {                                     map.infoWindow.hide();                                 }                             });                         });                              map.infoWindow.on("hide", function () {                             ISS_InspectionsFL.clearSelection();                         });                              var layerInfos = [{                             'featureLayer': ISS_InspectionsFL,                             'showAttachments': false,                             'isEditable': true,                             'fieldInfos': [                               { 'fieldName': 'PS_READING_INLET_SIDE', 'isEditable': true, 'tooltip': 'Current Status', 'label': 'Status:' },                             ]                         }];                              var attInspector = new AttributeInspector({                             layerInfos: layerInfos                         }, domConstruct.create("div"));                              //add a save button next to the delete button                         var saveButton = new Button({ label: "Save", "class": "saveButton" });                         domConstruct.place(saveButton.domNode, attInspector.deleteBtn.domNode, "after");                              saveButton.on("click", function () {                             updateFeature.getLayer().applyEdits(null, [updateFeature], null);                         });                              attInspector.on("attribute-change", function (evt) {                             //store the updates to apply when the save button is clicked                              updateFeature.attributes[evt.fieldName] = evt.fieldValue;                         });                              attInspector.on("next", function (evt) {                             updateFeature = evt.feature;                             console.log("Next " + updateFeature.attributes.objectid);                         });                              attInspector.on("delete", function (evt) {                             evt.feature.getLayer().applyEdits(null, null, [feature]);                             map.infoWindow.hide();                         });                              map.infoWindow.setContent(attInspector.domNode);                         map.infoWindow.resize(350, 240);                     }                 }                 );      > Blockquote


title: Automatically update the result of a QueryTask

text: I have developed a application using the ESRI JS API to allow users to create and edit features in a web map. I have used the QueryTask to create summary statistics to report back to the user on total length and such. To create this report back, I am using .innerHTML, which works great, but the statistic is not refreshed when a change is made to the feature. Thus in order for a user to see updated statistics they need to refresh the page. This is not ideal - can I add a listener or other technique to automatically update the statistics generated with the Query Task? The Query and Query Task is:               queryTask = new QueryTask("URL");         query = new Query();         statisticDefinition = new StatisticDefinition();         statisticDefinition.statisticType = "sum";         statisticDefinition.onStatisticField = "SHAPE.STArea()";         statisticDefinition.outStatisticFieldName = "total_area";         query.outStatistics = [statisticDefinition];         queryTask.execute(query, function (result) {             total_area = result.features[0].attributes;             postExecute();              });      and the postExecute Function that gives the statistic to the DIV:               function postExecute() {         var roadLength = (total['total'])";         document.getElementById("length").innerHTML = roadLength;     }


title: Workflow for staking out points in ArcGIS for Mobile

text: I was wanting to take a line of points along a road spaced 500ft apart and put a lathe in the road. Is there an 'easy' workflow for this in ArcGIS for mobile? It looks more like you have the option to collect features or view the map. I've used Trimble Survey Controller and marked seismic lines where it guides you to the point and once you're there you hit collect and it moves you to the next point. Is there any hidden functionality like this in ArcGIS for Mobile? I need ~10 foot accuracy and using a Geo HX.


title: Shapefile CRS changed after exporting from QGIS. Are they equivalent?

text: I added a shapefile as a vector layer in qGIS 1.7 so that I could join in additional attribute data (not geodata) from another DBF file. The Shapefile that I added has this CRS (as far as I can tell using ogrinfo):               PROJCS["WGS_1984_Web_Mercator",     GEOGCS["GCS_WGS_1984_Major_Auxiliary_Sphere",         DATUM["WGS_1984_Major_Auxiliary_Sphere",             SPHEROID["WGS_1984_Major_Auxiliary_Sphere",6378137.0,0.0]],         PRIMEM["Greenwich",0.0],         UNIT["Degree",0.0174532925199433]],     PROJECTION["Mercator_1SP"],     PARAMETER["False_Easting",0.0],     PARAMETER["False_Northing",0.0],     PARAMETER["Central_Meridian",0.0],     PARAMETER["latitude_of_origin",0.0],     UNIT["Meter",1.0]]      After joining in the extra attribute data in, I exported the original shapefile by right-clicking on the layer and choosing 'Save as.' I kept the CRS as 'Original CRS' in the 'Save vector layer as ...' dialog. However, the exported shapefile has the following CRS defined:               PROJCS["Mercator",     GEOGCS["GCS_unnamed ellipse",         DATUM["unknown",             SPHEROID["Unknown",6378137,0]],         PRIMEM["Greenwich",0],         UNIT["Degree",0.017453292519943295]],     PROJECTION["Mercator_1SP"],     PARAMETER["central_meridian",0],     PARAMETER["false_easting",0],     PARAMETER["false_northing",0],     UNIT["Meter",1],     PARAMETER["latitude_of_origin",0.0]]      Are the CRS' equivalent? If so, does that mean that some of the strings in the WKS definition of the PRJ file are just identifiers? If not, how can I make qGIS preserve the CRS of the original shapefile when exporting it? Thanks in advance for any help anyone can offer.


title: Tiling failing near the end of generating base level tiles

text: I have a GeoTiff file that I have created by using the command:               gdal_translate -gcp <my gcp> -a_srs <my wkt file> input.tif output.tif      Note that I have twelve -gcp options set on the command, not just the one as shown above. Running gdalinfo on the resulting output.tif gives this info:               $ gdalinfo output.tif     Driver: GTiff/GeoTIFF     Files: output.tif     Size is 14988, 4817     Coordinate System is `'     GCP Projection =      PROJCS["NAD83 / Lambert Conformal Conic",     GEOGCS["NAD83",         DATUM["North_American_Datum_1983",             SPHEROID["GRS 1980",6378137,298.2572221010002,                 AUTHORITY["EPSG","7019"]],             AUTHORITY["EPSG","6269"]],         PRIMEM["Greenwich",0],         UNIT["degree",0.0174532925199433],         AUTHORITY["EPSG","4269"]],     PROJECTION["Lambert_Conformal_Conic_2SP"],     PARAMETER["standard_parallel_1",53],     PARAMETER["standard_parallel_2",58],     PARAMETER["latitude_of_origin",55],     PARAMETER["central_meridian",-117],     PARAMETER["false_easting",0],     PARAMETER["false_northing",0],     UNIT["metre",1,         AUTHORITY["EPSG","9001"]]]     GCP[  0]: Id=1, Info=           (2825.895,258.41074) -> (-880122.870999,429169.114123,0)     GCP[  1]: Id=2, Info=           (4287.7334,677.89484) -> (-647749.215943,385189.927027,0)     GCP[  2]: Id=3, Info=           (5770.6079,1015.5618) -> (-413230.559378,354650.048432,0)     GCP[  3]: Id=4, Info=           (8782.7646,1429.8372) -> (59130.821732,334247.905451,0)     GCP[  4]: Id=5, Info=           (11819.869,1494.3732) -> (530709.611705,368232.705719,0)     GCP[  5]: Id=6, Info=           (13468.901,2820.1733) -> (805645.946747,186796.122966,0)     GCP[  6]: Id=7, Info=           (13603.036,4243.1196) -> (847013.722386,-31779.568436,0)     GCP[  7]: Id=8, Info=           (10238.577,4364.8101) -> (327399.354203,-99445.655019,0)     GCP[  8]: Id=9, Info=           (6879.6489,4099.3042) -> (-196548.115146,-106984.902876,0)     GCP[  9]: Id=10, Info=           (3574.6519,3447.9844) -> (-717894.287773,-54297.530737,0)     GCP[ 10]: Id=11, Info=           (1518.3627,4345.4502) -> (-1023098.699938,-222975.023951,0)     GCP[ 11]: Id=12, Info=           (1955.6367,2981.635) -> (-975431.79687,-5555.816475,0)     GCP[ 12]: Id=13, Info=           (2390.9373,1619.8647) -> (-927792.139262,211739.118477,0)     Metadata:       TIFFTAG_SOFTWARE=Adobe Photoshop CS2 Windows       TIFFTAG_DATETIME=2011:05:25 08:08:20       TIFFTAG_XRESOLUTION=635       TIFFTAG_YRESOLUTION=635       TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)       AREA_OR_POINT=Area     Image Structure Metadata:       INTERLEAVE=PIXEL     Corner Coordinates:     Upper Left  (    0.0,    0.0)     Lower Left  (    0.0, 4817.0)     Upper Right (14988.0,    0.0)     Lower Right (14988.0, 4817.0)     Center      ( 7494.0, 2408.5)     Band 1 Block=14988x1 Type=Byte, ColorInterp=Red       Mask Flags: PER_DATASET ALPHA      Band 2 Block=14988x1 Type=Byte, ColorInterp=Green       Mask Flags: PER_DATASET ALPHA      Band 3 Block=14988x1 Type=Byte, ColorInterp=Blue       Mask Flags: PER_DATASET ALPHA      Band 4 Block=14988x1 Type=Byte, ColorInterp=Alpha      When I run the output.tif file through our tile generator I get to 99% done with the base level and it suddenly fails with this error:               Traceback (most recent call last):       File "<string>", line 7, in process       File "/home/<my user dir>/maptiler/tiler/tiler.py", line 839, in generate_base_tiles_async         image_output.write_base_tile(tile, xyzzy)       File "/home/<my user dir>/maptiler/tiler/tiler.py", line 1000, in write_base_tile         dsquery.WriteRaster(xyzzy.wx, xyzzy.wy, xyzzy.wxsize, xyzzy.wysize, data, band_list=data_bands)       File "/usr/lib/python2.7/dist-packages/osgeo/gdal.py", line 746, in WriteRaster     buf_pixel_space, buf_line_space, buf_band_space )     TypeError: not a string      When looking at the output from the tile generator up to that point, all tiles look good. Does anyone have insight as to what this error means to gdal and how it can be fixed so the tile generator can go on and generate the overview tile levels?


title: QGIS and Raster Mapping in 'Seamless' layer

text: I would like to use Ordnance Survey base mapping in QGIS. I would like to set up something like a seamless table in MapInfo. I think that the equivalent in QGIS is a Virtual Raster Table. The files are in tif format as they were when I download them. I have built a VRT but it seems slow to load when I open the layer. I have also tried building pyramids for the data and this doesn't seem to speed it up that much. Is there a way to speed this up? Am I missing something? Are there any good resources about steps to take to prepare raster data for use in QGIS? Would I be best to start to load this information into a PostGIS database with PostGIS Raster installed?


title: Future of spatial databases

text: It may be a bit off-topic. I am eager to know the industry specific importance of Spatial Databases. Is Spatial Database a very important part of any GIS system? Or will we use other technologies to store and retrieve spatial data in the near future? I want to know these things because soon I am going to persue MS on Spatial Database Optimization. Thanks


title: Erdas Imagine DN to TOA reflectance for SPOT images

text: I would like to convet DN to TOA reflectance in Erdas Imagine 2013. I see there is a way of doing this for Landsat7 in the Radiometric tab. How can I do this for SPOT2,4,5 images?


title: Arcpy Performance If Then Statements

text: I'm rather new to python so my code might be horrid but I had a question about executing scripts from ArcMap and performance involving several if statements. The main objective is to create a toolbox with several different possible executions depending on the users input. Essentially I have two options that I see!?! --- note there might be errors as I am simply writing an example code that represents what I am doing. At the moment, iterating through only 5 (6000x6000cells) rasters my code runs in hours that in my mind should not take more than one.               import arcpy     arcpy.checkoutextension('spatial')          def main(inputfolder,outputfolder,x,y):         inputfolder = arcpy.env.workspace         RasterList = arcpy.ListRasters()              for RasterImage in RasterList:              try:                  if 'True' in x:                       sa.Slope(.....)                  else:                       if 'True' in y:                            sa.Reclassify(....)                       else:                             RasterImage * 2              except Exception e:                   arcpy.GetMessages(e)      or is defining separate functions better? i.e.               def main(inputfolder,outputfolder,x,y):         inputfolder = arcpy.env.workspace         arcpy.ListRasters()              if 'True' in x:             x(inputfolder, outputfolder, RasterList)         elif 'True' in y:             y(inputfolder, outputfolder, RasterList)         else:              for RasterImage in RasterList:                  try:                      RasterImage *2          def x(inputfolder, outputfolder, RasterList)         for RasterImage in RasterList:               ....          def y(inputfolder, outputfolder, RasterList)          .....      Any help would be most appreciated! **UPDATE** Solved my problem. Thanks for all the responses and help. The problem was not with my code but rather that a few of the datasets that I had been given were corrupt. Using a try: except: I was able to pass through those corrupt files (write an error log of those files) and later delete them.


title: Is it possible to convert graphics to features in ArcGIS 10 using arcpy?

text: Apologies if this is easy but I cannot seem to find the answer. Is there a way to convert a graphic to feature, i.e. use the "Convert Graphics to Feature" tool on the toolbar, within arcpy? I need to use a graphic as a selectbylayer feature, so either converting it or using the graphic directly would be nice.


title: Add layer using popup in ArcGIS Javascript API

text: I would like to be able to add a new feature layer within a popup window from an arcgis server. For example (purely hypothetical), you click on a state and it has 2 options: fire departments and police stations. You can then click on one of those options to add it to the map


title: QGIS: georeferencing report: tail cutted off

text: I'm using QGIS 1.8.0-2 to georeference some old maps and want to report residuals and other information via the PDF report function of the Georeferencer tool. If there's too much information, it's cut off at the bottom of the PDF page. Is there a way to get all the information (i.e. on a second page)? Regards, Thomas


title: OpenLayers jQueryUI Draggable

text:
I am using open layers to render a wms inside of a div tag. This is right out of the openlayers documentation. My WMS layer is rendering well.

      Using the jquery UI documentation I have been able to create a draggable div tag that will, hopefully, house controls for editing vector features. Using the code below I am able to draw my draggable box. javascript:               $('#makeMeDraggable').draggable();      html:

      I was able to get overlap working by setting the map position to absolute and assigning appropriate z-indices to each div. (In the CSS file)               #map{ position:absolute; z-index:1;}     #makeMeDraggable{z-index:2;}      This allows the box to be dragged around the map's "container" (div tag) without issue. I am struggling to figure out how to have the map's position remain constant as I drag the box? The map is registering an onClick event over the entire page and so the box and map move in tandem. I am relatively new to jQuery and openlayers. I am probably missing something straight forward in the documentation? Thanks! Edit: URL to jsfiddle.net for anyone interested in checking out this problem. The map displays after zooming once. I still need to modify that... http://jsfiddle.net/Dn3fw/


title: Selecting polygons within others that share a boundary

text: Thanks in advance for any help. I have a feature class in ArcGIS 10.2 with 455 polygons,they are municipal boundaries. We use it to determine permissions for users in another application and it's based on sharing a boundary. So, for example, Muni A touches Muni B and C, so Muni A's rights will be: -Muni A -All towns within -Muni B --All towns within -Muni C --All towns within It's simple enough to select by location to determine the municipalities that share a boundary, however, I cannot seem to take that selection and do another based on those results to select the town polygons within B and C. Second to that, can you possibly script this to make it iterative so I can generate shp files for said permissions automatically?


title: Why is the Dissolve Tool not working?

text: I'm still having trouble with the dissolve tool and I've tried all of the solutions offered here including moving the process from the background and repairing the geography. I've also tried amending the spatial index and narrowing the dissolve area down considerably. Is there anything that I'm missing? Right now when I run the tool, it jumps right to 33% complete and stalls out. If I wait for an hour or so it gives me the 99999 error (edited to clarify, I am also getting the Invalid Topology error). I'm doing this project for work and waiting an hour each time isn't working for me (or my boss) anymore. Thanks in advance for any help or advice you might be able to offer.


title: ArcGIS Flex API: Keep info window on top of other widgets?

text: I am working on a web mapping widget using the ArcGIS flex API and ArcGIS Flex Viewer. I have a infoWindow popup when there is a mouse rollover on a map graphic. Problem: the infoWindow renders below other widgets which obscures the data in the info window. Is there a way to force the info window to render on top of all the other viewer widgets? Thanks.


title: How to import an Access database to GeoDjango?

text: I'm a I've just inherited a pile of institutional geodata that's stored in an MS Access database. I need to pull that data out into a format that I can work with in GeoDjango--so I'm OK with shapefiles or exporting it directly to a more useful database (mysql or postgres). What's the best way to do that? I'm a GIS newb, so I'm hoping there's an easy solution here. I can get access to an ArcGIS install to work with the data if necessary.


title: How to use geometry functions in rule based styling?

text: Edited: I'm trying to style some OSM data such that short fences, walls, etc just don't render. I only want to display barriers over some certain length. I've tried this rule,               tags LIKE '%barrier%' AND ($length > 100)      and quite a few variations on it, finally getting               tags LIKE '%barrier%' AND $length > 0.001      to do about what I want. Clearly, I don't know what units this is measuring in. It was awkward getting it to work though because while the "test" button next to the formula always gave me no results, the actual map stopped drawing the shorter fences like I wanted. ![test button not working](http://i.stack.imgur.com/Uf0V2.png) Indeed, the test button doesn't seem to want to work with any length attribute, as even               tags LIKE '%barrier%' AND $length != 0       returns "no results". So I guess my question now is: Am I doing something wrong, or is this a bug?


title: Trying to set NAD 1983 EPSG 102631 in QGIS

text: I was able to find the right coordinate system online NAD 1983 Alaska But now I don't know what to do. I can't find the coordinate system on QGIS. When I choose the one I think is correct it warps everything. Thank you for help, sorry if this question is asked a lot! Edit: Sorry about the poor explanation. I have a lot of shp files that were made in the coordinate system NAD 1983 EPSG 102631 which does not show when I use filter and try to set the CRS. When I load the shp files into my project and the CRS says custom everything seems fine. But when I set a CRS for my project it goes crazy. I want to use these shp files with other data and it seems I need to convert or at least get something sorted out before I can use this data with other data. It seems I need to custom set the proj strings... I've been reading the manual and I haven't found how to do this yet. Thank you all for your help.


title: Setting default units for Shape_Area to be Acres using ArcGIS Desktop 10.0

text: When I create a new feature layer polygon, how do I set the default in Shape_Area to read out in Acres? I am using ArcGIS Desktop 10.0.


title: Is there a "Disperse Markers" tool for QGIS?

text: I am using ArcGIS, but either I would like to use QGIS and maybe want to switch completely later. A have a point overlapping problem, as a result of geocoding of addresses. I have not found any tool in QGIS which could replace the "Disperse Markers" tool from ArcGIS, because if I understand well, the "Points displacement" tool in QGIS can displace the overlapping polygons only in "circle way" which has finally a very artificial effect. Please check out these two short articles about Disperse Markers to see what I mean. Please if you know any possible solution in QGIS for this, let me know. http://blogs.esri.com/esri/arcgis/2008/08/01/how-to-scatter-marker-symbols- for-stacked-or-clustered-point-features/


title: Is there any way to write a snipet of code with function of "SDELayer -o register" command

text: I try to create a geodatabase using some SQL command and then register some tables of it with SDE. I create an empty geodatabase using sde post installation and then create tables and other database objects in a program written by VC# using command like "Create Table" and other DDL scripts. but after creating database successfully user of this VC# program has to enter "Command prompt" and type sdelayer command to register tables one by one. I need to make all the process seamless for user and user must not see any change in working environment.Now my question,is there any way that I register tables of my geodatabse with SDE by VC# code programming instead of using "sdelayer" command in command prompt?(Any object model?) Regards


title: Can you create a ArcGIS 9.3 esri-geodatabase in ArcGIS 10?

text: Dooes anyone know if it's possible to create a v9.3 geodatabase from ArcGIS 10? Opening them is not a problem, but I haven't found a way to create one without going back to 9.3 and doing it there.


title: Problem PostGIS Spatial Query ST_Contains ST_Disjoint ST_Intersects

text: I'm working on a project with two different **tables** inside a database. One contains points in a column **geometry(Point,4326)** type and the second one has a column **geometry(MultiPolygon,4326)**. Now I would like to do a query on **pgAdmin III** using **st_contains** and **st_disjoint** to understand if a point is inside or outside the entire polygon. Both tables have more than one row. The multipolygon table has inside values to represent the area, instead the point table has just points that are on the map. Between tables there is no relation because the multipolygon table is created from a shapefile, instead the polygon table is created from collected data. I tried to load both tables on QGIS and I can see that some points are over the area represented by multipolygon table. I wrote this query:               SELECT distinct points.id, st_disjoint (points.geom, multipolygon.geom)     FROM points, multipolygon     ORDER BY points.id;      The result is this: ![enter image description here](http://i.stack.imgur.com/0rpAW.png) As you can see, the **id** 1,2,3,4 are ok and also checking on **QGIS** is fine. The number 5 and 6 are cointained inside the multypoligon, so the result would be false, but I get a **false** and a **true** result together. Writing also:               SELECT distinct points.id     FROM points, multipolygon     WHERE st_disjoint (points.geom, multipolygon.geom)     ORDER BY points.id;      the result is wrong with all points inside the result. It's like the result I get with               WHERE st_intersect(points.geom, multipolygon.geom)='f'      If I write:               SELECT distinct points.id     FROM points, multipolygon     WHERE st_intersects(points.geom, multipolygon.geom)     ORDER BY points.id      The result is correct, without any repetition and it looks like I did something like the st_contains. To do the **st_disjoint** , instead, I tried to do               WHERE not st_intersects(points.geom, multipolygon.geom)      or               WHERE st_intersects(points.geom, multipolygon.geom)='f'      but the result is the entire list of points. So it's not working to emulate st_disjoint. Why the **st_intersects** sometimes works, when **st_contains** and **st_disjoint** don't work?


title: getting from a DEM to points that could be used for a TIN

text: I have a DEM, and would like to create a set of points that I can use to make a mesh for a 3d modeling program, such as Maya, Blender, or SketchUp. If I were to make a TIN from a DEM in ArcGIS, ArcGIS would create a greater density of points in areas where the slope changes. How should I perform a similar process using open source tools? Do you know what algorithm is used for sampling points in a DEM to create a TIN? I'm looking for a solution that would produce less points than the number of pixels, and in locations where the DEM is more flat, produces less points. The best solution for me would use python or command line tools and result in either a mesh-like geometry or points that could easily be triangulated to create a mesh. Thanks. [EDIT: would classifying areas by some combination of slope and aspect be a first step? maybe then I could put points along the borders of these areas?]


title: Smartest way to union different "layers" in postgis

text: I'm currently using this crude approach to combine several tables/layers :               CREATE TEMPORARY VIEW p_impd_800 AS (     SELECT st_union(geom) as geom FROM rt_201     UNION     SELECT st_union(geom) as geom FROM rt_202     UNION     ...        SELECT st_union(geom) as geom FROM rt_207         );      Is there any smartest and faster way you to achieve the same result? Thank you for your time and help. C.


title: Realtime vector engine

text: Hey guys, I am looking for a real-time GIS vector engine that is to be used on a device using Embedded Linux/Qt (commercial or opensource). Any suggestions? Thanks. The usecase is a non-certified navigation system for airplanes, the data comes from a spatialite database. The data itself is not dynamic. Currently we are using rastercharts only, but we'd like to add the option of aviation vector charts, drawn on top of a raster layer.


title: 30,000 data points... can this be reasonably served using openlayers?

text: I'm trying to tackle a web GIS problem and need to figure out the best strategy. I have a map with 30,000 cells on it forming a grid for the province of Alberta. I have a list of data points for each cell - about 50 indicator fields and values for every cell. For example, one value might be human population, so each cell would have a value for human population for that cell. I want to make an interactive map that can show those values visually either with squares for the cells, or a blended heat-map type of look. Beyond that, I'd like to be able to make compound calculations on all of the data points and use those calculations to make additional maps. Taking into consideration the calculations, there are roughly 300,000 permutations to the map. To top it off, it is also temporal; there are 16 different time slices. That means 16 time slices x 300,000 permutations. My strategy so far: 1) On the server side, calculate the cell values dynamically at run time and send the values to the client (all 30,000 of them). This translates to roughly a value for every 3x3 pixel square in a 525px x 525px image on the screen. 2) On the client side with open layers, use a 1px png that can be resized and have the alpha value adjusted as needed to show the different color gradient corresponding to the data value for each cell. The png would be resized as the map zooms in or out. Theoretically they would be positioned precisely to form a blanket coverage of the map as squares or else using the heat map approach they would overlap each other enough to form a blanket coverage. The Question: Is it reasonable to calculate those cell values dynamically on the server and then send to an OpenLayers interface in real time? I'm confident the server can perform the calculations, but can OpenLayers reasonably display 30,000 data points at a time on a map? Is it reasonable to expect to be able to create a blanket coverage using point data? I guess I'm trying to create the equivalent of a vector map that has 30,000 shapes giving 100% blanket coverage of the map, but using point data to simplify it. The alternative strategies in my mind are: a) to generate the maps in real time on the server and send as rasterized layers to the client b) to generate all of the permutations ahead of time and store them on the server as rasterized maps Any thoughts? Is my approach way off and barking up the wrong tree? Any advice on a better method? I'd sure appreciate any thoughts on the issue! If you're interested, I might even be looking to contract a developer to help with it. Thanks so much! Noah


title: Definition of a BBOX in Web GIS

text: In my practice I use a lot WMS and WFS in Geoserver. I have not found a document describing the concept of a bounding box(bbox). ArcGIS has map extent properties to identify map boundary. Google Map/Bing map has getbound() method to identify the map view. However, when defines a bounding box in WMS or WFS, it seems to involve projections parameters and map view extent. The parameters in an HTTP GetMap request looks confusing to me since if I use different projection systems the units in the bounding box varies significantly, and the incorrect setup of bbox would cause rendering fail So, could anyone point me to the document explaining the bbox?   Thank you!


title: How to calculate a percentage of an area covered by polygons ArcGIS 10.1

text: I created an Aspect Layer with 9 Zones on which I want to use the Tabulate Area Tool with another polygon layer namely Woods. So what I actually need to know is the percentage, covered by woods for each of these areas. I tried it with tabulate area but without success, the intersect tool might be useful here but I can choose the polygon layer there.


title: ArcMap - Data Driven Pages: Group features where page name field is the same

text: I'm using DDP to show a series of farmland areas. Some of these have the same farmland area name but different attributes (based on land cover), so are two different features (by necessity). Is there a way to group these so that I can group these features for the DDP without having to edit the featureclass to create a multi-part feature, and so lose the detail I need to display in the map?? I'm using ArcGIS 10.0.


title: Problems reading data from a file geodatabase using an OleDbConnection

text: I'm able to connect to an ESRI fgdb using an OleDbDataAdapter and read the attribute table just fine - _from within visual studio_. However, when I put the code inside a windows service it crashes (no error, just kills the service). The line it crashes on is commented in the code below (when executing the reader).                   Dim fgdbPath as String = "c:\esridata\myfgdb.gdb"         Dim tableName as String = "TableXX"         Dim conn as OleDbConnection = New OleDb.OleDbConnection("Provider=ESRI.GeoDB.OleDB.1;Data Source=" & fgdbPath & ";Extended Properties=WorkspaceType=esriDataSourcesGDB.FileGDBWorkspaceFactory.1;Geometry=WKB")         Dim reader As OleDbDataReader = Nothing         Try             conn.Open()                  Dim cmd As New OleDbCommand("Select top 2 ID, CITY  FROM " & tableName, conn)             reader = cmd.ExecuteReader() ' crashes here!      I also tried using an OleDbDataAdapter.Fill(DataSet, tableName) but it would crash on this line as well. The service will run forever as long as it doesn't hit the above line of code. The try/catch block doesn't catch the error either. If I can't get this to work, I suppose I could use arcobjects and a cursor but that's the last resort. Note: I'm using ArcGis 10, .net framework 3.5, vs 2008


title: How to compile QGIS with GRASS on Ubuntu?

text: I am on Ubuntu building qgis with grass plugin. I have build grass code separately and used --prefix to provide the path `GRASS_PREFIX` is `/usr/local/grass-6.4.2` and `GRASS_INCLUDE_DIR` is `/usr/local/grass-6.4.2/include` and `LIB_PATH` is `/usr/local/grass-6.4.2/lib/libgrass_gproj.so`. I have unchecked WITH_GRASS When I compile qgis I get the following               [  0%] Built target version     [ 17%] Built target qgis_core     [ 19%] Built target qgis_analysis     [ 19%] Built target qgis_networkanalysis     [ 27%] Built target ui     [ 40%] Built target qgis_gui     [ 40%] Built target memoryprovider     [ 41%] Built target delimitedtextprovider     [ 42%] Built target osmprovider     [ 43%] Built target qgissqlanyconnection     [ 44%] Built target sqlanywhereprovider     [ 44%] Built target gdalprovider     [ 45%] Built target mssqlprovider     [ 47%] Built target postgresprovider     [ 48%] Built target spatialiteprovider     [ 48%] Built target crssync     [ 73%] Built target qgis     [ 75%] Built target diagramoverlay     [ 76%] Built target interpolationplugin     [ 76%] Built target dxf2shpconverterplugin     [ 77%] Built target spatialqueryplugin     [ 78%] Built target sqlanywhereplugin     [ 79%] Built target roadgraphplugin     [ 80%] Built target zonalstatisticsplugin     Linking CXX shared module ../../../output/lib/qgis/plugins/libgrassplugin.so     /usr/bin/ld: cannot find -lqgisgrass     collect2: ld returned 1 exit status     make[2]: *** [output/lib/qgis/plugins/libgrassplugin.so] Error 1     make[1]: *** [src/plugins/grass/CMakeFiles/grassplugin.dir/all] Error 2     make: *** [all] Error 2      Please let me the what I am missing. Thank you. Regards, Srikanth * * * I solved it. I can see the grass plugin in qgis. But the plugin is not able to find the grass utilities. Then I tried to build using `WITH_GRASS = yes`; to link the grassplugin to grass, then I get the following. I think it says there is a build directory issue. I can't figure how do I fix it. Please advice.               Found GRASS: /usr/lib/grass64 (6.4.2)     Touch support disabled     Found Proj: /usr/lib/libproj.so     Found GEOS: /usr/lib/libgeos_c.so     Found GDAL: /usr/lib/libgdal.so (1.9.1)     Found Expat: /usr/lib/x86_64-linux-gnu/libexpat.so     Found Spatialindex: /usr/lib/libspatialindex.so     Found Qwt: /usr/lib/libqwt-qt4.so (5.2.2)     Found Sqlite3: /usr/lib/x86_64-linux-gnu/libsqlite3.so     Found SpatiaLite: /usr/lib/libspatialite.so     Pedantic compiler settings enabled     Debug output enabled     Found Python executable: /usr/bin/python     Found Python version: 2.7.3     Found Python library: /usr/lib/libpython2.7.so     Found SIP version: 4.13.2     Found PyQt4 version: 4.9.1     CMake Error at src/plugins/grass/CMakeLists.txt:116 (ADD_LIBRARY):       add_library cannot create target "grassplugin" because another target with       the same name already exists.  The existing target is a module library       created in source directory       "/home/develop1/QGIS_Develop/qgis-1.8.0/src/plugins/grass".  See       documentation for policy CMP0002 for more details.               CMake Error at src/plugins/grass/CMakeLists.txt:140 (TARGET_LINK_LIBRARIES):       Attempt to add link library "qgisgrass" to target "grassplugin" which is       not built in this directory.               CMake Error at src/plugins/grass/CMakeLists.txt:140 (TARGET_LINK_LIBRARIES):       Attempt to add link library "qgis_gui" to target "grassplugin" which is not       built in this directory.               CMake Error at src/plugins/grass/CMakeLists.txt:140 (TARGET_LINK_LIBRARIES):       Attempt to add link library "util" to target "grassplugin" which is not       built in this directory.               CMake Error at src/plugins/grass/CMakeLists.txt:150 (ADD_EXECUTABLE):       add_executable cannot create target "qgis.g.browser" because another target       with the same name already exists.  The existing target is an executable       created in source directory       "/home/develop1/QGIS_Develop/qgis-1.8.0/src/plugins/grass".  See       documentation for policy CMP0002 for more details.               CMake Error at src/plugins/grass/CMakeLists.txt:152 (TARGET_LINK_LIBRARIES):       Attempt to add link library "/usr/lib/x86_64-linux-gnu/libQtGui.so" to       target "qgis.g.browser" which is not built in this directory.               CMake Error at src/plugins/grass/CMakeLists.txt:152 (TARGET_LINK_LIBRARIES):       Attempt to add link library "/usr/lib/x86_64-linux-gnu/libQtCore.so" to       target "qgis.g.browser" which is not built in this directory.               CMake Error at src/plugins/grass/CMakeLists.txt:160 (INSTALL):       install TARGETS given target "grassplugin" which does not exist in this       directory.               CMake Error at src/plugins/grass/CMakeLists.txt:172 (INSTALL):       install TARGETS given target "qgis.g.browser" which does not exist in this       directory.


title: Problem opening a shp in another application

text: I helped a colleague converting waypoints from a gpx file to a shape file. My colleague has only arcMap. I gave him the shp and when he opened it in ArcMap, it did not show anything in the attribute table. I installed Qgis in his machine, We tried with a couple of different gpx files and we have the same problem. The resulting shp does not show anything in the attribute table in ArcMap, but we are able to see all the data in Qgis. Any Ideas?


title: Developing GIS Application on Android

text: Is there any Open Source GIS Software for Android in which we can perform Various Geoprocessing Operations (like Buffering,union and intersection) and that should be customizable eg: what we do in QGIS which is Desktop Based.


title: SQL Server Relationships in ArcSDE

text: I am running ArcSDE 10 with SQL Server 2008 R2 Standard Edition. I am new to SDE and SQL Server, but I understand that SQL Server has the ability to create relationships between tables and maintain certain referential integrity rules. ArcGIS has relationship classes that act similarly, but a relationship class does not have all the features of SQL relationships and does not result in a SQL relationship in the ArcSDE database. Is it possible to create relationship classes in ArcGIS for an ArcSDE database and create relationships for the same tables in SQL Server? By doing so, I will be able to utilize these relationships whether I am working with the data in ArcGIS or in SQL Server Management Studio. Will the two types of relationships conflict with each other or otherwise hinder performance? Thanks for your input.


How to sort data after using uniquevalue from IDataStatistics? The problem is I am using ArcGIS 9.3 vb6. **Edit:** Thanks kenbuja for the code. It will be useful. In details what I am trying to is this.   1. join gdb table and feature table using `IQueryDef`   2. get uniquevalue of a particular field and sort the field   3. Export all information in excel including the uniquevaluefield and other fields also. This can be easily done in Access through SQL/querybuilder but unfortunately I am using 9.3 vb6. Using kenbuja'r code I can go upto task 2. But I lost other field information when use `IDataStatistics`.


title: Reading multiple grid data with Python and ModelBuilder

text: How can I read grid data (3 or 5 sources of grids) like slope, soil, cover, etc.? My goal is to build a simulator based on multiple grid data for harvesting decisions.


title: Geographic locators within Polygons

text: I have a list of geographic locators and a boundary file. In QGIS, is there any way merging them together to create a lookup saying this boundary contains these locators? Not the number the actual locator i.e. postcode, easting/northing.


title: arcpy pydev 3rd party toolbox intellisense

text: I am just newly started to look at arcpy and i see that it has good intellisense for system toolboxes by default and also if you import a custom toolbox - the intellisense gets update also - however this seems to only work in arcgis built-in python. i am trying to setup this in pydev/eclipse - but even though i imported my toolbox stll pydev cannot recognise toolsNameError: name 'Mytool' is not defined but if you run it works fine. - i just want to work in pydev and to be able to see the custom tool references also ? anybody can help thanks MJ


title: Map in an iFrame - open hyperlink from infoWindow in the calling page

text: I've got a Google Map being served inside an iFrame on a page (eg xxx.com/PageWithMap.html) The code for the Google map sits on another domain (eg yyy.com/MapCode.html) So it looks like this on xxx.com/PageWithMap.html:               <iframe src="yyy.com/MapCode.html"></iframe>      The markers in the map show an infoWindow which contains a hyperlink to a new page on the first site (eg `<a href="xxx.com/photo1.html">photo link</a>`) How can I force the hyperlink to change the first page? That is, xxx.com/PageWithMap.html should navigate to xxx.com/photo1.html I'm finding that xxx.com/photo1.html opens _inside_ the iFrame on xxx.com/PageWithMap.html if I simply click the hyperlink. Searching on StackOverflow suggests using `window.top.location.href` or `target="_parent"` or `target="_top"` but I can't get it to work. Is there an added complication since the hyperlink is within a Google Map infoWindow? Let me know if the above description isn't clear - unfortunately I can't share the actual site yet but I may be able to make a mockup if necessary. Thanks


title: Counting Files with a Spatial Reference using Python

text: I need to display a _list_ of feature classes with an unknown spatial reference, and the _number_ of feature classes with a spatial reference. I think I have the first part right, but having troubles with the second part. I've been playing around with the `len()` and `count()` but those always result in an error. The following is part of my code:               for fC in fCList:          desc = arcpy.Describe(fC)          spatialRef = desc.spatialReference          if spatialRef.Name == 'Unknown': # List of feature classes that are unknown             print "\n" + fC, ("has an 'Unknown' spatial reference\n")          else: # Number of feature classes that have a spatial reference             print ("Total number of feature classes with a spatial reference:"), count(fC)


title: How to increase performance of tile caches if vendor parameter filters are needed?

text: My application uses vendor parameters to filter the data. It takes some time to generate all tiles on the server. Therefor I'm trying to increase the performance of the application. I'm using geoserver as my tileserver. I looked up if caching would be a solution, but it does not support vendor parameters. The only solution I could think of when trying to cache tiles is to filter it on the client, by having a separate layer for each possibility. However this does not seem very doable. I welcome any suggestions on how to improve performace.


title: How to Unlock feature classes in ArcCatalog that don't show user

text: In ArcCatalog there are some feature classes that are locked and don't show a user. After restarting SQL server, the feature classes remain locked. Any ideas as to what might be causing this and how I can unlock them? Map services should have a user name like gisreader or something attached to them. ![enter image description here](http://i.stack.imgur.com/9YyrS.png) Versions: ArcCatalog version 10.1, SQL Server 2008r2 and SDE 10.0.


title: OpenLayers displays nothing when I try to add WFS Layer from Geoserver - can't work out where the problem is occurring!

text: I hope someone can help me with this problem as I'm very confused! I recently downloaded the IHO Sea Areas shape file from http://www.marineregions.org/downloads.php One of my colleagues has uploaded the shape file to PostGIS and served it up using Geoserver. Because I want to display it over a google maps base layer in OpenLayers, we tried to set Geoserver to "Reproject Native to Declared" from **EPSG:4326** (detected by Geoserver) to **EPSG:3857** (Google projection). However, when trying to access the layer through Geoserver, I got a **404 The requested resource () is not available**. The only way that Geoserver would serve the file was if we set it to "Force Declared", at which point the WFS would return the data as requested. So, I don't really understand why that's the case, but I got a WFS that seemed to work. Next step (note: I have set up OpenLayers with a declared projection of EPSG:3857 on the map), I added the layer to OpenLayers using:               IHO = new OpenLayers.Layer.Vector("IHO Areas",{                  style: {                         strokeColor: "green",                         strokeWidth: 1,                         fillColor: "green",                         fillOpacity: "0.2",                         cursor: "pointer"                     },                     projection: "EPSG:3857",                     strategies: [new OpenLayers.Strategy.Fixed()],                     protocol: new OpenLayers.Protocol.HTTP({                         url: "http://*MyWebProxy*/IHO_Areas.php",                         format: new OpenLayers.Format.GeoJSON()                     })                 });               IHO.events.on({"loadend":function(){console.log(this);}});           map.addLayers([IHO]);      Now, the "loadend" event successfully fires, the logged IHO layer shows that it, and all its features, have been fetched successfully and the projection is logged as EPSG:3857 on the layer object, no errors are thrown by javascript/OpenLayers. But, nothing appears on the map. This is especially weird as I copied and pasted the code from one of my earlier projects that worked perfectly using a different WFS vector layer source. So it seems there must be something weird about the IHO shape file or the data extracted from it, but I don't really know what to look for to fix it. Can anyone suggest anything to help?