title: PostGIS replace view crashes PostgreSQL server from ArcGIS script

text: I have the following script which when from ArcGIS (and a similar script from a QGIS plugin) will update a view. Every so often (around 1 in 5 times the script is run) it causes the PostgreSQL server to 'crash' (no features show up in ArcGIS or QGIS and both will hang) and the script will fail to update the view. Restarting the PostgreSQL server resolves whatever the problem was.               def replace_view(self, ref_num_str):         conn = psycopg2.connect(*connection string*)         cur = conn.cursor()         sql = """CREATE OR REPLACE VIEW old_search AS                 SELECT desktop_search.gid, desktop_search.search_type, desktop_search.client,                 desktop_search.reference, desktop_search.author, desktop_search.dategis,                 desktop_search.datebm, desktop_search.property_name, desktop_search.street,                 desktop_search.town, desktop_search.city, desktop_search.county,                 desktop_search.postcode, desktop_search.searches, desktop_search.reports,                 desktop_search.geom, desktop_search.asq_lasteditedby,                 desktop_search.asq_lasteditedwhen, desktop_search.asq_lockedby,                 desktop_search.shapelength, desktop_search.shapearea                 FROM desktop_search desktop_search                 WHERE desktop_search.reference = %s::text;                      ALTER TABLE old_search                 OWNER TO postgres;                 GRANT ALL ON TABLE old_search TO postgres;                 GRANT ALL ON TABLE old_search TO "Archivists";                 GRANT ALL ON TABLE old_search TO "Geologists";"""         data = (ref_num_str, )         cur.execute(sql, data)         conn.commit()         cur.close()         conn.close()         arcpy.AddMessage("the Old_Search view has been sucessfully updated")      I have the following errors in my postgres log:               2014-02-12 11:51:59 GMT STATEMENT:  DECLARE qgisf18_120 BINARY CURSOR FOR SELECT st_asbinary(st_force_2d("geom"),'NDR'),"gid","dategis"::text FROM "public"."desktop_search" WHERE "geom" && st_makeenvelope(209586.46110484766541049,77341.20856820739572868,209797.37429537757998332,77461.20856820742483251,27700) AND st_srid("geom")=27700     2014-02-12 11:51:59 GMT ERROR:  cursor "qgisf18_120" does not exist     2014-02-12 11:51:59 GMT STATEMENT:  move absolute 0 in qgisf18_120      However, I am unsure if they are related to the problem but nothing else looks abnormal. I am using PostgreSQL 9.2.3 and postgis 2.0.1 Is there anything in my script which may be causing this problem? Any other suggestions?


title: Homogeneous vs Heterogeneous schema in Postgis

text: ## Introduction I'm working on creating a spatial database in Postgis, to be viewed and edited trough QGIS to help managing some farmland areas. One of my goals is the have a centralized place where all actions to develop in farm are listed. The actions all have (kind of) the same structure (attributes) and would be stored in a non spatial table. Each action will be related to a particular feature in the farm (a road, a sign pole, a gate, a fence...). ## The problem Since features will have to be represented in different geometry types, (at least) two options arise. **The homogeneous schema** Each geometry type is stored in a different table (one for points, one for lines and one for polygons). This makes opening and editing the tables in QGIS (and other GIS clients) much easier as qgis does not accept tables with multiple geometries. In the other hand I can't seem to find a way to consistently manage a unique key in the three tables to use as foreign key in the actions non-spatial table. ![enter image description here](http://i.stack.imgur.com/6FXf0.png) **the heterogeneous schema** All features are stored in the same table, where the geometry column is of the type geometry(geometry, 3763). This will make very easy to manage a unique key to relate to the actions non-spatial table. On the other hand, viewing and editing the table trough QGIS will require the creation of VIEWS to separate the different geometry types, and INSTEAD TRIGGERS to redirect edits on views into the original table. ![enter image description here](http://i.stack.imgur.com/Vx6K6.png) ## The question Are this my only options? Is it possible to use the homogeneous schema for this case? If yes, how? Please enlight my database schema creativity


title: Google maps API charset for http request ?? Geocoding Requests

text: im sending the following request to maps api but receiving the json response with chars problem. Can some one point me in the right direction to set charset correctly ?   Request -- http://maps.googleapis.com/maps/api/geocode/json?latlng=38.676817,-9.178433&sensor=false Response of formated_address = R. dos LusÃadas, 2805 Almada, Portugal Where it should be R dos Lusíadas, 2805 Almada, Portugal. Thanks Jorge


title: Addition and Subtraction of two TINs

text: I am referring to the paper here, section 2.6.1. Is there an existing library ( in C++ or .Net) that already has this implemented? Namely, taking two Triangulated Irregular Network (TIN), we create a new TIN by adding or subtracting the two. Edit: I afraid applying polygon boolean operation between each triangle in one TIN against all the triangles in other TIN is not efficient; from what I know there ought to be efficient algorithm that computes polygon overlay operation; it is this kind of library that I'm looking for.


title: Availability of ArcGIS *.tpk maps to buy / download

text: I have an ArcGIS for WPF application capable of displaying both online (ESRI map server) and local (*.tpk files) basemaps. I currently have a need to be able to load a basemap of China on a machine that has no internet / network connection. My initial thought was to find / purchase / generate a tpk file (or similar) that can be copied onto the drive of the machine in question, but I am having trouble finding such a thing. My question is - am I thinking about this the right way? Are basemaps available as tiled packages that can be accessed in such a manner (I'm aware that they can be rather large). If not, what are my alternatives? I'm new to GIS in general so any pointers on this are much appreciated.


title: Automatic map outlines

text: I have some building site plans for different conference events with the various stands plotted (usually all as different sized rectangles), we have a simple editor based on openlayers that someone made a few years back but it requires clicking on each point of a rectangle to draw the rectangle for each stand.   Then editing each object to add the correct IDs and info for each stand, which we then export into our applications. Is there any function that could automatically create the outlines of all squares and save as the objects? EDIT:   The background is the image of the conference. We then add the points to create rectangles/squares using a simple OpenLayers editor (I think it was built 2-3 years ago?). I found one editor that's well developed that we might be able to use for a future upgrade but was hoping there was something automatic: http://ole.geops.de ![Halle](http://i.stack.imgur.com/118W3.png) The Objects get stored into a database (PostGis?) in geometry form for the points of each polygon.


title: ESRI Mobile Javascript API Click Events not happening on mobile devices

text: I have a a map with a couple of feature layers. Using a mobile popup to display attribute data of graphics when you select them. Everything looks great on the desktop. However, when you get to any mobile device it acts like you're not clicking on the graphic at all.. I could give code. But, this seems like a more general question. Am I dumb and missing something obvious?


title: Union in QGIS: missing polygon boundaries

text: I am trying to UNION two shapefiles in qgis. I use the geoprossesing tool UNION. Both sf are in the same coordinate system (same as in the project). ![Layer_1](http://i.stack.imgur.com/50Pzd.png)![Layer_2](http://i.stack.imgur.com/ATF5U.png) In the resulting sf some polygon borders are missing (see mock-up of desired result in last image). ![Union](http://i.stack.imgur.com/yWDFe.png)![Missing boundaries](http://i.stack.imgur.com/C1Ey6.png) I also tried the overlay tool from Grass toolbox (or) but no result was produce! Any ideas or a workaround ?


title: How to find the polyline's ID connecting two points in ArcGIS 10.1?

text: I have an ArcMap (*.mxd) file with several layers including a point layer and a polyline layer. The points are connected by polylines in the polyline layer, and I wish to know how to list the connectivity relation in a table? For example, if point 1 and 2 are connected by polyline 105, then the relevant row in the resulting table looks something like "1 2 105".


title: Calculating distance of polygons from coastline using ArcGIS for Desktop?

text: I have a series of polygons representing parcels of land. I would like to calculate the distance of each polygon from the coastline. I also have a polygon of the entire region of interest, i.e. an island. I would like to know what is the arcGIS 10.1 procedure to achieve what I am after. Any hint pointing me in the right direction is appreciated.


title: EPSG1612 transformation

text: I have survey data for contacts listed as eastings and northings - I need to overlay this onto PNG files but the location is quite far north - How do I apply EPSG 1612 transformation to the UTM Zone 32N so they appear as layers in the same place?


title: problem login geoexplorer - redirect IP

text: I have problems when I want to log the administrative user through GeoExplorer when geoserver is running on a server with public ip but redirection to a private ip. GeoExplorer takes too long to load and when it finally starts the login button does not appear in the interface. (in firedebug can be seen that there is no of cookies data). If I access the GeoExplorer from the internal network, the login button load properly, GeoExplorer fast loading and allows me to make the user login. The only open through public ip port is 80. Instead for access through the internal network are all open ports. I am using: geoserver 2.4.0 , Ubuntu 12.04 LTS


title: manipulate file geodatabase like an access personal geodatabase?

text: Is there any way to interface with features, but more specifically their attributes, in a file geodatabase like you can in a personal geodatabase? Frequently I will just open a personal geodatabase in MS Access and use straight SQL (not the query wizard but raw SQL - I think quicker and work much more quickly this way) to manipulate attributes in their tables, do table field updates, drop records based on whatever criteria, etc. This works and it works well and is a heckuva lot easier than trying to jockey with attributes through ArcGIS (e.g., the Intersect tool) like if I want to just append one field etc. I've been doing this for a couple of years on multiple projects with no problems. Is there any recourse for this approach with a file geodatabase? I'm guessing not but am hoping I'm wrong...and am wondering if ESRI may deprecate the personal geodatabase format all together since they really push the file geodatabase format... thanks Tom


title: Working with GeoServer and MongoDB

text: I am trying to get MongoDB working with GeoServer. I am using the BoundlessGeo Suite (comes with GeoServer and other tools) I was able to find the MongoDB extension for GeoServer. Got it installed according to these instructions: Getting MongoDB Working with GeoServer I found this version of the extension: http://repo.opengeo.org/org/geotools/gt-mongodb/12-SNAPSHOT/ I am able to see MongoDB as an option in the Data Store Menu. MongoDB is also installed on the server locally for testing. I was able to create a database without much issue. After putting in the Data Store Settings, I attempt to upload a shapefile using GeoExplorer when I get the following error: "Name is required for PropertyType" When I searched for the error I found almost no results but what I did find seemed to indicate that I needed to make an XML file to designate where the Mongo Info is. I would just have no idea about what needs to go in that file or where it needs to go. http://docs.geoserver.org/stable/en/user/data/app-schema/mapping-file.html Kind of stuck and wondering if anybody else out there was able to get it to work on any of their setup.


title: mbutil invalid literal for int() with base 10

text: I'm trying to generate a mbtile file using mbutil for processing a groups of layers tiles saved in the GEOWEBCACHE CACHE DIR of my Geowebcache. When i do `"mb-util --scheme='tms' tiles world.mbtiles"`, I get this error: invalid literal for int() with base 10 from the mbutil Probably, it is related to the folder structure and image format, that are WMS-C and not TMS. It's seems that the Geowebcahe tile generation (re/seed) only works for WMS-C an not TMS. How can I generate in advance (no on demand) all tiles for a TMS service in Geowebcache?


title: How to edit overlapping lines?

text: I am trying to edit bus routes in QGIS. Multiple bus routes can run on the same street. When I want to change one bus route, I select one of them, then I enable editing mode. With the Node tool, I then edit or delete a node. The problem is that this change is not applied to the bus route I had selected originally. How can I make sure that I edit a specific bus route if multiple routes use the same street?


title: Can Voronoi/Thiessen polygons be created using ArcObjects without 3D Analyst license?

text: Has any body used ITinNodeCollection to generate Voronoi/Thiessen polygons. I have a point featureclass for which I want to create Voronoi/Thiessen polygons. Does this require 3d analyst license? I appreciate your help. Thanks.


title: Geoserver lock itself , performance problem

text: when 10-15 users use my wms layers, geoserver doesn't give response, or i hava tiledmap and when i zoom in and same level geoserver doesn't give any response so image is not appear. Is there any confugration about geoserver performance ? i think when multi request come on geoserver, it lock itself


title: How to avoid ESRI secure layer identity manager popup

text: I am new to ESRI Identity manager, I am creating a secure layer service using identity manager, I have to avoid the secure layer login popup.


title: How to do a separate Python installation with ArcGIS?

text: I see a lot of threads asking how you can have a separate Python installation (e.g. the Anaconda or Python XY distribution) and get it to work with arcpy, while not 'breaking' ArcGIS at the same time. I had this same problem, and I think I have found a 'universal' solution. So far we have done this on about 8 computers at work and it all works fine. So the question: How to install a separate Python distribution with ArcGIS?


title: Publishing esri geoprocessing service - upload custom python modules?

text: I have an esri geoprocessing service which causes problems when publishing to arcgis server. The python scripts behind the service are structured as a custom python module, in a folder with an ' **init**.py' file, because the scripts contain many thousands of lines of code and there was a design choice to develop this way. My problem is that the script 'main.py' is published to the server correctly, but all of the other scripts are not. 'main.py' calls all of the other scripts. Therefore when I try to run the service I get ' Import Error - No such module as Scriptsforservice', where main.py is importing. Is there a way to get arcgis to upload the custom module properly during publishing? I have found a hack which is to copy the module directly into my server's local python libraries, but this is not an acceptable long term solution.


title: How to best create linked pdf to point data in ArcGIS server 10 sde 9.3?

text: I would like to create point data which offers a link to open a pdf file which I will have on my server. I have just read about "attatchments" which are new to ArcGIS 10, but this option isn´t available for my sde feature classes - only my filegeodatabases. How would I best create pdf links to point features classes in SDE?


title: How to run OGR in ArcGIS Scripts?

text: When I run my script outside ArcGIS it works because during execution script uses a GDAL and OGR modules from osgeo. When I use script as a tool in ArcGIS it does not work. In PySripter I can import all modules and it work. In Python Window in ArcGIS I cannot import because I get this error: > Parsing error SyntaxError: invalid syntax (line 2) import ogr Runtime error > Traceback (most recent call last): File "", line 1, in File > "C:\Python27\ArcGIS10.1\lib\site-packages\osgeo\ogr.py", line 26, in _ogr = > swig_import_helper() File "C:\Python27\ArcGIS10.1\lib\site- > packages\osgeo\ogr.py", line 22, in swig_import_helper _mod = > imp.load_module('_ogr', fp, pathname, description) ImportError: DLL load > failed: In the case when I import gdal in ArcGIS Python Window I do not get this error. How to force arcgis to import ogr and use it in ModelBuilder or Script?? I check a lot of solutions includin reinstallation, changing and adding environment variables. I checked :   1. http://pythongisandstuff.wordpress.com/2011/07/07/installing-gdal-and-ogr-for-python-on-windows/   2. http://www.wildsong.biz/index.php/Running_GDAL_scripts_in_ESRI_Model_Builder and I still do not have a good solution. Any idea? UPDATE: I also try use direct importing in my script: import imp ogr = imp.load_source('ogr', 'c:\Python27\Lib\site-packages\osgeo\ogr.py' and I get the same error. If I use this method in standalone script it works.


title: How to access functions from another project in vb2010

text: I have written a project which has common functions in Visual Basic 2010 i.e. Visual Studio 2010. for e.g.               Public Function FlashPolygon(pDisplay As IScreenDisplay, pGeometry As IGeometry)         Dim pFillSymbol As ISimpleFillSymbol         Dim pSymbol As ISymbol         Dim pRGBcolor As IRgbColor              ' Set the Actions based on Error Mode         If DEBUG_MODE = 0 Then On Error GoTo FlashPolygon_Error         If DEBUG_MODE = 2 Then On Error Resume Next              pFillSymbol = New SimpleFillSymbol         pFillSymbol.Outline = Nothing              pRGBcolor = New RgbColor         pRGBcolor.Green = 128              pSymbol = pFillSymbol         pSymbol.ROP2 = esriRasterOpCode.esriROPNotXOrPen              pDisplay.SetSymbol(pFillSymbol)         pDisplay.DrawPolygon(pGeometry)         Sleep(300)         pDisplay.DrawPolygon(pGeometry)              On Error GoTo 0     Exit Function      I want to access this function in a form in another project. I have already added reference to the commonfunctions project. But i am getting error **Reference to a non-shared member requires an object reference**. Can someone help with what mistake I am doing in this code? Any help is appreciated. Thanking you in advance for the help.


title: Extract a LineString from LineString by two Points

text: I am using PostGIS2.0 and PostgreSQL9.3. I have LineString in Spatial-Ref 4326 like               geom:= ST_GEOMETRYFROMTEXT('LINESTRING(60.7014631515719 56.8441322356241,60.7023117507097 56.8445673405349,60.702948200063 56.8447993944193,60.703902874093 56.8448574076656,60.706236521722 56.8447993944193,60.7094187684889 56.8449444273664,60.7121236782406 56.8450894597515',4326);      And 2 Points in Spatial-Ref 4326 like               point1:= ST_GEOMETRYFROMTEXT('POINT(60.703902874093 56.8448574076656)', 4326);     point2:= ST_GEOMETRYFROMTEXT('POINT(60.7023117507097 56.8445673405349)', 4326);      Both points have been extracted from given LineString. So it is guaranteed, that both points are inside the given LineString. No neared points will be used. It is not guaranteed, that the points are in the same order like in given LineString (see example: point1 is point #4 and point2 is point #2 of the LineString). They can be ascending or descending. Is there any function or operator to extract a LineString from a given LineString by the points? I want to do someting like               sub_geom:= ST_???(geom, point1, point2);      to get a LineString geometry that contains all Points from the given geometry from point1 to point2 (points are included)? Expected result:               sub_geom == ST_GEOMETRYFROMTEXT('LINESTRING(60.7023117507097 56.8445673405349,60.702948200063 56.8447993944193,60.703902874093 56.8448574076656',4326)       The order of the points of the result geometry does not matter. It can be ascending or descending. The result is only used for visualisation. It would be nice, if you can show me a solution for my problem.


title: Clip geodatabase containing vector and raster data

text: I have a fairly large file geodatabase in ArcGIS 10.1 containing **both vector and raster datasets**. Generally, I only want to work on a small extent at a time. Is it possible to clip a geodatabase to a smaller extent to reduce its size on disk?


title: ogrinfo bash script failure

text: I need to recursively document a bunch of Shapefiles using orginfo in many directories. For example,               $ tree -P *.shp     .     ├── acfish2s     │   └── acfish2.shp     ├── airports     │   ├── airport_runways.shp     │   └── airports.shp     ├── aquifer_contactss     │   └── aquifer_contacts.shp     ├── aquifer_polygonss     │   └── aquifer_polygons.shp     ├── armoriess     │   └── armories.shp     ├── ashab3s     │   └── ashab3.shp      I've found something that works for the first layer, but then dies with "FAILURE: Couldn't fetch requested layer".               from ~/airports     $ find ./* -type f -name \*.shp | xargs -0 /bin/GDAL/./ogrinfo.exe -ro -so -fields=YES -geom=SUMMARY $x ${x%.*}     INFO: Open of `airports.shp'           using driver `ESRI Shapefile' successful.          Layer name: airports     Geometry: Point     Feature Count: 212     Extent: (341172.066500, 4778235.208900) - (656874.933400, 5237120.513500)     Layer SRS WKT:     PROJCS["NAD_1983_UTM_Zone_19N",         GEOGCS["GCS_North_American_1983",             DATUM["North_American_Datum_1983",                 SPHEROID["GRS_1980",6378137.0,298.257222101]],             PRIMEM["Greenwich",0.0],             UNIT["Degree",0.0174532925199433]],         PROJECTION["Transverse_Mercator"],         PARAMETER["False_Easting",500000.0],         PARAMETER["False_Northing",0.0],         PARAMETER["Central_Meridian",-69.0],         PARAMETER["Scale_Factor",0.9996],         PARAMETER["Latitude_Of_Origin",0.0],         UNIT["Meter",1.0]]     SITENUMBER: String (254.0)     <snip>     DOTID: Integer (10.0)     FAILURE: Couldn't fetch requested layer ./airport_runways.shp     ./airports.shp     !      when I do it from a higher level, I get the following error               $ find ./* -type f -name \*.shp | xargs /bin/GDAL/./ogrinfo.exe -ro -so -fields=YES -geom=SUMMARY $x ${x%.*}     FAILURE:     Unable to open datasource `airports.shp' with the following drivers.       -> ESRI Shapefile       -> MapInfo File       -> UK .NTF     <snip>      I was thinking it was a BASH thing, but the stat command (mostly) works.               $ find ./* -type f -name \*.shp | xargs stat $x     stat: cannot stat `airports.shp': No such file or directory       File: `./acfish2s/acfish2.shp'       Size: 11428           Blocks: 12         IO Block: 65536  regular file     Device: b054e692h/2958354066d   Inode: 844424930137000  Links: 1     Access: (0644/-rw-r--r--)  Uid: (57187/john.zastrow)   Gid: (10513/Domain Users)     Access: 2005-03-18 10:38:56.000000000 -0500     Modify: 2005-03-18 10:38:56.000000000 -0500     Change: 2012-11-27 00:09:45.025730200 -0500      Birth: 2012-11-27 00:09:44.967726900 -0500       File: `./airports/airports.shp'       Size: 6036            Blocks: 8          IO Block: 65536  regular file     Device: b054e692h/2958354066d   Inode: 844424930137006  Links: 1     Access: (0644/-rw-r--r--)  Uid: (57187/john.zastrow)   Gid: (10513/Domain Users)     Access: 2011-03-02 08:51:18.000000000 -0500     Modify: 2011-03-02 08:51:18.000000000 -0500     Change: 2012-11-27 00:09:45.365749700 -0500      Birth: 2012-11-27 00:09:45.304746200 -0500       File: `./airports/airport_runways.shp'       Size: 32960           Blocks: 36         IO Block: 65536  regular file     Device: b054e692h/2958354066d   Inode: 281474976715722  Links: 1     Access: (0644/-rw-r--r--)  Uid: (57187/john.zastrow)   Gid: (10513/Domain Users)     Access: 2011-03-02 08:50:58.000000000 -0500     Modify: 2011-03-02 08:50:58.000000000 -0500     Change: 2012-11-27 00:09:48.799946100 -0500      Birth: 2012-11-27 00:09:48.735942400 -0500


title: How to remove a vector QgsVectorLayer from QGis python plugin

text: I managed to add `QgsVectorLayer` in `QGIS` through a python plugin, for example:               vl = self.iface.addVectorLayer(uri.uri(), layerName, self.dbConn.getProviderName())      But how can I remove it?


title: Getting ArcMap to display rasters properly first time

text: This is a very basic question, but as I've self-taught most of my GIS skills this is still a gap in my knowledge. When I load a .tif raster into ArcMap, most of the time it requires re- exporting to get it to display the correct values on the colour ramp. Rather than the actual values, I get 255->0 for most .tif files. Why does it default to this scale? And is there any way to get ArcMap to display the actual pixel values first time? Thanks in advance,


title: Calculating TOA reflectance from Radiance using Erdas Imagine for a Spot2 image

text: Using the SPOT equation ρ = π L/[E cos (θs) d-²] to calculate TOA reflectance from Radiance. L was calculated using this equation [L = (X/A) + B] d was calculated by converting date to julian day then converting to d using http://landsathandbook.gsfc.nasa.gov/pdfs/Landsat_Calibration_Summary_RSE.pdf Esun was calculated using http://www2.astrium- geo.com/files/pmedia/public/r452_9_normalsolarirradiance.pdf To calculate cos (θs), taking the sun elevation from 90 and then converting to radians http://www.mathinary.com/degrees_radians.jsp and then getting the cos of the answer Example of above equation filled in for a Spot2 image p= (3.14*radian band1)/(1865*(0.98717*0.98717)*cos(70)) This equation works in Erdas Model maker however the resulting image is blank. I need to know where I'm going wrong using the equation in Erdas


title: ArcGIS Javascript API - Using Proxy For Specific Layers

text: With ESRI's Javascript API - is it possible to make only certain layers go through the proxy? I know this is possible in the Flex API via proxyUrl property of applicable layers. Right now i have this code in my initialization function - but all map content is now routed through proxy.               esri.config.defaults.io.proxyUrl = "proxy.ashx";     esri.config.defaults.io.alwaysUseProxy = true;


title: ArcGIS Javascript API - Return 'normal' map extents when panning around the world

text: ArcGIS Javascript API maps allow the user to pan around the world, which is a great feature, however I am performing some processes that rely on map extents. I have discovered that despite the defined projection (wkid), extents are returned in meter coordinates with an origin of lat/lon 0,0 (off the coast of Africa). In order to get my extents in the projection I need, I use a Geometry service to project them, however when the user pans around the world, the coordinates do not reset, they just keep adding up, resulting in 'NaN' extents returned. I saw this post, which would be one way to deal with this issue, however I would really like to keep the ability to pan around the world. Does anyone have any ideas on how to accomplish this?


title: spatial join by attribute match from shapefile

text: i require to spatial join the shapefile having attribute by ie selecting by attribute which remains same for the target and join feature and get the output as per attribute selected i want to prepare a model to optimise the workflow I am new with model builder and using 9.3 arc GIS any script or model will be to great help. spatial join by attribute match between line and ploygon with attribute of points. i.e iterator is not available in lower version so could not try that.


title: How to match air photo to existing vector layers on Mac OS?

text: I'm trying to add an air photo to a project and match it to existing data. CanVec data is mostly based on the old CIA dataset of the 60's and is hopelessly out of date, but the roads are up to date - the roads can easily be seen on the air photo. So, I need to use the roads to line the photo up. This will be an iterative process, of course. I read of a Georeferencer plugin for QGIS, but can't persuade QGIS to find it (it doesn't seem to have the "3rd party" option shown by online tutorials). Will it do what I need it to? If so, how can I install it?


title: How to "clean" and vectorize a raster map?

text: I'd like to make use of a geological map as shown in the example below, which is only a pretty small and downsized part of the map, so editing/redrawing doesn't seem to make sense in the end. My idea would be to have it first converted to vector with only bedrock and tectonic faults left, thereafter having the possibility to optionally use a "cleaned" raster file. Any hints on a "how to do?" ![bedrock map](http://i.stack.imgur.com/OP2rj.jpg)


title: How accurate are measurements in Google Earth?

text: Can anyone point to a resource that lists the accuracy of measurements taken in Google Earth?


title: Image classification

text: How can I do classification based on NDVI image. What kind of process and model can do it? Thanks a lot


title: Is there an easy way to create a boundary polygon shapefile from a set of LAS files using ArcGIS 10?

text: I have a bunch of LAS file sets that I need to process. The current task at hand is to generate a "footprint" shapefile that contains polygons for each LAS tile. I am looking for a graceful way to generate this polygon shapefile for all the LAS files in a directory. I am using ArcGIS 10 with just about every extension you can have (academic site license). At the moment, my workaround is to use LAStools lasboundary.exe and then merge all of the individual shapefiles into single shapefile. However, this takes a while to execute and requires the additional merge step at the end. advTHANKSance


title: WFS success with error

text: I am trying to load WFS from geoserver. my geoserver is at localhost:8080 and webserver at localhost:80. Since there is a problem of crossdomain and my firebug showing "XMLHttpRequest cannot load *http://localhost:8080/geoserver/wfs. Origin *http://localhost is not allowed by Access-Control-Allow-Origin" I have created a proxy.cgi following http://www.gistutor.com/geoserver/21-intermediate-geoserver- tutorials/38-configuring-geoserver-proxy-for-public-and-remote-data- access.html. But when I go to *http://localhost/cgi-bin/proxy.cgi its giving me openlayers site,when there is no proxy and just leading to *http://localhost/xampp, when there is a proxy(here proxy is my institute proxy to connect to internet ).. My problem is I am able to load the data from geoserver successfully(as if everything is fine) but my firebug is showing "POST *http://localhost/cgi- bin/proxy.cgi?url=http%3A%2F%2Flocalhost%3A8080%2Fgeoserver%2Fwfs undefined (undefined)". I am including OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url="; in my JS and protocol: new OpenLayers.Protocol.WFS({ version: "1.0.0", srsName: "EPSG:4326", // this is the default url: "http://localhost:8080/geoserver/wfs", featureType: "states", featureNS: "http://www.openplans.org/topp" }), I want to know why its working fine still giving me the error, Whats the error is about and how to fiix it...... Any help is highly appreciated..........


title: Error XMLHttpRequest cannot load openlayers geocode

text:
I'll make a page for viewing routes with openlayers, postgresql / postgis and pgrouting. The part of the seat is already ok, I'm using OSM data. The image below is to illustrate what I'm doing now: a page where the user enters origin and destination and I'll do the geocode these addresses to play the coordinates in my sql to obetr the route. ![Geocode](http://i.stack.imgur.com/c9cmz.png) And the following error is occurring, I saw several posts on the subject but it is not clear how I can solve any objective help will be appreciated.               XMLHttpRequest cannot load http://www.openrouteservice.org/php/OpenLSLUS_Geocode.php. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. /C:/Desenv/FitTaxi/FitTaxi/index.html:1     Uncaught TypeError: Cannot read property 'documentElement' of null      My javascript code:                         HTML code: Call the map...
                Origem           <input type="text" id="origem" class="form-control" placeholder="Origem">           Destino:           <input type="text" id="destino" class="form-control" placeholder="Destino">
           <button type="submit" value="submit" onclick="submitForm();" class="btn btn-default">Pesquisar</button>


title: Using custom dlls in multiple arcmap applications

text: I'll do my best to ask my question. I develop a number of COM-based libraries for use within custom arcmap dlls (using ArcGIS 9.3.1 SP2, .NET 2008 C#). These would include a custom arcobjects "helper" library. The issue is how best to deploy and manage these common dlls. The safest way seems to have the setup program create a folder for each application and have it include all of the supporting dlls needed for that application. This has been successful for years but I wonder if this is the best practice for COM-based libraries? On a deployment PC, there would be multiple copies of the custom "helper" library (for example), some with different versions but so far, the same GUID and strong-named. Is it possible (or even advisable) to use a single deployment of common dll? If I can be pointed to an article or white paper or something that talks about this, that would be great too. Thanks.


title: How to label features in QGIS using SQL statement?

text: In QGIS, I can't seem to find a way to define the features that I want to label using a SQL query? Is this possible? For example, I downloaded the OSM Natural shapefiles, and a lot of those features have no values in their "name" field. I would like to display all features, but only label those features where `NAME <> ""`. The same concept could be applied to roads, where `TYPE = "Motorway"`. In the image below, I want all polygons visible, but don't want to label the 3 polys on the right. ![enter image description here](http://i.stack.imgur.com/DAv4w.jpg)


title: Join CSV using gdal/ogr

text: I'm trying to use gdal/ogr to join a shapefile called **myshape.shp** with a csv called **mycsv.csv**. The join field in the shape in **joinshp** and the join field in the csv is **joincsv**. I've found this command on other post(link) :               ogr2ogr -sql "select inshape.*, joincsv.* from inshape left join 'joincsv.csv'.joincsv on inshape.GISJOIN = joincsv.GISJOIN" shape_join.shp inshape.shp      I tried this but I can not get it to work:               ogr2ogr -sql "select myshape.*, mycsv.* from myshape left join 'mycsv.csv'.mycsv on myshape.joinshp = mycsv.joincsv" shape_join.shp myshape.shp      Can someone help me write this command for my example ?


title: Is there a way to associate a scale bar with a new, different data frame than the one used to create it?

text: If I remember correctly, in ArcView 3, after a scale bar had been created, you could change its properties so that it would show the scale for a different data frame than the one that was used to create it. I think the same applied to north arrows. In ArcGIS 10, when you create a scale bar, it displays the scale of the data frame that is active when you create it. Is it possible to change that association after the scale bar has been created? As far as I know, if you want to use that scale bar (and whatever customizations you've made to it) with a different data frame, you can't, you need to delete it and insert a new one, re-creating any modifications you've made to the scale bar. I'm asking because I have an MXD which has a layout I like, and I want to paste a data frame (containing a map I need) into it. But I can't re-use the scale bars and north arrow which already exist in the MXD, I'll need to recreate them.


title: Can't seem to move labels manually in QGIS, 1.80

text: Trying to move labels manually in QGIS. I am having the same problem when adding x,y to the attribute table. I picked (Type Decimal Number (real)), it's the only one out of the 3 choices that has 'double'. After enabling the Edit tool, the 'Move' and 'Rotation' tools remained greyed out. (1.80 Lisbo, using PC) Help?


title: "Create Enterprise Geodatabase" errors

text: I am trying to use " Create Enterprise Geodatabase" option in arcmap 10.1: I am getting two following errors: > You must copy the latest ST_GEOMETRY and dependent libraries to the > PostgreSQL software location. Refer to the ArcGIS help topics for more > details. and > Connected RDBMS instance is not setup for Esri spatial type configuration. > Failed to execute I have put `C:\Program Files (x86)\ArcGIS\Desktop10.1\DatabaseSupport\PostgreSQL\Linux64\st_geometry.so` in `/var/lib/pgsql/9.2` directory.


title: How to use Google Maps for more than just an overlay

text: I'm using ArcGIS Desktop 10.1 SP1 and I have defined the anuual risk of accidents for each segment of a city road network. I would like to know if anyone tried to do more than overlay on GoogleMaps or similar... For instance, is there a way of using their services to return a path from A to B, based on my data? We could call it, "return the safest path from A to B", instead of the traditional shortest/fastest one? I don't know if it's relevant or not, but my network doesn't completely match OSM data in ArcGIS (it was created that way and with a different datum ... so, it may be also due to the geographic transformation applied). If there is a way, can it be achieved with my current license?


title: Can 2D polygon be used as hard breakline for terrain?

text: I've been working with TINs for years and have only ever been satisfied when using 3D polylines for breaklines. I am currently transitioning to using terrains and after reading the documentation in ArcGIS, it seemed that I ought to be able to apply a polygon as a breakline. Intrigued by the possibility, I decided to try it with a LiDAR data set I received from a project partner along with a 2D polygon feature class of wetted stream channel planform. I specified the wetted channel polygon as a hard breakline, built the terrain, and ended up with two very deep (0 elevation) troughs along the extent of each bank. See below: ![](http://i.stack.imgur.com/CdRbp.jpg) Based on my reading the software should create nodes where the polygon perimeter intersects triangle edges and interpolate z-values along those edges, but that does not seem to be the case. Is this actually possible? I am using ArcGIS 10.0 SP4 with an ArcInfo license and 3D Analyst and Spatial Analyst extensions.


title: How to find library or other business POIs?

text: I am just starting an Intro GIS course, so I really have no idea what the best place is to find downloadable GIS data. I was really hoping to do my semester project on _library or bookstore locations_ in Southern California, but I am having major trouble finding some kind of library locations GIS file to download. I'm sure I'm using all the terms incorrectly, but could someone please help? If such a thing does not exist at all, that would also be useful to know.


title: Is there a simple way to visualise point data with height values in KML?

text: Is there a simple way to display latitude/longitude point data like a 3D bar chart in KML, where the height is specified by a varying value? I've seen some examples where the `<extrude>` element is used in conjunction with line-string polygon, but can it be done with a simple point/placemark?


title: Is there a way to handle file names with spaces in ogr2ogr?

text: I'm trying to convert .shp files to .kml files. I used a batch file to find all .shp files in a directory and its sub-directories and convert them to .kml. Some converted and some gave me the error "Unable to open datasource with the following drivers". I worked out that it was not converting due to spaces existing in the file names. When I got rid of spaces in the file name, it converted. With that said, I need the files to be the same name so that they can be referenced by other programs correctly. Is there a way either in ogr2ogr or in windows cmd line to accommodate for spaces in files names when being batch converted? Much Obliged,


title: How to hide/show QGisVectorLayer from Python code?

text: Once created a layer, how can I hide/show it? I can enable/disable rendering of a specific layer by selecting the checkbox through QGIS, but I need to do it programmatically from python code. How can I show/hide(not remove) a label from python code? I'm looking for something like:               aLayer = self.addVectorLayer(uri.uri(), layerName, self.dbConn.getProviderName())     aLayer.Hide()     ....     aLayer.Show()


title: How to draw a closed line in QGIS1.8?

text: I want to draw a closed line in QGIS1.8,but I don't know how to make the last point coincide with the first point.What am I supposed to do?


title: Where can I get public transportation route information for USA?

text: I'm trying to find a list of public transit route information, mainly location of bus and train stops for the US. I've looked around at some of the Google products and openstreetmap but can't find anything. Any suggestions? Where does Google get their info? Thanks.


title: What is the most efficient method to delete points?

text: I have a script that takes a point featureclass (FC) through the following workflow:   1. Select points that lie within individual polygons   2. From the selected points within each polygon, randomly subset X% of points   3. Merge the selected points from each polygon feature sub-selection   4. Erase the original points with the merged subset and write to a new FC I am using `arcpy.Erase_analysis()` to do the point deletion. The subset of data I am testing this script on has ~35000 point features. The point subset that I would like to use as the erase feature has ~3000 point features. It takes approximately 3-5 minutes to complete processing. Seeing that I will be scaling this up to a dataset containing ~30 million points, _is there a more efficient method to delete points than by using the_ `arcpy.Erase_analysis()` _method_? Perhaps, programmatically deleting points in an editing session? Or, a method that does not involve writing a new point FC?


title: Georeference information stored in tfwx (from ArcGIS). Is it possible to see the georeference in QGIS?

text: I have georeferenced some images (ArcGIS -> Update Georeferencing) which creates a *.tfwx file with the new parameters for georeferencing. I renamed it to *.tfw but QGIS is not able to read the georeferencing information. Does anybody has any useful tips how to fix this? Thanks in advance!


title: Screen coordinates generated locate popup incorrectly

text:
I'm using OpenLayers 2.13 for an application that create several maps. When the user click on a map a popup appears where the user clicked on the map. Sometime the popup is offset either east or west of where it should be. I used console.log to get the values from map.getLongLatFromViewPort(event.xy) and the event.xy that place the popup. The event.xy, when popup appears in the wrong location, has a value for event.xy.x that is not correct. Below is the code for the popup:               innovate.popupbox[mapID] = new OpenLayers.Popup.FramedCloud(                             "innovate_info_popup_" + mapID,                             map.getLonLatFromViewPortPx(event.xy),                             boxSize,                             content,                             null,                             true,                             function() {                                 this.div.style.display = 'none';                                 map.panTo(innovate.lastPopupCenter[mapID]);                                 map.removePopup(innovate.popupbox[mapID]);                                 }                             );      The following is how the map is built:               innovate.Map = function(mapID){     var currentObject = this;          this.map = null;     this.config = innovate.getUserConfigForMap(mapID);     this.innovateLayerObj = new innovate.Layers(this);     this.innovateControlsObj = new innovate.Controls(this);     this.clickControls = {};     this.mapClickControlIds = {};          //build map object     this.setMap = function(){         var baseLayerType = this.innovateLayerObj.getBaseLayerType();         this.map = new OpenLayers.Map('container-map'+mapID, {              allOverlays: false,             fallThrough : true,             projection: currentObject.config.projection,             controls: [             new OpenLayers.Control.PanZoomBar()             ]         //,eventListeners: {"mouseout": innovate.handleOnMouseOutOnMap,"mouseover":innovate.handleOnMouseOverOnMap}         });              if(baseLayerType==="arcgiscache"){             this.map.setOptions({                  maxExtent: new OpenLayers.Bounds(currentObject.config.maxExtent[0],currentObject.config.maxExtent[1],currentObject.config.maxExtent[2],currentObject.config.maxExtent[3])             });         }else if (baseLayerType==="bing"){             this.map.setOptions({                  maxExtent: new OpenLayers.Bounds(currentObject.config.maxExtent[0],currentObject.config.maxExtent[1],currentObject.config.maxExtent[2],currentObject.config.maxExtent[3])             });         }     }          //set all the base layer as well as overlays     this.setLayers = function(){         var layer = null;         for (key in this.config['baseMap']) {             layer = this.innovateLayerObj.getLayer(this.config['baseMap'][key]);             this.map.addLayer(layer);         }              for (key in this.config['layers']) {             layer = this.innovateLayerObj.getLayer(this.config['layers'][key]);                  if(this.config['initialDisplayLayer']){                 if(key!=parseInt(this.config['initialDisplayLayer'])){                     layer.setVisibility(false);                 }             }             this.map.addLayer(layer);         }              if(this.config['layers'].length>1 && this.config['initialDisplayLayer']){             var layers = this.map.layers.slice(),count=0;             for(var i=0;i<layers.length;i++){                 if(!(layers[i].isBaseLayer)){                     if(count!=this.config['initialDisplayLayer']){                         layers[i].setVisibility(false);                     }                     count++;                 }             }              }     }          this.reactivateClickEvents = function(){         //first remove the click control from the map         //for some reason in dev, the click control was added twice!         //same issue did not arrise in local         //but adding code to delete the control and then add it back did the trick         for(var keys in this.map.controls){             if(this.mapClickControlIds[this.map.controls[keys].id]){                 //alert("removed"+this.map.controls[keys].id);                 this.map.controls[keys].deactivate();                 this.map.removeControl(this.map.controls[keys]);             }         }         this.mapClickControlIds=[];              var control = null,layerName;         for (key in this.config['controls']) {                  var controlName = this.config['controls'][key];             if(controlName.substr(0,6)=='click_'){                 for(var layerIndx in this.config["layers"]){                          layerName = this.innovateLayerObj.layerDefinitions[this.config["layers"][layerIndx]]["name"];                     control = (this.innovateControlsObj[controlName]).call(this.innovateControlsObj,layerName);                     if(control!=null){                         this.clickControls[layerName] = control;                         this.map.addControl(control);                         control.activate();                         this.mapClickControlIds[control.id]=1;                     }                      }             }         }          }          //set all the controls     this.setControls = function(){         var control = null,layerName;         for (key in this.config['controls']) {             var controlName = this.config['controls'][key];             if(controlName.substr(0,6)==='click_'){                 for(var layerIndx in this.config["layers"]){                          layerName = this.innovateLayerObj.layerDefinitions[this.config["layers"][layerIndx]]["name"];                     control = (this.innovateControlsObj[controlName]).call(this.innovateControlsObj,layerName);                     if(control!=null){                         this.clickControls[layerName] = control;                         this.map.addControl(control);                         control.activate();                         this.mapClickControlIds[control.id]=1;                     }                      }             }             else{                 control = this.innovateControlsObj.getControl(controlName);                 if(control!=null){                     this.map.addControl(control);                 }             }         }     }          /*      * Thus function builds map based on map id set to the current innovate.Map function      */     this.buildMap=function(){         this.setMap();         this.setLayers();         this.setControls();              var baseLayerType = this.innovateLayerObj.getBaseLayerType();              if(currentObject.config.zoomToExtent){             this.map.zoomToExtent(new OpenLayers.Bounds(currentObject.config.zoomToExtent[0],currentObject.config.zoomToExtent[1],currentObject.config.zoomToExtent[2],currentObject.config.zoomToExtent[3]));         }else if(this.config.center){             var zoomLevel = this.config.defaultZoomLevel?this.config.defaultZoomLevel-this.config.startResolution:0;             var geographic = new OpenLayers.Projection("EPSG:4326");             var mercator = new OpenLayers.Projection(this.config["projection"]);             this.map.setCenter(new OpenLayers.LonLat(this.config.center[0], this.config.center[1]).transform(geographic,mercator),zoomLevel);              }else if(baseLayerType==="arcgiscache"){             this.map.zoomTo(this.config.startResolution);         }     }      } Below is the event handler for the map:               this.click_radons = function(layerName) {     if (layerName == "State Boundaries") {         return null;     }     var map = innovateMapObj.map,             layer = null,             serviceURL = null,             layers = map.layers.slice(),             content = "",             desc = null,             img = null,             priority = null;          //because we don't want to query base layer     for (var i = 0; i < layers.length; i++) {         if (!(layers[i].isBaseLayer)) {             layer = layers[i];             serviceURL = layers[i].url;             break;         }     }               OpenLayers.ProxyHost = innovate.proxyURL;     return new OpenLayers.Control.WMSGetFeatureInfo({         layers: [layer],         url: serviceURL,         title: 'Identify features by clicking',         queryVisible: true,         eventListeners: {             getfeatureinfo: function(event) {                 var thisObject = new innovate.Controls(innovateMapObj)                 obj = thisObject.makeObjectOutOfResponse(event.text);                      var boxSize = null;                 var mapID = innovateMapObj.config.id;                 //hide any open popup on click                 if (innovate.popupbox[mapID]) {                     map.removePopup(innovate.popupbox[mapID]);                     innovate.popupbox[mapID].destroy();                     //$("#innovate_info_popup_" + mapID).hide();                 }                 if ($.isEmptyObject(obj) || obj === false) {                     return;                 }                 innovate.lastPopupCenter[mapID] = map.getCenter();                      if (obj['radonzone'] == 1) {                     desc = "Zone 1 counties have a predicted average indoor radon screening level greater than 4 pCi/L (picocuries per liter) (red zones)";                     priority = "Highest Potential";                     img = "3b6a386668a6d07b8d8e029744820282";                 } else if (obj['radonzone'] == 2) {                     desc = "Zone 2 counties have a predicted average indoor radon screening level between 2 and 4 pCi/L (orange zones)";                     priority = "Moderate Potential";                     img = "52edb92fef3b3447d910ea3f4e3bad06";                 } else if (obj['radonzone'] == 3) {                     desc = "Zone 3 counties have a predicted average indoor radon screening level less than 2 pCi/L (yellow zones)";                     priority = "Low Potential";                     img = "d1573b09a0505bef245b2a380a18e380";                 }                 var stateName = obj['statename'], initCapedStateName = "";                 stateName = stateName.split(" ");                 for (var keys in stateName) {                     initCapedStateName += stateName[keys].substr(0, 1) + stateName[keys].substr(1).toLowerCase() + " ";                 }                      var imgURL = innovate.mapServiceBaseURL["legend"] + innovateMapObj.config.legend["url"] + "/../0/images/" + img;                 content = "
" + obj['namelsad'] + ", " + initCapedStateName + "
" +                         "
Radon risk zone: " + obj['radonzone'] + "
" +                         "

	" +                         "" + desc + "	" +                         "" + priority + "

";                               innovate.popupbox[mapID] = new OpenLayers.Popup.FramedCloud(                             "innovate_info_popup_" + mapID,                             map.getLonLatFromViewPortPx(event.xy),                             boxSize,                             content,                             null,                             true,                             function() {                                 this.div.style.display = 'none';                                 map.panTo(innovate.lastPopupCenter[mapID]);                                 map.removePopup(innovate.popupbox[mapID]);                                 }                             );                          map.addPopup(innovate.popupbox[mapID]);                  }         }     });      } It seem as though something is causing the screen coordinates to sometime be shifted to the left or right of where the user click. Any advice would helpful.


title: Any way to use WGS84 latlng to dynamically get state plane EPSG code? Either javascript or PHP

text: I am developing an online project that needs to be able to accept a WGS84 lat lng anywhere in the lower 48 states and produce the corresponding state plane coordinates. Once I know the state plane EPSG code then I can use http://spatialreference.org to get the parameters for that state plane zone and then use proj4js to convert the latlng to state plane. But I am missing a piece. Is there a way with javascript or PHP to find out the correct state plane EPSG code for a WGS84 latlng? Is there some kind of REST API I can call that will return the EPSG code?


title: What is a "mashup"?

text: GIS users mix spatial data layers from an early age of GI science. What is new in the concept of "mashup"? Is it something really new, or only a trendy word?


title: ST_SplitRight() in PostGIS?

text: I am looking to split a shapefile via a line. I am interested only in the feature that lies to the right of the line; exactly what ST_SplitRight does **here**. Do any of you know of a way to do this in PostGIS? After spending a couple hours searching I haven't been able to find any sort of solution.


title: How can I represent distance using the dashes or markers of a vector line?

text: I am a very basic user and dont know the lingo to get to the gist of my question so some background might help. Ive volunteered to create a pre-incident planning system for my rural fire department. Our primary vulnerability are extremely long un-mapped driveways. So far Ive successfully transferred GPS data of the driveways over aerial photography of the district as bright green lines(a .SHP layer) with a label showing the length of each driveway. It looks great and is very useful as is. _**Now the question_** : I want to draw the driveway vector lines as dashes or with markers set at 100-foot lengths. Our supply-line hoses come in 100-foot lengths; A vector line defined with markers at 100-foot intervals would save me a lot of time and improve the data immeasurably. So far I have tried "Single Symbol" as a "Simple Line" using a customized dash pattern and the "Marker Line" using the interval placement. Neither of these options maintain the proper length while zooming or "scaling" (if that's the term). Perhaps it is impossible? (at least at my level of knowledge. I taught myself this far and dont have a lot more time for fooling around :))


title: Install Georeferencer Plug-in QGis 1.7.0 OS X

text: I'm trying to install the Georeferencer plug-in in QGis 1.7.0 on Mac OS X (10.5.8). However the plug-in doesn't show up in the list. I have used "enable 3rd parties directory" and I have checked "manage plug-ins", it's not installed yet. I believe that I can't install a newer version of QGis on OS X 10.5.8, if I'm wrong please correct me...   Any suggestions? I'd be very thankful. If there's no way to install the plug- in - are there other ways to georeference raster imagery?


title: Assigning vector data attributes from other adjacent data

text: I am supposed to do a presentation on how to do this, and I'm not exactly sure what it is asking. The question is: "how can you assign vector data attributes from other adjacent data?" I am in a geology field class and am learning GIS and mapping my field sites as well. This is supposed to be something I am able to learn through the help menus and/or forums, but the question itself is not clear to me and they won't answer me. Anyone have an idea what this would most likely be asking?


title: How to connect to MySQL from QGIS in Ubuntu10?

text: I have just installed Quantum GIS 1.8.0 on my Ubuntu 10. I want to add a MySql table as a data source but I can't see any options for connecting to mysql. Can any one guide me how to connect to mysql? N.B : Options for Available Database Types in Qgis are MSSQL,ODBC,PostgreSQL and ESRI Personal GEO Database.


title: Why don't I see ArcSDE service in the Windows services?

text: I've been thrown into learning how ArcSDE and ArcServer work. I'm trying to start a service using the default esri_sde on port 5151. I put it in both the ArcSDE and windows service files. When I go to Administrative tools and services, I don't see an ArcSDE service. What am I doing wrong?


title: QGIS Web Url paramater zoom / scale

text: I have a link for wms in QGIS Server like this:               http://localhost/qgis/qgis_mapserv.fcgi.exe?SERVICE=WMS&VERSION=1.3.0&SRS=EPSG:21781&REQUEST=GetMap&map=C:/OSgeo4W/SERVER/SQL.qgs&BBOX=608350,264875,615466,268677&WIDTH=1200&HEIGHT=1300&LAYERS=TS&FILTER=TS:%22ID%22+=+3&FORMAT=image/png      is there any possibilty to give an additional parameter for zooming in url like ?zoom oder ?scale (not for printing) Thanks for help


title: How to fix encoding problems with Turkish characters?

text: > **Possible Duplicate:**   >  How to read Greek fonts (ISO-8859-7) in shapefile attributes within QGIS > 1.8.0? My shapefile contains turkish (latin) letters. (see: http://www.5goldig.de/Tuerkische_Tastatur/Tuerkisch-Buchstaben.html) The encoding of the shapefile is UTF-8 and I also tried ISO-8859 and several others but the letters are still like that: ApÄ±Åkar GeÃ§it -> Apişkar Geçit Is it because of the encoding or is there a other reason?


title: Field Calculator VB Script Codeblock IF statement syntax is wrong

text: I can't figure out why the syntax is wrong in Field Calculator ArcMap 10. The complete codeblock is               Dim CapitalDia As Number     Dim TwagDia As Number     Dim X As Number          CapitalDia = [New_Pipe_S]     TwagDia = [DIAMETER_1]          If CapitalDia= 0 Then      X = TwagDia     Else      X = CapitalDia     End If      And then, the bottom window is               Final_Dia =      X


title: Problems with a FileGeodatabase locking

text: We have file geodatabase on a network drive, version 9.2, which locks every time a specific machine starts up ArcMap 10.0 or ArcCatalog 10.0. This machine isn't actually reading anything from this geodatabase. It is just opening up a blank map document or browsing other directories elsewhere on the network. However, this machine has accessed this geodatabase in the past. Has anybody ever come across this? Things we have tried so far to stop this locking: 1 - Opened up enough map documents so that none of the mxd's in the recently opened list in the "File" menu in ArcMap have data from this database. 2 - Disconnected this network drive from the folder connections in ArcCatalog 3 - Deleted the normal templates for ArcCatalog and ArcMap. 4 - Re-started the machine 5 - Deleted the original database and made a new one in the same location. None of the above worked. The only thing that works is to remove the connection from this machine to the network share i.e. remove the connection to the "N" drive in MyComputer. Unfortunately this isn't a feasible solution as the machine needs to have that network share mapped to that drive letter. Any suggestions on how to prevent the lock?


title: ArcGIS Server 10.2 URL - case sensitve

text: ArcGIS 10.2 Server enforces case sensitivity on map service URLs. This has been the case for some URLs in previous versions but was reported as bugs? Does anyone know the reason WHY ESRI makes AGS URLs case sensitive? I don't see the logic on making URLs case sensitive as it just adds another layer of unnecessary complexity and adds confusion.. Example of URL that will not work: http://services.arcgisonline.com/arcgis/rest/services/world_street_map/mapserver (incorrect case on service name) More information: http://blogs.esri.com/esri/arcgis/2013/12/17/esri-basemap- system-upgrade-to-arcgis-10-2-for-server/


title: Whats steps can I suggest to achieve the best Geolocation Result

text: We are using Geolocation (`getCurrentPosition()`) in a website to determine a users position when using our site from a mobile device. I want to write an article explaining how the user can obtain the best results. Am I correct in assuming:   * Enabling GPS will yield the best result when in rural areas (less buildings to obscure line of sight to the satelites)   * Enabling Wi-Fi will yield the best results when in urban areas (generally more Wi-Fi hotspots available)   * Is it true that Android phones have better results from silently harvesting Wi-Fi hotspot details? Any links to reference material on this are appreciated


title: Create report and how to insert a comma at the end of the report?

text: When I run a create report and want to use the comma when you want to sum the acres ? Is there a way around to do that ? Here is the attachment where I use the yellow highlight. ![See here](http://i.stack.imgur.com/N3VL0.png) It is so much easier if you just add the comma ! I am using ArcGIS ArcMap 10.4 SP


title: Button to add a new line in a non-spatial table without opening the table itself using QGIS?

text: While using QGIS and having loaded a non spatial table (from PostGIS), is it possible to add a new row to its table attributes without having to open the attribute table first as in here Is it possible to add a new line in a non- spatial table using Qgis? Same principle as add a point but with no geometry, just information in a table. I was able to create a plugin that chooses and starts editing the table but can't get the form window to open so I can fill the fields.


title: Python equivalent of gdalbuildvrt

text: Is there a way to perform the same task as the gdalbuildvrt utility using GDAL Python bindings? So far I have not found any way to do this other than creating a vrt of a single dataset and manually editing the xml. I would like to create a vrt from multiple rasters (essentially performing a mosaic). Is this possible using pure Python? My other option is to use subprocess to simply call gdalbuildvrt.


title: How to Connect OpenLayers Map to non-GeoServer / PostGIS Setup?

text: I apologize in advance if my question is unclear - I am afraid I do not understand all of this quite well enough to form my question precisely, but I will give it a shot. I recently managed to get an OpenLayers map set up and displaying a WFS layer (mostly by piecing together examples from others' questions), the data for which is stored in a PostGIS database and served with GeoServer. My next task is to figure out how to connect the map to our existing database, which is an Accumulo database. We have a Jetty server set up for communicating with the Accumulo database. To the best of my knowledge, what I want to do is to replace the WFS protocol on my vector layer with a different protocol that will communicate with this Jetty server. If we can get a request sent to the Jetty server in some easily parsed format, we already have the capability to turn this into a database query and return JSON with the results of the query. I have looked at both the HTTP and Script protocols, and it seems to me that one of these may be what I want to use. However, Google searches provide little in the way of examples of how these protocols work. Am I on the right track with this? Thanks, -Rob


title: How can I apply multiple expressions to a field in QGIS?

text: I'm working expanding abbreviated names in a shapefile. I have written the following expansions, and would like to learn how to write a field expression that would do many expansions in one.               replace( "DNRNAME",'SF','State Forest')     replace( "DNRNAME",'FMA','Fish Management Area')     replace( "DNRNAME",'FT','Fire Tower')     replace( "DNRNAME",'SP','State Park')     replace( "DNRNAME",'CFL','Chesapeake Forest Lands')     replace( "DNRNAME",'NRMA','Natural Resource Management Area')     replace( "DNRNAME",'NEA','Natural Environment Area')     replace( "DNRNAME",'WMA','Wildlife Management Area')     replace( "DNRNAME",'HCF','Heritage Conservation Fund Site')      How can I apply all of these replace conditionals at one time?


title: Where can I find base data shapefiles for whole US?

text: I am looking for the base layers for whole U.S. - roads, hydrological lines etc with flexibilities of changing symbology and labels. TIGER is a good source but it is at county level. I am running on a short deadline right now, so want a quick fix. Can anyone suggest good source where I can find one layer for whole country? Or merged TIGER Census shapefiles for the whole US?


title: Plot files in ArcGIS

text: I wondered if you could share some of your experience with plot files in ArcGIS. I've been trying to make these, as I have a good expeirence with them from autoCAD (every drawing is exported to a PLT file, which stands by if another copy is wanted later on). In arcGIS, I saw there is only options to export to PRN or RTL, but no PLT (which is a HP designed file, if I'm not mistaking). Both PRN and RTL save the maps (containing vector and raster features) horridly, making the maps produce from them very discolored and messy. From what I've deduced from the Internet, PRN is usally for documents, so it's probably not meant for rasters, hence the poor capabilities. (for all those who want to ask: Saving only as a MXD isn't much good, as the layers can be changed over time, moved to different locations, and anyway, handling MXD can be done only by GIS trained personnal while printing plot files can be done by any given secretary). Any thoughts? Has something in this field advanced in ArcGIS 10 (I'm in 9.3.1)??


title: How to toggle layer visibility in QGIS using Python?

text: How can I toggle layer visibility in QGIS via Python API?


title: How to import SpatiaLite data into GRASS?

text: How can I import SpatiaLite tables into GRASS? Are there any restrictions I should be aware of? How does GRASS cope with columns that don't have a specific type (Sqlite tends to create such columns e.g. if you create a new table from a query using SUM() or similar)?


title: How to read/write from/to QGIS project file using Python?

text: I'd like to save the project-dependent configuration of my Python plugin inside the QGIS project file. Is this possible and what are best practices to do so?


title: How illustrate cells in attribute table?

text: Firstly, many thanks to all of you who have been helping me greatly, just can say THANKS. Secondly...I have a new question. I have an attribute table with 2883 rows which are the OA of Leicestershire with their easting and northing column. I have 4 more columns in the attribute table(4 land use classes) that carry the population density of each land use class in each OA (i.e. 4*2883=11532 cells). I want to creat a popygon shape file with 11532 polygons which every polygon's attribute is the population density mentioned in the original attribute table(it shoul be a table with 11532 rows and three columns of easting, northing and population density). Does any one know how to sort this problem out? I do appreciate. THANKS!!!I look forward to your help...


title: Performing health checks on ArcGIS Server?

text: ArcGIS Server setup in an enterprise environment: i.e. Multiple SOCs, perhaps a fail-over setup, separate web server, SDE/DBMS on separate machine, etc. Without going into the specifics on versions/software/operating systems/etc, I would like to know what people would recommend on performing **"health checks"** on this kind of scale setup. Or perhaps **diagnostics** is a better word? I was thinking it would be a good idea to run monthly checks (as opposed to consistent monitoring) to ensure **everything is running smoothly** and to perhaps identify bottlenecks or problem areas in the setup. Ideally having a specific workflow that could be easily repeated, and then gather historical data to see if the setup has deteriorated over time. _I hope this is not too subjective a question, but I think there will be experts out there that will have "right" answers to this, and perhaps any discussion can be done via comments and deleted as need be?_ To make the question more specific, please assume:   * SDE has been setup optimally.   * ArcGIS Server services have also been setup optimally (i.e. Cached where appropriate, scale ranges/definition queries, etc). I was thinking of putting together a custom application that sits on the webserver and allows a user to hit a button which would do things like:   * ping each endpoint (each IP, check XML from Server WSDL ok, various REST endpoints)      * Fail/Pass to these tests     * Perhaps repeat these pings, and show an average response time for each endpoint. These tests could be performed in off-peak hours, and then generate a basic report on the outcomes. I guess you could also swap out ArcGIS Server for any server technology (which got me thinking on perhaps this belongs in ServerFault). I know ArcGIS Server has logging and statistics capabilities. I should also point out that automatic alerts have already been put in place to notify when servers go down or are performing very badly. I am really after some advice on what to test/identify in terms of diagnosing if the overall system is "healthy" (i.e. Is it running ok, is it worse than last month, can something be improved?) I would be interested to know what people (who are experienced in multi- tier/high use setups) think of this.


title: Is there a way to make a qgis project only editable by me

text: In QGIS, currently Lisboa 1.8.0 is there a way to make it only editable by me. I want to set up projects for each client on the network, so when all the files are on the network and the program and project are saved on the network that everyone can view it and interogate it but only I can edit layers, add new layers, draw on it, etc etc. I dont know if this is in the right section or if it is answerable. I may need to clarify this point i think.


title: How to connect particular sets of points with (poly)lines?

text: I think my problem is quite easy to be solved by the most postgis-users, but i am a bloody beginner: i have a timestamped point-table representing GPS- tracked places of different cars. To distinguish the cars there is a car-id for every point. So, a simplified version is looking like that: ![enter image description here](http://i.stack.imgur.com/EoKcB.png) Now, i want to write a query for connecting the places of each car chronologically with lines so that the track of each car can be displayed. The table is sorted chronologically, so it can be worked with the id's instead of the timestamps. How can I solve it? Thank you in advance!


title: Extract raster by mask output does not completely overlap the mask

text: I have a flow accumulation grid and a shapefile containing catchment areas. Now I want to do some calculations on them so I need to extract data from cells in the raster adjacent to certain catchment areas. In that process I try to use Extract by Mask on my raster, with one of the catchment polygons as mask (in a loop later on, but now I just need it to work once). The problem is that the extracted raster is shifted half a cell to the left, compared to both the original raster and the masking polygon. This is messing up the rest of my process, since I try to convert the raster to points and intersect with other polygons later on. And unless the extracted raster is overlapping the original one, I wont get the right polygon. The original raster and the polygons are aligning perfectly, since the polygons are created from the raster. I have tried to check if there somehow have been some kind of change in the projections, but can't find any. I have also tried in new ArcMap documents, restarting everything several times (this solves the problem surprisingly often) and executing the tools from the python prompt instead of calling my script. I have even tried to execute the Extract by Mask tool from the Toolbox, with same result. If anyone can help me with a fix, or at least tell me what I am doing wrong, that would be greatly appreciated! This is the (very simple) code that I use in the python prompt in ArcMap:               inpgs = r'C:\GIS\Catchm_ex.shp'     flowacc = r'C:\GIS\flowacc'     arcpy.MakeFeatureLayer_management(inpgs, 'currentMask', '"HydroID" = 269634')     outRaster = arcpy.sa.ExtractByMask(flowacc, 'currentMask')      I have some sample files here I use Windows 7, ArcInfo 10.0 and Python 2.6. EDIT: I have tried Extract by Polygon now, and that seems to work fine. Is it just my machine malfunctioning on ExtractByMask? Only drawback is that I'm having problems using that function in my script, since I can't work out how to get the coordinates of my masking polygon (only covering 9 cells, with a point in center if that helps). EDIT2: I have now got it working with Extract by polygon by using the code below (modified from Esri's support pages). Unfortunately, this does not solve my problem. It appears as if the output (from this tool as well as Extract by mask) is sometimes shifted half a cell to the left, and sometimes not. Mostly it is, but occasionally it actually is located where it should be. So now I'm really confused. Is this just happening to me, on my computer? If anyone else have experienced the same, please write a comment so I know that I'm not all alone :) To me this problem seems to be a too big of an issue to be a bug, which leaves me with this being a problem that I have created myself along the way. Any ideas on how? Or how to avoid it?               def ReadPoints(infc):         try:             import arcpy, numpy         except ImportError:             sys.exit('Unable to import arcpy')              # Identify the geometry field         desc = arcpy.Describe(infc)         shapefieldname = desc.ShapeFieldName         points = []              # Create search cursor         rows = arcpy.SearchCursor(infc)              # Enter for loop for each feature/row         for row in rows:             # Create the geometry object             feat = row.getValue(shapefieldname)             partnum = 0                  # Step through each part of the feature             for part in feat:                 # Step through each vertex in the feature                 for pnt in feat.getPart(partnum):                     if pnt:                         points.append([int(pnt.X), int(pnt.Y)])              pt = numpy.array(points)         pts = []         for i in range(len(pt)):             t = pt[i]             pts.append(arcpy.Point(t[0],t[1]))         return pts


title: gdal doesn´t support my *xyz file

text: I have just exported a tif DEM to XYZ format with SAGA GIS. When I check this with gdalinfo it states that the format is unsupported? Seeing as I converted this with saga gis which used gdal I find this rather strange. Can anyone suggest what I did wrong? thanks.


title: How to login arcgis secure service in Flex using 2.5 version?

text: I know, that I can use IdentityManager class to show login+password form for secured services. But it's available in version 3.0, and I'm using 2.5. How can I provide access for secured service in my case? I also know, that I can use token generation, but token is bound to unique IP address and I need to use the application on many machines. Thanks


title: Working around the raster calculator in ModelBuilder - ArcGIS

text: I am experiencing a problem with the raster calculator in the Model Builder under ArcMap 10. I need to combine two layers: a drainage map (issued from a series of previous operations on a DEM) and a slope map reclassed in 8 classes. The formula used in the calculator is the following: `Con(("surf_drainee" > 12) & ("surf_drainee" <= 80) & ("pente_rclass" <= 24),"pente_rclass"+1, Con(("surf_drainee" > 20) & ("pente_rclass" < 24),"pente_rclass" + 2, Con(("surf_drainee" > 80) & ("pente_rclass" == 24), "pente_rclass" + 1, "pente_rclass")))` When I enter this in the calculator, using the buttons to enter the expression, it sends back a python syntax error. I discussed it with a colleague, who told me to write it out completely with the keyboard. This works in the Raster Calculator, when used alone from the Toolbox. But when this is done in the Model Builder, it does not connect my two layers to the calculator, but creates numerous duplicates in entry to the calculator (pente_rclass (2), pente_rclass (3)...). Is there a way of getting around this problem? I was thinking maybe a script could replace the raster calculator, but I don't really have the knowledge to set that up without a few hints... Thank you for your help!


title: Which Geo stack for an online strategic wargame?

text: I'm googling around for some weeks but I've some difficulties to figure out where to begin my project and which part of the available Geo stacks are mandatory for my needs. I have a strong Java background, some interest for Python and totally open to learn some new technologies. As an hobby and because it is close related to my job, I plan to develop a web MMO strategic wargame heavily based on an interactive maps (basically to display the tactical situation and give orders to units). Here is what I was thinking about :   * Geoserver to serve maps and layers.   * PostGIS to store geodatas.   * GeoExt to display in a browser   * Apache Click as the Java application server (combat resolution, unit management) I managed to deploy a GeoServer (war in tomcat, easier is difficult) I managed to install PostGreSQL I run some tutorials about GeoExt. I need to experience Javascript a little bit. I played with Apache Click to serve pages and forms. Here is the flow I was thinking of :   * GeoServer serves the map backgrounds and layers constructed from PostGIS data for static objects (Cities, Victory Points, Territories, ...)    * Apache Click generates HTML+GeoExt pages in the client browser.   * Apache Click sends CRUD commands to PostGIS in response of user's action.   * [something] updates regularly PostGIS (movements, combat resolution, unit characteristics management...)   * Apache Click generates dynamically KML files to live update the browser (KML NetworkLink ?) for units display with icons, zones (range, detection...)... And now, the missing brick in my little wall :   * How can I implement a "sea/land" layer. For example, to invalidate a ship movement passing on land ? GeoServer layer ? Zones defined in PostGIS ?   * Is the following flow reactive enough to update the map after a user action : HTML/GeoExt event -> Apache Click process -> PostGIS update -> GeoServer layer update -> HTML/GeoExt display The main point is : where are the data if I want to use it for calculation and update ? GeoServer static layer or PostGIS tables ?


title: Python geoprocessing performance

text: I'm using ArcGIS Server 10.0. I have a python geoprocessing that takes a lot of time. The geoprocessing calculates geometries using points, polygons, buffers, and cursors. I'm also using sql queries with the SdeExecuteSQL function. This function seems to take time too. Is it possible to optimize this? Do you have any hint of how to optimize the geoprocessing? Would it be shorter in time if I used the Java API?


title: Find and destroy duplicate OSM multipolygon/polygons in TileMill/PostGIS

text: In OpenStreetMap there are sometimes multipolygons where attributes are present on both the polygon and the multipolygon relation, such as the Grampians National Park:               http://www.openstreetmap.org/browse/relation/2703380     http://www.openstreetmap.org/browse/way/201068605      These polygons get loaded by OSM2pgsql separately, so I get duplicate polygons in PostGIS. Both match a query like `select * from planet_osm_polygon where leisure='nature_reserve'`. The problem is that when rendering such polygons using a transparent style (eg, over a terrain basemap) they appear darker than other single polygons. ![enter image description here](http://i.stack.imgur.com/qzbWp.png) I can't think of any way to avoid this happening, short of not rendering _any_ multipolygons, or _only_ multipolygons. Any suggestions? Pre-processing in PostGIS is ok if needed.


title: Change overview map postion in map from right to left

text: I am using OpenLayers 2.12. I have added an OpenLayers OverviewMap control. This overview map tool is located on the right side of the map panel by default. I would like it to be positioned on the left side instead (see image). ![Image showing overview map control on the left side of the map](http://i.stack.imgur.com/OmKcI.jpg) How can I achieve this?


title: Openlayers and Google Maps Api aren't work on Android Platform

text: I have application that uses OpenLayers, Google Maps Api and Geoserver My application is running at Web browser and when I try to run at Android tablet (using Phonegap), It runs but openlayers components is staying behind the google maps. How can I solve this problem ? PS : When running at android, plus-minus button, red marker and layer switcher are staying behind the google maps. Thanks![My Browser Screen Shot](http://i.stack.imgur.com/kcO0L.jpg)


title: How to show a selected polygon feature, using a single marker in its center

text: I've been asked to replicate a map where the selected polygon is shown with a red tick/check mark: ![enter image description here](http://i.stack.imgur.com/DjNia.png) I need to tell ArcMap to use this symbol when a polygon is selected, so that un-selecting the polygon removes the check mark, and selecting a new polygon shows the check mark for that polygon. I don't want to edit a point layer and move the point around, which would be a manual workaround. I tried setting the layer's selection symbol... ![enter image description here](http://i.stack.imgur.com/nU8Y2.png) ... but the only options here assume that the marker/image should be distributed multiple times throughout the selected polygon: ![enter image description here](http://i.stack.imgur.com/2kqcD.png) Is it possible to show a single marker within a selected polygon? I suspect this will require ArcObjects coding (which is probably out of the picture for this) but someone may know of a workaround.


title: pgr_dijkstra function not finding node that appears in ways table

text: I am having a problem with pgr_dijkstra algorithm not finding some of the node vertices in my table. I have a large dataset of survey travel diaries and am trying to determine their shortest paths between each place they visit. I linked each place visited to the closest node in my OSM network using the ways_vertices_pgr table. I can find the nodes that are returning a blank shortest route in either the source or target column of the ways table (my edge table) but for some reason pgr_dijkstra is not finding the node when I call the function for about half of my routes. Do I need to do something to tell the algorithm to look in both source and target columns of the ways table? Here is my query that fills in the routes, which worked for about half of my routes. I should mention that the prg_dijkstra function I use here is the prg_dijkstra wrapper function given on the workshop website on the pgrouting homepage. I have tried with the full function as well and it doesn't seem to make a difference. I have also done pgr_analyzegraph and the network topology returns OK.               update analysis.routing     set     routeline2 = (select st_multi(st_union(pgr.geom)) from (select * from      pgr_dijkstra('ways',analysis.routing.source,analysis.routing.target)) as pgr)  ;       Do I need to do `ST_Reverse` or some other transformation to get the function to find the node? Any help would be greatly appreciated.


title: Mapinfo 10 with new look does not show toggle state of button

text: Is this only a problem to me or a problem to other's too. I have mapbasic application that runs good on mapinfo 11 and mapinfo 10 with old look but this toggle button does not work with mapinfo 10 (The icons dll files too won't work) . What might be the problem?


title: ArcGIS Server - E-Tags

text: From an ArcGIS Server (9.3.x or 10.x) instance, can anyone confirm if REST HTTP response headers are modified when the data within a layer is updated? For example, if I query a layer at time `x` and get a `200 OK` response and E-Tag `y` and I query the same dataset at a later date, I'll generally receive a `304 Not Modified` response with the same E-Tag. However I'd expect the E-Tag to change and to receive a `200 OK` status if the layer data changed, is this the case? If this is **not** the case, is there a way to test if data has changed since a particular date without actually pulling the data down.


title: Learning how to use Mapinfo Professional ?

text: I am wondering if there is a good website where can I learn how to use Map Info Professional ? I am an advanced ArcGIS user and am a beginner MapInfo. Thanks. What I mean "Good website" I mean they can be from site where they give you the steps, documents, powerpoint, pdf related to MapInfo.


title: Can OpenStreetMap replace Google Earth?

text: I need to build a website which needs to perform the following tasks:   1. Display a web map with topographical details   2. On the map show a set of selected streets   3. When a street is selected show a set of points of interest on that street The constraints are:   1. Ruby on Rails as a programming language   2. Everything in the stack must be open source I've given an interested look at OpenStreetMap will it work for the needed tasks? EDIT Actually there is a product using Google Earth in this company but they want to change it due to its commercial cost.


title: OpenLayers deploy: what libs does selectFeature rely on?

text: I am trying to minimize my code by modifying OpenLayers deploy configuration file in order to reduce its `load time`. However, It seems that I can't include all necessary libs that OpenLayers.SelectFeature.Control needs. Here is the config file:                   [include]     OpenLayers/Map.js     OpenLayers/Kinetic.js     OpenLayers/Projection.js     OpenLayers/Handler.js     OpenLayers/Control.js     OpenLayers/BaseTypes/Pixel.js     OpenLayers/BaseTypes/LonLat.js     OpenLayers/BaseTypes/Bounds.js     OpenLayers/Layer/SphericalMercator.js     OpenLayers/Layer/XYZ.js     OpenLayers/Layer/WMS.js     OpenLayers/Layer/Vector.js     OpenLayers/Layer/ArcGISCache.js     OpenLayers/Control/TouchNavigation.js     OpenLayers/Control/Geolocate.js     OpenLayers/Control/Attribution.js     OpenLayers/Control/SelectFeature.js     OpenLayers/Control/DrawFeature.js     OpenLayers/Control/ModifyFeature.js     OpenLayers/Control/Snapping.js     OpenLayers/Control/Split.js     OpenLayers/Control/Panel.js     OpenLayers/Control/Button.js     OpenLayers/Control/PinchZoom.js     OpenLayers/Feature/Vector.js     OpenLayers/Feature/WFS.js     OpenLayers/Handler/Click.js     OpenLayers/Handler/Feature.js     OpenLayers/Handler/Hover.js     OpenLayers/Handler/Box.js     OpenLayers/Renderer/SVG.js     OpenLayers/Renderer/Canvas.js     OpenLayers/Format/GeoJSON.js     OpenLayers/Format/KML.js     OpenLayers/Format/WFS.js     OpenLayers/Format/WFSCapabilities.js     OpenLayers/Format/WFSCapabilities/v1.js     OpenLayers/Format/WFSCapabilities/v1_0_0.js     OpenLayers/Format/WFSCapabilities/v1_1_0.js     OpenLayers/Format/WFSDescribeFeatureType.js     OpenLayers/Format/XML.js     OpenLayers/Request/XMLHttpRequest.js     OpenLayers/Protocol/HTTP.js     OpenLayers/Protocol/WFS.js     OpenLayers/Protocol/WFS/v1.js     OpenLayers/Protocol/WFS/v1_0_0.js     OpenLayers/Protocol/WFS/v1_1_0.js     OpenLayers/Strategy/Fixed.js     OpenLayers/Strategy/BBOX.js      When I test selectFeature feature which has a feature info popup in OnSelect, it always tells me following error:               cannot call "add" of undefined      which I think it points out that in the file of `selectFeature.js`, under "pixelToBounds", the variable "pixel" is undefined, and then I assume it's relevant to the recognition of "evt". could somebody give me some hints? thank you!


title: Geometry from multiple selected features into one geometry

text: Lets see if I can explain what I'm trying to do. First of all I have developed an AddIn for ArcMap that can take one selected feature (Polygon) on a layer, grab the geometry of that feature, and save it to a SQL Server database. What I would like to do is to save multiple selected features, not as individual geometries (ie. one row per feature/geometry) but as one "piece of geometry" containing the selected polygons. This is the code I have so far:               IFeatureLayer featureLayer = ArcMap.Document.CurrentContentsView.SelectedItem as IFeatureLayer;             if (featureLayer != null)             {                 IFeatureSelection featSel = featureLayer as IFeatureSelection;                 IEnumIDs idList = featSel.SelectionSet.IDs;                      int index = idList.Next();                 List<int> indexes = new List<int>();                      while (index != -1)                 {                     indexes.Add(index);                     index = idList.Next();                 }                      IFeatureClass featureClass = featureLayer.FeatureClass;                 IFeature feature = featureClass.GetFeature(indexes[0]);                 IGeometry geometry = feature.Shape as IGeometry;                 // Save to database             }      As you can see I can get all the indexes of the selected features of the selected layer and get the geometry, the challenge is to "concatenate" all the geometries into one...hope it makes sense :) Any suggestions? P.S ...and if any of you have a better way of looping through the idList...please let me know :) UPDATE: A BIG thanks to Petr! Followed your instructions and it worked in the first try! Here's the code I ended up with:               IFeatureSelection featSel = featureLayer as IFeatureSelection;                          if (featSel.SelectionSet.Count > 0)                     {                         ITopologicalOperator resultPolygon = new Polygon() as ITopologicalOperator;                         IGeometryCollection geometriesToUnion = new GeometryBag() as IGeometryCollection;                              ICursor cursor;                         featSel.SelectionSet.Search(null, false, out cursor);                              IFeatureCursor featureCursor = cursor as IFeatureCursor;                         IFeature feature;                         while ((feature = featureCursor.NextFeature()) != null)                         {                             geometriesToUnion.AddGeometry(feature.Shape as IGeometry);                         }                              resultPolygon.ConstructUnion(geometriesToUnion as IEnumGeometry);                              // Save resultPolygon to a database                     }


title: Install PyQGIS in virtualenv

text: Is it possible to install PyQGIS in virtual environment? I want to use rendering capabilities in my own application which runs using virtualenv.


title: How do I use the new USGS topo WM(T)S in QGIS?

text: The WMS link for "Scanned Topo Maps from USA Topo" in http://viewer.nationalmap.gov/example/services/serviceList.html no longer works (HTTP 400). http://services.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer has several links at the top, including WMTS, which QGIS 2.2 supports. But when I connect to this server, it switches me to the 'tilesets' tab, where I can't seem to do anything (hovering over either of the two results gives "encoding image/jpg not supported", which is bunk since I can definitely use other WMS layers as JPG).


title: Extrude polygons with holes in GRASS using v.extrude

text: I have a shapefile with building footprint polygons. Many of the polygons have holes/inner rings within them (I'm not sure of the correct term in Grass). These import correctly into Grass GIS. I aim to drape the polygons over a DEM, extrude and export them and the DEM for use in a realtime 3D visualisation. The following workflow is functional, except where `v.extrude` messes up the geometry:   * import vector (allowing cleaning) and raster data   * set `g.region` to the polygon layer   * drape the polygons on the DEM using `v.drape`   * extrude them using `v.extrude`   * output the layer using `v.out.vtk` My problem is that the extrusion process ignores the holes in the polygons and creates geometry for the outer ring only. This happens whether or not `v.drape` is used beforehand. I've tried the following (unsuccessful) ideas already:   * generating centroids for the 'holes' first (this just creates a new polygon 'separate' from the outer ring).   * using `v.clean` with the `chbridge` option, hoping that might add a bridge from outer to inner ring. Another idea might be to break all the polygons down to triangles first, but I hate to think how complex the 3D geometry would be afterwards! Likewise, manually adding bridging lines to the polygons is not practical given the size of the dataset. Am I missing something? I'm happy to use Grass and QGIS. Many thanks


title: Looking for Ocean Dataset

text: This may seem like a very simple request, but does anyone have or know where I can get a shapefile of the ocean around the US? The only thing I can find within my ArcGIS BA is the ocean background, which doesn't do me much good when I'm trying to cover up heat map data. If this is not possible can someone tell me how to convert a raster (heat map) to a shapefile? Thanks, Erin