title: QGIS apply style to shapefile

text: I'd like to create a Categorized style in QGIS, classify with it data in a shapefile and then save the shapefile with the new categorized style. Is it possible?


title: Why do these points send me to the middle of the ocean or middle of nowhere?

text: I've been beating my head against the wall trying to map some points using Leaflet + OSM. I put in some sample points (near Bellingham, WA, USA). I've checked the JSON with JSfiddle and GeoJsonlint. It's valid. But they both send me to the middle of the ocean or to the bottom of the map. Any idea what I'm missing here? ![What I'm seeing:](http://i.stack.imgur.com/COvci.png) GeoJson               {     "type": "FeatureCollection",     "features": [         {             "type": "Feature",             "geometry": {                 "type": "Point",                 "coordinates": [                     48.759553, -122.488225                 ]             },             "properties": {                 "name": "ABBOTT NEIGHBORHOOD PARK",                 "address": "1300  SPRUCE ST"             }         },         {             "type": "Feature",             "geometry": {                 "type": "Point",                 "coordinates": [                     48.759553, -121.488225                 ]             },             "properties": {                 "name": "DOUBLE OAKS CENTER",                 "address": "1326 WOODWARD AV"             }         },         {             "type": "Feature",             "geometry": {                 "type": "Point",                 "coordinates": [                     48.759553, -123.488225                 ]             },             "properties": {                 "name": "DOUBLE OAKS NEIGHBORHOOD PARK",                 "address": "2605  DOUBLE OAKS RD"             }         },         {             "type": "Feature",             "geometry": {                 "type": "Point",                 "coordinates": [                     48.759553, -124.488225                 ]             },             "properties": {                 "name": "DOUBLE OAKS POOL",                 "address": "1200 NEWLAND RD"             }         }]}


title: Can you dynamically set print options using ArcGIS JS API?

text: I'd like to create an option in my web application where a user can click on a print button and a list of options appears:   1. Page template (already available via `esri.dijit.print`)   2. Map Title   3. Notes or Custom Text No. 1 is known to be available but I can't find any good resource on how to be able to dynamically change these inputs. Any ideas? Code I'm working with:                   dojo.require("esri.dijit.Print");          function initPrinter() {              var printTemplates = [{             label: "Map Only",             format: "png32",             layout: "MAP_ONLY",             exportOptions: {               width: map.width,               height: map.height,               dpi: 96             }           }, {             label: "Portrait",             format: "PDF",             layout: "Letter ANSI A Portrait",             layoutOptions: {               titleText: "my layout",               authorText: "GIS Team",               copyrightText: "Copyright 2013",               scalebarUnit: "Miles"             }             }, {             label: "Landscape",             format: "PDF",             layout: "Letter ANSI A Landscape",             layoutOptions: {                 titleText: "my layout",                 authorText: GIS Team",                 copyrightText: "Copyright 2013",                 scalebarUnit: "Miles"                 }           }];              // print dijit         var printer = new esri.dijit.Print({             map: map,             templates: printTemplates,             url: "path/to/my/Export%20Web%20Map%20Task"             }, dojo.byId("printButtonDiv"));                          printer.startup();          }


title: Trouble programmatically publishing to SOM when SOC is on another machine

text: I wrote a desktop extension for ArcMap that allows a user to publish the map they've just created to an AGS 9.3.1 machine on another server. This works fine as long as the AGS machine acts as a SOM and a SOC. It also works if there are multiple other SOC machines in addition to the AGS machine. However, if I go into the web manager on the AGS machine (let's call it serverA), and remove it as a host machine and specify serverB as a host/SOC machine, then the code fails when it tries to connect to the AGS instance on serverA. It says that it can't find the machine. Here is the code I'm using to connect and publish the MXD:               IServerObjectAdmin soa;     ESRI.ArcGIS.Server.IGISServerConnection connection = new ESRI.ArcGIS.Server.GISServerConnection();     connection.Connect(server);          soa = connection.ServerObjectAdmin;     IServerObjectConfiguration3 soc = (IServerObjectConfiguration3)soa.CreateConfiguration();     soc.Name = psoObject.Title;     soc.Description = psoObject.Description;     soc.StartupType = esriStartupType.esriSTAutomatic;     soc.TypeName = "MapServer";          soc.IsPooled = true;     IPropertySet props = psoObject.AGSConfigPropertySet(soc);     soc.Properties = props;          soc.MinInstances = Convert.ToInt32(props.GetProperty("MinInstances").ToString());     soc.MaxInstances = Convert.ToInt32(props.GetProperty("MaxInstances").ToString());          soa.AddConfiguration(soc);     soa.StartConfiguration(soc.Name, soc.TypeName);     IServerMachine machine = soa.GetMachine(server);     soa.UpdateMachine(machine);


title: What USGS maps exist in the 7.5' × 15' metric 1:25,000 series?

text: While browsing through the library, I discovered that USGS has, in fact, produced some metric maps at 1:25,000. One example is Thendara (NY), 43075-F1-TM-025. As far as I can tell, those maps are sporadic. I do find some at the USGS website. What is the nature of this series? Is it a past project since abandoned, is it only for some areas, and does it exist in place of or in parallel to the imperial 1:24,000 series? What areas are covered by those maps?


title: reverse proxy windows server to opengeo-geoexplorer

text: I have a web server running windows server 2008 and OpenGeo suite 4.0.2. I´ve made a test map, saved it and exported it using geoExplorer. Now the problem is tat I have to make the map public but port 8080 is closed so there is no way ( as far as I know) to acces the map from the www and opening 8080 is not an option on a short therm. I´m guessing that I have to ser a reverse proxy in a way that it redirects trafic from the open port to the Geoserver port, BUT, I`m a GIS spetialist not a network tech so I have no idea how to do that... As allways , any help wold be apreciated


title: Can two polygon layers be merged in QGIS on a common id?

text: Can two polygon layers be merged in QGIS on the basis of a common id? Update: Ok , the dissolve tool works fine. But for instance lets say I have 10 polygons. 8 of them are together , so when dissolved they become one big polygon. The other two polygons are somewhere away and I dont want them to dissolve with these other 8. So how do you go about it. ![](http://i.stack.imgur.com/NxK6c.jpg)


title: GRASS GIS 3D - Inconsistent number of attributes

text: I am trying to automate my 3D plotting of GRASS GIS 7 results, also to make them more consistent in size and view angles. So for               m.nviz.image elevation_map=DEM -a mode=fine resolution_fine=1 color_map=result position=0.84,0.16 height=2799 perspective=24 twist=0 zexag=1.000000 focus=119,49,2713 light_position=0.74,-0.57,0.80 light_brightness=80 light_ambient=20 light_color=255:255:255 output=nviz_output format=ppm size=1853,989      I get as error:               ERROR: Inconsistent number of attributes (<vpoint> 0: <vpoint_position> 3)      I do not seem to be the first with this problem, but could not find an answer yet how to solve this problem. I have no vector data in my workspace, so why is vpoint here an issue?


title: Why does zoom not work for one of the openlayers base layers?

text:
I have map with 2 base layers (osm, bing) and few overlays. I put layerswitcher outside of map in separate div. I wrote script for toggle layers in that div and it works fine. But there is one problem with base layers. If I select bing as a base layer in my div it displays fine but I can't zoom in or out. Point features (ones from the overlay) are moving but base layer is static. Here is my code:

BASE LAYERS
                                    <input type="radio" name="baselayer" value="osm" id="IDosm_layer" onclick="toggleControl(this);" autocomplete="off" checked>                   OpenStreetMap                                                          <input type="radio" name="baselayer" value="bing" id="IDbing_layer" onclick="toggleControl(this);" autocomplete="off">                   Bing Aerial

OVERLAYS
                                    <input type="checkbox" value="2" id="IDcurrent_position" onclick="toggleControl(this);" autocomplete="off">                   Overlay1
        That's the html part of code for layer tree div and here is javascript code:               function toggleControl(element){                           if(element.value == "osm"){               bing.setVisibility(false);           osm.setVisibility(true);          }          else if(element.value == "bing"){           osm.setVisibility(false);           bing.setVisibility(true);                   }               for(i=2; i<12; i++) {             if(element.value == i) {                 map.layers[i].setVisibility(element.checked);              }         }          }      I hope you understood my problem and I'm looking forward to your answer.


title: Problems with interpolating in Arcmap 10

text: I would be extremely grateful if I can get help with this question. I cant find anyone who had a similar problem. I am trying to make a raster from point data. My data is in .txt form and contains of x,y,z; that is, coordinates and elevation. I have about 156000 points. So, these points are imported into Arcmap, showing up at the correct positions. Now, for some reason I cant make these into a raster.. WHATEVER tool I try (spatial analyst, 3D analyst..) nothing works! I just get an error 99999 code. I am really stuck on this one and no one seems to be able to help me! Do you have any idea why?


title: Using ogrinfo to list all projection source of a database

text: I have to reproject all the layers from a database, but some of them are undefined and some are defined in a wrong projection. I would like to sort all those layers in a text file with their source projection and their path. I tried:               For /R %f in (*.tab) do ogrinfo -al -so %~dpnxf > list.txt      The fact is only the last layer return a result in the `list.txt`. Do you know why? Is there a more appropriate method to overcome that projection problem?


title: Comparing features in GIS interface with Google Maps/Bing Basemaps - Which Co-ordinate system to use?

text: I want to compare some Geographic features in my data with Google maps in ArcGIS platform using a third party application. But I prefer the output to be in Local UTM cordinates. What is the best practice? (a) Use the WGS_1984_Web_Mercator_Auxiliary_Sphere ( WKID: 3857) for my data; or (b) Use local UTM cordinate system for editing, and do a transformation, in case editing throws errors?


title: How to translate WIGeoEU projection from ArcGIS to Qgis?

text: I have a Layer with this projection in ArcGIS: > > PROJCS["WIGeoEU",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",10.0],PARAMETER["Standard_Parallel_1",40.0],PARAMETER["Standard_Parallel_2",60.0],PARAMETER["Central_Parallel",30.0],UNIT["Meter",1.0]] Whenever I try to open it with QGIS, this layer is somewhere out of space and I can't display it together with any other layers which should overlay. I try to convert this by hand to the format QGIS is using without any success. That's how the description of the shape looks in QGIS: Layer Spatial Reference System:               +proj=lcc +lat_1=40 +lat_2=60 +lat_0=0 +lon_0=10 +x_0=0 +y_0=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs      Is anyone able to help me with my issue? I am really frustrated :/


title: Which kriging method is the best for the rainfall?

text: I am working on an rainfall analysis and I have to interpolate some datas with kriging method. So is co-kriging the best one for the rainfall analysis?


title: How to find nearest neighbors of polylines?

text: I have a shapefile containing irregularly placed polylines (i.e., survey routes). Following the general idea of a paper I read, I would like to use tessellation to identify the neighbors for each polyline, but I have no idea how to accomplish that. I see there is a tool to create Thiessen polygons around points which (I think) is similar to what I want to do, but I don't see a similar option for lines. I am using ArcGIS 10.1. Any specific ideas on how to proceed would be much appreciated! * * * ### Additional information 1) The paper is here: http://www.esajournals.org/doi/abs/10.1890/03-5247. Their brief description: "We delineated a spatial neighborhood on an irregular lattice by tessellating the sample routes, and from this neighborhood structure derived an adjacency matrix of first-order neighbors." 2) The routes do not overlap. 3) I do have access to Spatial Analyst. 4) The goal is to determine the nearest neighbors of each polyline so we can control for spatial auto-correlation of count data from the routes.


title: show dwg,as background not as vector

text: I have some dwg files that i need to show as background on my map, but the DWG is not need to be vector layers, i need only to show them with out the need of using. if i am trying to convert it to DXF so the QGIS read it wrong, its convert everything to point and losing all the data. example for dwg file: ![DWG pic](http://i.stack.imgur.com/ugXXU.png) there is any way to show it like it is, without losing all the shaps when trying to convert to vector layer? maybe show it like raster? then what format its should be?


title: Change polygon "handedness" for SQL 2008

text: I have a few hundred shapes (`polygon`s and `multipolygon`s) each consisting of tens of thousands of points that I am trying to get into SQL 2008. Unfortunately, the shapes I have tried to import are "right-handed" (the perimeter of each one is drawn clockwise around the points it contains). SQL server assumes "left-handed" shapes (anti-clockwise around the interior), at least for `geography` types. This means that SQL assumes that I'm trying to select the entire earth _except_ for my shape. Some people describe this as "inside-out" shapes. From MSDN, which frustratingly doesn't say which ring orientation one is to use: > If we use the `geography` data type to store the spatial instance, we must > specify the orientation of the ring and accurately describe the location of > the instance. If you use the wrong ring orientation in SQL 2008, it crashes with the following error (emphasis mine): > A .NET Framework error occurred during execution of user-defined routine or > aggregate "geography": Microsoft.SqlServer.Types.GLArgumentException: 24205: > The specified input does not represent a valid geography instance because it > exceeds a single hemisphere. Each geography instance must fit inside a > single hemisphere. A common reason for this error is that a **polygon has > the wrong ring orientation.** Importing the shapes as `geometry` instead of `geography` works fine, but I'd like to use `geography` if I can. In SQL 2012, it appears fairly trivial to fix this problem, but I am tied to 2008. How should I convert the shapes?


title: Program crashes when trying to do intersection.

text: I'm trying to get the intersection between a highways shapefile and some states in Mexico but it seems that the program always crashes. I attach the images of what I'm trying to do and the error that comes at the end. Do you have any idea how could I get by other methods the desired intersection? Its strange because with a transmission lines shapefile it does work. Maybe its because the program cannot process all the data..![enter image description here](http://i.stack.imgur.com/1J0Sb.png) Any help would be really appreciated. Thanks a lot!


title: How to draw a Circle with a set radius?

text: I have a site and want to draw an indicative line in a 5km buffer around the centre of the site. So I want to draw a circle with a radius of 5km. I have a tool for drawing circles and ellipses and rectangles squares and spirals. None of these let me state the centre point and the radius.


**Question:**   Is there an out of the box Flexviewer set up for a Flex Mobile Project? **Background:**   I could just create a Flex Mobile AIR Project from one the samples that ESRI supplies, but that would require a bit more work to recreate an app that is based upon ESRI's ArcGIS Viewer. **Asked Here Initially:**   http://forums.arcgis.com/threads/33387-Flex-Viewer-for-Mobile- Applications?p=215235#post215235 **Flexviewer Github Page:**   https://github.com/ArcGIS/ArcGISViewerForFlex


title: Travelling salesperson in pgRouting without starting point

text: I'm a beginner with PostGIS and it's the first time I try pgRouting. I work for a regional transit agency and I'm trying to develop a mean to evaluate the easiness or difficulty to offer a bus service for the population of a certain area. "Traditionally", classic dispersion statistics where used, like the average nearest neighbor. In theory, it would be easier to offer a good service to a more dense population. But in reality, the road network have a great deal of importance. You can have a quite dense population, but on each side of a river or train track and if the nearest crossing is miles away, you will need to travel a lot longer to be able to pick up the maximum of persons. ![enter image description here](http://i.stack.imgur.com/gqjV1.png) We call it the "Pacman index" :) On the left, the theoric bus would pick up 6.7 persons/km. On the right, 5.3 p/km. The two populations have a average nearest neighbor of 1 km. Once we have the results, we'll compare them to our knowledge of the area and the service already offered (and see if a relatively "easy" area have many buses or if someone, somewhere is doing wonders to serve a difficult area). That's our theory and now we'd like to test it. I have a set of locations (every intersection within a city that could be a bus stop) and I am trying to find the shortest path between them. Looks like a classic TSP problem. My problem is that I really don't care about the starting point and it can pass twice on the same path too, as long as the result is the shortest path to "pass by" all locations. Network Analyst can do it, but it takes forever (my test dataset only have 2 dozen points, but my final one will have 1000+). With pgRouting, I have to assign a starting point and an end point (if I don't specify an end point, it's doing a loop and I don't want that. From the documentation, I've found this               CREATE TABLE tsp_route AS     SELECT seq, id1, id2, round(cost::numeric, 2) AS cost        FROM pgr_tsp('SELECT id, x, y, geom FROM vertex_table ORDER BY id', 6, 5);      It there a way to do this with pgRouting? Any help would be appreciated.


title: What is better for spatial data analysis? REST or SOAP?

text: I am working on agriculture forecasting project. It is the integration of SOA, web services, ontologies etc. What is better for spatial data analysis ? REST or SOAP ? WMS, WFS are used but either use REST or SOAP ? PLZ reply as soon as possible. I am going to use QGIS. So please give me suggestion in that context. Thank You.


title: How to open GDB files using QGIS in a Mac?

text: > **Possible Duplicate:**   >  How to get ".GDB" Esri File Geodatabase in Qgis for MAC OSX 10.6? I have some data located here: https://nycopendata.socrata.com/Facilities-and- Structures/Building-Footprints/xe92-xce7 I'm trying to import this data into QGIS and am unable. I'm a novice at this. Ultimately, I'm trying to upload it to indiemapper. Any help would be appreicated!


title: GDal problem: "Unable to open datasource" when I run "ogr2ogr" command

text: I am trying to load gdb file to postgis, I created a database "test", then run a command using "ogr2ogr".               sudo ogr2ogr -f "PostgreSQL" PG:"dbname=test user=postgres" planning.gdb     FAILURE:     Unable to open datasource `planning.gdb' with the following drivers.       -> ESRI Shapefile       -> MapInfo File       -> UK .NTF       -> SDTS       -> TIGER       -> S57       -> DGN       -> VRT       -> REC       -> Memory       -> BNA       -> CSV       -> GML       -> GPX       -> KML       -> GeoJSON       -> GMT       -> SQLite       -> PostgreSQL       -> PCIDSK       -> XPlane       -> AVCBin       -> AVCE00       -> DXF       -> Geoconcept       -> GeoRSS       -> GPSTrackMaker       -> VFK       -> PGDump       -> OSM       -> GPSBabel       -> SUA       -> OpenAir       -> PDS       -> WFS       -> HTF       -> AeronavFAA       -> EDIGEO       -> GFT       -> SVG       -> CouchDB       -> Idrisi       -> ARCGEN       -> SEGUKOOA       -> SEGY       -> ODS       -> XLSX       -> ElasticSearch       -> PDF      I have read that this is problem with gdal library               macbook$ brew install gdal     Warning: gdal-1.9.2 already installed      I found that gdal is installed, but when I tried to check the directory, I find nothing.               macbook$ which gdal     macbook$ which gdal


title: How do I get feature count of a QgsVectorLayer?

text: I'm using this code to get features from QgsVectorLayer                QgsVectorDataProvider* provider=theVectorLayer->dataProvider();                 if(!provider)                 {                     return;                 }                      theVectorLayer->select(provider->attributeIndexes(),theVectorLayer->extent(),true,false);         theVectorLayer->selectedFeatureCount();//here returns 0 but there is one polygon         while(theVectorLayer->nextFeature(currentFeature))                 {              ....//here Iget attributes and current geometry (one polygon)                 }      How do I get feature count? Method featureCount() returns -1.


title: GeoTools: SimpleFeatureCollection to KML error CoordinateReferenceSystem

text: I want to export a SimpleFeatureCollection (Read from a MySQL DB) to a KML file, here is my code used to read the infos into the console:               private void featureCollectionToKML(SimpleFeatureCollection features)             throws Exception {              Encoder encoder = new Encoder(new KMLConfiguration());         encoder.setIndenting(true);         encoder.encode(features, KML.kml, System.out);     }      When I run the program there are first some WARNINGS when I get the Features and then the program crashes with this error log: > PM org.geotools.referencing.factory.PropertyAuthorityFactory > > WARNING: Axis elements found in a wkt definition, the force longitude first > axis order hint might not be respected: PROJCS["Google > Projection",GEOGCS["WGS 84",DATUM["World Geodetic System 1984",SPHEROID["WGS > 84", 6378137.0, 298.257223563, > AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich", 0.0, > AUTHORITY["EPSG","8901"]],UNIT["degree", > 0.017453292519943295],AXIS["Geodetic longitude", EAST],AXIS["Geodetic > latitude", NORTH],AUTHORITY["EPSG","4326"]],PROJECTION["Popular > Visualisation Pseudo Mercator", > AUTHORITY["EPSG","1024"]],PARAMETER["semi_minor", > 6378137.0],PARAMETER["latitude_of_origin", > 0.0],PARAMETER["central_meridian", 0.0],PARAMETER["scale_factor", > 1.0],PARAMETER["false_easting", 0.0],PARAMETER["false_northing", > 0.0],UNIT["m", 1.0]] > > ott 23, 2013 4:06:49 PM org.geotools.feature.simple.SimpleFeatureTypeBuilder > add > > WARNING: Creating LookAt with null CoordinateReferenceSystem - did you mean > to setCRS? > > ott 23, 2013 4:06:49 PM org.geotools.feature.simple.SimpleFeatureTypeBuilder > add > > WARNING: Creating Region with null CoordinateReferenceSystem - did you mean > to setCRS? java.lang.RuntimeException: Failed to get property: id at > org.geotools.xml.impl.GetPropertyExecutor.visit(GetPropertyExecutor.java:105) > at > org.geotools.xml.impl.BindingWalker$BindingExecutionChain.execute(BindingWalker.java:220) > at org.geotools.xml.impl.BindingWalker.walk(BindingWalker.java:186) at > org.geotools.xml.impl.BindingVisitorDispatch.walk(BindingVisitorDispatch.java:47) > at > org.geotools.xml.impl.BindingVisitorDispatch.walk(BindingVisitorDispatch.java:32) > at org.geotools.xml.Encoder.encode(Encoder.java:902) at > org.geotools.xml.Encoder.encode(Encoder.java:603) at > shapefileManager.ShapefileManager.featureCollectionToKML(ShapefileManager.java:173) > at > shapefileManager.ShapefileManager.convertArchiToFeatuesKML(ShapefileManager.java:114) > at Main.Test.main(Test.java:19) Caused by: > java.lang.UnsupportedOperationException at > org.geotools.data.store.ContentFeatureCollection.getID(ContentFeatureCollection.java:492) > at > org.geotools.kml.bindings.FeatureTypeBinding.getProperty(FeatureTypeBinding.java:284) > at > org.geotools.xml.impl.GetPropertyExecutor.visit(GetPropertyExecutor.java:103) > ... 9 more I can't understand which is the problem... Here is how I get the SimpleFeaturesCollection from MySQL DB > public void convertArcsToFeatuesKML(String[] ids) { >   >   >       try { >   >   >           FilterFactory2 ff = CommonFactoryFinder.getFilterFactory2(); >   >           Set<FeatureId> fids = new HashSet<FeatureId>(); >   >           for (int i = 0; i < ids.length; i++) { >   >               fids.add(ff.featureId(ids[i])); >   >           } >   >           Filter filter = ff.id(fids); >   >           SimpleFeatureCollection features = featureSource >                   .getFeatures(filter); >   >           this.featureCollectionToKML(features); >   >       } catch (Exception e) {             e.printStackTrace();        }   } >   FeatureSource is the MySQL DB. PS I've checked, with the getId() method, and all features have an unique ID.


title: Prevent OpenLayers WMS layer cache by browser

text: I am using OpenLayers (GeoExt) with google chrome browser. All WMS layer is for live database. I have refreshed the browser at certain interval using javascript but the data is cached in browser and when I refresh web page I see old data. When I clear cache from browser I see new data. How do I prevent caching or clear the cache automatically?               function RefreshPage(Period) {         setTimeout("location.reload(true);", Period);     }


title: Bulk field rename in file geodatabase

text: I have a file geodatabase with several hundred feature classes in it. Some feature classes have a field that got named incorrectly, and it got named "SCHEMA_FEATURECLASS_ENTITY" instead of just ENTITY. Consequently, their final destination (Oracle) complains about the very long field names. I'd like to rename those fields to have their proper short name. I did find this article on changing aliases but (from what I understand) renaming a field is an add-copy-delete operation rather than just setting a property. Has anyone got a quick-and-dirty method for doing a bulk rename? I have ArcCatalog 9.3.1 but NOT Visual Studio (client environment...).


title: Python27 in Quantum GIS is missing SQL drivers in PyQT4

text: I am developing a QGIS plugin and need to create a table view in my GUI that I have been designing with QT Designer. I have PyQT4 installed but I have noticed that I have 2 Python directories. I have one main install on my C: drive and one in my Quantum GIS directory. Both of these Python folders have PyQT4 installed, but the contents of the folders are different. The main issue that I am having is that while the main install of Python has everythign I need to connect to a postgres databased, the Quantum GIS install of PyQT4 has the QSql module but not the drivers to connect to the database! I don't know why this is or how I can get a complete install of PyQT4 in the QGIS version of Python? Can anyone help? Cheers, Roman


title: Linking SharePoint database with ArcGIS...possible?

text: Ok, so I the organization I am working for has a sharepoint database that multiple people update every time they do an inspection of natural resources on a parcel in the county. This database has the following fields: *Parcel Number *Date *Notes *Inspector *Action I have created a feature class with a centroid with these attributes placed in each parcel that has been inspected. Is there a way to dynamically link the sharepoint database to the geodatabase so that when they go in and change/add anything to the notes section it actively changes (and adds new points to newly listed parcels) the attributes in the featureclass? If this isn't entirely clear, let me know! THANKS! IF NOT: This layer only needs to be updated monthly. I am able to export it to a excel or csv file. Is there a quick way to create the centroids layer from this table? THANKS AGAIN!


title: Income data on a block level: how does a newbie do it?

text: I am a complete newbie at GIS data, and am trying to do the following:   1. Figure out census blocks in Miami-Dade (and several other counties) that have average household incomes > $75,000   2. Get the latitude-longitude boundaries of those blocks   3. Plot the blocks on a map 1 and 2 are the most important. What is the best way to get this data, and then the lat-long boundaries? Quickest, easiest, cheapest are of course the top criteria. Thanks so much! David


title: Re: QGIS - Select Feature gives nonsensical results

text: > **Possible Duplicate:**   >  QGIS - Select Feature gives nonsensical results Thank you for your replies. To address some points raised, firstly in the attribute table I don’t see a ‘show selected only’ option, but there is a ‘move selection to top’ option. Secondly yes I was using one of the selection tools - the ‘select features by polygon’ one. Thirdly I realise that what I have is polygons and that only distances between points of the polygons can be measured. The distance matrix was being calculated on centroids. There are two ways to select the area I am interested in. (i) Go to View menu > select > select features by polygon. Then go to Layer menu > save selection as vector file. Change shapefiles by using ‘remove layer’ / add layer’ functions. With selected area now loaded, go to Vector menu > Geometry tools > Polygon Centroids > create centroids file. Add new layer to the TOC. Then Vector menu > analysis tools > distance matrix. (ii) Since I already knew which CAUs I wanted to calculate distances for, the alternative was to edit the (whole country) DBF file in a spreadsheet, deleting all but the Auckland region. If the choice is (i), then the selected area looks right in the map, but the areas in the attribute table are wrong. If the choice is (ii), then the attribute table is correct, but the areas depicted in the map are discrete or discontinuous parts of the whole country, instead of the Auckland region. I presume by ‘manually selecting the layer’ you mean clicking on (highlighting) the correct layer in the layer panel of the GUI (which the User Guide calls the map legend). I removed polygon layer, retaining the centroids layer, and performed multiparts to singleparts conversion. The feature count was the same. If you need to know, coordinate reference system is set as NZGD2000/New Zealand Transverse Mercator 2000. So after addressing all the above points I still don't have a resolution. BM


title: I can project from UTM (zone 10) into State Plane (Oregon), but I can't do the reverse -- why not?

text: I have an air photo with the following xy coordinate system name: NAD_1983_StatePlane_Oregon_North_FIPS_3601_Feet_Intl and the following in the description field: Projection:               Lambert_Conformal_Conic false_easting: 26909776.041774       false_northing: 0.000000       central_meridian: -120.500000       standard_parallel_1: 44.333333      standard_parallel_2: 46.000000      latitude_of_origin: 43.666667      Linear Unit: Foot (0.304800)      Geographic Coordinate System:               GCS_North_American_1983     Angular Unit: Degree (0.017453292519943299)     Prime Meridian: Greenwich (0.000000000000000000)     Datum: D_North_American_1983       Spheroid: GRS_1980         Semimajor Axis: 6378137.000000000000000000         Semiminor Axis: 6356752.314140356100000000      I cannot project either the air photo or a shapefile with the same spatial reference into UTM Zone 10 (regardless of whether it's NAD27 or NAD83). Why not? How can I overcome this problem? I get a generic projection error (error 999999; failed to execute). Help!


title: How do I create forms using Geodatabase's related tables in ArcPad Studio 10?

text: I have a Geodatabase with a Points table and number of related tables. The reason for the related tables is because of the large number of fields. The relationships are reconginsed by ArcGIS and ArcPad Studio OK. I'm trying to generate a number of forms based on this Geodatabase. A form is automatically created for me using the primary (points) table in ArcPad Studio, but the related tables are only shown in the Attribute tab. I have tried to create a forum using the "Related Tables" button, thinking I could call this form using a button on the main form. So on the main form I've placed a VBScript code to say `frmChild.Show`. Where frmChild is based on the related tables. But this gives me an error saying `Object doesn't support this action`. Any one have any idea what how I can create from using related tables and display them? Thanks


title: Ideas for showing Land Use and Zoning on a Single Map

text: I was wondering if any of you had any creative ways to clearly show zoning and landuse together on a single map. I thought about showing one in a thick outline and the other in a fill with no outline but wondered if any of you had any better ideas. Does anyone have a better idea? Thank you in advance.


title: Anyone know where I can find a file like this for Pakistan?

text: Can anyone tell me where I can find a file like this on Pakistan? I found it on ochaonline.un.org I cannot find it when I search on there. http://www.scribd.com/doc/38714310/Afghanistan-Settlements-Index-A3 Thanks,


title: Programmatically calculating the length of all polyline features in a featureclass

text: I've come across this issue a few times and have not yet found an agreed upon solution on any forum. Simply put, I have a featureclass containing many polyline features. I would like to calculate the lengths of each feature and write that value to a new field, which I have already added to the featureclass. I know that I can export the featureclass to a geodatabase and have the length calculated automatically, but that doesn't make much sense in terms of programmatic workflow. It seems like I might be missing something simple, but there are obviously others out there with the same unanswered question. EDIT: I should have been more clear. I would like to carry this out using ArcObjects. The field calculator method that keeps coming up does not appear to work for this purpose. EDIT 2: I've sorted out one method for doing this using ArcObjects. Solution/Code is below. Thanks for all the help and suggestions. The following code assumes you are operating on IFeatureClass and have already added a field called "Length" to the existing FeatureClass (which contains a series of polyline Features). I have tested it on a shapefile containing about 300 polyline Features.                           Dim nLengthFieldIndex As Integer = pFCXS.FindField("Length")                 Debug.Assert(nLengthFieldIndex > -1)                 Dim dLength As Double                 If TypeOf pFC Is IFeatureClass Then                     Dim pFeatureCursor As IFeatureCursor                     pFeatureCursor = pFC.Search(Nothing, False)                     If TypeOf pFeatureCursor Is IFeatureCursor Then                         Dim pFeature As IFeature = pFeatureCursor.NextFeature()                         While pFeature IsNot Nothing                             Dim pLine As IPolyline                             pLine = pFeature.Shape                             If TypeOf pLine Is IPolyline Then                                 dLength = pLine.Length                                 pFeature.Value(nLengthFieldIndex) = dLength                                 pFeature.Store()                                 pFeature = pFeatureCursor.NextFeature                             End If                         End While                     End If                     pFeatureCursor.Flush()                 End If


title: How to print semi-transparent elements?

text: I highlight some features with a semi transparent color via an `ILayerExtensionDraw`. When I print the ActiveView of the PageLayoutControl with IPrintAndExport the highlightning is not on the printout. In the print method I get the printers HDc and save it to a static variable which the LayerExtension reads from.                 System.Windows.Forms.PrintDialog printDialog = new System.Windows.Forms.PrintDialog();       System.Windows.Forms.DialogResult res = printDialog.ShowDialog();       if (res == System.Windows.Forms.DialogResult.Cancel)         return false;            // ... assigning printer settings here...            System.Drawing.Graphics graphics = printDialog.PrinterSettings.CreateMeasurementGraphics();       MyLayerExtension.CurrentPrinterHdc = graphics.GetHdc();            PrintAndExport.Print(docActiveView, docPrinter, _pageLayoutControl.PageLayout.Page, 1, iResampleRatio, null);            graphics.ReleaseHdc();       MyLayerExtension.CurrentPrinterHdc = IntPtr.Zero;      The LayerExtension reads the IntPtr and uses it to draw the highlightning to the printer, but it is not shown on the print out.               SimpleFillSymbol fillSymbol = new SimpleFillSymbol();     fillSymbol.Style = esriSimpleFillStyle.esriSFSSolid;     fillSymbol.Outline = new ESRI.ArcGIS.Display.SimpleLineSymbol();     fillSymbol.Color = Utilities.CreateColor(System.Drawing.Color.Khaki);     pDisplay.Filter = new TransparencyDisplayFilterClass { Transparency = 127 };      pDisplay.SetSymbol((ISymbol)fillSymbol);     pDisplay.StartDrawing(pDisplay.hDC, (System.Int16)ESRI.ArcGIS.Display.esriScreenCache.esriNoScreenCache);     if (CurrentPrinterHdc != IntPtr.Zero)       pDisplay.StartDrawing(CurrentPrinterHdc.ToInt32(), (System.Int16)ESRI.ArcGIS.Display.esriScreenCache.esriNoScreenCache);     pDisplay.DrawPolygon(feature.Shape);     pDisplay.FinishDrawing();      The LayerExtension does get called on printing. What did I miss? **Update** As far as I understand the HDc now the drawing on the printers handle would only work, if I use the HDc to print later on again, which is not a real option. Is there any other way to get the transparent (!) highlightning printed?


title: Cloudmade Web Maps API  Marker Clustering problem

text:
I've just started learning Cloudmade Web Maps API. I'm at marker clustering, and I'm facing a strange problem; whenever I try accessing the page below, `content of elements must consist of well-formed character...` trace is shown, and the map doesn't render. My code is shown below:               <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">                           <title>CloudMade Marker Clustering</title>

                                 It appears simple, but I can't spot the problem. Any assistance will be appreciated. Thanks in advance.


title: how to put a cropped selection of a map into the composer

text: I have a map canvas and I want to have a portion of that canvas printed. I adjust the canvas window in QGIS to show what I want to print and then add the map to the composer. The results are very hit and miss. It never quite does what I want, in most cases I get more of the canvas than is displayed in the qgis window. I then have to fiddle endlessly with the scale and extents to get what I want. There must be a easier way! ;)


title: Merging Multiple Paths

text: Alright, I'm going to start by using Google Earth terminology because that's where the original need for a solution came up. I have multiple paths (54) that I want to merge into a single path. Using QGIS I converted to .shp file, but it still maintained the 'feature subset'. So next question - within QGIS does anyone know of any easy way to merge the features of a single shp file?


title: How to work with Microstation DGN v8i files in QGIS?

text: I have a set of multiple files in DGN format (Microstation V8i). I would like to work with them in Qgis. Since QGIS only support pre-V8i dgn files, I cannot directly open the files. My first idea was to find a way to publish DGN files on a WMS service and then import it in QGIS. Do you know any software that will allow me to publish dgn files in WMS ? Is there a better way to work with dgn files in QGIS? A little precision : it is not a one time work that I want to do : people work all the times on these dgn files and I need to open them in QGIS.


title: What are the options for working around the max number of records returned for a query task on ArcGIS Server 9.3.1?

text: I'm trying to return polygon features that intersect a larger polygon which defines my area of interest. It is working in some cases, but when the area of interest gets large (7000 intersecting records) it is not working. The MaxRecordCount property in the configuration file at _ArcGIS install location\Server\user\cfg\configuration file name.cfg_ was increased to 10,000 but still no records were returned. I have read about an upper limit of 2000 records and the queries that are working correctly return less than this number of records. One idea is to split the area of interest into parts. An FAQ I read suggest to iterate through consecutive blocks of results on the client by using the field that contains a unique key (e.g. primary key) to track progress. And it seems the number of attributes in the records returned may have an impact. What works for others? I am not the programmer, but I'll include the code being used.                    Private Sub QueryTask_ExecuteCompleted_Zoom_Filter_Events_Layer(ByVal sender As Object, ByVal args As ESRI.ArcGIS.Client.Tasks.QueryEventArgs)                  'special code just for Event Filter option             'save the selected polygon to use to retrieve all parcels within it                  Try                           Dim featureSet As FeatureSet = args.FeatureSet                      Dim myGraphicsLayerSelectedFeature As ESRI.ArcGIS.Client.GraphicsLayer = TryCast(MyMap.Layers("GraphicsLayerSelectedFeature"),                                               ESRI.ArcGIS.Client.GraphicsLayer)                 myGraphicsLayerSelectedFeature.ClearGraphics()                      If featureSet IsNot Nothing AndAlso featureSet.Features.Count > 0 Then                          Dim selectedFeature As Graphic = featureSet.Features(0)                          ' *****************************************************                     ' Hightlight selected feature                     selectedFeature.Symbol = TryCast(gridGISMapInteractive.Resources("BlueLineFillSymbol"), ESRI.ArcGIS.Client.Symbols.Symbol)                     'graphicsLayer.Graphics.Add(selectedFeature)                     myGraphicsLayerSelectedFeature.Graphics.Add(selectedFeature)                               ' *****************************************************                     ' Zoom to selected feature (define expand percentage)                     Dim selectedFeatureExtent As ESRI.ArcGIS.Client.Geometry.Envelope = selectedFeature.Geometry.Extent                          Dim expandPercentage As Double = 90                          Dim widthExpand As Double = selectedFeatureExtent.Width * (expandPercentage / 100)                     Dim heightExpand As Double = selectedFeatureExtent.Height * (expandPercentage / 100)                          'save the selected polygon envelope     polygonExtent = New ESRI.ArcGIS.Client.Geometry.Envelope(selectedFeatureExtent.XMin, selectedFeatureExtent.YMin, selectedFeatureExtent.XMax,                           selectedFeatureExtent.YMax)                     MyMap.ZoomTo(polygonExtent)                               ' *****************************************************                     'query the parcels in the selected filter polygon                     Dim strQueryLayerID As String = CType(Convert_Web_Service_Layer_Name_To_Index("Parcel MBL"), String)                          'query a specified layer to find data that intersect with the polygon buffer around the selected point                     Dim queryTask As New QueryTask(CityOfWorcester.Url & "/" & strQueryLayerID)                     AddHandler queryTask.ExecuteCompleted, AddressOf QueryTask_ExecuteCompleted_Polygon_Parcels_Filter_Events                     AddHandler queryTask.Failed, AddressOf QueryTask_Failed_Polygon_Parcels                          Dim query As New ESRI.ArcGIS.Client.Tasks.Query()                     query.ReturnGeometry = True                     'query.Geometry = polygonExtent                     'query.Geometry = selectedFeature.Geometry                     query.Geometry = selectedFeatureExtent                     'query.SpatialRelationship = SpatialRelationship.esriSpatialRelContains                     query.SpatialRelationship = SpatialRelationship.esriSpatialRelIntersects                               'specify which fields to return (must be case specific)                     'Output Fields are specific to the layer being queried                          query.OutFields.AddRange(New String() {"X_COORD"})                     query.OutFields.AddRange(New String() {"Y_COORD"})                     query.OutFields.AddRange(New String() {"HOUSE_NO"})                     query.OutFields.AddRange(New String() {"STREET"})                     query.OutFields.AddRange(New String() {"GISGPV_MBL"})                     query.OutFields.AddRange(New String() {"MBL"})                               queryTask.ExecuteAsync(query)                           End If                  Catch ex As Exception                 HandleError(ex, False)             End Try              End Sub


title: Flow mapping visualization using a road layer

text: I am trying to illustrate travel using a flow map on a road layer. My data is:   * city of origin   * destination   * number of travelers I would like to use a polygon city layer (or point) and a road layer, with line thickness representing volume of travelers. Any suggestions would be great :-) I am using qgis but open use other platforms if it recommended Cheers, Luke


title: Openlayers vector feature coordinates are not transforming,

text: I have a OpenLayers vector with a single feature [0]. It's coordinates are in the map projection (EPSG:3413) and I want them in WGS84 (EPSG:4326) decimal degrees. I have the following code which executes with no errors.                   // Transform the polygon to WGS84 (EPSG:4326)             polybound.features[0].geometry.transform(new OpenLayers.Projection("EPSG:3413"),new OpenLayers.Projection("EPSG:4326"));                  // Get the extent/vertices of the polygon drawn             var polyBounds = polybound.features[0].geometry.getVertices(); alert(polyBounds);             var polyExt = polybound.features[0].geometry.getBounds(); alert(polyExt);      However both the alerts show the untransformed coordinates. Eg: alert(polyBounds);               POINT(-2486558.28125 -1947299.71875),POINT(-4121511.40625 -1737690.34375),POINT(-3555566.09375 -2722854.40625)      alert(polyExt);               -4121511.40625,-2722854.40625,-2486558.28125,-1737690.34375      How do I get the vector feature coordinates to transform correctly?


title: Exporting PDF from QGIS with print composer without destroying fonts

text: So I'm making this nice map with a lot of labels which are going to end up in a book. Since the labels doesn't end up exactly where I want them I'd like to move them some in Illustrator after exporting them using the Print composer. The only problem is that when exporting to PDF the text is not text anymore, QGIS transforms it into paths instead of leaving the font alone. Does anyone know a workaround so the labels stays as fonts when opening the image in Illustrator?


title: Using very large image formats with GDAL

text: I would like to use `gdalwarp` and `gdal_translate` with some very large raster images (313,040 x 313,040 px) and I'm wondering what the best format or method is to do this, if it's even possible. I have the file in Photoshop, which at that size can only output Large Document Format (.psb) files, which I don't think gdal can read. Will gdal even be able to handle such a sized document? If so, how can I convert it to a format gdal can use?


title: QGIS merge selected features tool malfunctions due to geometrical errors

text: The issue occurs using the 'Merge Selected Features' tool when there are geometrical errors in the features (not all are picked up by the 'check geometrical validity' tool). In 2.2 Valmeria, the merge fails to complete. This is acceptable, as it alerts me that I need to fix geometrical issues with the features. In 2.3 nightly build from 12th June, the merge fails to complete, and at least one of the features is deleted. This can be undone, but it is a worry, as the user might not notice on time. Anyone experienced similar, or advice if I should report this somewhere?


title: Rasterize line shapefile

text: I'm trying to convert a line shapefile to a raster image at QGis, but my attempts have been unsuccessful. I've tried to use Raster/Conversion/Rasterize and SAGA/Grid - gridding/Shapes to grid, but to no avail. Is there any other way to accomplish this?


title: Leaflet drop markers animation

text: Is it possible to do drop markers on the map like in google maps (https://google- developers.appspot.com/maps/documentation/javascript/examples/marker- animations-iteration) in leaflet


title: How to Page POST to web page to Print Map with ArcGIS for Server 10.1?

text: I am using ArcGIS for Server 10.1. I need pass in a lat/long to a webPage as query parameter and print a map with a TiledMapServiceLayer, DynamicMapServiceLayer, and a 1 mile buffer graphic around the lat/lng. Any ideas how I can do this? I tried the ESRI javascript API but problem is that I have to let the map render before I print, otherwise this option would work. I thought about using the REST API by it self and then mashing the images up together, but I am not sure how I would print the buffer graphic. I need to be able to call a webpage with a query param generate an image because the current SSRS takes the response for the request (a path to the image) and embeds it in the report. I know it's not the best way to do this, however, I am just trying to modify something that already exists without reworking everything.


title: Get Polygon or IGeometry from Envelope in ArcObjects

text: I would like to create a Polygon Feature from the geometry of an IEnvelope in C# ArcObjects SDK 10. Is there an easy way how to do it?


title: How to clip point features by polygon grid?

text: I am trying to adapt the "Batch clip in ArcGIS 10" script I found on GIS.StackExchange to my needs. I would like to do this in Python as a learning experiment. My data:   * Point data   * Standard numbered grid My goal is to output point_1, point_2, point_3, {...}, point_n Help me think about the problem. Since I'm not going to be "clipping" polygon data, can I accomplish this with a batch select? I've been doing some reading about batch clips, but have not written anything useful yet.


title: Iterate through multiple Raster files and compute statistics using Zonal Statistics

text: I have a large number of raster images. What I'd like to do is to compute statistics on different sections of these raster files using a polygon. I think everyone is suggesting Zonal statistics. However, I'd like to iterate through all the raster datasets and then store their statistics in a single table. Zonal statistics does this for one raster and then overwrite it next time. I used the %Name% inline variable as for my table name, but that just creates lots of tables. How can I iterate through all this raster datasets and create only one table? Thanks


Could somebody help me? How to open InfoTemplate programmatically??? Using of FeatureLayer.selectFeatures(...) not helps. Here is example: http://jsfiddle.net/gfV2K/ When I click on the map then single feature selected and InfoTemplate is opened. But when I click some feature in the grid then single feature selected and InfoTemplate isn't opened! So how to open InfoTemplate in this case? May be there is a way to simulate this behavior (for example by calling map.click() event)?


title: Wrong output wth group by and aggregate function in spatialite

text: I have a grid and for every cell I want to set the column "landuse" according to the largest intersecting polygon.               SELECT        grid.PKUID,        landuse.landuse,       MAX(AREA(INTERSECTION(grid.Geometry,landuse.geom)))     FROM grid, landuse     WHERE Overlaps(grid.Geometry,landuse.geom) OR WITHIN(grid.Geometry,landuse.geom) OR  INTERSECTS(grid.Geometry,landuse.geom)      GROUP BY grid.PKUID      Without the max() the table would look like this               PKUID | landuse | AREA(INTERSECTION(grid.Geometry,landuse.geom))     168     mais      0.14     168     wheat     0.04        ...      and this is what i get with the above query:               PKUID | landuse | MAX(AREA(INTERSECTION(grid.Geometry,landuse.geom)))     168     wheat     0.14     ...      so the maximum value is selected but it doesn't tale the corresponding landuse. I PostgreSQL i would need to write the group part like this               GROUP BY grid.PKUID, landuse.landuse      but when I do this in my Spatialite query the aggregate function doesn't work and the result looks like i wouldn't have used it. Any suggestions how to solve this?


title: What is the complexity of neigborhood search in PostGIS?

text: I have a point with coordinates x and y. I want to know all the points in a square around this point, with side L. For this, in postgresql/PostGIS, I use:               SELECT * FROM table_of_points WHERE (ST_Transform(the_geom,srid) && ST_MakeEnvelope(" + str(x-L) + ", " + str(y-L) + ", " + str(x+L) + ", " + str(y+L) + ", srid )      with srid being the Spatial Reference System Identifier. What is the computational complexity of this query in PostGIS?


title: Mystery duplicate values

text: I'm using a unique list to populate up to 10 fields for a fc with correct geometry, in an "overloading" manner as you would in excel. I noticed on my first run through I had an "index out of range" error, which was strange as values should not populate more than 10 fields per record. I did a bit of an error check with a "break" and print, and it seems from the final result that there are duplicate values being entered where there most definitely should not be. Problem code:               for x in uniqueList:         query = "[BAND_NUM] = \"%s\"" % x         if x <> "" and x <> " " and x is not None:             try:                 gp.MakeFeatureLayer("FIRST", "lyr1")                 gp.MakeFeatureLayer("END", "lyr2")                 gp.SelectLayerByAttribute("lyr1", "NEW_SELECTION", query)                 gp.SelectLayerbyLocation("lyr2", "HAVE_THEIR_CENTER_IN", "lyr1", "", "NEW_SELECTION")                      cursor = gp.UpdateCursor("lyr2")                 urow = cursor.next()                 count = 0                 print x                      # update NULL or blank fields                 while urow:                     # this was my error check                     if count == 10:                         print count                         break                          if urow.getValue(fieldvalues[count]) is not None and urow.getValue(fieldvalues[count]) <> "":                         count += 1                     # go to next feature only after an update                     else:                              urow.setValue(fieldvalues[count], x)                         cursor.updateRow(urow)                         count = 0                         urow = cursor.Next()                           gp.SelectLayerByAttribute("lyr1","CLEAR_SELECTION")                 gp.SelectLayerByAttribute("lyr2","CLEAR_SELECTION")             except arcgisscripting.ExecuteError:                 gp.AddError(gp.GetMessages(2))             finally:                 gp.Delete("lyr1")                 gp.Delete("lyr2")                 del urow, cursor          del gp      The list looks like - fieldvalues = ['FN1', 'FN2', 'FN3', 'FN4', 'FN5', 'FN6', 'FN7', 'FN8', 'FN9', 'FN10'] I believe the problem is in the way I'm trying to loop this - my first if statement has no cursor.next() because I want to stay on the same record, at a higher index. The logic is that if the record gets updated, go to the next one in the cursor. I had something similar before where I would append one field in a comma delimited manner, but it appears I won't be using a look-up table so 10 fields is the way I'm going. Here's an example of the duplication - ![pic](http://i.stack.imgur.com/XBFoE.png)


title: OpenLayers how to maintain layer ordering while using SelectFeature control

text: I'd like my map to display a few layers in a particular order. Some of these layers are Vectors, others are XYZs, and some of my Vector layers display attribution. Initial layer ordering works fine until I attempt to provide attribution for some of my vector layers. The problem comes when I use the SelectFeature control to handle vector attribution. Those layers that are added to this control are then rendered on top of the map's other layers (preventing the layers from being ordering in a meaningful manner). I'm seeking a solution that allows the attribution of some vector layers while also allowing control over the layer rendering order. I've filed an OpenLayers bug report: https://github.com/openlayers/openlayers/issues/661 Sample code can be found here: https://gist.github.com/3537881 And an example of that same code can be viewed here: http://labs.ecotrust.org/selectfeature/selectfeatureanomaly.html This example demonstrates the re-ordering that occurs when the SelectFeature control is activated and deactivated (click on the Activate Control link under the map). Again, I'm looking for a solution that allows me to maintain control over layer ordering while providing attribution for a subset of the rendered vector layers. -Scott


title: How to Speed Up ArcGIS 10.1 for Desktop Generating Near Table on Polygon Feature Classes?

text: I am trying to create a near table to link two datasets. The first consists of the outlines of about 1.8 million buildings, the second a 3 meter buffer around these buildings, which as been merged together where multiple buffers overlap. I want to identify the buffer closest to each building. I used the **Generate Near Table** tool which appears to be working, but is running very slowly. I left it running for 47 hours and it only managed to produce 4700 records. As I have 1.8 million to do I want to know if there is anything that I can do to make this tool run more efficiently. I've got the 64 bit geo-processing installed and enabled multi-core processing. I don't think it is the computer which is 6 core @ 3.2 GHz, Windows 7 64 bit, 16 GB of ram, with Solid State Disk.


title: How to calculate the maximum distance within a polygon in x-direction (east-west direction) in PostGIS?

text: I am interested in the maximum width of a polygon, _e.g._ a lake, in the east- west direction. Bounding boxes will help only in simple polygons but not in complex concave polygons.


title: Counting points along a polyline at a given distance of every 40 Ft

text: I've got a polyline representing a pipeline and have a pig run that has metal loss. I am going to create a points shapefile in ArcMap 9.3.1 of the metal loss locations along the pipeline but want to do it like a sliding rule every 40 ft., giving me a count of the metal loss points per 40' section. What would be the best way to perform this task in arcmap? TIA!


title: Set Raster Cells Based on NoData from other Raster

text: I have just no clue on this problem. I want one raster to set its values to 0 or NoData based upon another raster noData or 0 values. It's like a reclassify, but between two different raster's. I have a picture here to help illustrate: ![Raster Illustration](http://i.stack.imgur.com/9Uyzd.png) I have two raster here: one is a depth raster (the one with the reds and has a flow look to it) and the other is a velocity raster (the one with the straight breaks). I'd like to have the Velocity raster only exist where the Depth raster exists. I think this needs to be done in raster calculator or a clip, but so far I haven't found any way to do this. Any help would be great, thanks!


title: Display a link in a popup with Leaflet

text:
**Hey there!** Im working with the Leaflet javascript library. There should be an option to click on my map and view a popup. I already have a code for that:               var popup = L.popup();          function onMapClick(e) {     popup         .setLatLng(e.latlng)         .setContent(e.latlng.toString() + "
Visit Google")         .openOn(map);     }          map.on('click', onMapClick);      This code is working, but my question is: how can i put an link to that popup? For example there should be a link called "Visit Google". When you click on that link it should open www.google.com ( _surprise_ ). I think it should be in the **.setContent(e.latlng.toString())** tag, because I can add there a text like **Visit Google** (as you can see). ![](http://i.stack.imgur.com/GzXAb.png) Any ideas ? Thanks for your help :)


title: Tiled raster image to be placed in an OSM/ Leaflet.js map

text: I have a mapoverlay in a custom projection which I need to add as a layer to an Openstreet map within a website. Since I was not able to change the projection earlier, I decided to manipulate the raster image in Photoshop in order to make it "fit" onto the Openstreet base map. Now I have a png file with the "correct" projection. My problem is that I now have to make tiles from this image which can be used as overlay and thus need to set the correct coordinates. I can find out the exact lat/lon values using OSM but how can I tell `gdal2tiles` where the top-left or bottom-right position of my image is? My command line so far is:               $gdal2tiles.py -p 'raster' myimage.png      What I am missing is an idea on how to set coordinates. Do I have to use another tool prior to tile-making?


title: How to merge attributes fields and their values into a single table using a common key with FME

text: I am having difficulties with a relatively simple task. I have multiple transformers which append an attribute to an "ElementID" coming from different transformers. I would like to merge all outputs into a single table based on the ElementID field thus having a schema like "ElementID","Attribute01, Attribute02, Attribute03 instead of having 3 tables with ElementID, Attribute01 in table 1, and ElementID, Attribute02 in table 2 etc. Not all ElementIDs have all three attributes..ie there will be missing attributes. How do I achieve this with FME 2014.


title: ArcGIS Server 10 - Query numeric field with string

text: In ArcGIS Server 10, I am running queries against several fields in a feature class. All of them are sent with the format FIELDNAME ='value' (all queries contain the single quotes). This is failing in cases where have numeric data. Is there any kind of setting I can use with the map service to allow me to query numeric data with strings?


title: Cause of Field Calculator UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' in position 5: ordinal not in range(128)?

text: def Befahrung(value1,value2):       if value1 is ' ':         return ' '       else:      return "G:\\Example\\" + str(value1) + "\\File_" + str(value2) + ".pdf"      I try to create a field with a hyperlink. It works very well until i hit a special charakter. What do i have to change? This is the error: > ERROR 000539: Error running expression: Befahrung(u" ",u"Mönch") > > Traceback (most recent call last): > > File "", line 1, in > > File "", line 5, in Befahrung > > UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' in position > 5: ordinal not in range(128)


title: Installing ArcGIS 10 with Python(x,y)

text: EDIT 10/20/2011: The problem I was having below was caused by trying to install Python(x,y) after ArcGIS 10. I got a new machine yesterday and instructed IT to install Python(x,y) 2.6.5.3 (has correct numpy version for Arc). I had them run a non- scripted installation of ArcGIS 10 so we could make sure the installer didn't try to give us a second version of Python. I now have a single Python directory and ArcPy works (so far); as of right now I'm considering this issue resolved. * * * I have what would seem to be an issue with a clear and easy answer, but so far I haven't been able to find a suitable one. Here is the situation: I need to have both ArcGIS 10 and Python(x,y) installed on a server that is accessed by multiple users in order to accommodate everybody's needs. Because both of these pieces of software install their own version of Python 2.6, the libraries installed by one cannot be accessed by the other. In other words, if we install ArcGIS before Python(x,y) we can use all of the goodies like MatPlotLib, numPy, etc., but the arcPy module is unavailable and vice versa. To solve this problem I tried adding the path to the various libraries to the python path of the "active" version of Python to no effect, ala this thread: Problems setting up eclipse (with PyDev) for ArcGIS 10. We could possibly resort to installing ArcGIS 10 and then try to manually install all of the libraries that are included with Python(x,y), but this would not be an ideal fix. Alternatively we could install ArcGIS 9.3.x since that comes with Python 2.5, but I would prefer to have all of the functionality that is available with the new arcPy module. If someone out there has already encountered this and has any other suggestions I'm all ears! We are working in the Windows Server 2008 R2 environment.


title: Table structure for a reverse geocoding database

text: I should start by saying that I do not have much experience with GIS so this question may be foolish. What I do have is a database for performing a lookup from a set of coordinates to find the bounding box or LSD in which they reside. At the moment the database contains several thousand tables and we run some client side code to decide on which table to query, load that entire table back to the client and filter it client side. That seems dramatically inefficient to me as we are passing back quite a lot of data. Each table defines a large area at which to look and each record defines a smaller area. The areas are defined by 4 corner points. I suppose the original design was based on a quadtree but instead of there being four children and many levels it was decided to have only two levels and many children at each level. I am looking to perform some optimization of this structure. The database is SQL server 2005 so there is no help available from native geospatial datatypes. What I would like to know is   * Is this sort of thousand+ table database common for GIS work?   * Would it not be more efficient to keep the data in a single table and take advantage of some index magic? (Is it possible to index efficiently on the decimals which define each point of the bounding box such that you can find intermediate values?)   * How could this structure be improved to allow for rapid queries?


title: Arcmap 10 Dot Net SDK Installation Issues

text: We have had Arcmap 10 installed on our machines for about a month now and all seems to be well. I ran into an issue yesterday when I tried to install the Developer SDK for .NET. An error message shows up stating that I need to have a supported version of Visual Studio installed before the install can continue. We do have Microsoft Visual Studio 2008 Sp1 Professional installed as well as .NET 3.5 framework. Visual Studio and Arcmap both work just fine. Has anyone else ran into this problem or know of a solution? I have put in a help desk request with ESRI, and will post here if I get an answer from them.


title: Select same / select similar in ArcGIS

text: Can a "select similar" right click ( **two** clicks total) like in AutoCad be created in ArcGIS as an addin or something python-related? It is listed on their "ideas" page here: arcgis ideasSelect same/select similar ![enter image description here](http://i.stack.imgur.com/r8l75.gif)


title: ITopologicalOperator and Z Values

text: I have 2 polygon featureclasses with **Polygon ZM** features. I am trying to do a `ITopologicalOperator.Difference()` on these feature classes but it errors saying that: > `Geometry cannot have Z values` Does anyone know a way round this? PS - I am trying to emulate the same functionality as the Erase function in the Geoprocessing API - but you cannot access this functionality in ArcEditor, you must have ArcInfo. I take it. I am taking the right approach?


title: GIS software to manage assets

text: How do you manage the following projects (i.e. what GIS software / platform would you use)?                An extensive Footpath Construction & Renewal Program      Improved drainage systems at x Street, y Street, z Avenue      Traffic Management along A Avenue, B Road and C Road              Reconstruction of the following roads: K Street, S Court, D Road


title: Create a plugin in QGIS-

text: i want to develop a plugin in QGIS to access to my database in postgres : i want to import a file.sql that contains my SQL Code in a textbox , and execute this code to assign myd database. Any help!!!!


title: How to write output from subprocess to disk (using multiprocessing)

text: This code was developed from another question I posted about how to kill an arcpy tool if it takes longer than a specified time. See How to cancel tool execution in python. Using the multiprocssing module as a subprocess of the function seems to work, the only problem is i can't see how to write the output to disk. The function specifies a path to write the data to, and when I run the function without the subprocess, I can see the files on disk. But when the subprocess is included it doesn't look the files are being written out to disk. Can anyone help?               import os, arcpy, arcgisscripting, time, sys     gp = arcgisscripting.create()          def ConvertCADtoGDB(in_dgn,out_gdb):         gp.ImportCAD_conversion(in_dgn,out_gdb,'','Explode_Complex')         if not arcpy.Exists(out_gdb):raise RuntimeError('%s does not exist'%out_gdb)          def main(srch_dir,gdb_dir,timeout):         for dirpath, dirnames, files in os.walk(srch_dir):             for f in files:                 f_name, f_ext = os.path.splitext(f)                 in_dgn = os.path.join(dirpath,f)                 out_gdb = os.path.join(gdb_dir,f_name+'.gdb')                 if f_ext == '.dgn':                     if not os.path.isdir(out_gdb):                         print 'creating',out_gdb                         #####################################################                         # Create a separate process to run the tool in                         p = multiprocessing.Process(target=ConvertCADtoGDB,                                                 args=(in_dgn,out_gdb))                         p.start()                         p.join(timeout)   # Wait for process to complete                         if p.is_alive():  # Terminate process if it is                              p.terminate() # still running after the timeout                             print('Conversion of %s terminated'%in_dgn)                         else:                             print('Conversion of %s successful'%in_dgn)                         #####################################################          if __name__ == '__main__':         srch_dir=r'C:\Temp\dgns'         gdb_dir=r'C:\Temp\gdbs'         timeout=5 #Seconds         main(srch_dir,gdb_dir,timeout)      **UPDATE:** I tested Luke's code, and the message I receive tellS me the process was successful, but still I get nothing written out to disk:               import os, arcpy, arcgisscripting, time, sys     from multiprocessing import Process     from multiprocessing.queues import SimpleQueue     copy_dir = r'D:\test3'     gdb_dir = copy_dir+'\\'+'CAD_Export_to_GDB'          def ConvertCADtoGDB(msgs,in_dgn,out_gdb):         try:             gp = arcgisscripting.create()             gp.ImportCAD_conversion(in_dgn,out_gdb,'','Explode_Complex')             if not arcpy.Exists(out_gdb):raise RuntimeError('%s does not exist'%out_gdb)             msgs.put(gp.GetMessages())         except Exception as err:             msgs.put(gp.GetMessages())             msgs.put(err)          def main(srch_dir,gdb_dir,timeout):         for dirpath, dirnames, files in os.walk(srch_dir):             for f in files:                 f_name, f_ext = os.path.splitext(f)                 in_dgn = os.path.join(dirpath,f)                 out_gdb = os.path.join(gdb_dir,f_name+'.gdb')                 if f_ext == '.dgn':                     if not os.path.isdir(out_gdb):                         print 'creating',out_gdb                         #####################################################                         # Create a separate process to run the tool in                         # and a Queue to pass messages back                         m = SimpleQueue()                         p = Process(target=ConvertCADtoGDB,                                        args=(m,in_dgn,out_gdb))                         p.start()                         p.join(timeout)   # Wait for process to complete                         err = None                         while not m.empty(): # Check if messages in queue                             msg = m.get()                             if isinstance(msg, Exception):err= msg                             else: print msg                         if p.is_alive():  # Terminate process if it is                             p.terminate() # still running after the timeout                             print('terminated')                         elif err:                             print('unsuccessful: %s'%err)                         else:                             print('successful')                         #####################################################          if __name__ == '__main__':         srch_dir=r'C:\Temp\dgns'         gdb_dir=r'C:\Temp\gdbs'         timeout=60 #Seconds         main(copy_dir,gdb_dir,timeout)


title: How to detect MGRS/UTM zone?

text: I posted a similar question on StackOverflow, but I thought I'd check here as well. I am developing an open-source library for converting between coordinate systems, and I've run into a wall. I want to be able to perform a transformation on an MGRS point. I want to be as accurate as possible, so I'd rather not convert to lat/long first, but that's the only way that I've been able to think about doing it. Here are the circumstances:   * I have a starting MGRS position   * I see something in the distance and measure it's distance   * I want to know the MGRS coordinate of said point Is there any way of detecting whether I've crossed a zone boundary without converting to lat/long first? It seems to me that MGRS zones (or UTM zones for that matter) are based on latitude/longitude.


title: "Extract Error writing to file oraociei1.dll" while installing QGIS version 2.0.1

text: I have been desperately trying to install QGIS version 2.0.1 Dufour, but in the middle of the installation I always get an error ("Extract Error writing to file oraociei1.dll"). And automatically installation is aborted ("Setup was not completed succesfully"). I have tried so many times and also tried to download from different websites, not only from qgis.org, but nothing helps. Sooner or later I get the same type of error and that was it... Any ideas what I could do?


title: GeoExplorer - Show layer by default in published map

text: I am able to publish a map using GeoExplorer and can add the icon on the published map to show the legend. However, I'd like the legend to appear on the published map by default. Is there a way to do this? I've searched online, here and the boundless workshops and have so far been unable to find an answer. Any help appreciated. Thanks


title: Why aren't Mapbox vector tiles rendered in the browser?

text: Would it be technically possible to have Mapbox's compact vector tile format sent to the client (instead of PNG tiles), then rendered inside the browser with JS code? Second question: when using TM2/Mapbox Studio, why are the tiles rendered remotely? Couldn't Mapnik be directly used locally to render the tiles? (still using remote data sources like Mapbox Streets)


title: Snap points to line and calculate chainage using Open source GIS

text: I have a line layer (representing a pipeline) and a points layer (representing valves) and I would like to calculate the chainage of the valves along the pipeline. I assume that I would first need to 'snap' the points to the line in order to calculate chainage as they do not currently lie directly above the line. However I would need to use a bulk tool if possible as there are several hundred points and would take too long to do manually. I wondered whether the LRS tool in QGIS could be used to derive chainage? If anyone has documentation or a guide to using the tool I would appreciate it. I am using QGIS 2.2, GRASS & Postgis. Thanks for your time.


title: Plotting Smith and Sandwell global seafloor topography grids

text: Does anybody have any experience with plotting Smith & Sandwell 2-minute Mercator-projected grids in ArcGIS? I've downloaded one in two formats: ers and img. I've found tools for processing .img data called Generic Mapping Tools (GMT). Within this library there are commands which allow manipulating img grids, which is just what I need. This example uses the img2grd command which I can't find within the GMT library. The only tool I found so far was img2mercgrd but it wasn't successful. I would be grateful if there is anybody who can give guidance in how to process this dataset to GIS format.


title: Problem with MMQGIS in QGIS V. 2.0.1 - Attribute Join from CSV File

text: I've been trying to use the Attribute Join from CSV File function in MMQGIS, but it does not seem to work in Version 2.0.1. I've tried to join the same CSV and Shape files using V.2.0.1 running under both Ubuntu and Windows 7. In each case, the procedure runs but returns no matches. It creates a new shape file, but the file is empty. The same procedure with the same files works under QGIS 1.7.5. Is this a known bug?


title: How to get points in bounding box by degrees for map

text: I have some concerns about working of BOX3D PostGIS function. I tried to find places in square -158.721365889063 66.09275164148659, 154.608712235937 52.56807548751039(degrees). But this where statement                   some_place.point && SetSRID('BOX3D(-158.721365889063 66.09275164148659,         154.608712235937 52.56807548751039)'::box3d,4326)      returns places in the biggest of two possible squares. When I change order of angles or use 'xmin ymin,xmax ymax' order, I got the same result. Also I used                    ST_Contains( SetSRID( ST_MakeBox2D(            ST_Point(143.930001298437,66.82980906973742),            ST_Point(-145.757498701563,51.37699768868392) ), 4326 ), some_place.point)      with the same result. How can I do it for some specific order of angle's points? P.S. I got bounds from google map api.


title: Creating ArcSDE feature class in MS SQL Server?

text: Unfortunately I am totally dumb when it comes to programming, and very new to databases (mainly because I studied geography), so : I have a Microsoft SQL Database Server, and a ArcSDE geodatabase. I made a view in SQL Server Manager, which I can see it in my geodatabase (in ArcCatalog), as a table. Which is great. But I also need the geographic information not just the data from the tables. So how can I create a feature class in my geodatabase from a view that I created in SQL Server Manager. I did select the "shape" field, but sadly it's not that simple:P I use: Microsoft SQL Server 2008, ArcGIS 10.0, ArcGIS Server 10.


title: Editing MosaicDataset attributes

text: Good morning!,   I'm trying to access and edit an MosaicDataset (I need to edit the MaxPS/MinPS fields) But I can't find a way to access them programmatically..   Doe's anyone know how can I edit these fields?   Thanks,


title: QgsGeometryAnalyzer.dissolve problems

text: I am completely new to the QGIS python api and I am running into an error which I cannot solve when trying to use the dissolve class. I used the basics of the PyQGIS Cookbook. In my understanding the problem lies within the "layer". But as I understand it, that is exactly whats assigned to that variable. Probably it is just a simple error I am running in, as I am not experienced using python. In essence I just need a script which performs a dissolve on a shapefile with the option "dissolve all" like it is implemented within QGIS. Thankful for any help. Andreas Code:               from qgis.core import *     from qgis.analysis import *          QgsApplication.setPrefixPath("/usr", True)     QgsApplication.initQgis()          data_source = "test.shp"     layer_name = "test"     provider_name = "ogr"          layer = QgsVectorLayer(data_source, layer_name, provider_name)     if not layer.isValid():         print "Layer failed to load!"          QgsGeometryAnalyzer.dissolve(layer, "test_dissolved.shp", onlySelectedFeatures=False, uniqueIdField=-1, p=None)      Error:               Original exception was:     Traceback (most recent call last):       File "/home/ubuntu/workspace/testproject/dissolve.py", line 17, in <module>     QgsGeometryAnalyzer.dissolve(layer, "dissolved.shp", onlySelectedFeatures=False, uniqueIdField=-1, p=None)     TypeError: QgsGeometryAnalyzer.dissolve(QgsVectorLayer, QString, bool onlySelectedFeatures=False, int uniqueIdField=-1, QProgressDialog p=None): first argument of unbound method must have type 'QgsGeometryAnalyzer'


title: How can i create a link to a whole folder?

text: I know how to create a hyperlink to a single pdf-file: Create a hyperlink to a pdf file in the attribute table But now I want to make a link to a folder with 3 or 4 pdf files in it. Is that possible? I tried it the same way as linking a pdf but it didn't work. I'm working ith qgis 2.0.1.


title: Arcgis Model Builder - OD cost matrix on network with iteration on attributes

text: I am totally new to ArcGis' Model Builder, and I need some advice as how to build an OD cost matrix for large sets of origins and destinations. I want to compute an OD matrix where I can have as many as 20,000 points as origins and as destinations. Using the normal procedure with Network Analyst results in an "out of memory error". That's why I turned to model builder. I managed to (re-)build the core model that computes the distance between OD pairs with the network dataset ( _niger_ND_ ) and the points ( _p100_ ). The output is written in the database _reseau.mdb_. This works fine. ![enter image description here](http://i.stack.imgur.com/8G1qO.png) Now, I want to add some features to my model, but I do not know exactly where I should put them:   1. Each point in the layer containing the points has a unique identifier. As origins, I want to select only 1000 of them at a time. When the analysis is done, I want to relaunch the process on the next 1000 points until every point has been used. **How should I design the model to use my points one batch at a time?**   2. With each batch of origins, I save the result in a database. **How can I avoid overwriting the previous result by giving a different name to the output at each iteration?** I guess it is not too complicated when you know Model Builder, but I do not fully understand its logic yet. Thanks for your help!


title: Is there a way to compare geometries clientside in ArcGIS Flex API?

text: I'd like to know if the geometries of two different graphics are exactly the same. I'd like to do that client side without using a geometry service. Is that possible?


title: How to make Map Book with facing pages numbered near outside edge?

text: I am creating a map book but do not want the page numbers for each map page to be on the same side (since its printed double sided), I need the page numbers to be placed on opposite sides? I am using data driven pages. Any idea on how to do this?


title: GIS project advice

text: Hello: I have the following:   1. Shapefile of the world with the boundaries of each country      * Successfully imported shapefile into PostGIS database     * Can display map of the world in a browser via Openlayers.   2. A data (CSV) file where each record has      * birth country,     * gender,     * lat and long of the country of birth (which matches the lat & long in the shapefile) I am trying to figure out the best approach to display a map where each country (based on the CSV data) that has a 100 or more people with a color say red or green.... So my question is: If I create a separate table with the CSV data, is there a way link this table with the shapefile table to do the above? OR Do I need to merge the CSV data into the shapefile table in order to accomplish the above I am using PostGIS, mapserver and Openlayers Thanks Chris


title: How to change field name in raster file?

text: I´m having a bit of an understanding problem with a DEM TIF file. I have a DEM TIF file which is served with Geoserver. When I click on the layer the WMSGetFeatureInfo gives me the following output: GREY_INDEX 110.0 I realise that the 110.0 is the height, but what I don´t understand is why the raster field is called grey_index. The DGM was produced from a point shapefile which was then interpolated using spatialanalyst. The height field in the shapefile was called "z" so why is this then converted to "grey_index"? For the WMSGetFeatureInfo I would like to change the field name to "Height" but how do I do this? Is this really a "Field" in the same sense as a shapefile dbf? Am I able to just change field names in raster files? I have GDAL and ESRI libraries available if anyone can help. Cheers, Rob


title: When is a 3D Visualisation in GIS Useful?

text: I can currently only think of two cases:   * to visualise potential changes in a landscape, such as the effect of adding windfarms, or the addition of a new building to an urban area. However both these examples are often done using CAD packages.    * to impress an audience - which while no doubt effective to get an interest by stakeholders in a GIS, may not provide analytical benefits.  ![alt text](http://i.stack.imgur.com/apF73.jpg) Whilst 3D _data_ is often critical (for floodplain analysis, river profiles, geological surveys etc.) does a 3D viewer add anything?


title: Need an explanation on a network simplification algorithm

text: I try to implement the algorithm described in this paper (page 8), but there's a place that I can't understand, and the authors do not provide a more detailed explanation or pseudocode. They show how to contract this graph: ![enter image description here](http://i.stack.imgur.com/HhSA5.png) Vertices A, G & F are external and must remain. Now, they analyze the connections: > For 1,8,9, the connections are {1}A,8,9, {8}G,9,1, and {9}F,8,1. Any > vertices connected solely within the subgraph are removed from the list. In > this particular instance none of the vertices is internal to the subgraph. > Next, **any repeated items are removed from these lists.** What remains are > 1,8,9, A,G,F. The centroid, X, is now calculated as the mean of the vertices > in the subgraph (1,8,9). What are these repeated items? What is the criteria that 1, 8 & 9 can be reduced? Are there better papers & algorithms for graph simplification? What I want to do is simplify a road graph, removing junctions and cities if needed.


title: Selection Events in ArcObjects using Java

text: I am trying to have an ArcMap addin receive `ISelectionEvents`, but I can't figure out how to register the event handler. I'm using ArcObjects 10.0 for Java. I'm able to catch `IDocumentEvents` as follows:               public void init(IApplication app) throws java.io.IOException, com.esri.arcgis.interop.AutomationException{         super.init(app);         this.app = app;         MxDoc doc = (MxDocument) this.app.getDocument();         doc.addIDocumentEventsListener(new EventCatcher()); // EventCatcher implements IDocumentsEvents and ISelectionEvents     }      Any suggestions on where to look would be greatly appreciated.


title: Can we use proj to offset coordinates?

text: Can someone please help me construct a proj string to offset coordinates? The detail we have - one coordinate point in a local construction grid, and the corresponding WGS1984 LatLong which we converted to a UTM coordinate (as the desired output projection). Manually applying this offset in a 3d Modelling package aligns the data set correctly, so we conclude there is no scaling or rotation involved. So basically - how do we define the local projection in proj so we can apply the offset to all other data sets?


title: Geoserver SLD for OS Mastermap

text: We are just looking into moving from Mapserver to Geoserver for some of out WMS needs, one of which is to serve OS Mastermap to our users. Before i have a go at creating the SLD styles for Mastermap does anyone have any they have created that they are willing to share? Cheers Neil


title: Taking 10 minutes to import File in CartoDB Local Instance

text: I am using local instance of Cartodb in my system.I followed the github instructions from following site<CartoDB Installation Procedure> And everything installed properly.But when I upload file it takes Exactly 10 minutes to import Single File.But in reality it should not take that much time. I tried to upload same file in cartodb site. Importing happened with in minutes. Note:- Irrelevant of file size it takes 10 minutes to import. I have feeling that their must be some error happening at back end. But I couldn't figure out. I am giving link to log fileDevelopment_LOG_File


title: Can not install geoserver 2.5.1 on Mac OSX 10.9.3

text: I am trying to install geoserver 2.5.1 on my Mac (OSX 10.9.3) but i am getting the error “GeoServer.app” is damaged and can’t be opened. You should move it to the Trash. Can you pls help?


title: How to insert coordinates to url

text: What would be the approach to show and dynamically update the map coordinates in the url like stamen is doing it? Are there any built in functions in OpenLayers, what other techniqes could I use or do I have to solve this on the server side? **Background** : I have a simple TMS built with TileStache and a simple map for showing it - this all works fine. I was just wondering how to add this feature to my map


title: How to resolve 000210 problem, when I use Scratch Workspace

text: I have some problem. Now I'm trying to make Python script to resolve some problem. I need too place all out features in Scratch Workspace (Later this script will be used in web GIS and intermediate features mustn't be saved). But when I'm trying to do this i have and 000210 error. How can i resolve this? ![enter image description here](http://i.stack.imgur.com/sMxY7.png)


title: Leaflet Layer Control appended to panel but duplicated

text: So I've used jquery append to attempt to move my leaflet group layer controls on to a panel. This was successful, however the original still exists on the right side of the map object. I've tried to remove this using jquery and css with no luck. I think my problem is I have set an id to the control but the id is only applied to the second instance of it, so the original control remains...Any ideas?               $("<input type='button' name='layercontrol' value='EMEA' id='buttonstyle' /><br />").click(function() {     $("#emealayer").toggle("slow");     }).appendTo(".panel");          var EMEA = {     "EMEA":object     };     var layerControlEMEA = L.control.groupedLayers({},EMEA, {collapsed:false} );          layerControlEMEA.addTo(edit.map);     $('.panel').append(layerControlEMEA.onAdd(edit.map));          layerControlEMEA._container.setAttribute('id','emealayer');


title: How to use ArcPy to Check if Search Cursor Returns Anything

text: How can I use arcpy to check if a search cursor returns anything and then do something based on the answer. So far I have this and it recognizes the positive - i.e. when i pass the query for 001 it gets the value, but when I substitute a bad value, the script does not print "No Search Cursor"               import arcpy          table = "A_Table"     query = "\"FeatureID\" = '001'"       theseRows = arcpy.SearchCursor(table, query)          for row in theseRows:         if theseRows:             print(row.getValue("FeatureID"))         else:             print "No Search Cursor"


title: What open-source web mapping solution I need to use for this situation?

text:
I will try to explain what I need to do. I have about thirty KML polygons. I need to put them on some satellite map. On the top of these layers (KMLs, satellite) there must go layer with roads. I don't have any "roads" source. I don't care in which format are roads, my primary goal that these roads are on the top of all layers. My question is what is the best opensource web mapping solution for this kind of a project? What "roads" layer would you use? Is it possible maybe to put Google ROADS map on the top of satellite imagery and KMLs? If it's not, can I use some vector and where I can find it? And how to put it on the top of other layers? Please give me also some coding instructions. Thank you for any help. * * * EDIT * * * This is the coding I wrote combining OpenLayers and Google Maps styled maps:               <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">                     <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />         <meta name="apple-mobile-web-app-capable" content="yes" />         <title>Google styled map & Openlayers</title>
Google styled map & Openlayers

                       I can see wms layer and KML, but I can't see roads layer. What am I doing wrong?


title: How can I hide custom model from mytoolbox in ArcGIS

text: I am created model in ArcGIS using model builder and python script. To build main model I have created some submodel and script in the same toolbox. I just want to show main model in the toolbox and other some model and script I want to hide so the user can not see them. Please let me know how can achieve the same? Thanks in advance. Dharmesh


title: What GIS software did you purchase to work with Tiger data?

text: It looks like in Tiger line file the user must have mapping or Geographic Information System (GIS) software that can import TIGER/Line data. Has anyone worked with the TIGER/Line data. What GIS software did you purchase? Please advice the steps that I need to follow to map the data.


title: Difference between 2 projections?

text: I have osm.xml file where projection is defined as follows: Map background- color="grey" srs="&srs900913;" minimum-version="2.0.0"> n settings.xml file projection is also set there as:               <!ENTITY osm2pgsql_projection "&srs900913;">      I want to know what is the difference between these 2 projection. I have changed osm2pgsql projection to wgs-84 and it runs f9 for some files. i am confused in this thing * * * **EDIT** When i use srs4326 projection i am getting error on console which is as follow: Unknown projection string, using web mercator as never the less. +init=epsg:4326 I have long/lat coordinates i want to use srs4326 projection


title: CLAVIN use for GeoCoding

text: I would like to a offline package to determine the country a person lives in from a text field in a database named locatoin. I started using CLAVIN which gives good results sometimes but surprisingly dosn't work on easy results. For example:   * "Toronto, Canada"   * "Fremantle, WA" Both fail to return a result. I have deliberately skipped out the GeoParsing steps as I already know the text is an location. I am using the LuceneLocationResolver class, for example initialise the object:               LuceneLocationResolver locRes = new LuceneLocationResolver(file, 1, 10);      Create a location occurrence instance:               LocationOccurrence LocationOccurrence_instance = new LocationOccurrence("Toronto, Canada",0);      Add it to a list and try and resolve the location:               List<ResolvedLocation> result = locRes.resolveLocations(locations, false);      Am I using CLAVIN in the right way or is it just not up to scratch? Backgroud: my main applicatoin is in Python but couldn't find anything that would do the job. So i'm using JPype to interact with CLAVIN using Python.


title: export latitude and longitude from google earth to excel

text: I need to export the latitude and longitude of 300 specified sites from google earth to an excel file. I there any systematic way to do it? I really appreciate your help I have found the following link which might provide a solution: http://www.slideshare.net/RazaNajam2/importing-latlongs-from-googleearthkml- in-excel I did it several times for a file with KMZ format but it did not work. But for KML files it worked well


title: Import KML or KMZ  files into Qgis

text: > **Possible Duplicate:**   >  Can QGIS open KMZ files? Is it possible to import Google Earth generated KML or KMZ files into QGIS and then use these files as background data for a project? I intend to add non-KML hydrology data to these base layers. Can you provide some easy tutorials? Thank you in advance.


title: Selecting proper polygon

text: Currently doing a final project for school on ARCMAP 10. I have a set of unsuitable and suitable buffers over a big area which is Quebec City, Canada. The final potential sites give me areas between 900 sq meters and over 33,000,000 sq meters. We want to keep areas between 500,000 and 1,000,000. The problem is that some polygons become too thin in certain areas. So, although a polygon is big enough in area, in some spots it is too narrow for all the infrastructure we need. Any help would be much appreciated. Thanks ![enter image description here](http://i.stack.imgur.com/pgJGw.png) (Original at http://postimage.org/image/ftwsumkt1.)