title: Error when using proj4 in visual C++ (cannot compile project using proj4 lib)

text: I am using Proj4 version 4.8.0, after compiled by vc i had proj.dll and proj.lib But when i used proj.lib in my project vc++, i cannot compile that project. Here is my code :               #include <iostream>     #include "proj_api.h";     using namespace std;          int main()     {         double x = 138494.92605;         double y = 467792.640021;              char *srid28992 = "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +towgs84=565.04,49.91,465.84,-1.9848,1.7439,-9.0587,4.0772 +units=m +no_defs";         char *srid4326 = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs";              projPJ source = pj_init_plus(srid28992);         projPJ target = pj_init_plus(srid4326);              if(source==NULL || target==NULL)             return false;              //  x *= DEG_TO_RAD;         //  y *= DEG_TO_RAD;              int success = pj_transform(source, target, 1, 1, &x, &y, NULL );              x *= RAD_TO_DEG;         y *= RAD_TO_DEG;              cout << success << endl << x << endl << y << endl;     }      Here is message of visual studio : > 1>------ Build started: Project: Proj4ApiExam, Configuration: Debug Win32 > ------ 1>Source.obj : error LNK2019: unresolved external symbol > _pj_transform referenced in function _main 1>Source.obj : error LNK2019: > unresolved external symbol _pj_init_plus referenced in function _main


title: qGIS' Database Manager "Load as New Layer" Option Not Working

text: I'm trying to visualize some of my database queries on qGIS. I run a valid SQL query which returns a subset of my table that should be easily loaded as a layer. I then check "Load as new layer," selected the right id and geom columns and typed in a new layer name. Then, I clicked "Load Now!." qGIS does some thinking and things pause for a second, but no new layer is created. No error messages are thrown. Thanks in advance. EDIT: It turns out that add a new layer is throwing an error :$. Let me provide some more detail. I'm trying to do a pgrouting query and display the results. My database table is qc28l. When I run this query:                     SELECT * FROM qc28l        JOIN (SELECT seq, id1 AS node, id2 AS edge_id, cost FROM pgr_dijkstra('             SELECT gid AS id, source::integer, target::integer, miles::double precision AS cost FROM qc28l',                     747, 311, false, false)        )      AS route ON qc28l.gid = route.edge_id;      I get a valid-looking table and there are no errors. When I click the Add layer option, this query is embedded in more SQL syntax (and, you'll have to forgive me, I'm a bit of an SQL newb though I do know more traditional programming languages). The error that trying to add a new layer gives is:               Unable to execute the query.     The error message from the database was:     ERROR:  syntax error at or near ";"     LINE 6: AS route ON qc28l.gid = route.edge_id;                                                  ^     .     SQL: SELECT * FROM (SELECT * FROM qc28l        JOIN (SELECT seq, id1 AS node, id2 AS edge_id, cost FROM pgr_dijkstra('             SELECT gid AS id, source::integer, target::integer, miles::double precision AS cost FROM qc28l',                     747, 311, false, false)        )      AS route ON qc28l.gid = route.edge_id;     ) AS "subQuery_0" LIMIT 1      Thanks in advance.


title: Setting section of ModelBuilder model as optional but also as precondition to later steps?

text: I have a model that runs a series of reclass calculations on a Feature Layer I want to run several "summary statistics" tools in different locations to allow testing/ viewing of the results of the sequential relcass operations. The "summary statistics" must be run as a precondition to the next reclass operation, because each time a new reclass is conducted, the data changes. So the point in time at which the summary statistics runs is important. my issue is - i would ideally like to be able to control these summary statistics tool runs to be optional - via a single Boolean tick box. This would allow an option to run the model without all these separate summary statistics - in order to reduce model run time. my question is - is there any way to make all the summary statistics calculations optional, e.g. via a Boolean tickbox? but still when run for the summary stats to run in the correct locations, e.g. like a precondition. The main issues are:   * if the model is set with a precondition, but the Boolean tickbox is turned off then the main model will not run   * i know i could run a copy feature from each stage of the model and save to disk, or in memory and then have the summary stats run on those copies, however this would not result in any time saving   * i cant use a set of make feature layers and use them as the source for the summary stats because the underlying feature layer data changes during the model run   * i have looked into if then else commands and branching, but i cant see how to use this, without having to make lots of copies of the data at each split when two branches are created Any thoughts / tips would be appreciated! ![a section of the model - this is repeated many times](http://i.stack.imgur.com/EgF4F.png)


title: How to refresh a IDockableWindow with a DGV

text: I am having a IDockableWindow which will display a row of data which is a DATATABLE on DGV. below is my code. **Page1.cs:**                private void toolStripMenuItem_Open_detail_page_Click(object sender, EventArgs e)         {             UID dockWinID = new UIDClass();             dockWinID.Value = ThisAddIn.IDs.DetailsPage;                  IDockableWindow dockWindow = ArcMap.DockableWindowManager.GetDockableWindow(dockWinID);             dockWindow.Show(true);                       DNRToolBar.WaterRightsDetailsPage WRDetailsPage = new DetailsPage(this.Hook);             WRDetailsPage.WRDetailsPageLOAD(3);//passing in an integer directly for test.         }      **Page2.cs:** \- this is the default page which the arcGIS template creates once you choose to create a dock able window and below is my method in it                 public void WRDetailsPageLOAD(int ID)         {             WaterRightsInfoDBAccess dbAccess = new WaterRightsInfoDBAccess();             DGV_WaterRightsDetailsPage.DataSource = dbAccess.WRDetailsPageData(ID);         }      Once the Dockable window is shown with the DataTable when I try to call the click event again it does execute the WRDetailsPageLOAD(int ID) but the DGV in the dockwindow does not refresh. http://forums.esri.com/Thread.asp?c=93&f=993&t=110408 this is exactly the same issue but I dint find it helpful Thank you in advance


title: GRASS has broken my terminal

text: I'm using GRASS on OS X. After installing GRASS I can no longer open my terminal to a prompt. On opening the terminal, the following line runs by itselt               '/Applications/GRASS-6.4.app/Contents/MacOS/grass.sh'; exit      And GRASS starts but itself. I can't find how to stop terminal from doing this. I just want my shell prompt back.


title: Display two layers with OpenLayers at once

text: How can i display two layers with diferent projections at once? For example i have layer with EPSG:70076 and OSM layer.


Can I create a legend of a map that I had get from a WMS? Can I create a legend of a raster map with Qgis version 1.7.4, or only with the 1.8 version?


title: Writing a plugin for Qgis using python to access PostGIS and write geometries

text: Sorry about the strange title didn't really know how to word it. I currently use MapInfo to do most of my GIS work however I have recently installed PostGIS 1.5 and am really liking it so far. A project that I am going to start working on in the future sometime will involve creating an application for managing stormwater assets, all my previous mapping projects have just been using a MapInfo window embedded in a C# application. Now that I have some data in a PostGIS server it has opened a lot of possibilities. I tried writing some small sample applications using NHibernate and NHibernate.Spatial in C# but to say it's frustrating is a understatement (sometimes static typed code gives me the shits). So I was wondering if anyone had any experience writing a Qgis plugin using python to access PostGIS and if you think it would be a viable route to take, and if so anyone had any good places to read about doing such things.


title: Show pop-up where user clicked in OpenLayers

text: How to change this example ( http://openlayers.org/dev/examples/select- feature-openpopup.html ) so that when the user clicks on a line (feature) pop- up display where the user clicked? A few days trying to do it, does not work. My code (alert doesnt show when i clicked on feature (line)):                     Help me. Thanks!


title: Retrieve data from table for spatial queries in PostGIS

text: We just want to write some spatial queries for our PostGIS tables, but we can only write queries with geometry columni like (POINT(36 43). Assume that we have two columns like geom and name, we want write our queries with the point name.               select st_astext(geom) from table     where ST_DWithin (geom, 'POINT (36 43)', 100);      Any ideas about writing these kind of queries without using geometry?


title: Arcmap: attach python script to a button?

text: In ArcMap 9.x how can I attach a python script to a button?


title: Is it ok to replace "#" in address with "Suite" for millions of addresses of businesses?

text: I have a big list of addresses of businesses that I am trying to "normalize". What keeps happening is that, every now and then I verify the address of the place by going to their website and all too often, what is within my database as **"100 Forest Park Drive # 100"** is really **"100 Forest Park Drive Suite 100"** I have not yet come across any entry where I have it written as **Suite** which is in reality **#** I am not an expert, but it seems to me, that the # sign is interchangeable with "Suite". Maybe the experts can chime in, and help me. In your experience, are there are any places where I better leave the # sign intact, instead of running a sql replace function to # to Suite. Some research I have conducted in google suggests to me, that even USPS suggest that I only use # in absense of an Apartment, or Suite. And it just seems to be that Suite is more likely in a business environment, since if a business leases a space within a building, it would be more likely called a "Suite". As an evidence, when I used to live in an apartment, if I used Suite instead of **123 SW apartment drive suite 20** the mail was delivered correctly to me 100% of the time. As an added bonus, Suite looks much cleaner. * * * **EDITS** I should have added that I already have all of these addresses geocoded, and the use case is not to be used as a mailer of any form. Simply as search. And I did not intent to purely use find a replace. Running regular expressions on my address strings is how I discovered the issue in the first place when I started to discover many variations. Take for example: **5619 DTC Parkway, Greenwood Village, CO** I have three businesses on this address in my database and the format that they use.   1. Podoll & Podoll (Suite 400)   2. EPS Settlements Group (Suite 600)   3. Frank Patternson and Associates. (# 1100) The data in the parenthesis is a exact copy of the information on their website and my database. (Suite & #)


title: display openlayers lat/long map bound on page

text: I want to display the bounds of my current extent on the page. I am not too great with javascript. I know it must be related to this: map.getLonLatFromPixel(new OpenLayers.Pixel(bounds.left, bounds.bottom)) Can't seem to get it. Any help would be great! Thanks.


title: Using of esriFieldTypeDate field in Add Features REST service?

text: I need to use Add Features REST service to add a new record to a table in an ArcSDE geodatabase. One of the field is type of esriFieldTypeDate, but I don't know how to populate this field in JSON script. An example is as follows:               [         {           "attributes" : {             "LOCATION_ID" : 30,             "LOCATION_NAME" : "SDAF",             "LOCATION_STATUS" : "IN USE",             "GEOMETRY_ID" : 30,             "CREATE_DATE" : "2008/06/16 00:00:00 AM"           }         }     ]      Column "CREATE_DATE" is of esriFieldTypeDate type. But the above JSON ended up with an error.


title: openlayers wms loaderror event get response text of

text: 1.How do I get the http response text & error code from OpenLayers 2.12 WMS loaderror event ? 2.The WMS request returns returns http error code 500 with some response text, however, as per image below, I can't get those details. 3.Workaround: I send a HEAD request in the 'loaderror' handler                                   intramapsConfig = {                             name : "MapImage WMS",                             options : { "ratio": 1, "singleTile": true,                                         "removeBackBufferDelay": 500 ,                                         "transitionEffect" : "resize",                                         "tileOptions": {                                         "eventListeners": {                                                 'loaderror': function(evt) {                                                     console.log('loaderror');                                                     debugger;                                                     $.ajax({                                                         type: "HEAD",                                                         async: false,                                                         url: evt.object.url,                                                         success: function(message,text,response){                                                             debugger;                                                         },                                                         error: function(error) {                                                             debugger;                                                         }                                                     });                                                      }                                             }                                     }                             }      4.The image below is the event object sent by onImageError function. ![enter image description here](http://i.stack.imgur.com/vFkLR.png)


title: ArcGIS Server 10 Javascript API Offline

text: Is there anyway to have all the required files of JS API ? because i have a local application and the user wont be able to have the resources from serverapi.arcgisonline.com


title: How to load a postgres view using pyQgis?

text: Under Qgis 1.8 on Windows 7 I have this problem with my pyArchInit plugin: I need to load on the map canvas my geometries from a postgis layer. Till the 1.7.4 version I use the method explained on the tutorial. But I have to load also some potgres view, and Qgis 1.8 need to know the column that I would like to use as ID. How can I pass this value with pyQgis and restore my plugin? Thanks a lot for any help!               uri = QgsDataSourceURI()     # set host name, port, database name, username and password     uri.setConnection("localhost", "5432", "dbname", "johny", "xxx")     # set database schema, table name, geometry column and optionaly subset (WHERE clause)     uri.setDataSource("public", "roads", "the_geom", "cityid = 2643")          vlayer = QgsVectorLayer(uri.uri(), "layer_name_you_like", "postgres")


title: QGIS 1.8 Vector layer from ODBC connection

text: I have successfully set up an ODBC link from a FileMaker DB to QGIS, and using Layer/Add Vector Layer I can get a layer with a fully populated attribute table listed in the Layers Panel. I now want to plot datapoints from the new layer but cannot work out how to tell QGIS that the new layer has georeferenced information and which fields contain the LAT/LONG data. I guess that I am expecting to find a window similar to that which appears when you create a layer from a Tab Delimited file, where you define which fields contain the LAT/LONG data. Can anyone help me out? Thanks


title: Adding MS Access Table as X,Y Points using QGIS?

text: Can you add an MS Access table as X,Y points in the same way you can Add X,Y data in ArcMap using: File --> Add Data --> Add X,Y Data Thanks, Mike


title: How to rename multiple rasters with modelbuilder

text: I have 101 raster images stacked inside a folder. The Rasters are of arcinfo grid type (*.asc) while having a long string name 'NW2D_T100_05_base_depthXXX.asc' where XXX ranges from 000 to 100. What I would like to do is to add each of them with a single DTM. I tried to use ArcGIS 10.1 model builder by inserting raster iterators and raster calculator tool and the model looks as follows: ![enter image description here](http://i.stack.imgur.com/6GeNn.jpg) When I ran the model, the following error message was displayed: ![enter image description here](http://i.stack.imgur.com/OR3wU.jpg) It looks like that I have a very long string name for each raster data. How can I rename the raster with the 8 digits of the name (i.e., depthXXX.asc) for each file ? And how can I save 101 new rasters in anew directory.


title: Routing in MS SQL 2012

text: I would like to perform routing in MS SQL 2012 similar to pgRouting. In pgRouting, I'd do the following steps to create a routable network:   1. Create a database routing with template `template_routing`   2. Create table `road_network` with following constraints              CHECK (st_ndims(the_geom) = 2)     CHECK (geometrytype(the_geom) = 'MULTILINESTRING'::text OR the_geom IS NULL)     CHECK (st_srid(the_geom) = 4030)          Then     -- @ CREATE INDEX FOR THE ROAD TABLE -------------------- IMPORTANT          CREATE INDEX spatialindex_road         ON road_network         USING gist         (the_geom);        3. Perform the following queries:              ALTER TABLE road_network ADD COLUMN "source" integer;     ALTER TABLE road_network ADD COLUMN "target" integer;          SELECT assign_vertex_id('road_network', 0.00001, 'the_geom', 'gid');          CREATE INDEX source_idx ON road_network("source");     CREATE INDEX target_idx ON road_network("target");          ALTER TABLE road_network  ADD COLUMN length double precision;     UPDATE road_network  SET length = length(the_geom);               ALTER TABLE road_network  ADD COLUMN reverse_cost double precision;     UPDATE road_network  SET reverse_cost = length;          ALTER TABLE road_network  ADD COLUMN x1 double precision;     ALTER TABLE road_network  ADD COLUMN y1 double precision;     ALTER TABLE road_network  ADD COLUMN x2 double precision;     ALTER TABLE road_network  ADD COLUMN y2 double precision;          UPDATE road_network  SET x1 = x(ST_PointN(the_geom, 1));     UPDATE road_network  SET y1 = y(ST_PointN(the_geom, 1));     UPDATE road_network  SET x2 = x(ST_PointN(the_geom, ST_NumPoints(the_geom)));     UPDATE road_network  SET y2 = y(ST_PointN(the_geom, ST_NumPoints(the_geom)));     alter table road_network add column cost double precision default 0;     update road_network set cost=0.1 where type='NH';     update road_network set cost=0.2 where type='SH';     update road_network set cost=0.3 where type='major';     update road_network set cost=0.4 where type='minor';     update road_network set cost=1.2 where type='colony';     update road_network set cost=0.8 where type='third';        4. Now the network table is created. To check, run this query on your postgreSQL.... assign table name name and create a table              CREATE TABLE shortest_path_astar_table_3(gid int4) with oids;     SELECT AddGeometryColumn( 'shortest_path_astar_table_3', 'the_geom', 4030, 'MULTILINESTRING', 2 );     INSERT INTO shortest_path_astar_table_3(the_geom)      SELECT the_geom FROM astar_sp_directed('road_network',37,43,true,true);      Open `shortest_path_astar_table_3` on QGIS and check the path. Is there any similar way to perform similar queries in SQL Server 2012?


title: Scale raster in ArcGIS using raster calculator

text: I have a raster with values ranging from 0 to 8991130624. This raster is actually the result of a cost distance analysis. I want to scale the raster to range from 0 to 1 and take the inverse? so that a cell with the highest cost/value (e.g. 8991130624) will now have a value of 0 while a cell with the lowest cost/value (e.g. 0) will now have a value of 1. I am using raster calculator with the following expression: 1-(x/8991130624) where I add x to the expression by clicking on the raster from the list of available rasters when using the tool This is not working and producing an error: "ERROR 000539: Error running expression; rcexec() :ERROR 999998:Unexpected Error." Can someone tell me what I'm doing wrong?


title: How to start WFS with layers that are stored in a particular workspace?

text: I would like to start WFS with layers that are stored in particular workspace. Now my WFS address (ex. domain.com/geoserver/wfs) gives access to layers saveed in all workspaces. Wher to change it?


title: Sending coordinates of features of any polygon featureclass to a table

text: I am trying to store x-coordinates and y-coordinates of a polygon feature in a table. But, i am getting an error message: Item not found in this collection. The code is like this:               Do      pFeature = pFeatureCursor.NextFeature        If Not (pFeature Is Nothing) Then          pPointCollection = pFeature.Shape          For lPnt = 0 To (pPointCollection.PointCount - 1)            ppolyrow = ptable.CreateRow()            ppolyrow.Value(coorxind) = pPointCollection.Point(lPnt).X()            ppolyrow.Value(cooryind) = pPointCollection.Point(lPnt).Y()            ppolyrow.Store()        The error comes in this following line of code:               ppolyrow.Value(coorxind) = pPointCollection.Point(lPnt).X()        Any help....


title: Hiding dynamically added toolbar will crash ArcGIS desktop 10.1 on XP

text: I have weird bug If you create dynamically a toolbar on ArcGIS Desktop extension, and then try to hide it . It will crash Desktop 10.1 on Windows XP. But work find on Windows 7. So, for example this simple code for Desktop extension. on the Startup event write this simple code               public void Startup(ref object initializationData)         {             m_application = initializationData as IApplication;                  if (m_application == null)                 return;                  var commandBars = m_application.Document.CommandBars;             var myToolbar = commandBars.Create("My First toolbar", esriCmdBarType.esriCmdBarTypeToolbar);                  //Find my own personal command             var uid = new UIDClass();             uid.Value = "{057234a3-d67b-4b84-9781-4e2d028d51c9}"; // or any registered command in desktop             // you can replace it with any built-in desktop command             var command = commandBars.Find(uid, false, false);             object outme = null;             myToolbar.Add(uid, ref outme);                       var standardUid = new UIDClass(); //find the standard toolbar to dock it to it             standardUid.Value = "esriArcMapUI.StandardToolBar";             var stndToolbar =     commandBars.Find(standardUid, false, false) as ICommandBar;             myToolbar.Dock(esriDockFlags.esriDockRight, stndToolbar);         }      You can put that code anywhere you want, and not necesserly an extension startup. Now. if you try to hide the toolbar, with right-mouse click on the toolbar area, and uncheck the toolbar. The desktop will crash on XP.


title: Can I install two versions of QGIS on the same computer?

text: I thought a few weeks ago someone asked a question about running multiple versions of qgis on the same computer. But I can't find it back.


title: Why won't Tabulate Intersection work?

text: I can't seem to find much in forums about this - I'm trying to use Tabulate Intersection with two shapefiles. When run in a model, I get a generic error (Error 999999:Error executing function). When run in a Python script, I get the following:                   Traceback (most recent call last):   File         "H:/Scripts/IntersectTable_test.py", line 18, in <module>         arcpy.TabulateIntersection_analysis (in_zone_features, {'distance'}, in_class_features, out_table, {'INFO'}, '','','')   File         "C:\Program Files\ArcGIS\Desktop10.1\arcpy\arcpy\analysis.py", line          1122, in TabulateIntersection          raise e RuntimeError: Object: Error in executing tool      ....this makes it difficult to diagnose problem. Anyone with experience/know what I'm missing? I'm working in Arc10.1 and have all license access. I've edited this post to include the code I'm using to test this before adding it to a larger, more complex script:                   import os         import arcpy         import sys         from arcpy import env         import csv              ##Set overwrite         arcpy.env.overwriteOutput = True              ##Set variables         in_zone_features = r'C:\BOEM\QuartRings\Scratch\quartrings_points_proj_multrings.shp'         zone_fields = 'distance'         in_class_features = r'C:\BOEM\Basic_NE_Fisheries.gdb\ALL_WEA_Simplified_3_2013'         out_table = r'C:BOEM\QuartRings\Scratch\buff_intersect_table'              arcpy.TabulateIntersection_analysis (in_zone_features, {'distance'}, in_class_features, out_table, {'INFO'}, '','','')


title: Extension for COGO for ArcGIS 10.2

text: I can't seem to find an answer with regards to obtaining COGO for ArcGIS Basic 10.2. Does COGO fall under any of the extensions currently offered by ESRI or does it only fall under the higher level licenses.


title: Application Extension vs. Add-in Application Extension

text: Background: I am tasked with rewriting a 9.3 ArcMap solution based upon a VB6 implementation using an application extension and several forms. The interface to ArcMap is that this solution needs to find a running instance of ArcMap with a specific map in it and then selects features in a layer in that map. This will be redone for ArcMap 10.2 using C# and VS2012. I am new to ArGIS stuff and in someways new to .NET/COM development. Yes, I know I am in deep. :) My Question: I have read the documentation till my head is spinning - such a mixture of versions and FWs between both ESRI and MS. I cannot decide upon the proper approach. I feel that I should use a COM based application extension as the heart of the re-write, but I have also seen mentioned an Add-in application extension. What I don't know is, can I use an Add-in application extension instead of a full blown COM based one? Do they have the same abilities, or as in Add-in application extension more limited than a COM one? I have seen information that points to add-ins not being as capable as COM based solutions but this seems to be lessening with each release. To be honest, I don't even know if an Add-in application extension is the same kind of thing as a "traditional" application extension - and I can't find that out from the docks, which frankly, suck. Additionally, if I AM able to go with an Add-in application extension, how capable are the dockable forms that apparently are part of Add-in land? In the VB6 Forms that I am replacing, database work using ADO to Oracle is being done. Would I still be able to do that with these dockable windows?


title: Where can I find cellmast data in the UK?

text: I am looking for a shapefile containing the locations of cell masts that provide phone coverage in the UK. On sites like Orange, O2 etc they have an interactive signal checker (https://explore.ee.co.uk/coverage-checker for example), but I haven't found a way to obtain the data in GIS form. Have rung several phone companies, but the customer services down there don't seem to understand what I am asking for! Any help would be greatly appreciated, thanks.


title: problems with py2exe, shapely and fiona

text: I have a short python script, called `test`:               import fiona     with fiona.open("C:\\Essai_compil", 'r') as l_Obs_shp:          for shp in l_Obs_shp:             print shp['geometry']      I want to compile with `py2exe`or `PyInstaller`. OS: Windows7, Python 2.7 (32-bits), I've got erros. With `py2exe`, the 'log.txt' said :               Traceback (most recent call last):     File "test.py", line 1, in <module>     File "fiona\__init__.pyc", line 78, in <module>     File "fiona\collection.pyc", line 7, in <module>     File "fiona\ogrext.pyc", line 12, in <module>     File "fiona\ogrext.pyc", line 10, in __load     ImportError: DLL load failed: %1 n’est pas une application Win32 valide.     ImportError: DLL load failed: %1 is not a valid Win32 application.      With `PyInstaller`, log says:               File "ogrext.pyx", line 12 in init fiona.ogrext (src/fiona/ogrext.c:19107)     ImportError: cannot import name ogrinit      Problem are related to `fiona` module or some `ogr` stuff... I supposed this is not a 32/64 bits problem; all the modules I've used are 32-bits. More surely a DLL problem... Any ideas ?


title: QGIS can't find osgeo after GDAL upgrade

text: Mac OS 10.6.8: I installed QGIS 1.8.0 with GDAL 1.8; then another app requires GDAL 1.9 and installed it; now QGIS can't find osgeo [python-gdal]. (I can't find any trace of GDAL 1.8 left in my system.) What needs to be edited to point QGIS to GDAL 1.9?


title: Conditional formatting for Advanced Label Expression in ArcMap

text: I am trying to do some conditional formatting in order to highlight specific criteria. The main error I keep getting is that there are no features found. I've done a simple label with the exact same parameters that works fine. I've also occasionally gotten an error that says the function FindLabel is not defined. Thinking now, I might need a nested if statement. I have 4 parameters, [Percentage_Complete], that if they exceed the criteria of 90, then I want to change the color to green. If it doesn't it will stay black. So 1 to 4 of them could be green, or they are all black text. ![Basic Label Expression](http://i.stack.imgur.com/uIP2x.jpg)               def FindLabel ([SWSID], [Stn_Name], [First_Date_In_DB], [Last_Date_In_DB], [Percentage_Complete], [First_Date_In_DB1], [Last_Date_In_DB_1], [Percentage_Complete1], [First_Date_In_DB2], [Last_Date_In_DB_2], [Percentage_Complete2], [First_Date_In_DB3], [Last_Date_In_DB_3], [Percentage_Complete3]):          lab1 = "T_avg" + "  " + [First_Date_In_DB]+ "  " + [Last_Date_In_DB] + "  " + [Percentage_Complete]+"\n"     lab2 = "Snowfall"+ "  " + [First_Date_In_DB1]+ "  " + [Last_Date_In_DB1] + "  " + [Percentage_Complete1]+"\n"     lab3 = "Snow Depth"+ "  " + [First_Date_In_DB2]+ "  " + [Last_Date_In_DB2] + "  " + [Percentage_Complete2]+"\n"     lab4 = "Rain"+ "  " + [First_Date_In_DB3]+ "  " + [Last_Date_In_DB3] + "  " + [Percentage_Complete3]"\n"     higlight =  "<bol><clr green='255'>"     endhigh = "</bol></clr><\n>"               if int([Percentage_Complete]) >= 90:     lab1 =  highlight + lab1 + endhigh     if int([Percentage_Complete1]) >= 90:     lab2 =  highlight + lab2 + endhigh     if int([Percentage_Complete2]) >= 90:     lab3 =  highlight + lab3 + endhigh     if int([Percentage_Complete3]) >= 90:     lab4 =  highlight + lab4 + endhigh          label = "<und><bol>"+[SWSID]+"</bol></und>"+ "    "+ "<und><bol>"+[Stn_Name]+"</bol></und>\n" + lab1 + lab2 + lab3 + lab4      return label


title: How do I reproject one raster to match another's in GRASS

text: I have two raster layers, A and B, which have information about the same location but have different projections and datums. How can I reproject layer A to match the projection and datum of layer B? Trying to use `r.proj` yields:               ERROR: Input raster map is outside current region      When I use `g.region` to set the region to layer B, I get the same error. When I use `g.region` to set the region to layer A, then the input and output projections are the same. Layer A has a projection of:               Projection: Lambert Conformal Conic                                      N: 5786515.18365295    S: 5349685.18365295   Res:    30              E: -13519426.48582491    W: -13806586.48582491   Res:    30       Layer B has a projection of               Projection: Lambert Conformal Conic                                      N:    5087310    S:    4800360   Res:    30                          E:     606210    W:     440460   Res:    30       The `Lambert Conformal Conic` is because this is the projection I selected for the Location. Presumably the specific values of the LCC occurred when the raster layers were imported.


title: QGIS point sampling tool really slow for polygons?

text: I have a large field of randomly distributed points (100,000 of them to be precise), and I'd like to get values for a variety of raster and polygon coverages for each point. I've been using the QGIS Point Sampling Tool, and it seems to work very nicely for rasters (runs in under a minute) but to take literally hours for many of my polygon coverages. Can someone explain to me why this is taking so long? Is there a more efficient open source tool to do this?


title: How to create a small globe locator map in QGIS?

text: I've tried searching on gis.stackexchange and elsewhere but can't seem to figure this one out though it seems simple enough. The type of locator I'm thinking of is similar to the one from the map in this post: Unattractive image artefact when exporting from QGIS's Print Composer Does anyone know of a tutorial out there? much thanks, -Chris


title: Text in POSTGIS Raster

text: Is it possible to add text/annotation to a raster generated in Postgis raster? Specifically I need to do this within the database if possible and am looking for an option that does not require an export to the file system.


title: geoserver returns incorrect number of points when cql used

text: I'm using Geoserver 2.2.4 to support WMS queries. All testing is done via the "Layer Preview" page. If I send a request with no CQL a map full of points is returned as expected. If I add a CQL filter the map that is returned has the wrong number of points. That is, I get about 50 points on the map when the underlying SQL query (pulled from the log and executed separately) returns over 1200 points. In both cases the same style is used. The only difference is the use of a CQL filter. How can I get all 1200 points displayed on the map?


title: Unable to connect Postgis from QGIS 1.8.0

text: I have installed PostgreSQL and PostGIS on my laptop (Win 7 64 bit OS). I am running QGIS 1.8.0 on my machine . When I am trying to connect Postgis I am getting connection failed error then I tried following things : Details: Port :5433 User name : postgres Password :postgres   1. I checked the pg_hba.conf file (All default settings)   2. Restart the PostgreSQL service and tried    3. I have reinstalled PostsreSQL and getting same error.   4. Tried using empty fields while connecting still getting an error. (Not sure what to put in service field..tried using postgres and postgresql)   5. My firewall is disabled.   6. The database PostgreSQL (version 9.2) is installed on my local machine also postgis (version 2.0.3-2) installed on my machine and both are for 64 bit setups. 7.Should I try lower version of Postgresql with qGIS ?? ![Screenshot 1](http://i.stack.imgur.com/78sar.png) ![screenshot 2](http://i.stack.imgur.com/HVB24.png) Researching on Google also and found similar bugs related to connection issue(not sure) Any help regarding this will be great.. thanks in advance : )


title: QGIS Points in Polygon Crashes

text: I have a layer of points that are spread out in different areas. I created a polygon layer for each area, and tried to count the number of points in each polygon using Vector > Analysis Tools > Points in Polygon. QGIS 2.0.1 is crashing every time. I have already checked and both layers are using the same CRS (WGS 84). Is this a bug, or am I doing something wrong? ![enter image description here](http://i.stack.imgur.com/JNI9V.png)


title: Extracting polygons along a border

text: I have a shapefile of United States counties. Suppose I am interested in all counties in Georgia that border North Carolina and all counties in North Carolina that border Georgia. And, in particular, I'm interested in knowing which Georgia counties border which North Carolina counties. For example, suppose Rabun County, Georgia is along this border. I want to know which is the county that borders Rabun in North Carolina. My ultimate goal is as follows: I believe that Rabun, Georgia borders both Clay, North Carolina and Macon, North Carolina. I would like to then create two files. One would be the line segment of the border segment between Rabun and Clay. The other would be the line segment of the border between Rabun and Macon. I know line segments can be isolated between two bordering geographic units by using intersect. For example, if I were to intersect Rabun and Clay as two separate files, I would isolate the line segment that is their shared border. I would like to repeat this procedure for every other pair of counties along the Georgia and North Carolina (in addition to other borders, which is why I would like to streamline the process). Are there hints for streamlining this process? I know how to do it by brute force, but I realize it can take awhile or be inaccurate. I was just wondering if there is a more efficient way to do this. I juse ArcMap and ArcGIS 10.1. Thank you!


title: How to populate data from postgresql using dynamic php\html listing

text:
In the form I created, I need two fields to be dynamically populated from the database while the other fields will be manually entered and push to the database. I have written a script that is able to accept information from the users through a HTMl form and load it on the postgreSQL table via the php script. I created the form with a dropdown listing and able to pull the data from the postgresql but unfortunately the listing does not fall into the dropdown list, it is showing somewhere else on the form not within the dropdown. I have two separate scripts, one is the html script with the php script used to created the form fields with along with the dropdown listing. The second is just a php script that connects to the database and load information from the form onto the database table when the data is entered and the submit tab is clicked Please I need to get my php script to dynamically populate my html form by drawing data from the postgresql database.I have made some minor corrections on this script and its still not able to populate the dropdown! can somebody out there help out. thanks
         <form action="dropdown.php" method="post">

Input Field Tally Information
         Select Pipe No:<select name="Pipeno">          Select Wall Thickness: <select name="WallThickness">

         Input Joint No:<input type="text" name="jointno">          Input measured Length: <input type="text" name="measuredlength">

         Input Serial No:<input type="text" name="serialno">

          <input type="Submit" name="submit" value="Submit">            </form>         <?php         $PGHOST = "localhost:25376";         $PGDATABASE = "Pipeline";         $PGUSER = "postgres";         $PGPASSWORD = "Casa2009";         $PGPORT = 5432;         $db_handle = pg_connect("dbname=$PGDATABASE user=$PGUSER         password=$PGPASSWORD");         if ($db_handle) {         echo 'Connection attempt succeeded.';         } else {         echo 'Connection attempt failed.';         }             echo "
\n";        $query = 'SELECT * from "fieldtally" ';         $result = pg_query($db_handle,$query);         while ($row = pg_fetch_row($result))        {        print ("<option> $row[0]</option>,<option> $row[1]</option> ");        }        ?>        </select>                                                     <?php         $PGHOST = "localhost:25376";         $PGDATABASE = "Pipeline";         $PGUSER = "postgres";         $PGPASSWORD = "Casa2009";         $PGPORT = 5432;         $db_handle = pg_connect("dbname=$PGDATABASE user=$PGUSER         password=$PGPASSWORD");         if ($db_handle) {         echo 'Connection attempt succeeded.';         } else {         echo 'Connection attempt failed.';         }         $jointno = pg_escape_string($_POST['jointno']);         $measuredlength = pg_escape_string($_POST['measuredlength']);         $serialno = pg_escape_string($_POST['serialno']);          $query = "INSERT INTO fieldtally(jointno,measuredlength,serialno)VALUES            ('$jointno','$measuredlength','$serialno')";         $result = pg_query($query);         if (!$result) {         $errormessage = pg_last_error();         echo "Error with query: " . $errormessage;         exit();         }         printf ("These values were inserted into the database - %s %s             %s",$jointno,$measuredlength,$serialno);         pg_close();        ?>


title: Where is connection file used to connect ArcMap to ArcSDE?

text: In ArcMap 10.0, how do I find where the connection file is that is being used to connect to ArcSDE 10 on Sql Server 2008? Some non administrative users are hooking up to SDE as the user 'sde' with db auth. The users are passed around a few mxds and I am trying to find the connection file to delete it. If the connection file is embedded in the mxd I suppose I could use python to comb the network and individual c drives finding all the mxd that connect up with db auth and sde user. Is there a way to block this at the db level or some other? Thanks.


title: How to split points by polygon?

text: I am looking for a way to split points by a county polygon feature class. The attached image shows two feature classes: one composed of points and the other a county polygon feature class. The split tool would be ideal if it allowed points. I would prefer a clean output without additional fields added to the point attributes. Additionally, I would like to have the county name from the polygon feature class defining the new point feature classes (e.g. Kiowa, Clark, Comanche). I appreciate any solutions and advice. Edit: For this example, the final product should be three point feature classes named "Kiowa", "Clark" and "Comanche" produced from one, larger point feature class. An automated solution would be ideal, as I have many, many merged point FCs over dozens of counties to work with (approximately spanning the state of KS). ![enter image description here](http://i.stack.imgur.com/Haduh.jpg)


title: Are there any shapefile-based GPS data recorders?

text: I am looking for a data recorder that can be programmed to send a serial data request to a field computer and then accept and record an incoming data string and tie it to GPS location and then save the data as a shapefile at the end of the logging period. Any recommendations or places I can start looking? * * * I tried to keep my original post relitivley general to reduce confusion. The field computer I refered to in my original post is a spray control console that controls spray application in agricultural fields. it has a speed sensor, flow meter, control valve, and gps receiver attached to it. its purpose is to maintain a given application rate regardless of changes in speed. The console has in the past had an onboard CFcard reader/data recorder that initiated a shapefile on power up of the console and closed the file on power down of the console. on the next power up a new shapefile. The CF card readers are no longer being produced so the consoles are now being produced with out them, thus creating the need to come up with an alternative. The console has a serial comunications connector on it that will output a string of data. the current onboard recorder did this at programamble intervals, internally and also collected the location information from the connected gps receiver and ultimately created a shapefile consisting of a SHP, DBF, SHX files. As this is what we are accustomed to working with, and my customers are fairly tech handicapped, it seemed easiest to keep things as similar as possible. Once the files have been produced they open the files with a GIS software package to view the application data, usually in a color coded map format, but also open the DBF file up directly to view the database lines directly.   So what ideally I need is a recorder with 2 serial connectors. one to receive the console data string and one to accept the GPS string, on completion of the job the recorder will need to save the collected data to a Shapefile.   If there are simple way to collect the data from the unit and location stamp it in a way that can be viewed by a shapefile viewer that would be fine to. Thanks


title: System policies prevent QGIS installation - false alarm?

text: I get the following message during install Quantum GIS 1.8.0-Lisboa on Windows 7: ![enter image description here](http://i.stack.imgur.com/g9AkV.png) I tried doing the install as administrator with the same result. The install finishes after the 'ok' button is clicked and QGIS seems to be functioning after the install. What is causing the installer popup and how do I fix it? Or should I leave as it is?


title: How to ceate a point layer from a table in PostGIS?

text: I have a table in PostgreSQL(postgis). This table has latitude and longitude values in it. Now I want to plot these point in qgis. The only thing I could get done was connecting to the database from QGIS. Could anyone please let me know on how to go about it.Thank You. Here is the screenshot below![enter image description here](http://i.stack.imgur.com/SNIGZ.png) Below is the connection error I get while connection to the database from QGIS ![enter image description here](http://i.stack.imgur.com/5Y1rr.png)


title: Geoserver with SQL server consuming all my CPU

text: This question is long please bear me and my problem. **SQL Server Query profiler** The **Sample Query** from profiler that geoserver is running that corresponds to **SLD** I am using and not the **SQL SERVER** view I am using is :               SELECT "siteId","Vendor",CAST("SP_GEOMETRY".STSrid as VARCHAR) + ':'      + "SP_GEOMETRY".STAsText() as "SP_GEOMETRY" FROM "Data"."sites"      WHERE ("SP_GEOMETRY".Filter(geometry::STGeomFromText     ('POLYGON ((80.12878722280502 28.280198584198256,          80.12878722280502 29.559126104578176, 81.58996886322707      `29.559126104578176, 81.58996886322707 28.280198584198256,      80.12878722280502 28.280198584198256))', 4326)) =      1 AND ( UPPER("Vendor") LIKE 'A%'  OR  UPPER("Vendor") LIKE 'B%' ))`      I have used javascript as suggested by this to redraw pages at 5 minutes interval. It show 100% CPU utilization when layer is refreshed. **IF I open multiple pages then page just gets locked.** ![enter image description here](http://i.stack.imgur.com/FMhmI.png) I have Computer with following configuration used for **geoserver, Sqlserver and Apache Tomcat**. The person who was using it untill I demonstrated my project was only me but when I ran this only with 5 person the page just hang(chrome browser) and same thing is happening when I open 5-6 window with same address. I am using geoserver WMS layer with openlayer and google map. The google map loads very fast but my layer loads very slow 1/2 min. The zooming takes similar time. I have used jai and all for geoserver. Database is **indexed and the query takes 0 ms** when I do it from SSMS. The geoserver is deployed inside tomcat and data directory is outside the war. I have problem accessing only map pages and believe the memory requirement is more for maps but I am unable to find actual problem. **SQL Server is actually consuming most of the CPU and Tomcat is consuming most of the memory.** ![enter image description here](http://i.stack.imgur.com/7tQJ9.png) The task manager shows following usage : ![enter image description here](http://i.stack.imgur.com/np557.png) The perfmon shows following usage: ![enter image description here](http://i.stack.imgur.com/C0Qz8.png)


title: Problem executing Mean Shift Segmentation

text: I have a problem executing the Mean Shift Segmentation in QGIS with Orfeo Toolbox. I put all the parameter to execute and then, nearly 5s after appear the message that SEXTANTE could not open the output layers. Any help? Thanks a lot


title: Field Calculator: Add "0" to the front of all values in a column

text: I have a table for each state with Zip Code values. The 5-digit Zip Codes that start with "0" have been reduced to 4-digits. I cannot figure out how to add a "0" to the front of all the values in the table. Tried a number of field- calculations but just can't seem to get it right. Some help please. Using ArcInfo 10.1


title: How do I account for changing latitude with a spatial filter?

text: I'm working with data in latitude/longitude grid form in a non-GIS specialised package (MATLAB) and wish to apply spatial filters to it. As this data contains a broad range of latitudes and is centred on the North Pole, I need to account for the spacing between points changing with latitude. For example, if I wanted to apply a simple Gaussian filter of radius X km, I can't just convert that radius to Y cells and go - there has to be some kind of correction as the filter width in terms of cells will change with latitude. How do I attack this problem? Something to do with weighting by latitude? Thanks, and apologies for my ignorance!


title: What is the best practice to show GPS movements on map (Openlayers or Leaflet) using DB and Geoserver?

text: I have GPS unit which update the DB with Points every 10 seconds. I want to show the position in real time (as much as I can) on map using OL or Leaflet. What I did is serving the Point as Layer in Geoserver and using it as WMS layer and redraw it every 2s (to show update asap). Thing is that this solution feels kinda slow/heavy on performance... and in Leaflet the WMS layer flickers every redraw. Is there a better way , "Best Practice" way to do such thing ?


title: Why does script exported from ModelBuilder give ERROR 000733 at SelectByLocation?

text: I created a model in ModeBbuilder, and I exported the model as a script, but when I try to run it I get the following error. I have added my error below and the code below that. Thanks for any help. > Error: Traceback (most recent call last): File > "C:\Temp\VirtualCampus\IGIS\IGISprogrammingscript_1.py", line 43, in > arcpy.MakeFeatureLayer_management(Points_of_interest, > Pointsofinterest_Layer, "", "", "FID FID VISIBLE NONE;Shape Shape VISIBLE > NONE;CATEGORY CATEGORY VISIBLE NONE;NAME NAME VISIBLE NONE")   >  File "c:\program files\arcgis\desktop10.1\arcpy\arcpy\management.py", line > 5774, in MakeFeatureLayer raise e ExecuteError: Failed to execute. > Parameters are not valid. ERROR 000733: Output Layer: Same as input > C:\Temp\VirtualCampus\IGIS\Super Output Areas.shp Failed to execute > (MakeFeatureLayer). Here is my code:               ~# -*- coding: utf-8 -*-     # ---------------------------------------------------------------------------     # IGISprogrammingscript_1.py     # Created on: 2013-07-09 21:39:46.00000     #   (generated by ArcGIS/ModelBuilder)     # Usage: IGISprogrammingscript_1 <Thames_shp> <Points_of_interest> <Super_Output_Areas_shp> <Thames_Buffer_shp> <superoutputareas_clip_shp>      # Description:      # ---------------------------------------------------------------------------          # Import arcpy module     import arcpy          # Script arguments     Thames_shp = arcpy.GetParameterAsText(0)     if Thames_shp == '#' or not Thames_shp:         Thames_shp = "C:\\Temp\\VirtualCampus\\IGIS\\Thames.shp" # provide a default value if unspecified          Points_of_interest = arcpy.GetParameterAsText(1)     if Points_of_interest == '#' or not Points_of_interest:         Points_of_interest = "Points of interest" # provide a default value if unspecified          Super_Output_Areas_shp = arcpy.GetParameterAsText(2)     if Super_Output_Areas_shp == '#' or not Super_Output_Areas_shp:         Super_Output_Areas_shp = "C:\\Temp\\VirtualCampus\\IGIS\\Super Output Areas.shp" # provide a default value if unspecified          Thames_Buffer_shp = arcpy.GetParameterAsText(3)     if Thames_Buffer_shp == '#' or not Thames_Buffer_shp:         Thames_Buffer_shp = "C:\\Temp\\VirtualCampus\\IGIS\\Thames_Buffer.shp" # provide a default value if unspecified          superoutputareas_clip_shp = arcpy.GetParameterAsText(4)     if superoutputareas_clip_shp == '#' or not superoutputareas_clip_shp:         superoutputareas_clip_shp = "C:\\Temp\\VirtualCampus\\IGIS\\superoutputareas_clip.shp" # provide a default value if unspecified          # Local variables:     Pointsofinterest_Layer__2_ = Thames_Buffer_shp     poi_cat = Pointsofinterest_Layer__2_     poi_cat_View = poi_cat     Pointsofinterest_Layer = Points_of_interest     pop = superoutputareas_clip_shp     pop_View = pop          # Process: Make Feature Layer     arcpy.MakeFeatureLayer_management(Points_of_interest, Pointsofinterest_Layer, "", "", "FID FID VISIBLE NONE;Shape Shape VISIBLE NONE;CATEGORY CATEGORY VISIBLE NONE;NAME NAME VISIBLE NONE")          # Process: Buffer     arcpy.Buffer_analysis(Thames_shp, Thames_Buffer_shp, "300 Meters", "FULL", "ROUND", "NONE", "")          # Process: Select Layer By Location     arcpy.SelectLayerByLocation_management(Pointsofinterest_Layer, "COMPLETELY_WITHIN", Thames_Buffer_shp, "", "NEW_SELECTION")          # Process: Summary Statistics     arcpy.Statistics_analysis(Pointsofinterest_Layer__2_, poi_cat, "CATEGORY COUNT", "CATEGORY")          # Process: Make Table View     arcpy.MakeTableView_management(poi_cat, poi_cat_View, "", "", "CATEGORY CATEGORY VISIBLE NONE;FREQUENCY FREQUENCY VISIBLE NONE;COUNT_CATEGORY COUNT_CATEGORY VISIBLE NONE")          # Process: Clip     arcpy.Clip_analysis(Super_Output_Areas_shp, Thames_Buffer_shp, superoutputareas_clip_shp, "")          # Process: Summary Statistics (2)     arcpy.Statistics_analysis(superoutputareas_clip_shp, pop, "LSOA_POP SUM", "")          # Process: Make Table View (2)     arcpy.MakeTableView_management(pop, pop_View, "", "", "Rowid Rowid VISIBLE NONE;FID FID VISIBLE NONE;FREQUENCY FREQUENCY VISIBLE NONE;SUM_LSOA_POP SUM_LSOA_POP VISIBLE NONE")~


title: How to set appropriate spatial index for a feature class in Oracle?

text: I wanted to ask is there any known method how to set spatial index for my feature class in Oracle. I am working with ESRI 10.1 and I have various feature classes covering the whole area of my country (Poland). Those feature classes represent forest, rivers, roads, cities etc. They are of course represented by different geometires so I have polygons, lines, points and annotations. After loading all data into Oracle I wanted to recalcute spatial index to improve the speed in which the features are drawn on the map. Of course I could use the recalculate function in ArcCatalog for each feature class but I wanted to do it on my own. Maybe it will give better results? I have found interesting solution at ESRI website, however I would like to ask how did other user deal with this problem: http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Guidelines_for_choosing_a_spatial_index_grid_size/006z0000002p000000/


title: Symbol rotation by using rotation-field

text: I want to rotate my symbols using the rotation-field in my atribute-table. After choosing the rotationfield, my symbols become invisible (the text is still there). ![enter image description here](http://i.stack.imgur.com/t4bjb.png) What happend? Thank you! Martin


title: Older British Geological Survey geology maps of Kenya; need complete projection information

text: I have several geologic maps of Kenya produced by the BGS circa 1993. Noted on each map is the following: Projection:-Transverse Mercator Spheriod:-Clarke 1880 (modified) That's great, but that doesn't tell me exactly which projection to use in ArcGIS. I've tried these two: Adindan_UTM_Zone_37N and Arc_1960_UTM_Zone_37N Both put the maps in sort of the right place. There's a shift of about 50m to the west and 300m to the north. More or less. Does anyone have a clue as to what the full projection parameters might be for these maps? Thanks, E


title: Determine ArcCatalog's currrently selected folder using Python

text: Is there a way to get the current directory opened in ArcCatalog 10.0 using Python? Something like os.getcwd() but instead gives the selected folder on the catalog tree. Cheers


title: Convert Georeferenced imagery to vector data using python

text: Are there any opensource tools I could use to take a projected georeferenced image such as a jpg with world file, that is UTM projection such as NAD83 and convert it into distinct vector polygons using python or possibly just some software? The end result would likely need to be a shp file.


title: How to embed ArcGIS Server Map in personal Google or Blogger website?

text: I have created my own free Google website, and I want to embed a web map on it that I have created with ArcGIS Server. Can I do this, and if so, how?


title: Why does writing large shapefiles crash QGIS?

text: I'm trying to write large shapefiles with QGIS 2.0 API, using Python, which crashes QGIS. The data is composed of simple two point lines and a data table of five columns. A thousand features or so works fine, but at 10k the program crashes for sure. Perhaps some sort of writing in chunks is a solution, or the problem lies in my code :               def write_lines (file_name, data_list, coordinate_ref_system):              fields = QgsFields()          fields.append(QgsField("Data_1", QVariant.String ))         fields.append(QgsField("Data_2", QVariant.String))              writer = QgsVectorFileWriter( file_name + ".shp", "CP1250", fields,                               QGis.WKBLineString, coordinate_ref_system)         if writer.hasError() != QgsVectorFileWriter.NoError:             QMessageBox.information(None, "ERROR!", "Cannot write file (?)")             return 0              for r in data_list:             # create a new feature             feat = QgsFeature()                  l_start=QgsPoint(r[0],r[1])             l_end =QgsPoint(r[2],r[3])             feat.setGeometry(QgsGeometry.fromPolyline([l_start, l_end]))                  feat.setFields(fields)             #feat.setAttributes([ str(r[4]), str(r[5]) ]) DOESN'T WORK?                  feat['Data_1'] = r[4]             feat['Data_2'] = r[5]                  writer.addFeature(feat)         del writer      Thanks!


title: Any pgrouting enabled hosting providers?

text: I am really interested if any of you know about a hosting provider that offers postgis & pgrouting pre-installed? If not, can I just go ahead and purchase a linode hosting account and do all the installations myself? The situation is that I am seeking for a hosting account to launch my pgrouting based application. Please consider that I am a WIN 7 user with no linux and ubuntu experience. =) Any help/suggestion will be appreciated! Thank you!


title: Exporting arcgis features with attachments

text: Arcgis 10 features the new ability to add attachments to individual features to feature classes stored in a geodatabase. One use of this would be to add multiple pictures to a specific location, fire hydrants seem to be a popular example (important to know if you're a dog on the internet in need of a pit stop I suppose). In the database the structure of an attachment enabled feature class is trifold:   * the feature class itself,    * a table holding the attachments and associated metadata (filename, size, etc), and    * a relationship class defining the 1-to-many relationship between the two. ![the 3 items that comprise an attachment-enabled feature class](http://i.stack.imgur.com/GA42S.png) My question is: how to export this data -- feature class, attachments, attachment metadata -- for consumption outside of Arcgis?* Exporting the FC is easy, _FeatureClassToFeatureClass_ works the same as on a non-attachment enabled FC. Exporting the table of attachments? Not so much. _TableToTable_ to output.dbf extracts the attached file metadata only, to output.csv errors out with unsupported field type, and to output _info_ table fails with a general field error. This isn't all that surprising as those file types don't support a binary blob datatype. I was expecting/hoping to find a tool which would convert the attached binaries into their native format, e.g. ![table to file system diagram](http://i.stack.imgur.com/Mnfml.png) So, how about it? What do I need to do to get the data out? * _ironically my project of the moment which spawned this Q is to export for use within Arcgis, just not Arcgis Desktop..._


title: Simplest way to display a new marker on a map already displayed?

text: Could someone provide an example of the most dirt simple method to force a new marker to pop up based on a given lat/lng? I do not need js to write to my db, as that will be done server side; but I do want to display the new marker without refreshing the whole page. The UI will give a text input that gets geocoded and inserted into the table (e.g., string that will be located on google maps "123 seaside, any town, arzonia " . I just need that new point to be marked on the map as it stands. Again that client- side point won't be written anywhere, it's just added temporarily (until the map is hard refreshed again). see http://highrank.robh71.com/map1/index.php This page primitively demonstrates what I want to accomplish. Enter a new point or location, marker shows up without a reload. Geolocation already works, this is simply a display question. Currently I process data control via the sql api on a separate page for simplicity. This will obviously be changed! I'm really only concerned with the marker rather than the data update so let's pretend that the data write doesn't even matter.).


title: Unable to Import Data

text: I am following this tutorial, but i am not able to get the right username and password to import data. How do I know what the username password is? By default I see tomcat6 as database and username and no password in the textbox. As i am following the tutorial I changed it to username: postgis and password: postgres. How do I know what my username and password is? **EDIT** Import the data in PostGIS, which requires PostGIS connection. **UPDATE** Ok so i got the user and passwd but when I am trying to add the shapefile using the Shape File to PostGIS Importer Plugin and having made connection successfully, I am getting this error when I am adding the shapefile.               Connecting: host=localhost port=5432 user=admin dbname=shpRepo password='**********'      Connection succeeded.     Connection: host=localhost port=5432 user=admin dbname=shpRepo password='**********'      Destination: public.AllQuebecSpecies     Source File: /home/smaranh/development/Biodiversity/biodiversity/shapefile/AllQuebecSpecies     Shapefile type: Point     Postgis type: POINT[2]     Failed SQL begins: "SET CLIENT_ENCODING TO UTF8;     SET STANDARD_CONFORMING_STRINGS TO ON;     BEGIN;     CREATE TABLE "public"."AllQuebecSpecies" (gid serial PRIMARY KEY,     "family" varchar(50),     "species" varchar(50));     SELECT AddGeometryColumn('public','AllQuebecSpecies','the_geom','-1"     Failed in pgui_exec(): ERROR:  function addgeometrycolumn(unknown, unknown, unknown, unknown, unknown, integer) does not exist     LINE 7: SELECT AddGeometryColumn('public','AllQuebecSpecies','the_ge...                    ^     HINT:  No function matches the given name and argument types. You might need to add explicit type casts.          Shapefile import failed.      Can somebody tell me where am I going wrong?


title: Why is ICalculator.Calculate significantly slower than the CalculateField geoprocessing tool with SDE datasets?

text: I just discovered today that there are essentially two ways to calculate field values in ArcObjects: **1\. Using`ESRI.ArcGIS.GeodatabaseUI.ICalculator`:**               ITable table = …;     ICursor updateCursor = table.Update(null, false);          ICalculator calculator = new Calculator()     {         Cursor = updateCursor,         Field = …,         Expression = "…"     };     calculator.Calculate();          Marshal.FinalReleaseComObject(updateCursor);      **2\. Using`ESRI.ArcGIS.DataManagementTools.CalculateField`:**               var calculateField = new CalculateField()      {         in_table = …,         field = …,         expression = "…",         expression_type = "VB"     };          var gp = new Geoprocessor();     gp.Execute(calculateField, null);      While performance of the two approaches is similar with File GDB tables, I've found that it varies a lot for SDE tables: I've measured a processing speed of 21 milliseconds per row with the former approach (`ICalculator`), while geoprocessing requires only 10 milliseconds per row (<50 %). Does anyone know, or have an educated guess, why `ICalculator` is slower?   * With the `ICalculator` approach, it doesn't seem to matter whether the cursor used is a recycling one or not. But apparently, an update cursor is required. (I tried using a search cursor, too, but that resulted in warnings and errors -- discoverable via `ICalculatorCallback` -- immediately after calling `Calculate`.)   * Also with the former approach, I tried reducing network bandwidth usage by specifying only the minimum required `SubFields` in the `IQueryFilter` used to retrieve the update cursor. Surprisingly, this doesn't improve runtime performance at all.   * I tried all above methods outside any edit session or explicit transaction.


title: Assigning UNC Path to arcpy.env.workspace

text: For some reason my python script crashes ever time it reaches the following code which attempts to assign a unc path as my workspace. Can any of you please help me solve this problem? Also, I'm not getting any error code when PythonWin crashes, it just does and yes I'm running my code in PythonWin.               arcpy.env.workspace = r'\\ARSENAL.LAMB.CRAYON.NET\SHARE\LEY\CTPCW3\DATA\GIS_TOTA\Projects\TOTA\2014\Data_for_Submission\2014_MASTER_TOTA.gdb'      Currently using Arcmap 10.0 PythonWin 2.6.5 (r265:79096, Mar 19 2010, 21:48:26)


title: Cannot get the LocalFeatureService to start when transporting code and data

text: I have a C# project that uses a LocalFeatureService, a LocalGeoprocessingService and a LocalMapService. Everything runs fine when I run it at my own machine. However, when I transport the code and data (including packages) to another machine, and try to run the code, it is not able to start the Local Feature Service. I'm not sure yet if the other services will start successfully, because it bombs at the Local Feature Service. The error messages are: LocalServerException was unhandled. Service Failed to initialize. Error code 500 Feature service creation failed Everything is there, so what might I look for to understand why the service doesn't start? Thanks!


title: Editor to work on GML files

text: I am looking for a good way to work on GML files and would appreciate some personal experience. At the moment I am using nXML or SGML mode for Emacs but I wouldnt mind having an IDE/Emacs mode/... that is more specialized on GML files and could possibly render changes in real time. Support for large files (>15 MB) would be a requirement. I am running Linux (Ubuntu 13.04) so native programs would be prefered, but I don't mind if Windows programs are mentioned.


title: Zoom level lost in public visualization?

text: I've got a visualization made where in the back-end it looks great. zoom level = 5. Then any method of publishing sets the zoom level to 3. Can this be forced to remain 5? strangely, this other simple test map doesn't even have a zoom parameter passed to the url. This was the embed url I picked up on the day I was messing with it. http://highrank.robh71.com/map1/index.php


title: Delete Turned Off (Unchecked) Layers from Arcmap with Python

text: I have about 100 figures that have been updated countless times and a lot of the old data was left in each .mxd but was only turned off (unchecked) and not removed. I would like to remove these layers from each .mxd but keep the actual shapefile/features in an achieve folder. I have found a similar script that removes layers by layer name here: Delete layer from ArcMap using Python but it does not do exactly what I want it to do. Does anyone have a script already written that does what I am trying to do?


title: Error in raster displays of NoData cells when "zoomed in" past scale 1:3,000,000

text: I looked around GIS stack exchange and ArcGIS Help pages and didn't find anything on this issue. I have encountered an error in how Arc displays a Raster file (.TIF format) at different scales. At scales greater than 1:3,76,600, when I'm zoomed in, the raster displays mostly correctly, showing only a border of low-value cells, or no border -the "border" appears inconsistently. (first picture) ![enter image description here](http://i.stack.imgur.com/OQ2lD.png) What is consistent is that when I zoom out, specifically when I go from 1: 3,000,000 to 1:4,000,000, the white background (correctly indicating no-data cells) change to blue (indicating the lowest value "bin" in the classification). When I check the cell values, the cells are NoData value, even when zoomed in and blue (and they should be clear). (second picture) ![enter image description here](http://i.stack.imgur.com/j6hew.png) Any suggestions? I want to display this data zoomed out to a scale smaller than 1:3,000,000 but it is falsely visualizing the data. I am working in Arc 10.2 with all licenses installed. In Layer Properties > General Tab > "Scale Range," "Show layer at all scales" is checked. Thank you!


title: raster to ascii in QGIS

text: I have a raster file (DEM or .tif), but I need to transform it into a .txt file (ascii). How can I do this in QGis (Quantum Gis)? Thank you so much!


title: ExtJS 4.2 layout crush on latest chrome but not on old one in full screen

text: I've noticed that only in chrome my GeoExt app crush when I open many layers. If I resize the window , the layout seems to look good , once I resize to bigger screen , it mess again. The app code didn't change for long time , it doesn't happen on old laptop with chrome version 27 it only happens on 2 stronger desktops with latest chrome version. **UPDATE** I've found out that commenting the following CSS in openlayers resolve the problem , Any idea why ?                 /**      * Animations      */                .olLayerGrid .olTileImage {             /*-webkit-transition: opacity 0.2s linear;*/             -moz-transition: opacity 0.2s linear;             -o-transition: opacity 0.2s linear;             /*transition: opacity 0.2s linear;*/         }              /* Turn on GPU support where available */         .olTileImage {             /*-webkit-transform: translateZ(0);*/             -moz-transform: translateZ(0);             -o-transform: translateZ(0);             -ms-transform: translateZ(0);             /*transform: translateZ(0);*/             /*-webkit-backface-visibility: hidden;*/             -moz-backface-visibility: hidden;             -ms-backface-visibility: hidden;             backface-visibility: hidden;             -webkit-perspective: 1000;             -moz-perspective: 1000;             -ms-perspective: 1000;             perspective: 1000;         }      ![enter image description here](http://i.stack.imgur.com/Yg98w.png) ![enter image description here](http://i.stack.imgur.com/qxAnr.png)


title: Cannot install OpenGeo Suite on Ubuntu 12.04

text: I originally posted this on this forum post, but thought it would be best to open a new thread. If I should have simply posted on the other forum, my apologies. I am also having issues installing OG on Ubuntu 12.04. When I run:               apt-get install opengeo      I get the following:               Reading package lists... Done     Building dependency tree            Reading state information... Done     Some packages could not be installed. This may mean that you have     requested an impossible situation or if you are using the unstable     distribution that some required packages have not yet been created     or been moved out of Incoming.     The following information may help to resolve the situation:          The following packages have unmet dependencies:     opengeo : Depends: opengeo-server (>= 4.0.0) but it is not going to be installed     E: Unable to correct problems, you have held broken packages.      Mind you, this is my very first time using Linux, so if I am simply missing a command or step not noted in the outline provided here, then my apologies. Thank you in advance for any help, and please let me know if I can provide any more information to help better understand the issue.


title: Action zoom in a button

text: In my code, I have a button that displays information in my gridpanel and it add a vectorlayer in it. I want to add zoom on those polygon, but I did not succeed My code:               testlayer.events.register( testlayer, function(){      map.zoomToExtent(testlayer.getDataExtent())     });      Note this code functions when I add the vectorlayer only, but when I add the action of displays information in my gridpanel it is not working. any help is apprecited


title: How to copy a layer in TileMill?

text: I've been learning to use TileMill, and I want to be able to copy a layer. I especially want to copy layers connecting to an SQLite or PostGIS database in order to avoid having to type in multiple inputs for each. It gets pretty tedious copying the same database and srs values multiple times. Is there a way to copy a layer?


title: pgr_dijkstra working but pgr_ksp but returning anything for the same params

text: The following returns a route as expected.               SELECT seq, id1 AS node, id2 AS edge, cost, b.the_geom as the_geom FROM pgr_dijkstra('     SELECT gid AS id,          source::integer,          target::integer,          length::double precision AS cost         FROM ways',     247542, 258349, false, false) a LEFT JOIN ways b ON (a.id2 = b.gid);      However the following does not. I expected this to return 3 routes but instead it returns nothing.               SELECT seq, id1 AS node, id2 AS edge, cost, b.the_geom as the_geom FROM pgr_ksp('     SELECT gid AS id,          source::integer,          target::integer,          length::double precision AS cost         FROM ways',     247542, 258349, 3, false) a LEFT JOIN ways b ON (a.id2 = b.gid);      Any idea why this is happening?


title: Python to get ids from shp dont return all records

text: I have some Python code to get the ids and georeference from a shapefile:               canvas = qgis.utils.iface.mapCanvas()     allLayers = canvas.layers()     nos = QgsFeature()     for i in allLayers:         if i.name()=='path_nodes':             path_nodes = i          nodedata  = path_nodes.dataProvider()          while nodedata.nextFeature(nos):         i = i + 1         print str(no.gid())      It does not return all of the ids. Can anyone help?


title: QGIS: "No data" raster value for missing rows conflicts with data?

text: I’m having a problem with specifying “no data” in a raster dataset in QGIS 1.8.0-Lisboa. QGIS does fine in interpreting pixels I don’t have rows for as “no data” if I set Layer Properties -> Transparency -> No Data = 0. Problem is, I do have some genuine zeroes in my z value column, which obviously are recognised as “no data” when I do this. I can’t really create a row for every single “no-data” pixel and assign a new value manually as the extent of my data is very large. Is there any way to specify “no data” as “missing row” or equivalent rather than a numerical value? Thank you!


title: Query MYSQL database inside a python plugin

text: I am new to QGIS python development and I have a requirement to query the database and depending on the result do some processing in QGIS. I found how to create a connection to mysql db on python cook book, but I was unable to execute a user defined query using a python plugin. I did search but am couldn't find any good article about that. Can anyone please help to find out how to execute user defined query inside a python plugin?


title: problem labelling cluster features in openlayers

text: I'm trying to label a vector layer with clustered points in OpenLayers. When the feature is clustered I want to show the value of an attribute of all the features included in the cluster. I've tried to define my label as follows:               label: function(feature){if (feature.cluster) {                      for(i=0;i<feature.cluster.length;i++)                     {label_array += feature.cluster[i].attributes.yacimiento;                      label = label_array.toString();                     }                 }               else{label=feature.attributes.yacimiento;}           return label;           }      ... and the vector layer just doesn't work BUT, if I do the same with               label_array = feature.cluster[i].attributes.yacimiento;      it works prefectly displaying only the last item of the cluster I don't understand what's going on (I might be missing something obvious, for I have no programming skills) Thank you for any kind of help


title: Can anybody help me with Spatial Join in ArcGIS 10?

text: I have a doubt, I do not find what's happening. Screenshot: Using the Join (Join data from another layer based on spatial location) I have done an Spatial Join by location, and it is said that the FIELD "Count_" must to count the number of elements (in my case Points) within it. But when I see its metadata, I find that there more "number of elements" within the polygon! So, my question: Why do I have more countered elements? Thanks for all. \----EDIT---- Done only with a simple example of 1 polygon with some points nearby and inside, it works. 5 elements and countered 5 elements. But still don't know why counts more elements with the raw data. :( ![I choose...](http://i.stack.imgur.com/rGSkQ.png) ![sample](http://i.stack.imgur.com/V1WGi.png) ![Spatial Join](http://i.stack.imgur.com/WXiyA.png)


title: How to do the overlap detect for buffered lines

text: We have almost 50000+ lines which we want to remove a line if it is too close to the other. So we tried to do a buffer for two line, then check if the buffer area are overlapped. I wonder if there is a efficient idea to make it? Since at my first thought, we need almost 50000*(50000-1) times detect for two buffered area, it will take a long long time plus the buffer time for a line. :( * * * We use ArcGIS, but we prefer to make it by program rather than through the UI. Also, we will give a certain distance of meters or pixels to tell the program if the two line are too close to each other.


title: Spatial Join in QGIS 2.2

text: I am trying to spatially join point layers of some 12,000 women interviewed in Egypt to Egypt's polygon layers (administrative districts boundaries) using QGIS 2.2 and need some advice. I am a QGIS self-learner. I have read many QGIS manuals, but I cannot complete the spatial join successfully. I have added the vector layers of both Egypt's women's GPS points and Egypt's polygons (district boundaries). I used the UTF-8 encoding. Whenever I attempt to join attributes by location, the following message appears "Input layers have non-matching CRS". However, when I check the CRS of both layers, I found it the same (EPSG:4326 - WGS 84).


title: Creating a program for batch snapping polylines and polygons

text: I currently work with large sums of lines data. I am editing them using different GIS software. I've realized that I can detect node problems in arcmap10.1. I would like to know if it's possible to programmatically snap the detected dangling nodes and other issues. I have Microsoft Visual Studio 2010 (C#) installed with ArcObjects, but I am struggling with the code to develop such a stand-alone program. This would make my work so much easier in the future as I have to manually snap these detected dangling nodes.


title: Cannot find my schemas in QGIS's "Add PostGIS layers"

text: When I connect to my PostGIS database using QGIS's `Add PostGIS Layers`, I see only               public     topology     pg_catalog     information_schema      My other schemas that I have created are not shown here. Anyone else experiencing the same problem? I'm using QGIS v1.8.0-Lisboa, PostgreSQL-9.1 and PostGIS-2.0.1 How should I go about troubleshooting this?


title: Storing features in PostGIS and then creating layers using queries

text: I have a whole set of line segments or tracks that represent real tracks or, in some case, boundaries between areas. These segments form a network of lines on the map. I have a number of GIS layers, e.g. walking tracks, vehicle tracks and a variety of zones (areas delimited by a set of segments) with a many to many relationship between segments and layers. I figure the best way to deal with this is to put all the segments into a postgis table as individual features and then create a link table for each layer that lists then segments needed for that layer. That way I have just one copy of each segment to maintain. Is there a better way of doing this? Can anyone point me to some tutorial material in this area. More clarification: Indeed, views (or sql queries - which amount to the same thing) were what I was assuming that I would use to build the layers. I am pretty sure I know how to do what I want. My questions was more along the lines of "Is the approach sound?". As a GIS novice but with a extensive IT background it seems to me that this must be a common situation i.e. having features that are used in multiple layers where you only want to maintain one copy of the feature. I was wondering if the obvious approach (from a relational database point of view) was what people used in practice or if there were other approaches.


title: Can one load multiple GPX files at once?

text: I have a whole bunch of GPX files that I need to load into qgis and loading them one at a time using the GPS plugin is a bit painful. It will not allow one to select multiple files -- is there another way? I did find this: Automating batch load of multiple GPX files into PostGIS but I need to figure out a lot more about postgis and gdal before trying that approach. BTW I am using Mac version of QGIS -- just realised that this may be OS related


title: Set map service in idle mode in ArcGIS Server 10.1

text: I am using ESRI suit 10.1 (ArcGIS Desktop, ArcGIS Server, ArcGIS JSAPI 3.3/3.4) at my end and having few performance questions regarding ArcGIS Map service. -We have three simple map services published on our server. -Each map services contains query layer and with the help of query layer, we have created few xy events source layer in each map service. -Integrated those map services in ArcGIS Java script application.  -While querying on the map we are facing load at our sql server database (I think the request coming from client side as we used query layer) -Interesting thing is that in down time we got request only from arcgis server machine (On DB server machine, checked the machine details and host name it’s our arcgis server machine) So is it possible to set map service in idle mode when not in used? I checked the pooled and non-pooled option but in 10.1, all map services are pooled. Going through System Design Strategies Any help regarding this will be great !! **EDIT** According to @Alex Tereshenkov answer I can set the minimum number of instance to be zero so -Is it take time to UP the instance? -How many no. of instances to be set in Maximum number of instances (default is two)?


title: GRASS GIS related issues!

text: (1) How to create a multiband raster from a set of single band rasters (except when somebody talks about doing a `r.composite`). I attempted creating a `raster3D` and it turned out that it is not possible to display it with the GUI. (2) How to subset a raster dataset (at least I do not see a direct command for doing so) Edit (following the comment to my humble question): If my observations are wrong, please let me know the answer to these questions.


title: Is Tomcat or Jetty a better container for Geoserver on Windows

text: My Understanding is that Geoserver can be run in the default Jetty Environment or in Tomcat on Windows Server 2008 R2 GeoWebCache uses Tomcat as its container in its installation instructions. Which is better for Geoserver, Tomcat or Jetty and why? UPDATE (Thanks @BradHards) > Application is stand alone Geoserver talking via Private LAN to a Standalone > Postgres/PostGIS Server delivering up to 4 WMS tiled layers to the internet > > Up-time needs to be 99% > > Load is undetermined at this time. Deployment of additional servers is > expected when load reaches a predetermined limit, which we are trying to > assess. > > Environment: Windows Server 2008 (32 Bit), Public Facing. Currently running > Geoserver on Jetty > > Updates: only when they will provide performance benefits or additional > features that will improve the WMS Layers delivered.


title: How to add MS SQL table using python console?

text: I have MS SQL Server 2008 R2 database. How to add MS SQL Table using python console in QGIS?


title: Figuring out map scale when you know the spatial resolution of a Satellite Image?

text: I'm interested in figuring out how map scale and satellite pixel size (spatial resolution) are related. For example the TM or ETM+ has roughly 30m ground resolution, then, what could be the finest scale of the extracted map? Is there any formula or rule of thumb for converting the satellite pixel size to map scale?


title: Extract BoundingBox with Osmosis Java API

text: I'm am trying to use the Osmosis Java API to extract reasonably sized blocks from the OSM planet file using the BoundingBoxFilter. Note: I'm using maven Osmosis packages NOT the command line interface. Below is what I have so far. The reader and writer work fine without the filter in between, but the filter does not seem to pass the filtered output to the writer in the second sink. Any ideas as to what I'm doing wrong? Thanks! RunnableSoure reader = new OsmosisReader(new FileInputStream(file)); reader.setSink(sink1); BoundingBoxFilter filter = new BoundingBoxFilter(IdTrackerType.IdList, 0, 10, 10, 0, true, true, true, true); filter.setSink(sink1); sink1.setSink(sink2); File out = new File(...); BlockOutputStream stream = new BlockOutputStream(new FileOutputStream(out)); OsmosisSerializer writer = new OsmosisSerializer(stream); Thread thread = new Thread(reader); thread.run(); writer.flush(); writer.close(); private static SinkSource sink1 = new SinkSource() { public void process(EntityContainer ec) { filter.process(ec); ... } } private static Sink sink2 = new Sink() { public void process(EntityContainer ec) { writer.process(ec); ... } }


title: Geoserver WPS execute request / response errors

text: i'm testing wps execute request to a local geoserver. From demos > WPS request builder my process (ras:contour) do the job and the result (like a shapefile) is ok. The problem is when i use the QGIS WPS Client i repeat the same request with the same inputs (data & parameters) and i receive a Java error : > java.lang.IllegalArgumentException: argument type mismatch argument type > mismatch. When i check the geoserver log, i find a strange thing : > WARN [geoserver.wps] - cvc-complex-type.2.4.b: The content of element > 'wps:ResponseDocument' is not complete. One of > '{"http://www.opengis.net/wps/1.0.0":Output}' is expected. 2014-06-11 > 16:55:10,340 ERROR [geoserver.ows] - java.lang.IllegalArgumentException: > argument type mismatch .... You can see the document wps:ResponseDocument is not complete....effectively i cant't define the mimetype, subtype, encoding, and schema in the QGIS WPS Client... I need explanations about the output definition of the process, and also can you explain me the difference between the 2 request : from Geoserver Request Builder vs from QGIS WPS Client. I work with Debian Wheezy, Geoserver 2.3.5, QGIS 2.2.0 (Valmiera), QGIS WPS- Client (2.0.4). Many thanks for your help. B.


title: Adding Edit button to ArcGIS Javascript template?

text: We've been able to successfully download the Find, Edit, Filter template, customize the configurations, and host it on our own server but here is the issue we are facing now. We're looking to use this application for our Business License field officers. They stop by a business, check their business license and then classify it one of several different ways. The Business License layer is a point layer. By and large we do not have our address layer separated into units so in a few instances we have many Business License points right on top of each other making the data hard to edit. Not a huge deal from the desktop but if you're using a tablet it's a pain to scroll through 15 different pop-ups to edit the feature you want. As a result we're using the search function to search by business name. Has anyone written code that will create an edit button within the popup once the feature is found from the search box? As it stands now we can search for and zoom to the feature but then you must click the edit button and then reclick the feature you want to edit. Doing this means you have to then scroll through until you find your feature (link to application, search for Yankee Candle, click edit button then click back on feature). It's built in as a feature in the default web map (see picture below) but not in any of the apps. ![enter image description here](http://i.stack.imgur.com/ptOsd.jpg)


title: Why are STDistance results so small?

text: Im trying to get familiar with spatial data using sql server 2008. I use book: http://www.beginningspatial.com/ and there is sample data: http://www.census.gov/geo/cob/bdy/zt/z500shp/zt06_d00_shp.zip I uploaded it to my sql server database and Spatial results are presented well. Everything seems to be ok but when I tried to calculate distance between 2 geometries result is really small. For example 0.27 The same is if I try to calculate STLength of given region. Result also is very small like 0.19 for example. I wonder why the results are so small. I used SRID 4269 importing data. Does anyone have any idea why is it like that ? I think that the result whould be in meters. Thanks for any advice


title: How do I know when a NOMAD GFS Grib2 file is ready for download

text: The NOMAD GFS system creates files on a 4 times a day cycle. The file naming specification is:               cc is the model cycle runtime (i.e. 00, 06, 12, 18)      xxx is the forecast hour of product from 00 - 384     YYYYMMDD is the Year, Month and Day      'cc' is stated as the cycle run time, so it is reasonable to assume that that is the time the processing begins. How do I know what time the cycle actually is finished so that the grib2 files can be downloaded?


title: Automating removal of all demo layers from Geoserver

text: Is there an easy way to empty out an install of a standalone Geoserver jar (i.e., delete all the examples) or do I have to do it through either the admin GUI or the RESTful interface? Can I just delete or munge some files in the work directory? Or is there a command line switch to tell it to never unpack the examples in the first place?


title: Google StreetView Coverage Layer

text: How can I get the layer of the coverage of Google Street View on the roads, i.e. the layer that appears blue when we drag the pegman on Google Maps/Earth? I need it to work in ArcGIS. Thank you.


title: Render a raster with hue values in QGIS

text: I have a single-band raster (a GeoTIFF) with hue values in the band. I'd like to render it, preferably in QGIS but another open-source GIS would be acceptable as well. The saturation and value should be held constant at 255.


title: How to use the QgsDiagramRendererV2?

text: I'm writing a plugin for QGIS in python in the QGIS API doc, I can see the QgsDiagramRendererV2 class, under the qgs.core section http://www.qgis.org/api/classQgsDiagramRendererV2.html What I'm trying to do, is simply create diagram in a QgsVectorLayer. so I try to do this :               from PyQt4.QtCore import *     from PyQt4.QtGui import *     from qgis.core import *          myLayer = QgsVectorLayer("some/url", 'label', "ogr")     myRenderer = QgsDiagramRendererV2()     myLayer.setDiagramRenderer(myRenderer)     QgsMapLayerRegistry.instance().addMapLayer(myLayer)      And then I get an error saying that the QgsDiagramRendererV2 class doesn't exist But it exist in the doc What can I do to instantiate a DiagramRender ?


title: What are some alternative sources for USGS data?

text: I've been using the USGS National Map viewer (http://viewer.nationalmap.gov/viewer/) for getting data for QGIS, but the download system is driving me insane. I enter my email address and [sometimes] get a notice that my data will be available in up to 2 days (why so long???) If that email does arrive, occasionally the URLs are linked to a 0 byte file and I'm out of luck. Is there any other place to get the data? This "click and hope your data arrives in 2 days" system keeps getting me in trouble and behind on my work. I don't understand why I can download multiple GBs of elevation data from USGS on demand but hydro data that's a fraction of the size requires a waiting period. Edit: I'm specifically looking for hydro, transport and land cover for Kittitas Valley in Washington state. Thanks for the great answers.


title: Generate a matrix of change from shoreline vector time-series data

text: I have shoreline vector data that corresponds to property ownership, and time series data referring to attributes such as erosion levels, shoreline class (ornamental, natural, regenerative), etc. At this point I have two years of data, and I'm looking to generate a matrix of change, that describes from-to change, and no change (Natural shoreline to Ornamental, or Natural to Ornamental, as examples). With 4 shoreline classes, there are 16 possible change scenarios. Any suggestions, I primarily use Arc10, but I am also enjoy open source solutions. In advance, thanks for your time!


title: WPS process importing and returning output

text: I'd like to import to the GeoServer catalog the result of one of my processes (in addition to returning it to the client), which is a shapefile. I have managed to find some kind of import code, but it doesn't publish the layer. I also have to return a URL that links to that newly imported shapefile. My code so far : (I have simplified a little bit, I understand that the way it is presented here (with a direct path) is useless.)               @DescribeProcess(title = "AddSHP", description = "Returns a SHP")     public class AddSHP implements GSProcess {          private Catalog catalog;          public AddSHP(Catalog catalog) {         this.catalog = catalog;     }          @DescribeResult(name="ShapeFile", description="ShapeFile", type = String.class)     public RETURN_TYPE execute(             throws IOException {         String shp;         shp = "Path/to/my/shape.shp";         String shpname = shp.substring(shp.lastIndexOf('/') + 1);         addShapeFileDataStore(shpname, shpname, shp);         return (SOMETHING);     }          private boolean addShapeFileDataStore(String title, String description, String pathToFile)  {         DataStoreInfo dsInfo = catalog.getFactory().createDataStore();         dsInfo.setName(title);         dsInfo.setDescription(description);         dsInfo.setEnabled(true);         dsInfo.setType("Shapefile");         dsInfo.getConnectionParameters().put("create spatial index", true);         dsInfo.getConnectionParameters().put("charset", "ISO-8859-1");         dsInfo.getConnectionParameters().put("filetype", "shapefile");         dsInfo.getConnectionParameters().put("cache and reuse memory maps", true);         dsInfo.getConnectionParameters().put("url", "file:" + pathToFile);         dsInfo.getConnectionParameters().put("namespace", "http://");         try {             catalog.add(dsInfo);         } catch (Exception e) {             System.out.print("Error adding data store to catalog");         }         return true;     }     }      Could anybody help ?   Thanks


title: geoserver support to proxy other tiling services?

text: I'd like to use a central server to provide a common location for all of our mapping / imagery resources. Our data is primarily in the form of geotiffs with a variety of base layers from various sources on the web. Geoserver, given a set of geotiffs, does a nice job of serving up tiles (via WMTS or TMS). However, I don't know of a way to easily proxy other external sources of data like the sample base layers from http://services.arcgisonline.com/ArcGIS/rest/services. Unfortunately, it doesn't seem like many services implement a WMS layer (or don't make it public). Currently we have logic in our application to special case various web services but it is a bit of hack. Ideally I'd like to present a common web services interface to all our tiling providers. This would enable WMS clients like world wind applications to "just work". My only thought right now is to build a small python web service that would expose a list of capabilities via WMS and then add this service into geoserver as a cascading WMS store. This seems like a lot of work to simply serve up map tile URLs. I am curious if this this problem has been solved before or if there is an easier solution. Thanks!