title: GeoServer/GeoWebCache with C#

text: I'm starting a project in which I intend to use GeoServer/GeoWebCache as a provider of WFS, WMS, WCS, and WPS services. I've configured the GeoServer to use PostGIS for storage. The frontend is using OpenLayers. I, however, would like to use C# to program my business logic and to send requests for WMS, WFS, WCS and WPS services. I then make the response available to my view layer using View Model. I've been looking for materials that explain how this can be achieved, but no success so far. Any advice will be highly appreciated.


title: Add layer in Openlayers using layer variable passed to a function with setVisibility

text: I am trying to add and remove layers by passing the name of the layer variable to two separate functions and I can't seem to find any place that describes what I am trying to do. Here is an abridged version of my code:               function init(){             var options = {                 projection: new OpenLayers.Projection("EPSG:900913"),                 displayProjection: new OpenLayers.Projection("EPSG:4326"),                 units: "m"             };                  map = new OpenLayers.Map('map', options);                  var drainage = new OpenLayers.Layer.Vector("Drainage Basins", {                 extractAttributes: true,                 protocol: new OpenLayers.Protocol.HTTP({                     url: "drainage_basins.gml",                     format: new OpenLayers.Format.GML()                 }),                 strategies: [new OpenLayers.Strategy.Fixed()]             });                  map.addLayers([drainage]);     }      I would like to call showLayer(drainage); to turn the layer on but I am not what to do:               function showLayer(layer){         layer.setVisibility(true);     }      and hideLayer(drainage); to turn the layer off as:               function hideLayer(layer){         layer.setVisibility(false);     }      Thanks for your help.


title: QGIS: How to load feature (.qml) styles from python?

text: > **Possible Duplicate:**   >  How to style a layer from console? I'm trying to set the styles for a vector layer by loading the .qml file in the python console. The qml-style file contains all categories and symbols needed, but I can not find the right function to load the qml file. The QgsCategorizedSymbolRendererV2::create(domElement) seems to be not available in the python console (QGIS 1.8.0). Is myRenderer.load(doc.documentElement()) the right function to use? Thank you! Stefan               #load the xml     xmlfile = QtCore.QFile("qgis-layer-style.qml")     doc = QtXml.QDomDocument( "Categories" )      if xmlfile.open(QtCore.QIODevice.ReadWrite | QtCore.QIODevice.Text) == 0:         print "cannot open file"     if doc.setContent( xmlfile ) == 0:         print "no xml content"          # creating a new renderer     myRenderer = QgsCategorizedSymbolRendererV2('',[])     myRenderer.load(doc.documentElement())     # here myRenderer has still no categories!          # assign myRenderer to the active layer     layer = qgis.utils.iface.activeLayer()     layer.setRendererV2(myRenderer)


title: infotemplate getting cutoff on top or bottom of screen

text: in my app, i display few points across the map. these points have infotemplate with details in them and sometimes are quite large (around 350px height) if they have alot of information associated with it. so sometimes on smaller resolutions, either header or footer gets cutoff. is there any way to avoid this? i am not setting up my anchors, just leaving it up to the arcgis javascript api. map.infoWindow.show(evt.screenPoint, map.getInfoWindowAnchor(evt.screenPoint));


title: Rendering huge amount of points

text: Evening Guys, I am new to ArcGIS, and currently developing a small app that uses ArcGIS Javascript API. I have encountered a couple of problems while working on this and would greatly appreciate if somebody could help/point me to the right direction. I have about 5000 points that I am returning from a database, parsing them, and displaying on my map (a state in the USA). When my app finishes rendering, the entire state is full of points and you cant make anything out of it. Now, so my understanding, simplemakersymbols, when declared have pixel size, so you cant increase the size dynamically when zooming in. Is there any alternative to this? I tried first declaring a smaller size, and then once zoomed in to a certain scale, I redeclare all the points with a larger pixel size value. Hence all this rendering and rerendering takes a while before all the points are displayed again. So is there a better way to accomplish this task? Edit 1.0: I am using arcgis 10.1 and create points based on data i receive from database on fly.


title: Best interpolation tool for thickness points

text: I'm using Arcmap 10 and I have scattered points (denser in an area). Each point represents a thickness value. I want to get a raster from this points which I will transform in polygons (raster-to-polygons). Which is the best interpolation tool for this operation? I tried them and I saw the "kriging" tool is the one which gives me the best "overlapping" (i hope it's a good term, forgive my english) of the areas with a certain value of thickness with the points which have that specific value of thickness. Is this an appropriate way of establishing which tool is the one the suits better to my case? Below the image of the points superimposed on the raster obtained from them with the kriging interpolation. ![enter image description here](http://i.stack.imgur.com/83bE1.png) Thank you, Michele


title: Identifying connected drainage lines

text: This is my first post to this forum, so Hi Everyone! :-) I have a vector layer containing the potential drainage lines that have been computed from a DEM. I want to be able to click on any point and identify all the lines that are connected to my point of interest. In effect, this means identifying all the streams that contribute water to the point. I am sure this is not a novel problem. It would be similar to identifying all electric lines/houses that get power from a particular sub-station and other real life problems. I just can't seem to phrase my problem just right to get the correct response from Google. Please help me out. Gaurav PS: I understand that a simple identification of all connected lines would not take care of upstream and downstream drainages. I guess that will have to figured out later.


title: GPS alarm system for my boat

text: I need a GPS alarm system for my boat, in case of theft. Maybe notifying me any anomaly on iPhone. How are they called "GPS Tracking" ? I actually don't need to track my boat while sailing, but just knowing if it is moved away from its current mooring spot.   * Do I usually need to pay a monthly fee for these services?   * How long do the batteries last on such device? thanks


title: Vehicle tracking by QGIS

text: I need to do routing for a vehicle. A map with detailed turn-by-turn driving directions should be generated. For example, it should be like car race game in which the map with vehicle tracking is provided and driving instructions are shown by arrow keys. Is it possible with QGIS? EDIT: QGIS gps tracking plugin is useful to track vehicle. Please, can anyone clearly explain how I can provide driving direction to the driver (for example: turn left, turn right for given start point and end point).


title: add definition query to layers in a group

text: I'm trying to develop a python code that will apply the same definition query to all layers in a specified group. I currently have a working code that will apply a definition query to all layers in the Table of Contents, but unfortunately I need it to apply the syntax to a specific group of layers. Any ideas? I've seen this post: Create a definition query for groups of layers: Is it possible? But when I set it up specific to my mxd project, nothing happens.               import arcpy          #Variables to form query syntax     #-------------------------------------------     #field in Attribute table     field = 'Country \n'     queryField = '"%s"' % field.strip()   #add double quotes field (for query syntax)     #value in specified field     value = "'Canada'"     #concatenate query syntax     queryStr = str(queryField) + "=" + str(value)     #--------------------------------------------     mxd = arcpy.mapping.MapDocument("CURRENT")          for lyr in arcpy.mapping.ListLayers(mxd):         if lyr.supports("DEFINITIONQUERY"):              lyr.definitionQuery = queryStr     arcpy.RefreshActiveView()            del mxd


title: What functionality exists to calculate Cut and Fill for excavation?

text: Does qgis have the ability to compare and quantify existing versus proposed elevations?


title: Why are the special fonts in a .mxd-project not used/found?

text: I have a .mxd-project file from a customer which uses special fonts (TrueType). I installed these fonts in Windows but my application (mostly a MapControl) doesn't use these fonts for displaying. I checked the mxd file (see whuber did here) in a text editor and the font names do appear. I didn't find anything about using uncommon fonts in projects. I assume that it should work with simply installing the fonts in the OS but maybe there is something different to do? What do I have to do to get the fonts displayed in my MapControl?


title: How to determine lock on file geodatabase?

text: I'm trying to delete a file geodatabase through Windows Explorer but I get the error message:               The action can't be completed because the folder or file in it is open in another program. Close the folder and try again.      I have no success deleting it through right-click in ArcCatalog, or using Delete_management in a Python script. I've deleted all map services that could be using this geodatabase. I've covered issues like making sure no one else has this geodatabase open. Does anyone know how I can delete this geodatabase? Or does anyone know how I can determine what might be locking it? Quick and dirty methods are welcome.


title: Is there a service that would return me all streets in a city (ZIP)?

text: I am looking for a service that you know of, that would return me all streets in a city (ZIP) for the purpose of building a drop-down (or auto-complete) address entry field. Thanks


title: error in estimate distance?

text: i do some experiment place two sensor node between them 4 meter as distance. then i get these GPS information: node1: `Latitude: 32, 33.255 , Longitude: 36, 0.6632` node2: `Latitude: 32, 33.228 , Longitude: 36, 0.6588` then to try to find the distance between them i use this Link, but i surprised that the distance calculated is 50 meters !!!!! how can i go over this problem !


title: How to have a nullable field included in a shapefile using the Geotools library?

text: I am trying to add a new field to a shapefile and need it to store null values. But by using `SimpleFeatureTypeBuilder` from the Geotools library and then using the `Add` command, it is not giving the desired result: it just creates a field that can not contain null values. Please help.


title: How to retrieve a single polygon from a multipolygon layer in GeoServer

text: I have a multipolygon layer in GeoServer. The layer represents states within a country. I want to enable a user to search for a specific state, and then only the selected state to be displayed on the base map. The problem is two-fold: First, how to retrieve the names of polygons in the layer to enable a user to select, and second, how to display only the selected polygon on the base map. I'm using OpenLayers for presentation. In addition, I'm using GeoServer and PostGIS. Any pointers on how to proceed? EDIT: From some research, I'm guessing I'll have to use GeoServer filters (CQL and ECQL) as outlined here. However, I'm still a newbie at this, and any advice will be appreciated.


title: OpenLayers - Weird behaviour when a feature is zoomed in

text: The problem is when I zoom on a feature inside OpenLayers with any browsers, at a certain zoom level the feature flip like you can see in those pictures ![enter image description here](http://i.stack.imgur.com/jtwtd.png) ![enter image description here](http://i.stack.imgur.com/x6TuT.png)


title: WMSGetFeatureInfo not showing in Firefox and chrome

text:
This code set works for me in IE but not in Firefox and chrome.What is the problem? Map is showing in all browsers ,but when i click on point of map nothing showing in Firefox and chrome. Welcome any idea!               <!DOCTYPE html>               <title>My OpenLayers Map</title>            <link rel="stylesheet" href="1.css" type="text/css">      <link rel="stylesheet" href="2.css" type="text/css">
Feature Info in Popup

         WMS, GetFeatureInfo, popup

         Demonstrates the WMSGetFeatureInfo control for fetching information         about a position from WMS (via GetFeatureInfo request).  Results         are displayed in a popup.


title: Is it possible to create CAD file from shapefile and also create CAD blocks from the database fields

text: I am trying to find out if there is any software or plugin/code that I can bundle that will take a shapefile and export it to a CAD file with CAD blocks generated so our CAD mappers can just move the blocks and finalize the drawing. For example, I have the following data in the shapefile:               lat     long     detail1     detail2     detail3     ...      I want to have it output: `               **detail1**     detail2     datail3      `


title: How to programmatically change the timeExtent of a Map & update the timeSlider?

text: I am developing with the ArcGIS JavaScript web API and ArcGIS server 10.0. I have a time-aware layer in in my map, and also a timeslider. The full time extent of the map is a year, with data every month. I want that when the map loads, the data is shown for that particular month, and the slider is also on that month. I can programatically set the timeExtent on the map, using `map.setTimeExtent()`, but the timeslider does not auto-update to this date. How should the timeExtent to be set, so that the timeSlider auto-updates along with it? To see an reproducible example, go to the sample: http://help.arcgis.com/en/webapi/javascript/arcgis/samples/time_sliderwithdynamiclayer/index.html, and open up your firebug/developer console, and enter               map.setTimeExtent(map.timeSlider.fullTimeExtent);      The map will show you data for the entire period, but the time slider does not update.


title: How to convert Point coordinates into CSV format?

text: The GDAL documentation describes how to convert a ShapeFile into CSV data. The _layer create options_ (`-lco` parameter) allows to prepend the coordinates of Point features to the actual attributes values.               ogr2ogr -f CSV output.csv input.shp -lco GEOMETRY=AS_XY      Note that I omitted the Z-dimension for my example here.   For some reason this results in the following error message:               FAILED: Layer input already exists, and -append not specified.             Consider using -append, or -overwrite.     ERROR 1: Terminating translation prematurely after failed     translation of layer input (use -skipfailures to skip errors)      I am using GDAL 1.10.0. **Questions:**   * How can I get this running?   * Is there an option to omit the feature attributes: I only want to export the latitude and longitude values?


title: How to show in a custom QGIS form the feature and/or geometry info?

text: I need to show point coordinates on the from dialog used to edit the attributes of a point.. I see that in the formOpen the dialog receives a layerId and a featureId, but no iface object, so how can get a provider to use the selectatId() and reach feature informations?               def formOpen(dialog,layerid,featureid):     ...omissis...      (see **here** for a more detailed explanation of custom qgis forms)


title: How to force Add-in ComboBox to refresh?

text: I am having problems with an add-in combobox that doesn't refresh. When the currently selected item is removed from items collection, the name remains visible in the text area. It should show the combobox's caption, but that doesn't happen until the mouse is moved over it. Is there a way to force it to refresh programmatically ?


title: How to find within a geodatabase from the catalog window

text: I have a geodatabase containing hundreds of feature classes that I want to be able to search within so that I know which feature class to load. All the feature classes come from different data sources, so there is no consistency in naming or structure. As an example, from my hundred or so feature classes within my geodatabase, say I have two feature classes structured like this: FC1 ID Animal Age Sex 01 Cat 3 F 02 Dog 3 M FC2 ID Legs Genus Age 01 3 Dog 16 02 6.5 Arach 3 What I want is to search for Dog within the catalog window, and get a list of feature classes that have the word Dog in them, and from there I can work out which feature classes to load. Is this possible in Arc?


title: PyQGIS loading layer style with PostGIS

text: I'm loading layer styles from .qml files in a Python plugin. I'm about to switch to loading them from a non-local postgreSQL db. I've been looking at the (from QgsVectorLayer (v2.2))               listStylesInDatabase(QStringList &ids, QStringList &names, QStringList &descriptions, QString &msgError)     getStyleFromDatabase(QString styleId, QString &msgError)     loadNamedStyle(const QString &theURI, bool &theResultFlag, bool loadFromLocalDb)      For styles saved as .qml files loading them is straight forward. In terms of Python what are procedure for loading the styles from the db? Are they loaded simultaneously with the loading of the layer? I have so far not found a Q&A on the forum regarding this. Thanks.


title: Is there any way to reset feature cursor?

text: When we search within a feature class, it returns a feature cursor. To get features from a feature cursor, I use following code snippet:               private List<IFeature> GetFeatureList(IFeatureCursor featureCursor)     {         var features = new List<IFeature>();         IFeature feature;         while ((feature = featureCursor.NextFeature()) != null)             features.Add(feature);         return features;     }      But problem is for some interfaces and methods, we need this featurecursor. But before passing this feature cursor to that method, I have already traverse it. So, using IFeatureCursor.NextFeature method, I don't get any other feature here. Is there any method or interface or anything that can reset the feature cursor and make the feature cursor re-usable?


title: How to clip multiple raster datasets with county polygons?

text: The example below shows three raster (i.e. in black) and a single county polygon feature class. How can I clip/extract by mask the rasters by their corresponding county polygons (i.e. Edwards, Clark, Barber) in an automated fashion? For this example, the output should include three separate rasters clipped to the county boundaries. A python or ArcGIS solution suitable for batch processing would be ideal. Thanks for the help. ![enter image description here](http://i.stack.imgur.com/F60lK.jpg)


title: searching GeoJSON features

text: After googling for many days and reading the OL documentation, I don't understand well how the filterToParams in OpenLayers.HTTP protocol should work, what I'm trying to do is to find and display the GeoJSON features (features stored in my postgis tables) that matches my search using the following code:               Ext.onReady(function() {     var map = new OpenLayers.Map();     var osm = new OpenLayers.Layer.OSM(         "OSM"     );     map.addLayer(osm);          var mappanel = new GeoExt.MapPanel({         region:"center",         height: 400,         width: 600,         map: map,         title: 'A Simple GeoExt Map'     });          var layerList = new GeoExt.tree.LayerContainer({         text: 'All Layers',         layerStore: mappanel.layers,         leaf: false,         expanded: true     });          var layerTree = new Ext.tree.TreePanel({         title: 'Map Layers',         maxWidth: 500,         region: "east",         collapsible: true,         collapsed: true,         root: layerList     });          var features = [];     var vecLayer = new OpenLayers.Layer.Vector("Results");     var select = new GeoExt.grid.FeatureSelectionModel();          // define the data source     var protocol = new OpenLayers.Protocol.HTTP({         url: 'http://localhost/postgis_geojson.php?geotable=boreholes_point_wgs84&geomfield=geom',         params: {             outputFormat: "json"     //        },     //        filterToParams: function (filter, params) {     //            if (filter.type === name)     //            return params;     //        },         format: new OpenLayers.Format.GeoJSON({             ignoreExtraDims: true,             'internalProjection': new OpenLayers.Projection("EPSG:900913"),             'externalProjection': new OpenLayers.Projection("EPSG:4326")         })     });     //    protocol.read({     //        callback: function(r){     //            console.log("received featured: " + r.features);     //        }     //    });          formPanel = new GeoExt.form.FormPanel({         title: "Place Name Search",         height: 150,         region: "north",         protocol: protocol,         items: [{             xtype: "textfield",             width: 200,             name: "station__like",             fieldLabel: "station <br />(use * and . for wildcards)",             allowBlank: false,             minLength: 1         }],         listeners: {             actioncomplete: function(form, action) {                 features = action.response.features;                 store.loadData(features);                 vm=map.getLayersByName("Results");                 if(vm.length===0){                     vecLayer = new OpenLayers.Layer.Vector("Results");                     map.addLayer(vecLayer);                     store.bind(vecLayer);                     select.bind(vecLayer);                 }             }         },         buttons: [{text: 'search',             handler: function(){                 formPanel.search();             }         }],         keys: [{ key: [Ext.EventObject.ENTER],             handler: function() {                 formPanel.search();             }         }]     });          var cols = [ {name: 'station', type: 'string'},                 {name: 'survey', type: 'string'},                 {name: 'type', type: 'string'},                 {name: 'w_depth_m', type: 'float'},                 {name: 'comments', type: 'string'},                 {name: 'latitude', type: 'float'},                 {name: 'longitude', type: 'float'}             ];          var reader = new GeoExt.data.FeatureReader({},cols);          var store = new GeoExt.data.FeatureStore({         reader: reader,         fields: cols,         autoLoad: false     });     // create grid panel configured with feature store     gridPanel = new Ext.grid.GridPanel({         title: "Results",         height: 500,         region:"center",         store: store,         columns: [{             header: "Station",             width: 100,             sortable: true,             dataIndex: "station"         }, {             header: "Survey",             width: 40,             sortable: true,             dataIndex: "survey"         }, {             header: "Type",             width: 40,             sortable: true,             dataIndex: "type"         }, {             header: "Water depth [m]",             width: 40,             sortable: true,             dataIndex: "w_depth_m"         }, {             header: "Comments",             width: 100,             align: 'right',             sortable: true,             dataIndex: "comments"     }],         sm: select     });          gridPanel.on('rowdblclick', function(g,rowIdx,r){         rec = store.getAt(rowIdx);         map.setCenter(             new OpenLayers.LonLat(                 rec.get('longitude'),                 rec.get('latitude')),             10);     });          searchPanel = new Ext.Panel({         layout: "border",         region: "west",         collapsible: true,         width: 400,         items: [formPanel,gridPanel]     });     mainPanel = new Ext.Panel({         height: 600,         renderTo: "mainpanel",         layout: "border",         items: [searchPanel,mappanel,layerTree]     });          });      the code above plot all the features no matter what I write in the search button, so it's not fetching any specific features based on the name I enter. I think that the PHP script I'm using for the postgis request (update https://gist.github.com/3763701), should allow filtering the features I'm looking for (ie.WHERE ... LIKE ...). This script has a "parameters" option that should give this but so far it only throws an error (here is the reference: http://stackoverflow.com/questions/12591042/parameters-option-in- the-postgis-geojson-php-script). Sorry for probably this very simple question but I'm just starting using GeoJSON and protocol.HTTP, I'd appreciate your support, thanks


title: How to Obtain the feature attributes from feature collection

text: I am able to obtain the features of the layer which is selected by the user in the Layers table and then intersected by a user defined polygon, using `e.features`. I was able to obtain the attribute values of the feature as a property, like this `e.features[0].attributes.Family` or `e.features[0].attributes.Species`. The `e.features[0].attributes` object looks like this, `Object { Family="Pinaceae", Species="Pinus cembroides"}`. Now the problem that I am facing is when a user selects a different layer, say `states`, the `attributes` properties change, the object now looks like this, `Object { STATE_NAME="Arizona", STATE_FIPS="04", SUB_REGION="Mtn", more...}`. So now I need to fetch the attribute data by again changing the properties, like `e.features[0].attributes.STATE_NAME`. So I am trying to create a common function where I can obtain the properties of the attributes object and then directly fetch the values for any layer. This is the code that I am trying to implement,               var attrData = [];     for (var i = 0; i < e.features.length; i++) {         //Work on how to fetch properties for all the layers attributes         feat = e.features[i];         for (prop in feat.attributes) { alert(prop); } //this gives all the property values         var values = "";         for (prop in feat.attributes) {           value = (value === "") ? feat.attributes.prop : value += feat.attributes.prop; //But feat.attributes.prop is undefined              }       attrData.push([value])     }      As you can see, `for (prop in feat.attributes) { alert(prop); }` gives me all the property names but when I assign this `prop` to `feat.attributes.prop` to fetch the value, it returns `undefined`. Not sure where am I going wrong? This is my application, `http://128.196.142.12/geo/test/test_new.html`. Click on the 'draw poly' in the toolbar and then select 'Pima Pine' layer in the Map Layers column and create a polygon and intersect it with the blue stars (Pima Pine), you should get the table with the info of the stars which intersect with the vector polygon. Now I am trying to replicate the same for the USA States and that is where I am failing. How should I change the code to fetch the attribute values for all the layers?


title: Are there any known issues with using database triggers for reacting to a WMX Job status change?

text: I'm looking to notify another system when a WMX job ( _of particular job type_ ) has been closed. And I know this will be a call to an Oracle package. I'm considering a database trigger because it seems to be the most straightforward approach, but cautious because I'm not finding a lot of chatter in the forums. **Are there any "gotchas" (WMX or Oracle) to look out for with this approach?** Notes:   * Workflow Manager for ArcGIS 10.0   * Oracle 11g   * Want to avoid using custom notifiers and/or python scripts on client workstations.


title: How to handle events with ArcMap automation?

text: We have a bunch of forms written in C# as ArcMap commands, which are running happily in the normal way from command buttons. The forms interact with the map by creating layers and symbologies, and by listening for selections on the layers to update their own display. For a number of annoying reasons, we now have to convert these to run from an external executable, but still interact with ArcMap. I'm attempting to use the approach of ArcMap "automation" so the forms are created by the executable, which also creates an ArcMap instance and passes it to the forms to allow them to interact. I've got past the process-space issues of not being able to use "new" instantiation in the form's code for ArcObjects (layers, etc) that ArcMap has to interact with, and using IObjectFactory to get ArcMap to create them for me instead. But I am struggling with events. The form needs to listen to events like SelectionChanged in the map and update itself. If I create an event handler in the normal way like                  dSelChangedE = new IActiveViewEvents_SelectionChangedEventHandler(OnSelectionChanged);        m_pMap.SelectionChanged += dSelChangedE;      Then my OnSelectionChanged event method in the form fires correctly, but ArcMap seems to miss the event itself (even when it was ArcMap that created it, e.g. by interactive feature selection): the selection isn't displayed on screen! I guess this is process-space issues again but I don't know how to get around them. I can't see any way to make IObjectFactory make the event handler, for instance. This thread on the old ESRI forums is similar the problem I'm having http://forums.esri.com/Thread.asp?c=93&f=993&t=213577 but in my case it's the other way around: I can get my controlling application to listen to the events, but then Arcmap loses track of them.


title: Rgeos drops associated values when intersecting polygons

text: I am trying to intersect two SpatialPolygonsDataFrames and get a SpatialPolygonsDataFrame as the result. Unfortunately, using the `gIntersection` function from `rgeos` (which works impressively quickly to intersect the polygons), I cannot seem to retrieve the associated dataframes. Consider the following example:               > fracPoly <- gIntersection( toSingle, fromSingle )     > class(toSingle)     [1] "SpatialPolygonsDataFrame"     > class(fromSingle)     [1] "SpatialPolygonsDataFrame"     > class(fracPoly)     [1] "SpatialPolygons"      I can write a wrapper function which handles the transfer of `data.frames`, but it will be a minor pain to get all the checking right and before I did I was hoping someone could either confirm that there's no better way or point me towards another function (or option for `gIntersection`) which would allow me to retain the associated `data.frames`. **Update** On further reflection, this may may be very deliberate behavior by `gIntersection`. After all, of the two SPDFs, whose data.frame do you pass along? So I may have to write a wrapper which merges the two.


title: How to get map to parse input bounds as degrees?

text: I just started to learn Open Map and I am having some difficulty working with the API. This may look trivial, but please bear with me. I am trying to get Open Map to display a region of the map bounded by the `bounds` variable. Having specified the unit as `degrees`, I would expect that the bounds shown would also be in degrees. But it seems to me that it is in a different unit which is much smaller than degrees:               var options = {      projection: 'EPSG:4326'      ,units: 'degrees'     };     var map = new OpenLayers.Map('map',options);     var bounds = new OpenLayers.Bounds(-100, -90, 100, 90);     var osm = new OpenLayers.Layer.OSM();                 var gmap = new OpenLayers.Layer.Google("Google Streets");     map.addLayers([osm, gmap]);     map.addControl(new OpenLayers.Control.LayerSwitcher());     map.zoomToExtent(bounds, true);      My question is, how do I get open map to parse the input bounds as degrees?


title: Is there a way to import custom shapefiles for use with Gisgraphy?

text: I installed gisgraphy and looked at the data importer wizard -- it only has two options: Import Geonames and/or Import OpenStreetMap. I want to make Gisgraphy work with shapefiles. Since Gisgraphy uses PostGIS I was wondering; Is there a way to import shapefiles into PostGres/PostGIS directly and have it work with Gisgraphy?


title: Why don't GRASS tools work in SEXTANTE? (QGIS, MacOS)

text: I've got both SEXTANTE and GRASS installed on my platform. GRASS-SEXTANTE report an error when I'm trying to create the Modeller, however, other tools (R) work fine in SEXTANTE. Do these tools have separate configurations? Please let me know about your experiences. Best, N


title: how to find share segments between two shapes (line) using QGIS?

text: I have two line shapefiles. I want to find between them, where are located all share segments and extract the new selection shapefile. Can anybody help me? I am using Quantum Gis. I know that in ArcGis, there are a tool, named "share line segment with". There is some tool like this in Quantum Gis or other open source software? Thank you all. Cristina Soares


title: Tilemill logs - Is there a way to remove [tilemill] prefix

text: In the Tilemill logs, is there a way to remove the [tilemill] prefix of every line? I'm trying to add the timestamp of each log line in the tilemill logs. I can easily do it with log-prefix module. I can't however find how to remove the [tilemill] prefix of the log files. I'm faily sure that I have to edit a file somewhere, but don't know where to start looking. Thanks!


title: Polyline in shapefile

text: I'm still pretty new to arcpy and am still learning. I'm working on a script that has a polyline as its input. I'm able to traverse the polyline and get points at certain intervals. These intervals are represented as segments If I have segment AB, where A and B are points on the polyline, how can I traverse the points on the polyline in between A and B and grab those points to add to a shapefile? Thanks in advance


title: QGIS 2.4 Layout View pdf/raster file export moves points

text: I created a map, using a google basemap (openlayer plugin) and imported a table as a csv file (containing a name of a city, latitude, longitude for wgs84 and a row named "amount"). It displays correctly also in the layout view but when I export the Layout, the points are moved to the east while the base map stays where it should. I tried to convert the wgs84 coordinates of my csv file by saving it as a shape file (defining the coordinate system as wgs 84 pseudo mercator) but that did not work either. the points in my map are still moved after exporting from the layout view. I am working on this for 6 hours now and I am getting crazy. Could anybody please please help me with this problem?


title: Stuck updating one field based on the condition of another using Acrpy or Field Calculator

text: I have a shapefile with 5,000 city points. I need to populate a new field, "cls_pop", based on each cities population, so that cities with a population > 2,000,000 will have "cls_pop" = 1, cites with a population > 1,800,000 and < 1,600,000 = 2 and so on and so on. I know there are a lot of different ways to accomplish this and I think I have really confused myself reading to much. I want to write this as a arcpy script so I can change out the variables and use it on different fields but I'm unsure of the best way to go about this. I wrote this but it just places "1" in each row of pop_class.               city_points = "C:\\Desktop\\citypoints.shp"          cursor = arcpy.SearchCursor(city_points,"", "", "population")          for row in cursor:         if row.getValue(cursor) > 2000000:             arcpy.CalculateField_management(city_points, "cls_pop", '"{0}"'.format(1), "PYTHON")              if row.getValue(cursor) > 1800000 and row.getValue(field) < 2000000:             arcpy.CalculateField_management(city_points, "cls_pop", '"{0}"'.format(2), "PYTHON")              ect……………….      Am I on the correct track or is there a better way for me to do this?


title: POLYGON25D WITH OGR2OGR

text: I know how to convert a csv file with xyz coords to point25d with ogr2ogr and vrt file but the coords in the files are the vetices of 3dpolygon (firsth and last ones are the same coords). I want to convert that files to POLYGON25D with ogr2ogr How I can do it? the file has               x,y,z          219980.345,1834052.671,741.279      * * *


title: Geoserver Query

text: we are developing two application, the desktop and web application.. we are using vb.net for desktop application and drupal for web application.., what we are trying to achieve is plot a certain shapefile and save it to the database and that shapefile will be then update to the drupal.. is there a script that automatically upload shapefile to the geoserver in vb.net ??? your help is so much appreciated.. :)


title: Deleting the cursor object

text: Can someone explain why you need to delete the cursor objects and the iterator when you use for example:               arcpy.UpdateCursor(blah)      I've checked the esri docs and there doesn't seem to be an explanation there, but the object is shown to be deleted at the end of both example scripts.


title: Clipping a TIGER Census Tract by Vector Outline

text: So I have recently downloaded the 2011 Tiger Census Tract for the 5 Boroughs of Manhattan which I would like to process for a future visualization. The Tract Shp file includes water areas, which I would like to clip out using the actual boundaries of each borough. Or in other words how do I clip the blue tract areas using the red outlines. Thanks![enter image description here](http://i.stack.imgur.com/dlzL9.jpg)


title: QGIS "Delete ring" no longer works

text: I have QGIS 2.4.0. Until just today, the "Delete ring" feature worked just fine. Now it no longer works at all. I rebooted and even reinstalled QGIS 2.4, and it didn't fix the problem. But I also still have QGIS 2.2.0. "Delete ring" works fine on that. Why did "Delete ring" on QGIS 2.4 stop working?


title: Making custom basemap from SQLite data to use with ArcGIS Runtime SDK for .NET in Windows Store?

text: Now I'm developing an app of windows store (surface tablet) with ArcGIS Runtime SDK for .NET (BETA). I want to generate a basemap which likes ArcGISTiledLocalLayer (but not) with datas(including images, dpi, scale and so on) provided by SQLite, but I do not know how?


title: Changing default IDE for editing Validation code in ArcToolbox?

text: Do you know a way that I can change the application that opens the validation scripts in ArcGIS 10.2? At the moment hitting Edit... opens up Notepad, which ain't that friendly an IDE. ![enter image description here](http://i.stack.imgur.com/vpzNl.jpg)


title: How to use PHP MapScript to generate a MapServer Mapfile

text: I just read from this question that the OP was > using Mapscript and C# to generate and display a Mapfile I was wondering if it is really possible to use MapScript to **generate** a Mapfile? And if so, is there an example of doing so with PHP MapScript? P.S. I am new to MapServer, and I feel that manually writing every mapfile's is a pain even if I learn all its grammar. It would be nice if a bunch of mapfiles can be generated from a program by varying certain parameters. If MapScript isn't the solution, is there any other way to generate mapfiles programmatically? P.S.2. This post asks a similar question about doing it in python, but there seems to be no solution in the answers. Thanks in advance, --- EDIT --- Just to clarify, I am interested in writing/serialization of Mapscript objects into a mapfile (in PHP), not writing a mapfile verbatim via a programming languages such as PHP or C++. From the SO question quoted, this seems possible in C#. I was asking whether there are specific examples of actually doing that (preferably in PHP).


title: Package Layer (Data Management) tool reporting error 000814?

text: I want to package layers using the Package Layer (Data Management) tool but I always get error 000814 indicates invalid output file type (I try to add the .lpk extension also the same error). The following pictures show the processing of package layer and the error message. ![enter image description here](http://i.stack.imgur.com/WAXjB.jpg) ![enter image description here](http://i.stack.imgur.com/rXmsc.jpg) I search internet and find it is in ArcGIS 10.2 Issues Addressed List (My production version of ArcGIS is version 10.1). I want to confirm is it a bug or is there any means to compress layers (in enterprise geodatabase) for both 10.1 and 10.2? In ArcMap “Table Of Contents”, I select the layers to be packged, right click and choose “Create Layer Package” ->save package to file -> navigate the a specified location -> click "save". After that I use windows browser and arccatalog to access the *.lpk, but I cannot find the package file in the specified location.


title: Option for 360 degree movie embedded in Open Source GIS software?

text: Is there any Open Source GIS software available to embed 360 degree movies with the map? For a COTS example, there is the Active Link Vision (ALV) extension for ArcGIS from IWANE.


title: How to convert an image of a floor plan into data that I can work with?

text: This is more of a research question. I'm looking for aways of converting an image of a floor plant into data that I can work somehow. The end goal is to something similar to this: http://indoorosm.uni-hd.de/3d/. I want something that allows me to store rooms and corridors informations, and then use it to trace routes between them. It would be really helpful is someone can point me in the right direction, because the more I search the more different technologies I find, and I don't know which on would serve best my goals.


title: Can an ArcGIS Addin be aware of whether it was installed from a shared folder or installed though the the Addin file?

text: I am distributing an Addin for ArcGIS, and I love when you point the Addin manager to a folder, updates automatically get applied on the next restart. However, when you click on an Addin, it takes away this ability because it doesn't know where the source is. In my Addin, I would like it to figure out if it is installed the shared way, or the double-click-on-the-file way. Then if it is installed in the double- click way, I can prompt the user if they would like to upgrade and show them the path to the upgrade. It appears the Add-In manager knows where the Addin came from because it shows "My Add-ins" (which are from the double-click method) and the "Shared Add-Ins" (the add the folder method). Anyone have any ideas which ArcObject this may be obtained or another round about way?


title: Visual Studio 2008 vs 2010 for ArcGIS 10

text: Is there any differences, pros or cons between the two? I am going to buy Visual Studio and just want to be sure which one will work the best and have the most support going forward. I I am guessing Visual Studio 2010 but just want to be sure. Oh and will I need the professional version or will standard work fine? Please keep in mind that I am a beginner. Thank you!


title: Simple way to have an offline web based map?

text: My goal is to have a world map embedded in a web page, but without access to the internet. Preferrably only a set of tiles in combination with some slippy map js-lib. Storage space is not really an issue, and max zoom level is not required. What is the easiest way to accomplish this? I found a project that seems to fit the bill - Maps on a stick, but it seems to be dead?


title: Bluetooth GPS to Smart Phone

text: Has anyone had any luck intergrating a GPS unit with your Smartphone? Looking to gain sub 5m accuracy. Ideally would like the phone to just use the better gps reciever when it is connected. This goes for any tablets as well. Also, are there any cheap add-on gps units that get this accuracy for a smart phone? Anyone done anything like this? Thad


title: Zoom to Selected feature, without using 'current' in python

text: I am wondering if it is possible to build a zoom to geoprocessing service without using 'current' for the mxd variable in pyhton. Using 'current' my tool works in arcmap, but not in my gp service. here is my code that work fine locally in arc map import arcpy MXD=arcpy.mapping.MapDocument('current') dataframe = arcpy.mapping.ListDataFrames(MXD, "Web Mercator")[0] dataframe.zoomToSelectedFeatures() arcpy.RefreshActiveView() whe I publish my service, the zoom feature no longer works. I have read online that you cant use 'current' in a gp service, thats fine. When I enter the path to the mxd, the zoom function no longer works?


title: Geopy Error with Reverse Geocoding

text: I am using Geopy. I get following error for the code. I have using the same code as on https://code.google.com/p/geopy/wiki/ReverseGeocoding from geopy import geocoders               g = geocoders.GeoNames()     (place, point) = g.geocode("Palo Alto, CA 94306")     print place     >> "Palo Alto, US 94306"     print point     >> (37.418008999999998, -122.127375)          (new_place,new_point) = g.reverse(point)     print new_place     >> 3998 Ventura Ct, Palo Alto, US 94306      print new_point     >> (37.417850000000001, -122.12793000000001)      Works fine till print point. Error occurs with `g.reverse(point)`               Traceback (most recent call last):       File "<interactive input>", line 1, in <module>       File "C:\Python27\lib\site-packages\geopy\geocoders\base.py", line 9, in reverse         raise NotImplementedError     NotImplementedError      Any suggestions?


title: How to install OpenLayers in drupal?

text: I have been trying this for a while without success. After installing the OpenLayers module in drupal 7.14 and trying to configure it i get the following error: Cannot establish a connection to the server: I have tried all permutations including downloading the openlayers library in the local machine, giving it a local path in a number of different ways. The second error that is seen suggests that i am installing an incorrect version of the openlayers library when in fact i have been installing the recommended version i.e. version 2.11. It has been a frustrating experience getting Openlayers, Geoserver , PostGIS and Drupal 7 working together on Windows 7. The number of combinations are many and there are many issues that are difficult to solve if you are not a webmaster.


title: Reverse geocoding to get city, state, country data separately?

text: I have longitude and latitude data. I need to reverse geocode to get city, state, country data separately. I have checked google service. Google provides complete address to a micro level. Separation into city, state, country seems not possible. Any suggestions?


title: What causes ExecuteError: ERROR 000358: Invalid expression Failed to execute (SelectLayerByAttribute) on shapefile?

text: My script runs perfectly for feature classes, but not shapefiles. It crashes at the point of selection, provided there is a query.               gp.Workspace = "C:/someworkspace"     fc = "featureclass.shp"     query = "[SOME_TEXT_FIELD] = \"666\""     gp.MakeFeatureLayer(fc, "flyr")     gp.SelectLayerByAttribute("flyr", "NEW_SELECTION", query)      returns > ExecuteError: ERROR 000358: Invalid expression Failed to execute > (SelectLayerByAttribute). Tested a similar simple example in the Python Shell. This runs fine with a geodatabase and feature class. I assume there is some sort of special treatment for shapefiles I'm not aware of, but arcgis desktop help does not specify anything.


title: Select By Attribute sql problems

text: Having trouble with this python code. I keep getting a ERROR 000358: Invalid expression" code for the select layer by attribute management statement towards the end of the code. Moved the data to gdb and still couldn't get it to work... Not exactly sure what is wrong with the syntax...any help would be great!               import arcpy, sys, os, traceback          # Set workspace     arcpy.env.workspace = "H:\\GIS\\PUR.mdb"     plss = "Plss"     comm = "Communities_sub" # Input Community feature class     c_layer = "Communities_layer_sub" # Name of the Make Feature Layer output for communities     p_layer = "Plss_layer" # Name of the Make Feature Layer output     plss_out = "Output_plss" # Name of PLSS (selected) output feature.       search_distance = '0 MILES'     pur_dbf = "Glenn_pur"     pur_dbf_view = "Glenn_pur_view"     pur_dbf_sum = "Glenn_pur_sum"     comtrs_list_dbf = "Comtrs_list"          try:          arcpy.MakeFeatureLayer_management(plss, p_layer)         arcpy.MakeFeatureLayer_management(comm, c_layer)         print "Completed make feature layer management: plss, communities"              arcpy.SelectLayerByLocation_management(p_layer, "WITHIN_A_DISTANCE", c_layer, search_distance, "NEW_SELECTION")         print "Completed select by location on p_layer"         arcpy.CopyFeatures_management(p_layer, plss_out)          print "Completed copy features management for creation of plss_out"              ComtrsList = []         ComtrsCursor = arcpy.SearchCursor(plss_out)         for row in ComtrsCursor:             ComtrsList.append(row.getValue("CO_MTRS"))         print ComtrsList         del ComtrsCursor, row              arcpy.MakeTableView_management(pur_dbf, pur_dbf_view)         print "Completed make table view for creation of pur_dbf_view"              for number in ComtrsList:             arcpy.SelectLayerByAttribute_management(pur_dbf_view, "NEW_SELECTION", "[COMTRS] = " + str(number))              arcpy.Statistics_analysis(pur_dbf_view, pur_dbf_sum, [["LBS_AI", "SUM"]], "CODE")          except: # error code


title: How do I convert State Plane coordinates to latitude-longitude?

text: Given a specific state plane coordinate system (whether NAD27 or NAD83), are there any resources to convert to latitude-longitude?


title: Get pixel value from a raster in a xy table

text: I'm trying to find a way to convert a raster (in my case it's a Landsat satellite image) into a table with 3 columns which would represent: 1) x coordinates (the so called "xllcorners" in ASCII terms); 2) y coordinates (the so called "yllcorners"); 3) the relative pixel values. As I'm working with 8-bit pixel-depth raster, my table should look like this at the end:                  X       Y      Pixel     493185  4989885     0     493185  4989915    127        .       .        .        .       .        .        .       .        .      I tried to convert the raster into ASCII format and it gave me a grid with 7911 columns and 7211 rows. No problem so far, but since I want to organize the entire grid as it fits my 3 columns requirement, I haven't been able to import it to excel (where I'd like to do my calculations) properely (namely, it seems replacing and cutting off the spaces, inserting commas and so on didn't work so fine as there's always something different than in the "txt" ASCII grid, and it's not a squared grid neither, which complicates the things). I'm using both ArcGIS 10.1 and QGIS 1.8 if it could be of interest.


title: ArcGIS Vehicle Routing Problem Service via REST

text: I am trying to get a Vehicle Routing Problem to work as a geoprocessing service on one of our servers. I used the default_date with unix time stamp in miliseconds and set the times of orders and depot in the format of "10:00 AM UTC". Now I get a time constraint violation for the orders ("ViolatedConstraints": 32) If I take out the line "MaxViolationTime1":0 from the orders in my REST url, a route is calculated with correct travel times and distances and I can see the results. Especially the following lines (attributes of output route) caught my eye:               ...     "TotalCost": 42.5174562651664,     "RegularTimeCost": 42.5174562651664,     ...     "TotalTime": 42.5174562651664,     "TotalOrderServiceTime": 20,     ...     "TotalTravelTime": 22.517456265166402,     ...     "StartTime": 1369180800000,     "EndTime": 1369183351047,     ...     "TotalViolationTime": 30.35018770210445,     ...      I can change the default date and the earliest/latest start time, but the route starts still on the current date, at 2 AM. Could it be that some date and time options are "hard coded" somewhere in the module that was used to create the geoprocessing service? I checked the module again and can't find any options to change default date and time settings.


title: Arcmap: subset A.shp based on B.shp, then partially update B.shp

text: Okay, so I have 2 shapefiles:   * US states outline file (very coarse/simple outlines)    * Global Self-consistent Hierarchical High-resolution Shorelines, Level F (much finer spatial resolution) I am trying to make a map series for my employer using the GSHHS as my land/not land background, and overlaying the state outlines over top. I have other layers, but they're not relevant to this discussion. This is what the smallest North America polygon looks like.   ![map of both files overlain](http://i.stack.imgur.com/zqfUn.jpg)   I am only interested in the western US, and only need a couple hundred miles into Mexico and Canada for background purposes.   I can't simply `clip` for obvious reasons, and there's another problem...   Case 1 ![large-scale image of the problem](http://i.stack.imgur.com/r7JF6.jpg)   and   Case 2 ![enter image description here](http://i.stack.imgur.com/n0FOT.jpg)   In both cases, the GCHHS runs inside as well as outside the rough state lines. I'd like to update the shoreline of the state file to match the GCHHS.   The only theoretical way I've come up with would be to do an `Erase` of the GCHHS based on the states, which would give me the bits outside the states, then maybe a `Clip` of the states based on the GCHHS to get the bits where the states overrun.   And once I get all these slivers, I'd have to dissolve them all into the proper state. Should I just start looking for higher-resolution state polygons?   Thanks for any ideas or suggestions.


title: Looking for a mobile app for a field campaign with specific spec

text: In the frame of an international project in agriculture monitoring, I have to propose a mobile app that will be used as a reference for field working. The **minimum** requirements of such an application are:   * visualize the **real time** geo-location on a **background map or satellite image** (upload manually)   * possibility to **pinpoint** and **label** the crop type (i.e. add a vector layer with attribute via forms)   * possibility to work **offline** (i.e. loading the background image in memory)   * **multi-platform** (phone/tablet, Android(priority)/iOS...)   * **free** Several apps have already been identified (Geowiki pictures, GIS cloud, Poimapper, Wolf-GIS, GeoODK collect, Opendatakit, Geopaparazzi, GeoNode, ESRI ArcGIS) but none of them (at least at this point of the analysis) completly fulfilled the requirements. Do you have other suggestions ?


title: SLD styling based on Cql filter result

text: I am using Geoserver 2.4.4 with a postGIS database. I have 2 layers configured, one of them represents some polygons. I am trying to put a label inside the polygon with the number of the features of the second layer inside the bounding box of the first layer. Eg: number of cities in a State. I am wondering if it is possible to achieve this only with SLD styling of the layer. I am looking at ways to apply Point Stacker function to achieve this, but I can't find a good example or documentation. Your help is appreciated. Thanks.


title: When installing ArcGIS Server 10.1, I cannot get the System/Publish service to start

text: When I attempt to start it, it displays "System/Publishing Tools service is starting..." but never ends, time's out, or gives an error message. Any ideas what is going on here? I have already installed the license manager, ArcGIS Desktop and the license codes. ArcGIS Server seems installed correctly but just won't start the publishing service. I'm trying to develop with the ArcGIS Javascript API which is why I'm installing ArcGIS Server on my PC.


title: GeoServer GetFeatureInfo Template

text:
I have for now just used the standard Get Feature Template in the documentation. The first example should make all the returned data format into bullets instead of little tables. For some reason my middle returned feature still shows as a table. And it appears Geoserver is not using the template for this layer, visible from the 333 I typed at the end of the feature.type. Any suggestions to why GeoServer is not formatting the middle table? It must be a setting I am guessing. All the info returned is coming from PostGIS views, the GeoServer has the same access rights to each view. **Update** I had a play, and if I remove the content file from `geoserver_data/templates` and place it in `geoserver_data/workspaces/<workpacename>/<store>/<layer>` the template loads again for the first layer. However if I do the same for `map_abundace_overview` again the template is not applied. I did a search for tfl files and found the one i created and a couple under medford, which i renamed. Any suggestions?
     <#list features as feature>
Type333: ${type.name} (id: ${feature.fid}):
       <#list feature.attributes as attribute>       <#if !attribute.isGeometry>
${attribute.name}: ${attribute.value}
       </#if>       </#list>

     </#list>
       ![Get Feature Output ](http://i.stack.imgur.com/mIuRp.png)


title: How to calculate a missing (one or more) lat/long value of a bounding rectangle?

text: Is it possible to calculate an unknown (one ore more) latitude/longitude value of a bounding rectangle. The log file that I need to process provides a pair of lat/long values for Upper left and Bottom right of a bounding rectangle. However sometimes (don't know why) the logging source corrupts the data resulting in one or more of coordinate values logged as 0000.00. A snapshot of what data might look like is given below. My questions:   1. Is it possible to to figure out the missing coord point if only of the values is missing.   2. Is it possible to to figure out the missing coord point if more than one values is missing. PS: I may have access to GPS heading and speed. Any help will be greatly appreciated. ![enter image description here](http://i.stack.imgur.com/AkXs7.png)


title: Does on click functionality work with a feature layer or map?

text:
I have implemented a world map, onLoad of the page I query the feature layer and highlight some countries based on some criteria. I have to define onClick events for the highlighted countries. When I click on highlighted countries, I do an ajax call get data from my backend and show data in popup Am I defining onlCick and onHover events correctly? Does onClick functionality change for graphics which are highlighted by using querytask and the normal feature layer , I know graphics I highlighted are part of feature layer. Below is the code where I define onClick and onHover events.                   require(["dojo/on", "esri/map", "esri/layers/ArcGISDynamicMapServiceLayer", "esri/InfoTemplate", "esri/layers/FeatureLayer",                        "esri/symbols/SimpleFillSymbol", "esri/symbols/SimpleLineSymbol", "dojo/_base/Color", "esri/graphic",                        "dojo/parser","dojo/_base/connect","dojox/collections/ArrayList","esri/lang","dijit/TooltipDialog", "dijit/popup","dojo/dom-style","dojo/query","dijit/Tooltip",                        "esri/tasks/QueryTask","dojo/domReady!"               ], function(                 on,Map, ArcGISDynamicMapServiceLayer, InfoTemplate, FeatureLayer, SimpleFillSymbol, SimpleLineSymbol, Color, Graphic,                   parser,connect,arrayList,esriLang,TooltipDialog, dijitPopup,domStyle,dojoQuery,Tooltip,QueryTask               ) {                 parser.parse();              var initExtent = new esri.geometry.Extent({"xmin": -202.44653682638065,"ymin":-69.45199181559316,"xmax":193.60142342238083,"ymax":92.53081401212116 ,"spatialReference":{"wkid":4326}});                 //var initExtent = new esri.geometry.Extent({"xmin": -175.3328239872642,"ymin":-58.16381503447429,"xmax":184.71077623888237,"ymax":103.81899079323993 ,"spatialReference":{"wkid":4326}});                  map = new Map("mapDiv", {                    extent: initExtent                 });         var WorldCountries = new ArcGISDynamicMapServiceLayer("http://10.32.9.106:6080/arcgis/rest/services/KX_Mapping/World_Countries_VD_Look_v2/MapServer");                 WorldCountries.setDisableClientCaching(true);                 WorldCountries.setOpacity(0.75);          map.addLayer(WorldCountries);          map.on("load", initOperationalLayer);     requestData();         function initOperationalLayer() {                  featureLayer = new FeatureLayer("http://10.32.9.106:6080/arcgis/rest/services/KX_Mapping/World_Countries_VD_Look_v2/MapServer/0",{                     mode: esri.layers.FeatureLayer.MODE_ONDEMAND,                      outFields: ["*"],                      opacity: 0.75                   });                             map.addLayer(featureLayer);                         dialog = new TooltipDialog({                       id: "tooltipDialog",                       style:"border:1px solid #348AED;padding:0px !important;margin:0px !important "                        });                   dialog.startup();                        function closeDialog(){                       dijitPopup.close(dialog);                   }                        featureLayer.on("mouse-over", function(evt){                       console.log(" test");                       var countryName = "${CNTRY_NAME}";                       var content="
"+ esriLang.substitute(evt.graphic.attributes, countryName) +"
";                         dialog.setContent(content);                       dijitPopup.open({                           popup: dialog,                           x: evt.pageX,                           y: evt.pageY                       });                   });                        dojo.connect(map.graphics, "onMouseMove", function(evt){                       var countryName = "${CNTRY_NAME}";                       var content="
"+ esriLang.substitute(evt.graphic.attributes, countryName) +"
";                       dialog.setContent(content);                       dijitPopup.open({                           popup: dialog,                           x: evt.pageX,                           y: evt.pageY                       });                   });                        dojo.connect(map.graphics, "onMouseOut", function(evt){                       closeDialog();                   });                        featureLayer.on("mouse-out", closeDialog);                        on(map,"click", function(evt){                       if (pageUniqueName == "com.aig.kx.private.html.internal.alerts.home") {                           getData(evt);                       } else if (pageUniqueName == "com.aig.kx.private.html.internal.contacts") {                                publishCountryName(evt);                       } else if (pageUniqueName.indexOf("com.aig.kx.private.html.internal.reports")!=-1) {                               choseIOCountry(evt);                       }                   });                 }      Below is the code where I highight some counties onLoad of the page               function requestData(){               try {                   console.log(" request data");                   dojo.xhrGet({                       url: dojo.byId('countryUrl').value,                       handleAs: 'json',                       load: function(data){                           console.log(" data for world Map " + data);                           var bottomString = "";                           var queryStart = "CNTRY_NAME IN (";                           var queryChunk = "";                           dojo.forEach(data.countryName, function(country){                               queryChunk += "'" + country + "',";                               if (!alertNBulletinList.contains(country)) {                                   alertNBulletinList.add(country);                               }                           });                           alertNBulletinList.sort();                           var it = alertNBulletinList.getIterator();                           while (!it.atEnd()) {                               var country = it.get();                               bottomString += createAnchorTag(country) + ",";                           }                           queryChunk = queryChunk.slice(0, queryChunk.length - 1);                           bottomString = bottomString.slice(0, bottomString.length - 1);                           var queryEnd = ")"                           var finalQuery = queryStart + queryChunk + queryEnd;                           console.log(" bottomString " + bottomString);                           dojo.byId('mapBottom').innerHTML = "Countries:  " + bottomString + "";                           var color = "#c51230";                           console.log(" about to execute query");                           executeQuery(finalQuery, color);                           console.log(" completing query");                       },                       error: dojo.hitch(this, "failure")                   });               }                catch (e) {                   console.log(e);               }           }      Below is the code where onClick I highlight my application in the backend and display popup               function getData(evt){               try {                   var query = new esri.tasks.Query();                   query.geometry = evt.mapPoint;                   featureLayer.selectFeatures(query, esri.layers.FeatureLayer.SELECTION_NEW, function(features){                       countryName = features[0].attributes.CNTRY_NAME;                       if (ofacCountries.contains(countryName)) {                           map.infoWindow.setTitle(countryName);                           map.infoWindow.setContent('American International Group, Inc. (AIG) is a U.S. domiciled company and as such complies with all applicable laws, including the economic and trade sanctions administered and enforced by the Office of Foreign Assets Control (OFAC). Therefore, this tool cannot be used to assist you and/or cannot provide analysis related to this country');                           map.infoWindow.show(evt.screenPoint, map.getInfoWindowAnchor(evt.screenPoint));                       }                       else                            if (alertNBulletinList.contains(countryName)) {                               console.log(" got countryName" + countryName);                               var alertDetailUrl='';                               if(filterDate){                                 alertDetailUrl=dojo.byId('countryDateSpecificAlertsNbulletinUrl').value + "?countryName=" + countryName+"&fromDate=" + dojo.byId('fromDate').value + "&toDate=" + dojo.byId('toDate').value;                               }else if (existingProgram){                                 alertDetailUrl=dojo.byId('countryDateSpecificAlertsNbulletinUrl').value + "?countryName=" + countryName+"&fromDate=" + dojo.byId('exstFromDate').value + "&toDate=" + dojo.byId('exstToDate').value                               }else{                                 alertDetailUrl=dojo.byId('getdataUrl').value + "?countryName=" + countryName;                               }                               dojo.xhrGet({                                   url: alertDetailUrl,                                   handleAs: 'json',                                   load: function(data){                                       console.log("data ");                                       var popUpData = getPopUpContent(data);                                       map.infoWindow.setTitle(countryName);                                       map.infoWindow.setContent(popUpData);                                       map.infoWindow.show(evt.screenPoint, map.getInfoWindowAnchor(evt.screenPoint));                                       console.log(" end ");                                   },                                   error: dojo.hitch(this, "failure")                               });                           }                   });                    }                catch (e) {                   console.log("error occured " + e);               }           }      I also have defined onHover functionality on map , i.e when I hover a country I have to display country name in tooltip. Now when I click on highlight country it does not work unless and until I click it two three times. On hover does work but the tooltip keeps flickering.


title: Question about BNG coordinate systems

text: I'm historically a user of MapInfo Professional but have recently started using FME and have been talked into now testing out a copy of QGIS. The main problem I've come across is that the coordinate systems used in QGIS do not appear to match what is produced by the other two? For example, setting both MapInfo Professional and FME to BNG seems to generate a CRS of: +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy **+towgs84=375,-111,431,0,0,0,0** +units=m +no_defs This appears to differ form QGIS's interpretation of BNG which is; +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy **+towgs84=446.448,-125.157,542.06,0.15,0.247,0.842,-20.489** +units=m +no_defs I'm going to admit that I have no idea what the towgs84 parameter relates to but the differences appear to cause a few meters of discrepancy when looking at features on the ground. Much as I like the simplicity of QGIS this could affect any decision to move forward with adopting the software in any capacity. Could anybody provide me with a layman's explanation of what is going on? Many thanks


title: Extract aregular gride of points (x,y) values inside a polygon in arcgis10.2

text: This question may be frequently asked .But until know there is no clear answer . I need to extract a regular grid of points inside a polygon .In every time i construct several polygons from the specified polygon and get the vertices that looks as net and convert it to excel file. But know i need extract points ( x,y coordinates )regularly and save it to excel file. Can any one has experience in arcgis 10.2 program help me to do that?


title: ArcScene for indoor-navigation?

text: I'm new to the field of gis but I was wondering if there exists anything in ArcScene for indoor-navigation. I have to model a building and then implement a wayfinding component for it. Does ArcScene provide this feature for me or should I think about switching to another tool?


title: Domain restrictions in ArcGIS 10.1

text: Our arcgis server just got updated to 10.1. All the configurations are done and it is now running properly. But we still need to restrict explicit access to the REST services and only localhost(127.0.0.1) to have access to the REST services. We have done it in 9.3 by adding an allow entry for localhost on the ArcGIS web app in IIS under the IP Address and Domain Restrictions. Also we set the Feature settings to deny all unspecified clients. We did the same thing to 10.1 but we can still make explicit calls to the arcgis REST services through other PC. Any ideas? thanks!


title: Tracing up a stream network & tabulating attributes of polygons it passes through

text: I have an ArcGIS question that is either very easy or impossible (my favorite kind). I am somewhat inexperienced when it comes to dealing with network analysis, so maybe I'm missing something major here. I have a stream network covering a very large area & some census data. My problem is: I want to take each of the highest-order river mouths and associate a population value with it, which will tell you "here's how many people live in the drainage area derived from this pour point". I understand the usual way to do this would be to delineate catchments using ArcHydro or Spatial Analyst Hydrology tools, which I've done many times (then I could associate said catchments w/ census data). In this case, however, the area of interest is huge, and the processing time for even one raster operation seems to be far longer than is acceptable. Since I can't imagine that there's any way to delineate catchments w/o involving raster processing, I'm wondering if there's a way to do something like the following rough workaround: Given a feature class of pour points, have ArcGIS go through each pour point & determine the upstream river network. I also have a separate shapefile of watershed polygons for the area, with associated population attribute. Then, tracing down the network to the river mouth, it could tell when the network crosses a polygon boundary, and then "add" the population of the new watershed it has entered to the subsequent downstream reach. So, it'd be kind of like a weighted flow accumulation, except the "cells" would be large watershed polygons, & it would need to know, as it traces along the network, when it's crossed into a new one. By the time it reaches the mouth, it will have tabulated the total populations of all the polygons the network has passed through. In the following image: One river mouth of interest is circled in red (there would be hundreds of these, probably). The higher-order streams are selected in turquoise just for more visual clarity. Basically, I just want to see how many of the watershed polygons upstream the network leading to that mouth propagates through, & add up their populations. ![River network and watersheds visual aid](http://i.stack.imgur.com/UAHPp.jpg) Is anything like this at all possible? I would greatly appreciate any insight! Thanks! (One non-automated way to do what I want is to put a flag at the river mouth using Utility Network Analyst, cross my fingers & hope that it's been placed correctly, use Trace Upstream to select the features connected to that mouth, extract those, & count up the populations of the watershed polygons they intersect with. Now if there was a way to automate doing this hundreds of times... -- unfortunately I don't know how to access that toolbar via arcpy or automate things that require human clicking)


title: Is there a free dataset of historical geocoordinates of ancient cities and places?

text: Is there a freely available dataset (csv, geojson, topojson, etc.) with geocoordinates of ancient cities, for example of the Roman Empire? Ideally with additional information like population size? I've searched GeoCommons and NaturalEarth but found nothing.


title: SetColorInterpretation() for a GeoTiff using GDAL not working

text: I have a single band image which I would like to copy to a 3 bands of a new image and set the `ColorInterpretation` to red, green and blue respectively. I have tried two approaches, one using the `GTiff` driver, explained below, and the other using the `VRT` driver. My code is;               from osgeo import gdal     import os          IM = "path/to/image.tif" # single band image          ### read image ###     ds = gdal.Open(IM)     X = ds.RasterXSize     Y = ds.RasterYSize     band = ds.GetRasterBand(1).ReadAsArray()          ### write to 3 bands ###     driver = gdal.GetDriverByName("GTiff")     outPath = os.path.join(os.path.split(IM)[0], "test_image.tif")     outIM = driver.Create(outPath, X, Y, 3, gdal.GDT_Int16)     for i in range(1, 4):         outIM.GetRasterBand(i).SetRasterColorInterpretation(2 + i)         outIM.GetRasterBand(i).WriteArray(band)         print outIM.GetRasterBand(i).GetRasterColorInterpretation()     outIM = None      The output is:               1     0     0      I have also tried using the `SetColorInterpretation()`. My question is, how do I set the `ColorInterpretation` metatag using the `GTiff` driver?


title: Writing array to vrt

text: I would like to write an array from a single band image to a 3 band `vrt` where each band has the `ColorInterpretation()` tag of red, green, blue respectively. My code below;               from osgeo import gdal     import os          #IM = "/path/to/image.tif"     IM = im          ### read image ###     ds = gdal.Open(IM)     X = ds.RasterXSize     Y = ds.RasterYSize     band = ds.GetRasterBand(1).ReadAsArray()          ### write to 3 bands ###     driver = gdal.GetDriverByName("vrt")     outPath = os.path.join(os.path.split(IM)[0], "test_image.vrt")     outIM = driver.Create(outPath, X, Y, 0, gdal.GDT_Int16)     for i in range(1, 4):         outIM.AddBand()         outIM.GetRasterBand(i).SetRasterColorInterpretation(2 + i)         outIM.GetRasterBand(i).WriteArray(band)         print outIM.GetRasterBand(i).ReadAsArray()         print outIM.GetRasterBand(i).GetRasterColorInterpretation()     outIM = None      The output is:               [[0 0 0 ..., 0 0 0]      [0 0 0 ..., 0 0 0]      [0 0 0 ..., 0 0 0]      ...,       [0 0 0 ..., 0 0 0]      [0 0 0 ..., 0 0 0]      [0 0 0 ..., 0 0 0]]     3     [[0 0 0 ..., 0 0 0]      [0 0 0 ..., 0 0 0]      [0 0 0 ..., 0 0 0]      ...,       [0 0 0 ..., 0 0 0]      [0 0 0 ..., 0 0 0]      [0 0 0 ..., 0 0 0]]     4     [[0 0 0 ..., 0 0 0]      [0 0 0 ..., 0 0 0]      [0 0 0 ..., 0 0 0]      ...,       [0 0 0 ..., 0 0 0]      [0 0 0 ..., 0 0 0]      [0 0 0 ..., 0 0 0]]     5      So setting the `ColorInterpretation()` (unlike when using GTiff, see here), but all values are zero. Why?! **#### UPDATE ####** I have been running this through ipython and just noticed this error on the command line:               Error 1: Writing through VRTSourcedRasterBand is not supported


title: Problem with SLD on GeoServer

text: I can't find what is wrong. I try write an style on GeoServer. ## This is not ok.:                   <FeatureTypeStyle>                     <FeatureTypeName>Odcinki</FeatureTypeName>               <Rule>             <Name>Magistrala A</Name>             <Title>< 1700</Title>       <MinScaleDenominator>1700</MinScaleDenominator>       <MaxScaleDenominator>6771</MaxScaleDenominator>          <ogc:Filter>**line.24**             <ogc:PropertyIsEqualTo>              <ogc:PropertyName>mpec_magis</ogc:PropertyName>              <ogc:Literal>1</ogc:Literal>             </ogc:PropertyIsEqualTo>         </ogc:Filter>             <LineSymbolizer>             <Stroke>               <CssParameter name="stroke">#009933</CssParameter>                                  <CssParameter name="stroke-width">4</CssParameter>             </Stroke>             </LineSymbolizer>       </Rule>       <Rule>  <!-- thick line drawn first-->         <MaxScaleDenominator>6771</MaxScaleDenominator>                 <ogc:Filter>**line.40**             <ogc:PropertyIsEqualTo>              <ogc:PropertyName>mpec_magis</ogc:PropertyName>              <ogc:Literal>1</ogc:Literal>             </ogc:PropertyIsEqualTo>         </ogc:Filter>                 <LineSymbolizer>           <Stroke>               <CssParameter name="stroke">#009933</CssParameter>                                  <CssParameter name="stroke-width">2</CssParameter>           </Stroke>         </LineSymbolizer>             </Rule>      ## ## I have got errors: line 24: cvc-complex-type.2.4.a: Invalid content was found starting with element 'ogc:Filter'. One of '{"http://www.opengis.net/sld":Symbolizer}' is expected. ## line 40: cvc-complex-type.2.4.a: Invalid content was found starting with element 'ogc:Filter'. One of '{"http://www.opengis.net/sld":Symbolizer}' is expected. I don't understand what is wrong, beyond it is LineSymbolizer. ## My previous wersion without ScaleDenominator is ok.:                   <FeatureTypeStyle>      <Rule>        <Name>Magistrala A</Name>        <ogc:Filter>          <ogc:PropertyIsEqualTo>            <ogc:PropertyName>mpec_magis</ogc:PropertyName>            <ogc:Literal>1</ogc:Literal>          </ogc:PropertyIsEqualTo>        </ogc:Filter>        <LineSymbolizer>          <Stroke>            <CssParameter name="stroke">#009933</CssParameter>            <CssParameter name="stroke-width">2</CssParameter>          </Stroke>        </LineSymbolizer>      </Rule>      ## For any suggestions many thanks. I greet


title: How to open a Spatialite non-spatial view in QGIS

text: I'm using Qgis 1.8.0, and spatialite 2.3 in a Windows Vista machine. I have a database in Spatialite, and I have created a view from one of its tables. When I open it in QGIS, using add Spatialite Layer (and enabling non- spatial tables), the attribute table shows ERROR in all of its lines and rows, but the number of rows and attributes seems correct. I have tried both with spatial and non-spatial views withou sucess and opening tables (spatial or not) works well. My table and view is something like this:               CREATE TABLE "Accoes"(     pkuid integer primary key autoincrement,     "UnidadeID" text,     "Tipo" text,     "Descricao" text,     "Data" text,     "Responsavel" text)          CREATE VIEW AccoesPoltest AS     SELECT c.* FROM Accoes as c      I have already read all info provided in this related question: Can Qgis Read Spatialite Views? I also found a very old bug ticket from QGIS, with the exact same issue, but it was closed as invalid: http://trac.osgeo.org/qgis/ticket/2178 This is one of my first approaches with Qgis + Spatialite, so probably something is missing. Any idea? Thanks Alexandre Neto


title: How to draw lines for diagrams?

text: Just before submitting bug: in Diagrams, there is possibility to use Position AroundPoint or OverPoint. Whatever I choose Line Options selection stays gray: I can't choose any line. So, I suggest that this Line Option -option will draw line between actual point and re-located diagram. However, it doesn't work in my QuantumGIS 1.8.0 (win or Ubuntu). I haven't test it on 1.9 ![enter image description here](http://i.stack.imgur.com/o2bd6.png) Rgs, Pekka


title: osm2pgrouting command not found

text: I have installed osm2pgrouting on my Ubuntu 12.04 server with the following code from this tutorial:               sudo add-apt-repository ppa:georepublic/pgrouting-unstable     sudo apt-get update     sudo apt-get install osm2pgrouting      Which ran happily. Unfortunately however, when I go to use osm2pgrouting at the command line, the tool is missing. I realise I could follow the instructions on github but I was hoping to get an easy `sudo apt-get install` working out of the box. Thus, how can I get this tool working at the command line? I suspect it is something to do with paths...


title: Viewshed analysis and coordinate systems ArcGIS 10.1

text: I am trying to run a viewshed analysis and I've downloaded DEM data from the UK ordnance survey (Landform-panorama). Since the data is in ASCII format I have created a seamless raster mosaic (and used the projected coordinate system - British National Grid). Now I am trying to display a point layer, with lat/lon coordinates of about 10 sites on top of the DEM raster layer. I have been told that both the raster layer and the point layer needs to have the same coordinate system, but when I use the projected coordinate system on the point layer, my points do not show up. However, if I use the geographic coordinate system on the point layer then the site locations pop up: ![enter image description here](http://i.stack.imgur.com/QDZr0.jpg) I was wondering whether any one could let me know if this is alright for a viewshed analysis? if not whether anyone could explain in layman's terms what I need to do in order to fix this issue. As always any advice would be greatly appreciated!


title: VS2010 does not break on error when debugging ArcGIS add-in

text: I am having issues with VS2010 and debugging an ArcGIS add-in. The problem is that when there is an exception, it will not break on it and ArcMap(10.1) just crashes ("ArcMap has encountered...."). I can see the exception in the VS Output window ("A first chance exception. of type ..."), but it's tedious trying to track down where the error occurred. Also, I have no problems setting manual break points and it will stop at them. Anybody know how to resolve this issue?


title: Difference between feature to raster and polygon to raster

text: (I'm using Arc 10.1) I'm trying to rasterize a data set. I have a shapefile with geographic coordinates (GCS_GDA_1994) which I want to convert to a raster with 100m grid cells. So I need to project into a projected SRS - I used GDA_1994_South_Australia_Lambert but I don't think it matter which one for my question. So I did that, and afterwards I tried to use 'Polygon to raster' to convert to a raster. However, in the input field 'Cellsize' I get by default a very small value (0.0002 or so) - reading the help file, this makes me thing it is because it is still using degrees as the unit there. And indeed when I put in 100 there (for 100 meters), I get one big cell; it is using the wrong unit. When I check 'linear unit' under the layer properties, it does say 'Meter' however. So then I tried Feature to Raster and lo and behold, I get a default suggestion in the correct order of magnitude and putting in 100 manually gives me a 100m raster. Now, Polygon to raster has more options that control how the value of the cell is calculated, and I need that. So my question is: what is the difference between these two tools that makes one use a different unit than the other, and how can I make 'Polygon to raster' use meters?


title: Incomplete Visibility Product

text: I am running ArcMap 10.2 and have been trying to complete a fairly large viewshed analysis and have chosen to use the visibility tool in order to be able to produce an optional above-ground-level (AGL) layer which will be the focus of further analysis. The visibility is from a layer consisting of 2 points and the raster is a DSM. I have run several repetitions of this tool (both 3D Analyst & Spatial Analyst) and every time the process completes successfully producing a viable viewshed, but there is never any AGL to be found. There are no errors accompanying the completion of the tool either. Why would this be? How do I get the tool to produce an AGL? I have tried using only one viewer point as opposed to two without any difference in the outcome.


title: How to display bidirectional flows?

text: I'm working on a map showing oil shipping. Basically, I have a a series of nodes/line segments that make up the shipping network. I've joined the sums of oil that traveled along each node, so can show how much oil is traveling over those nodes. How can I show the directional breakdown along each node? In other words, I'm trying to show the split each segment by the direction of the oil on it, showing that with different colors and having the pen width adjust to the size of the flow in that direction. Edit: Could this be done with two layers, one of which is given a data-defined offset based on the width of the other layer, such that they line up with eachother? ![enter image description here](http://i.stack.imgur.com/UB3pa.jpg) Multiple layer version: ![enter image description here](http://i.stack.imgur.com/VBKfA.jpg)


title: Accessibility Mapping

text: The realm of cartography depicts many facets of the physical space within both urban and non urban settings. Specifically within the urban setting lies the challenge of navigating spaces such as roads, sidewalks, and buildings. What are some good representations of mapping accessible spaces for those with physical limitations?


title: Holes between imagery tiles projected using gdalwarp

text: I am having the following issue when reprojecting imagery tiles using gdalwarp. These are 4096x4096 imagery tiles, which I'm gdalwarp'ing from WGS84 to a State Plane projection. When reprojected, the tiles, naturally, overlap, and so have added an alpha channel which takes care of it nicely. However, when viewed together, after reprojection, the tile edges don't quite match up. Note also that this is NOT an issue or artifact with the alpha channel---I can use nodata instead of alpha, or just leave the area black, and the edges remain broken, with holes, just the same. Below is an example of a 1:80 scale crop of the seam between two tiles after projection. It maintains this pattern of holes along the entire seam between two tiles. The basic command I'm using looks something like this: > gdalwarp -s_srs EPSG:4326 -t_srs EPSG:0000 /path/to/source.jp2 > /path/to/dest.tif I've exhausted most of the options I can think of from gdalwarp ( http://www.gdal.org/gdalwarp.html ) and the warp options ( http://www.gdal.org/structGDALWarpOptions.html#a0ed77f9917bb96c7a9aabd73d4d06e08 ), including different resampling methods, increasing the SAMPLE_STEPS density, and playing with additional SOURCE_EXTRA pixels. All with no change whatsoever. I realize creating a mosaic first, reprojecting, and then retiling would be one way around this issue, but I'm dealing with tens of thousands of these ~16 megapixel tiles, so as far as I can tell, a mosaic is not feasible. Any ideas on an approach to deal with these edge inaccuracies? Thanks! ![Seam between tiles](http://i.stack.imgur.com/Nvjvx.jpg)


title: os.sep in python scripting

text: what is os.sep and when should i use os.sep while scripting for arcgis ? for example in below code i don't understand why should i use os.sep .               import arcpy     from arcpy import env     import os          # Set the workspace for the ListFeatureClass function     #     env.workspace = "c:/base"          # Use the ListFeatureClasses function to return a list of      #  all shapefiles.     #     fcList = arcpy.ListFeatureClasses()          # Copy shapefiles to a file geodatabase     #     for fc in fcList:       arcpy.Copy_management(fc, "d:/base/output.gdb" + os.sep + fc.rstrip(".shp"))      sincerely


title: How can I export elevations from AutoCAD in a format that ArcMap can read?

text: I have elevations in Autocad, I can shift between a triangles, contours etc if it makes any difference. How can I export these into something I can use in Arcmap? I have tried the Make shape function with both contours and triangles, which work fine. I can display the contours or polygons. The only hickup is that the Z values are not transferred with it. I do not know any CAD myself, and those in my organization that do haven't got any clue about ArcGIS. So I'm kind of stuck between not knowing what I can get myself and the ones who do doesn't know what I need. Google found me some supposed workflows that I fail to complete. Can someone help me with a pretty detailed (for a CAD newbie) step-by-step guide on how to export from AutoCAD (2010, 2011, 2013) or Civil3D to shape/TIN/ESRI Grid..? Thank you!


title: How can I make a buffer with xxx meter by NetTopologySuite

text: I am very new in NetTopologySuite, I work with the coordinatesystem in WGS84 by lon/lat, with the NetTopologySuite. I found the Buffer function to create a buffer with a distance, but how can I make a buffer with distance by the unit of meter? e.g make a 200 meter buffer of one point.


title: Change line selection display in MapInfo

text: can someone help me with a MapInfo query. Is it possible to change the display MapInfo uses when selecting lines? Atm I can be often difficult to see selected lines easily as the lines I am using are red and when selected there is slight red hashing around the edges. Would it be possible for a line to change color when selected, so it is easily distinguishable from other lines around it? Thanks, Alan


title: How to Mosaic DTED files (RasterDataset) using C#?

text: I use ArcGIS .NET SDK in C#. I'm able to load some DTED files in my ArcMap and show them in proper colors. What I want is to concat/merge/mosaic some DTED files. How can I do this? I want to mosaic **IRaster** or **IRasterDataset**. I googled A LOT and struggled with ArcObjects Help, but still unsuccessful.


title: Differences in raster extents in gdalinfo, SAGA & Quantum after resampling

text: I recently resampled a raster file using SAGA's Resampling module. The aim was to widen the extent of the new raster to two decimal places, where the original raster has three decimal places. The resolution of the raster stays the same with 0.02. I take the extent of the original raster and calculate the extent of the additionally needed input-raster from it. For example - Orginal raster upper left corner:   * This is what gdalinfo tells me:              589262.561, 5955004.195        * What I see with SAGA hard zoom to displayed raster:              589262.561, 5955004.195        * What I see in SAGA-Metadata instead:              589262.571, 5955004.185        * What I see with Quantum hard zoom to displayed raster:              589262.561, 5955004.195        * What I see in Quantum Metadata:              589262.5609, 5955004.1949      The given numbers of lines and columns are all the same from gdalinfo to SAGA and Quantum. Why is there such a difference in displaying the raster in SAGA? After resampling with the calculated input grid I get the following:               gdalinfo:         589262.550, 5955004.210     SAGA-zoom:        589262.570., 5955004.190     SAGA-metadata:    589262.56, 5955004.2     Quantum-zoom:     589262.570., 5955004.190     Quantum-metadata: 589262.550, ,5955004.209      Again such differences between displaying the raster and its actual metadata. However, the amounts of lines and columns are identical again, though the other corners also differ slightly. Is there generally such inaccuracy in these programs? Is it somehow caused by the resampling module? Which information should I believe for further use of the raster? A lot of information and questions--I would be grateful to get an answer anyway.


title: Which CRS would you use to georeference historical world maps?

text: Which CRS would you recommend to georeference historical world maps like the ones in the London Geographical Institute - The Peoples Atlas - 1920, e.g. ![enter image description here](http://i.stack.imgur.com/dUT1n.jpg) The map displays a lat/lon grid which I would like to use to pick control points. I managed to get some reasonable results simply using WGS84 EPSG:4326 but wonder if there isn't a better option.


title: Why won't QGIS recognize my GPS?

text: Garmin BaseCamp recognizes and receives data from my GPSmap 60CSx, but QGIS GPS Tools plugin does not. Am I missing a step? I want to be able to transfer data both directions. MacOS 10.6.8 QGIS 1.7.2


title: Send ArcGIS JavaScript Geometry Object JSON to server using JQuery Ajax request

text: I need to send ArcGIS JavaScript Geometry Object JSON string to Asp.Net Handler. I am using JQuery Ajax request to post the Geometry Data. I am not able to pass JSON geometry like this JSON.stringify(geometry.toJson()). Here is my code.               var jsondata = JSON.stringify(geometry.toJson());          $('#ajax-button').click(function () {        $('#frmUpload').ajaxSubmit({          data: jsondata,         contentType: "application/json; charset=utf-8",         dataType: 'json',         success: function (r) {            $('#ajax-results').html(r);           $('input:file').MultiFile('reset'); < br >         }       });     });


title: r.mapcalculator and python again

text: I've been trying to write a script creating binary maps:               a=raw_input ("enter a threshold")      b=float(a)      grass.run_command('r.mapcalculator', formula="**'base_map'>=b**", outfile='map'+str(a), overwrite=True)       When I'm trying to execute it there's an error message :               Invalid map     Parse error       Obviously, when the relevant part of the code is changed (e.g. `formula="'base_map'>=**0.7**"`) everything is working fine. However, my goal was to write a script creating a map automatically when the "a" (the threshold) is provided. I would be grateful for any hints. Cheers


title: ArcObjects: How to measure the draw time of a layer in ArcMap?

text: I'd like to quantitatively measure the display performance of mosaic datasets, image service layers, raster layers, feature layers, etc. in ArcMap 10. How can I measure the draw time of a particular layer (or the complete drawing process if that is the only option) in ArcMap? What are the interfaces, objects and events involved? Is the StopWatch class in .NET suitable for accurately measuring this type of operation? Has anyone already created an ArcMap add-in or extension for this purpose?


title: Generate Near Table and keep all attributes

text: I am trying to calculate the angle and distance of points to surrounding polygons. The table is good and what I need but it doesn't maintain all records; the unique point and polygon IDs are not there. Is there a way to maintain those? I will need them for further calculations. I'm using the "Generate Near Table" tool in ArcGIS 10. There are complete columns missing. I have a specific ID number assigned to each record and that column amongst others that I don't care about as much, didn't come with. The rows seem all there, I think, but not all columns. I can't join the near table with any data layer either to get that column back.


title: ArcGIS reloadData runs very slow on iOS

text: So I have some points on a map. I've written code to allow the user to drag a point around the screen which more or less looks like this.               - (void) mapView:(AGSMapView *) mapView didMoveTapAndHoldAtPoint:(CGPoint)screen mapPoint:(AGSPoint *)mappoint graphics:(NSDictionary *) graphics    {         [self.polyLine updatePoint:mappoint onPath:0 atIndex:self.indexOfPointBeingMoved];         [layerThatThePolyLineIsIn dataChanged];     }      However, this implementation seems to be amazingly laggy. Is it just me or the esri's ArcGIS SDK very bogged down and inefficient?


title: How do I search dates using the ArcGIS REST API?

text: I'm trying to understand how dates are queried in the ArcGIS Server REST API (v10) using the query functionality (`...MapServer/find?searchText=...`). If I search on a string attribute I can get a result and its date field shows the value "6/1/1995". However if I then search by the date field using "6/1/1995" I get 0 results. Am I supposed to provide my date in a particular format? I tried reversing the date's components' ordering, changing the separator, with/without leading zeros, and even tried the timestamp to no avail. I'm not in control of the service or the data so I don't know if any settings are in place in the source data that make this more difficult. The field's format is reported as `esriFieldTypeDate` with length 36. This thread suggests I should be seeing the date field reported as a timestamp in the JSON output of my query but in both HTML and JSON it is "6/1/1995". I saw this thread on the ArcGIS forum but as using a timestamp didn't help me I assume it's not relevant. Any hints much appreciated.