OpenLayers SelectFeature control not working after de- and re-activation of NavigationControl

I have a problem with OpenLayers Control.SelectFeature and Control.Navigation: I have a map with a Control.Navigation object. And I have a Layer.Vector with a number of features. On this layer I register a Control.SelectFeature. For a specific function on touch devices, I'm trying to implement the following behavior: If a feature is selected by touch and the finger is touch-moved from the feature through the map, certain values are calculated on touchmove and displayed/updated. As soon, as the touch-select-touch-move sequence is finished (on touchend), normal map-drag-pan behavior shall be enabled again. Therefore, on the touch-select of a feature, I deactivate the Control.Navigation of the map and re-activate it on touchend. If I just do as shown in the code below, Control.Navigation is re-activated on touchend, but then SelectFeature is disabled. I had a look on the OpenLayers.Control.Navigation code. It does (de-)activates its handlers but I wasn't able to find any interference with SelectFeature-related code. If I re-create the Control.SelectFeature object, remove the old one, add the new one, and newly register the events, the map is broken after some pan/drag/move events. The Vector-Layer is jumping around and the colors of the map are messed up. Does anybody have any clue on this? I wasn't able to find anything similar documented, neither on stackoverflow, nor here, nor anywhere else. Many thanks in advance for any help! Some code: (Let me know, if you need to see more)               function createMap() {         var epsg4326 = new OpenLayers.Projection("EPSG:4326");                    navigationControl = new OpenLayers.Control.Navigation();              var mapOptions =          {              controls: [navigationControl],             minScale: 498276.5625,              projection: new OpenLayers.Projection(epsg4326),             units: 'km'         };                    map = new OpenLayers.Map('mapContainer', mapOptions);                         var customPanZoomBar = new OpenLayers.Control.PanZoomBar({'div':OpenLayers.Util.getElement('panzoombar')});         customPanZoomBar.position=new OpenLayers.Pixel(4, 50);         map.addControl(customPanZoomBar);     }                 function registerEvents() {             featureLayer.events.on({                              "beforefeatureadded":    beforeFeatureAdded,                         "featureselected":       onFeatureSelect,                         "featureunselected":     onTrackFeatureUnselected,                         "loadstart":             onFeatureLayerLoadStart,                         "loadend":               onFeatureLayerLoadEnd                          });                  featureSelector = new OpenLayers.Control.SelectFeature([kmlTrackLayer, referenceLayer]);             featureSelector.handlers['feature'].stopDown = false;             featureSelector.handlers['feature'].stopUp = false;             map.addControl(featureSelector);             featureSelector.activate();                  map.events.register('click', map, onMapMouseClick);             map.events.register('mousemove', map, onMapMouseMove);             map.events.register('zoomend', map, onMapZoomEnd);             map.events.register('movestart', map, onMapMoveStart);             map.events.register('touchmove', map, onTouchMove);             map.events.register('touchend', map, onTouchEnd);            }               function onFeatureSelect(event) {         // ...         if(controller.getIsTouchDevice()) {             navigationControl.deactivate();         }     }          function onTouchMove(e) {         // TODO: Calculate and update stuff     }                  function onTouchEnd(e) {         if(controller.getIsTouchDevice()) {             navigationControl.activate();         }        }


I have registered the postgresql database with arcgis desktop 10.1. In ArcMap, When I try to drag and drop one of the tables to the map I get this error:               Could not add the specified data object to the map      I want to Add data as a layer to the map using the data tables in postgresql database rather than using add layer plugin and import .csv file form another location. How can I solve this?


Automate data entry into Access from ArcMap

I have an Access 2007-2010 database that I'm currently working on by manually searching for roads in a defined set of areas in ArcMap 10.1 and then filling in the area's ID in an empty column in the DB. Is there a way to automate this process using Python to select the features by overlap and export the area IDs to the empty column in the DB?


How to generate evenly sized polygons within a boundary

I have an area and need to create evenly sized polygons within the area. It doesn't matter where the polygons fall, only that they don't overlap and each area is the same. They needn't be squares/rectangles or any specific shape. Can this be done in ArcGIS?


Listing Printer names in a Python Toolbox in Arcgis 10.1?

Here's my code for my third parameter in my Python Toolbox. When I run the toolbox and look at the list of printers, it only shows one of them. My print command of 'printerName' lists all of them in a seperate script. How can i get printerName to loop through all of the printers and put them in the list? Is there a way to make a loop on one line? Thanks                   # Third Parameter         printer = arcpy.Parameter(             displayName="Select a Printer",             name="printer",             datatype="String",             parameterType="Required",             direction="Input")              for printerName in arcpy.mapping.ListPrinterNames():             print printerName              # Set a value list of Add or Remove         printer.filter.type = "ValueList"         printer.filter.list = [printerName]      * * * Update 2 Here's the code for the third parameter that list the local printers:                   # Third Parameter         printer = arcpy.Parameter(             displayName="Select a Printer",             name="printer",             datatype="String",             parameterType="Required",             direction="Input")         # Set a value list for the available local printers         printer.filter.type = "ValueList"         printer.filter.list = arcpy.mapping.ListPrinterNames()      This works and lists all of my local printers. The problem is it can't print the looped MXDs. It looks like python can't find them in the loop according to my arcpy.AddMessage(). Here's the code:                   # Get inputs         InputMXD = parameters[0].valueAsText         PDF_Folder = parameters[1].valueAsText         printer = parameters[2].valueAsText              # Set workspace as defined by user         #env.workspace = PDF_Folder         arcpy.env.workspace = r"c:/temp"              #List Names for Inputs         arcpy.AddMessage("PDF_Output: "+PDF_Folder)         arcpy.AddMessage("Printer Name: "+printer)         arcpy.AddMessage("MXDs before Loop: "+InputMXD)                   MXDList = arcpy.ListFiles(InputMXD)         arcpy.AddMessage("After MXDList")         arcpy.AddMessage(MXDList)         for MXDPath in MXDList:             arcpy.AddMessage("MXD Path: " + MXDPath)             MXD = arcpy.mapping.MapDocument(MXDPath)             arcpy.AddMessage("MXD: " + MXD)             arcpy.mapping.PrintMap(MXD, printer)      ![ArcMessage](http://i.stack.imgur.com/hSOCB.png) It's showing the mxds before the loop, but it isn't printing them once the loop hits. Any ideas? It's showing "[]" when it should be showing what's in the "MXDList".


Prevent user from sliding the map to the right or left

Is there anyway to prevent user from sliding the map to the extreme right or left? something like setting a maximum/minimum zoom level in arcgis maps.


ListRasters not recognizing raster files in python

I have 2 rasters in my workspace, one in TIFF Format and the other in GRID format: "C:\ExampleFolder" When I use the python script:               import arcpy     >>> rasl=arcpy.ListRasters("C:\ExampleFolder")     >>> print rasl     None      Python does not recognize my raster files. I'm attempting to use the script in this previous question: Clip a raster using a shapefile into multiple rasters? I keep receiving error: ERROR 000732: Input Rasters: Dataset does not exist or is not supported. Any reason why Python does not recognize my raster?


How to inserting script into ArcGIS ModelBuilder?

I am looking for some tips about inserting a script in the ModelBuilder... I am actually building a model in the ArcGIS ModelBuilder. At one point I would like to insert a script that crosses information from two layers at one point of the model with a output layer, that will be used further along. In ArcMap, I added the script with a right-click in My Toolbox > Add Script... After loading my script, I applied the following parameters:   * Two inputs, referring my layers that I use in the script (raster layer type)   * One output, for the result (raster layer type) I then go to my model and drag my script into it. I connect my two layers as inputs with the arrow and specify the output file name. All seems ok as the boxes appear with the correct colors. I have to specify that I am working with a variable folder %folder% so I added that in my script. When I validate my model it goes all blank, because it cannot find the input layers, as they are created in the model. Can anybody help me please? PS: Here is my script:               # ---------------------------------------------------------------------------     # calculator.py     # Created on: 2012-11-15 16:59:11.00000     #   (generated by ArcGIS/ModelBuilder)     # Description:      # ---------------------------------------------------------------------------          # Import arcpy module     import arcpy          # Check out any necessary licenses     arcpy.CheckOutExtension("spatial")               # Local variables:     raster = "%Dossier%\Erosion.gdb\raster"          # Process: Calculatrice raster     arcpy.gp.RasterCalculator_sa("Con((\"%Surf_Drainee%\" > 12) & (\"%Surf_Drainee%\" <= 80) & (\"%Pente_Rclass%\" <= 24), \"%Pente_Rclass%\" + 1, Con((\"%Surf_Drainee%\" > 80) & (\"%Pente_Rclass%\" < 24), \"%Pente_Rclass%\" + 2, Con((\"%Surf_Drainee%\" > 80) & (\"%Pente_Rclass%\" == 24), \"%Pente_Rclass%\" + 1, \"%Pente_Rclass%\")))", raster)


How to get the "absolute value" of a raster cell in QGIS?

I have a raster map (-100 to +100) and I need to get all the minus values as absulute values (-100=100; -99=99...). How can I do this? Is it something like reclassify?


Geocodin process in open source GIS tools

I want to do geocoding with open source gis tools , is it possible? if then tell me the solution? I have my village attribute data with me like addresses and contact information of persons in every house. Now I want to do a small project with all details by using google imagery with open source gis tool? Let me explain?


How to aggregate point measurements in areas?

I have a shapefile with the geographical boundaries of towns in a specific region; then i have a csv file (with xy coords) with a lot of measurements about pollution in this region. I'd like to have the mean value of pollution for town, obviously averaging over the measurements inside each town. How can i do it? I'm new to QGIS.


ArcGIS 10.1 - Using Polygon Neighbors with dissolved polygons

I've used polygon neighbors to find all neighbors of a polygon layer, which I then use to look up all possible neighbor combinations and dissolve the polygons into all possible combinations of two polygons. I'd then like to run this again and build all possible three-polygon combinations. However, when I run the tool again on the dissolved polygons layer it creates an empty table. I know the data is fine - is there another step i need to take, or is there another tool I could use to achieve this? Thanks in advance. EDIT: This is the script that i use after running the polygon neighbors tool to create the dissolves and then append them to 'Sites'. I then manually run polygon neighbors again on 'Sites', but get an empty table:               arcpy.env.workspace = "C:\Users\Ant\Documents\ArcGIS\ITN.gdb"     FC = "BLPUs"     TABLE = "BLPUs_PolygonNeighbors"     DISSOLVED = "Sites"     FIELDS = ["src_OBJECTID", "nbr_OBJECTID"]     with arcpy.da.SearchCursor(TABLE, FIELDS) as cursor:         for row in cursor:             OID1 = str(int(row[0]))             OID2 = str(int(row[1]))             arcpy.MakeFeatureLayer_management(DISSOLVED, "DISS_LYR")             OUTPUT_NAME = "Dissolved_%s_%s"%(OID1, OID2)             SQL = "OBJECTID = %s OR OBJECTID = %s"%(OID1, OID2)             arcpy.SelectLayerByAttribute_management("DISS_LYR", "NEW_SELECTION", SQL)             arcpy.Dissolve_management("DISS_LYR", "DISS_OUT")             expression1 = arcpy.GetCount_management("DISS_LYR")             fieldName1 = "BLPUCount"             fieldName2 = "OID1"             fieldName3 = "OID2"             fieldName4 = "OID3"             fieldName5 = "OID4"             fieldName6 = "OID5"             arcpy.AddField_management("DISS_OUT", fieldName1, "LONG")             arcpy.AddField_management("DISS_OUT", fieldName2, "LONG")             arcpy.AddField_management("DISS_OUT", fieldName3, "LONG")             arcpy.AddField_management("DISS_OUT", fieldName4, "LONG")             arcpy.AddField_management("DISS_OUT", fieldName5, "LONG")             arcpy.AddField_management("DISS_OUT", fieldName6, "LONG")             arcpy.CalculateField_management("DISS_OUT", "BLPUCount", expression1)             arcpy.CalculateField_management("DISS_OUT", "OID1", OID1)             arcpy.CalculateField_management("DISS_OUT", "OID2", OID2)             arcpy.CopyFeatures_management("DISS_OUT", OUTPUT_NAME)             arcpy.Delete_management("DISS_OUT", "DISS_LYR")          fcList = arcpy.ListFeatureClasses("Dissolved*")     for fc in fcList:         arcpy.Append_management(fc, DISSOLVED, "", "", "")


QGIS Installation - Oracle Link

Trying to connect an oracle 10g database to QGIS. I'm getting the error below: _ORA - 12154: TNS:Could not resolve the connect identifier specified_ Anybody ever seen this error, or could provide some guidance?


Create Contours From a DEM without 3D or Spatial Analyst

I'm wondering if there is a way to create contours from a DEM using ArcGIS without 3D or Spatial Analyst Extensions. I know that there are a few questions out there pertaining to this (How to create DEM from contours without ArcGIS Spatial Analyst licence?), but I'd like to specifically ask if there is a workaround for this. Like I said this is more of a curiosity type question. My organization is looking to cut budget and I personally would like to cut down on some of the ArcGIS licensing cost. Major projects that we do here are elevation related and we need this functionality. Like I said, QGIS can complete it, but some clients request the work be done in ArcGIS. Currently I'm trying a mix of DEM to points to contours, but with no luck so far. Crunching a DEM to points is a long resource trying task so it's not optimal, but I think it may work. But after that I really need to find a way to go from point to contour. Is there a free ArcGIS add-in with a functionality like this?


How to compare values from a column in attribute table with values in Dictionary{}?

I am just entering to the python world, hence the level of my question. Can anyone tell me what Python function should I use to compare values stored in one column in an attribute table with values stored within a script's dictionary{}. Format of the values in table is as follow: "2000, 5000", next row "3000, 6000"... etc. - this is a string. Format of my dictionary: dictio = {"NW": ["1000, 5000"], "NX": ["2000, 5000"], ...} How to take value from the table compare with dictionary and get dictionary Key ('NX') as an output. Many thanks PS. I am working on ArcGis 10.0 To clarify, I will try to give more details that I have been asked for in comments below: I am trying to create a simplified(!) tool that converts XY coordinates to BrithishNatioanlGrid. The dictionary contains fixed number of items, where keys and values are always the same. Format of the table will be always the same but number of rows in a table may be different each time as they represent polygons in the table (attribute table of polygon shapefile). Field name in the table is "XY". Once I got a list of keys I am doing to concatenate it with other text value, stored in gis table. Extract from dictionary: Dictio = {"NA": ["0, 9000"], "NB": ["1000, 9000"], "NC": ["2000, 9000"], "ND": ["3000, 9000"],"NF": ["0, 8000"], "NG": ["1000, 8000"], "NH": ["2000, 8000"], "NJ": ["3000, 8000"], "NK": ["4000, 8000"],"NL": ["0, 7000"], "NM": ["1000, 7000"], "NN": ["2000, 7000"], "NO": ["3000, 7000"], "NR": ["1000, 6000"], "NS": ["2000, 6000"], "NT": ["3000, 6000"], "NU": ["4000, 6000"], "NW": ["1000, 5000"]} Extract from attribute table: ![enter image description here](http://i.stack.imgur.com/3wDiw.jpg) What I want to do is: take value from ‘XY’ ->check against dictionary, and find the same value -> take key of the value -> stick it in front of “coord” value -> save it in “NGR” column (in brackets you can see desired output). I hope it is a little bit clearer now.


Custom Metadata Stylesheet

I am looking to create my own custom metadata stylesheet using the metadata toolkit in 10.1. Has anyone been successful in doing this or has another suggestion on how I can create my own custom stylesheet in 10.1?


Apply QGIS Style to osm-File like in Open Cycle Map, Landscape Base-Layer

I try to mimick a rendering style like in Open Cycle Map (landscape base layer) in QGIS. However, I'm not able to find certain elements (i.e., wood and rivers) that are used in Open Cycle Map but seem to be missing in the extract. Does someone know why this is and how I could procede? # Edit: For specification of the issue: I have an extract taken directly from OpenStreetMap (see here) (saved to my dropbox here). And another extract from an API call (http://open.mapquestapi.com/xapi/api/0.6/*[bbox=10.7,47.200,10.875,47.350]), covering about the same area (in fact the one from the API is a bit larger). The extract from OpenStreetMap shows, i.e. feature 199333058 (a large forested area), which I can't find in the extract that comes from the API (I opened the files in Notepad and searched for the ID in both osm-files). Also searching for the feature after opening the API-extract in QGIS was to no evail..


How can I do multiple snapping of vector layers in QGIS?

I have a network of a transport system that I created from 1970-2013. However, the accuracy is letting me down as I used different snapping settings throughout the process. Is there a plugin or a way that I can correct each line (and align each method of transport which uses the same stretch of road) without using the node tool? I have attempted to use the traceDIGITISE plugin but it didnt work for me.


PostGIS intersection function

I have a problem with intersection function. I built my query following http://manual.linfiniti.com/en/postgis/geometry.html, 5.7 section. I made my clip object, a red linestring frame: ![enter image description here](http://i.stack.imgur.com/8fDOq.jpg) But after the clip(intersect) operation, something is wrong: ![enter image description here](http://i.stack.imgur.com/jsfO1.jpg) query:               create table roads_clip as     select st_intersection(a.geom, b.geom), b.*     from clip as a, roads as b     where not st_isempty(st_intersection(st_setsrid(a.geom,23700),       b.geom));      Roads layer contains multiline object and intersection cut roads where intersects the red frame. I would like a result similar to this: ![enter image description here](http://i.stack.imgur.com/VRxlC.png) Please help, thanks


How to create an Isopleth map?

I'm looking for a plugin for QGIS that would allow me to create an effective isopleth map. Does one exist? I haven't been able to find any, only independent software that would allow this type of mapping. Any help would be appreciated!


Can you customize the editor widget for a feature layer?

Here is the code for the editor widget:               <esri:EditorWidget x:Name="MyEditorWidget" Map="{Binding ElementName=MyMap}"                                            Width="300"                                            AutoSelect="False"                                           GeometryServiceUrl="http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer"                                           ShowAttributesOnAdd="True"  />      This is **provided by Esri**. Some of these buttons have no use for our clients. Is there any possible way to get rid of them? Also, can I use some of the features from the editor without actually having the widget, such as the Add. I have not seen any documentation for this. Any help would be appreciated. Here is a picture of what the editor widget looks like: ![enter image description here](http://i.stack.imgur.com/2we4a.png) The only buttons I am interested in are the Save Edits, Add, and Clear Selection.


Why do existing map services run slow after updating to ArcGIS 10.2.1 for Server?

Has anyone had any issues with existing map services after updating to ArcGIS Server 10.2.1? After updating they are running slow and causing my ArcGIS Javascript app to crash. All of our GIS services are on 10.2.1 now (Desktop, Server, SDE). Any ideas? I can provide more information if necessary.


What class/types of smartphone chipsets support GPS, A-GPS, GLONASS AND have extended kalman filtering?

I've been testing several Android phones (all running Android 4+) Sony Xperia T, Moto G, Nexus and HTC 1 which are all giving decent tracks (all of which use GPS/GLONASS) However we are also using the new Mi-Fone (Ai350) running android 4+ and we are seeing lots of noise. Specs are hard to come by for this phone but it looks like basic GPS. This is a sub $80 android phone Question 1: What low end to mid-tier phones use GPS-GLONASS for better tracks? We are using Google's 'My Tracks' app to record the data' Question 2: Do GPS chips have extended kalman filtering on them? Some experts say yes while others say no. Would appreciate some clarification on this. Thanks N


How to georeference Tiffs after manipulation in Photoshop?

I am exporting very high-res (7000x7000px) hillshades from ArcMap as tiff files. I am then doing some work in photoshop to the images. How can I easily georeference these tiffs after working on them in PS? Is there a way I can simply define the coordinate system and the bounds of the tiff without using ArcMap. I am trying to avoid ArcMap because I seem to loose all me edits from PS and ArcMap just has a tenancy to foul things up once I reimport. I have QGIS installed if that might be a better approach.


Am I misunderstanding "Equal Interval"?

After reading Choropleth Mapping Using Quantile Method in CartoDB I decided that it was time for me to understand CartoDB's quantification methods. As I understand it, _quantiles_ should contain an equal number of rows, _equal intervals_ should place the cutoffs at ... equal intervals, and _jenks_ should do some math and come up with groups that have the smallest standard deviation, more or less. I'm skipping heads/tails for now. I created a slightly goofball map with 18 points, each with an age value from this list:               [11, 11, 12, 13, 14, 16, 19, 20, 20, 20, 23, 25, 26, 26, 31, 37, 38, 38]      I mapped them and then used the choropleth wizard to look at the implication of the various quantification methods. I expect the _Quantile_ method to break the list into groups of six, which it does:               [11, 11, 12, 13, 14, 16]      [19, 20, 20, 20, 23, 25]     [26, 26, 31, 37, 38, 38]      I do not expect to see the logic in the Jenks method at a glance, but indeed, the Jenks groups each have a smaller standard deviation than the quantile groupings.               [11, 11, 12, 13, 14, 16, 19] SD = 2.928     [20, 20, 20, 23, 25, 26, 26] SD = 2.854     [31, 37, 38, 38] SD = 3.367      The SD for the quantile groups is 1.9, 2.3, 5.8 (At least per Calc's `=STDEV` function.) So far so good. When I select _Equal Intervals_ I was expecting cutoffs 8 or 9 years apart (so 19 and 28 or 20 and 30 but the CSS places the cutoffs exactly where the quantile cutoffs were, giving groups that are 5, 8, and 12 years long -- not very equal:               #interval_new [ age <= 38] {        marker-fill: #F03B20;     }     #interval_new [ age <= 25] {        marker-fill: #FEB24C;     }     #interval_new [ age <= 16] {        marker-fill: #FFEDA0;     }      Am I misunderstanding how equal intervals work? Or is this a bug?


How to change raster cell values within a polygon using QGIS GUI?

I would like to know how to change the values of raster cells which are within a polygon, leaving all cell values outside the polygon unchanged. I would like to subtract 1.5m from each raster cell value within the polygon, rather than make them all the same value. I don't know how to use GRASS so I'm hoping there is a way to do it using the tools within the QGIS GUI, raster calculator, or processing toolbox. I'm using QGIS 2.0. Thanks.


Accessing Attributes of Individual FeatureLayer Points with ArcGIS

I have been struggling for some time with selecting points from a featureLayer which is stored on an ArcGIS webserver. Each of these point graphics contains information such as an ObjectID, SiteName, City, County, etc. I have created an infoTemplate for the points and all of this data is shown when each graphic point is clicked. However, when trying to access the values of the graphic, such as the value of ObjectID, I cannot seem to find anything other than an empty object. Here is what I have tried:                             The console output is simply an empty array [] I know that information exists about the feature since it is stored and displayed in the infoTemplate. Any help is greatly appreciated!


Why is the SQL included in the URL of CartoDB visualizations?

I noticed that the URL of CartoDB visualizations include the parameter `sql=` with the SQL statement for that visualization:               http://lifewatch-inbo.cartodb.com/viz/b43fa5a6-7dd0-11e3-ba2a-5f9e077d1162/embed_map?title=true&description=true&search=false&shareable=true&cartodb_logo=true&layer_selector=false&legends=true&scrollwheel=true&sublayer_options=1&sql=SELECT%20%0AST_MakeLine(the_geom_webmercator%20ORDER%20BY%20date_time%20ASC)%20AS%20the_geom_webmercator,%20%0ACASE%0AWHEN%20date_time%20%3E%3D%20'2013-05-28'%20AND%20date_time%20%3C%20'2013-06-25'%20THEN%20'1.%20Egg%20incubation'%0AWHEN%20date_time%20%3E%3D%20'2013-06-25'%20AND%20date_time%20%3C%20'2013-07-24'%20THEN%20'2.%20Chick%20rearing'%0AELSE%20'3.%20Postfledging'%0AEND%20as%20behaviour%0AFROM%20three_gulls%0AWHERE%20bird_name%20%3D%20'Eric'%0AAND%20outlier%20IS%20NULL%0AGROUP%20BY%20behaviour%0AORDER%20BY%20behaviour&sw_lat=50.790527850939384&sw_lon=2.2449874877929688&ne_lat=51.76975203254081&ne_lon=5.587577819824219      However, these parameter seems optional, as the visualization works fine without the parameter:               http://lifewatch-inbo.cartodb.com/viz/b43fa5a6-7dd0-11e3-ba2a-5f9e077d1162/embed_map?title=true&description=true&search=false&shareable=true&cartodb_logo=true&layer_selector=false&legends=true&scrollwheel=true&sublayer_options=1&sw_lat=50.790527850939384&sw_lon=2.2449874877929688&ne_lat=51.76975203254081&ne_lon=5.587577819824219      Changing the SQL on CartoDB will update the existing visualization and render the value of `SQL=` outdated, so I was wondering why it is included at all?


In mapbasic,how to register a table in xlsx,not in xls?

I have tow files that only differ in extention name, one xls ,the other xlsx.both contained the same things,same structure.there's no problem when I registered a table in xls,but when in xlsx,an error occured. ![enter image description here](http://i.stack.imgur.com/rQPBF.png) code list: Include "mapbasic.def" Include "menu.def" Include "icons.def" Declare Sub main Declare Sub Combine Sub main Register Table "C:\Documents and Settings\Administrator\desktop\test\fdd.xlsx" TYPE xls End Sub


Can I achieve one-to-many relationship in QGIS custom forms?

My PostgreSQL database has **ElectricLine** geometry table which has one-to- many relationship with **ElectricLineMaterial** non-geometry (attribute only) table. This PostgreSQL table added as layer in QGIS 2.0.1. When the user add/edit an ElectricLine, he should have ability to add one or more ElectricLineMaterial records against to that geometry. Can I achieve this requirement via **Custom QGIS Forms**? In other words, I want to have an "Add Electric Line Material" button in the form to add many materials against the current adding/editing electric-line. _Note: I am new to QGIS and learning QT Designer._


convert data.frame with no lat-long info to a raster

coders, I need to read in a .txt file into R and later do some spatial analyses on it.   I’m working in R. 3.0.2 on a Windows server.   I load the following libraries (probably more than I need): > library(raster)   >  library(rgdal)   >  library(rgeos)   >  library(sp)   >  I then read in the text file:   > > v2<-read.delim("E:\GIT\GEO_04_Research\03_Fire\03_FireIASI\Data\fire\GigGFEDRedownload\GFED3.1_199902_BA.txt", > header=FALSE, sep = "", dec = ".", strip.white=TRUE)   >  This works fine and   >  str(v2) #tells me 'data.frame': 360 obs. of 720 variables. Great. However there is no xy information. The documentation on this data layer states this data runs from a top-left of 179.75W, 89.75N to the lower right corner at 179.75E, 89.75S, with each reading in this regular ‘grid’ occurring at 0.5 degrees. So I created a raster to match these specifications: > gfed<-raster(ncol=720,nrow=360,xmn=-89.75,xmx=89.75,ymn=-179.75,ymx=179.75)   >  gfed… # tells me:   >  class : RasterLayer   >  dimensions : 360, 720, 259200 (nrow, ncol, ncell)   >  resolution : 0.2493056, 0 (x, y)   >  extent : -89.75, 89.75, -179.75, 179.75 (xmin, xmax, ymin, ymax)   >  coord. ref. : NA   >  Great. But now how do I get the xy information from the ‘gfed’ raster onto the values in the data ‘v2’? I tried ‘stack’ hoping it would take the ‘square’ data.frame onto to the gfed raster, but I get 0 layers. I’m new to coding and I suspect that this requires some loop that reads row 1 from 1-720 and then goes to the next row until it reads all 360 rows. I think part of the problem is that the data.frame ‘v2’ doesn’t have any spatial information associated with it, so SpatialPixels and SpatialDataFrame options don’t work – or at least, I can’t get them to work. Any help would be really appreciated. I just can’t get passed this point.   Many thanks, Helen. * * * thank you _so_ much for your solution! I've been meaning to thank you for another post you made on someone else's question last year that really helped me too. I'm almost there with your solution of using 'scan' into a newly created raster. It is a bit embarrassing to admit – I understood that my co- author on this was sending ‘world-wide’ files at half-degree scale, and previous data have been just that, and so I accepted that even though I looked at the data and saw co-ordinates that didn’t start at -180, +90. The study area is actually southern Africa (approximately xmn=13, xmx=36, ymn=-36, ymx=-18) and it is at a quarter-degree (0.25) scale!   I thought I’d be very clever and apply your solution (make grid and then scan the data in to the new grid) with these southern Africa parameters. I couldn’t get it to work and after spending time staring at the data, I realised two things: 1. The points don’t start neatly at round numbers. I applied shifts separately to the x and y. 2. Then I realised that the data that has been sent to me is an irregular grid. It is not consistently 0.25-degrees. It is in general has a 0.3-degree sized grid cell followed by a 0.2- degree sized grid cell followed by another 0.3- degree sized grid cell. Any idea how I read/scan data from an irregular ‘grid’ into a nice neat 0.25 grid that I have made. I have now made > southernA<-raster(nrow=72, ncol=92, xmn=13, xmx=36, ymn=-36, ymx=-18) I guess I would like R to ‘resample’ the ‘nearest-neighbour’ grid from the irregular grid into my newly created, regular grid called southernA. Someone asked what the data is all about: we are looking to see how much biomass burning contributes to CO in the atmosphere. I used to do a lot of fire ecology work for a conservation agency that I worked for. I still dabble in the field  I’d be happy to post a copy of the irregular grid data if that would help find the solution. Thanks again for the assistance – it is making a big difference!


How to add Domain using ArcGIS Diagramer?

Is it possible to add domain to XML Schema of GDB using ArcGIS Diagramer ?


can I install GIS on mackbok?

I am trying to install arcgis 10 on apple macbok. But I could not. My question is that whether arcgis 10 is supported by macbook or not?


How to calculate the grid point precipitation from the station data?

I have a problem to convert my hourly station precipitation data to the surrounding grid points. I need to convert 4 station hourly rainfall data to 18, 60, and 240 grid points for 0.0625,0.03125, and 0.015625 respectively. I know how to do it in ArcGIS.My problem is I have 20 years hourly precipitation data that need to be interpolated to those grid point. Making 20 years hourly raster data seemed impossible to me to start with. If anyone of you could help me, it is appreciated. Thank you


Looking for free DEM and other remote sensing data for Germany

Does anyone know of any sources for free DEM and other remote sensing data in Germany? I don´t think Europe is as open as the USA when it comes to free data!


What the difference: mapnik and mapnik2?

I use Ubuntu 12.04 LTC, postgres 9.1, postgis 2.0. I install mapnik.               $ sudo add-apt-repository ppa:mapnik/nightly-trunk     $ sudo apt-get update     $ sudo apt-get install libmapnik mapnik-utils python-mapnik      Which version of mapnik I install? https://github.com/mapnik/mapnik/wiki/Mapnik2 in this documentation write that mapnik may be 0.7 or 2.1               >>> import mapnik     >>> mapnik.mapnik_version()     300000      In synaptic: 3.0.0+dev20130906.git.f3b8645-1~precise1


How to install two versions of Qgis on Ubuntu 12.04?

I would like to run multiple versions of QGIS on Ubuntu 12.04. Can I do that, and how if so?


80% of data has a spatial component, says who?

This quote about how 80% of all data has a spatial component has been bandied around everywhere. Introduction to GIS classes, product descriptions, talks, etc. Would anybody know who first said it? Or A link to original article would be nice.


How to rubberband zoom w/o the shift key: arcgis api for javascript

I want to enable the rubberband zoom effect without users having to hold the shift key down. This behavior is found is Esri navigation bar dijit. I don't want to use the dijit. How can I get a zoom in/out bounding box to draw without forcing users to use shift key?


How to programatically set default Geodatabase and Workspaces for a map document?

I have a QC process that has a bunch of models that need to be sequentially run, and then the results manually inspected between each model. I know how to manually set the default GDB for the Map Document (`File-->Map Document Properties-->Default Geodatabase`). I also know how to manually set the default Geoprocessing Workspaces (`Geoprocessing-->Environments-->Workspace`). I already have a "setup script" that generate a GDB, Feature Datasets, define the spatial reference, etc, and I would like to be able to integrate these steps into the setup procedure as well. Can these settings be automatically set? For example, I have tried `arcpy.env.workspace`, but that only appears to work within a script, not setting it at the "application" level. Is this possible? I know it seems like a small thing, but I have many "areas of interest" that we have to look at, and each one gets placed in its own MXD and GDB (so yes, I could do it by hand... over & over again).


How to serve local maps for an offline HTML5 webmapping app?

How could one **serve maps** (tiles in wherever format possible) within a Android device to be consumed by an **offline webmapping app** also accessed within the device's browser?


How can I move diagrams?

Is there a way to locate diagrams and move them wherever you want in QGIS 1.7.4/ 1.8.0? I created a pie chart under the tab "diagram". I can mark those diagrams with a green box and move them via the label-tool, but they won't change their position in the end. When I create diagrams with the "diagram overlay" tab they cannot even be marked. Also, what is the difference between "diagram" and "diagram overlay"? Best, Mario


Shapefile Arribute Table to Datagridview

Can you please let me know how to display a shapefile attribute table in C# DataGridView? Thanks


Programatically split a polygon with a line

In looking at this question, it occurred to me that I am not sure how one would go about using geoprocessing tools in ArcGIS to split a polygon with a line programatically. Manually, you would use the Cut Polygons tool or the Split Polygons tool on the Topology toolbar, but how would you accomplish the same task using modelbuilder or python groprocessing scripting tools? Right off the bat I think of all of the tools in the Analysis toobox like Union, Identity, etc, but those are all Polygon-Polygon tools, **_NOT_** Polygon-Line tools. Even the Split tool is Polygon-Polygon. Any ideas? Accepted answers will be for ArcGIS, but for completeness sake, other platform answers are encouraged as well.


How to batch open and export to PDF folder of map packages (*.mpk)?

I have a directory full of ArcGIS map package files (mpk) that I need to export to pdf. Is it possible to automate it so I don't have to open and export each one manually? I need to open each map package, switch to layout view, export to pdf, close it, and repeat with the next map package file.


How to reduce Polygon to Raster (Conversion) bit depth?

I have a polygon featureclass that I am trying to convert to raster format at a low bit depth (i.e. <8 bit unsigned). The FC contains 50,000 polygons which have five values: 1,3,5,7,9. I have set the value field to record the previously described values. I have also tried adding a field populated with 1's and setting the Value Field to that. The output raster is an 8-bit unsigned raster dataset with a NoData value of 255 every time. I have tried changing the Environment setting > Raster Storage > NoData to every one of the options from NONE to PROMOTION. I have even tried entering "0" as a NoData value in the environment setting. I am pretty sure the tool does not honor that Environment setting. How can I control the bit depth of the Polygon to Raster output? Preferably I would like a 1, 2 or 4 bit raster output. Work-arounds welcome too. Edit: Unfortunately, Copy Raster is not an option because the Polygon to Raster conversion is an intermediate step in a larger processing workflow. Creating a new raster dataset would only add more time to the workflow.


How do I activate a custom ITool from a form without having to add it to a toolbar? (ArcGIS 10 add-in development)

I'm working on an add-in for ArcMap 10.0 that adds a toolbar to ArcMap. One command (`OpenModelessDialogCommand`) button on that toolbar opens a modeless WinForms dialog, from which a tool (`MyTool`) can be activated in order to e.g. select a feature on the map. My `Config.esriaddinx` contains these command and toolbar declarations:               <Commands>       <!-- this is the command that opens the modeless WinForms form, from where            MyTool is available: -->       <Button id="OpenModelessFormCommand" ... />       <!-- MyTool is not directly referenced in any toolbar defined in this file: -->       <Tool id="MyTool" class="MyTool" ... />     </Commands>     <Toolbars>       <Toolbar ...>         <Items>           <Button refID="OpenModelessFormCommand" />         </Items>       </Toolbar>     </Toolbars>      What I'm having problems with is activating `MyTool` in the form. All I've found on the internet is code samples along the lines of:               // get a reference to an instance of MyTool:     ICommandItem myTool = ArcMap.Application.Document.CommandBars.Find("MyTool");      // activate MyTool:      ArcMap.Application.CurrentTool = myTool;      However, this apparently requires that `MyTool` actually appears in a command bar (e.g. toolbar) of my add-in. But that's not the case. So, I've tried this next:               ITool myTool = new MyTool();     ArcMap.Application.CurrentTool = myTool;  // Type mismatch! An ICommandItem is expected.      I've even looked into adding an invisible `AxToolbarControl` to my form and adding a button for `MyTool` there; but then I'm running into problems on how to connect that toolbar (via `SetBuddyControl`) to the opened document's map. I don't want the tool to function in a separate `AxMapControl`, I want it to work directly with the main map shown in ArcMap. **Question:**   How do I activate a custom tool that is not added to any toolbar (or other command bar, for that matter)?


Free MobileGIS like ArcPAD

I'm looking for open-source program like ArcPAD. I have read all questions and answers, but i find nothing. I need the program for PDA (Dell axim x51v + GPS modul) and I want mapping points (trees or buildings), lines (roads) and polygons (forests).Then I want to do a simple web-mapping project. Thanks for sharing your knowledge. Regards Brtko


Using "Merge Divided Roads" tool with lesser parallel lines

When using the "Merge Divided Roads" tool, it merges roads that "trend generally parallel to one another". This means that from figure one.. It will merge the beginning, where the roads are close to each other (so the result is like figure 2), but not the entire length like I want it to (figure 3). I believe this is because the lines are not parallel enough (the angle between some of the lines are too big). Because even if I extend the merging distance to 300m (which is more than how far the roads are apart), I still don't get the result from figure 3. Anybody know how to decrease how parallel the lines have to be to get merged? ![enter image description here](http://i.stack.imgur.com/cBczK.png)


ArcGIS 9 doesn't recognize ArcGIS 10 .lyr files

I symbolized a parcel shapefile in ArcGIS 10 with about 2 dozen different colors. I need to use this in ArcGIS 9.3 as well, so I saved it as a .lyr file. This works fine in 10. But when I go to 9.3, I can add the shapefile, but not the .lyr file, or import it for symbolization (geometry doesn't match error). Is there a way to make a .lyr file in 10 so that 9 will recognize it? The .lyr file comes from the same shapefile, so I don't know why it wouldn't recognize it. I want to use this symbolization for a half dozen shapefiles a/o feature classes, so really don't want to manually recreate it. Thanks.


keeping track of edited features QGIS

Does anyone know of a way to keep track of last added or edited features in QGIS? A kind of Editor Tracking tool.


Creating flat end type polylineline buffer in model without ArcGIS advanced

I have a polyline split into many short segments and would like to create a flat end buffer for each individual segment (not "dissolve" them all into one feature). Is there any way to do this in an ArcGIS 10.2 model **without purchasing ArcGIS Advanced** licence? Arcpy script, paid 3rd party extension, or open source extension etc? Thanks! Update: I ended up modifying the code found in this Q/A to create a custom script tool which:   * creates an empty feature class for output   * Iterates though every line of a different input feature class with many short polylines   * at both the start and end of each line create a set of points which form a perpendicular line   * connect those two "lines" (2 sets of 2 points) and feed them into the "shape" attribute of polygon   * write those polygons to the empty feature class


Change the Name,Tooltip of builtin Commands

When I change the name of a builtin command using the following code, I get the error, "this method cannot run on builtin commands".               ICommandItem BuiltinCMD = FeatureLayerContextMenu.Find(BuiltinCMD_UID, false);     BuiltinCMD.Name = "NewName";      However changing the name of a command in Arcmap customization mode is vary easy. My question is that, is there a way to change the name of a builtin command programmatically through arcobject? Thank you in advanced


Qgis 2.0 and conection with Postgres 9.3.2

I tried conection with Qgis 2.0 with Postgres 9.3.2 but I was unable to do it. Is there anyone that help me Tks


How to identify township range and section from longitude and latitude

I have several hundred coordinates in an Excel file. I would like to identify the township range and section they are located--what is the easiest way to do this? I have you QGIS and basic GIS skills (i.e. digitizing). I googled my question and came across the following website: http://www.esg.montana.edu/gl/trs-data.html. This allows you to go from TRS to longitude and latitude. I'm thinking GIS would provide the best solution but I'm not sure where to start. I would like to identify actual legal descriptions.


Unable to retrieve custom extension state from a document in ArcEngine

I created a custom extension in ArcMap 10.1 which implements the IPersistVariant interface. State related to the extension features is persisted and retrieved via the Load and Save methods. Everything works fine in ArcMap. I am now building an ArcEngine app which needs to load documents which have been modified with the custom extension in ArcMap. I need to be able to load in the extension, so that when I load the document, the extension specific state is retrieved. I have no problem loading the extension in ArcEngine as follows:                       Type extensionManagerType = Type.GetTypeFromProgID("esriSystem.ExtensionManager");             System.Object extensionManagerObject = Activator.CreateInstance(extensionManagerType);             this.comReleaser = new ComReleaser();             comReleaser.ManageLifetime(extensionManagerObject);             this.extensionManager = extensionManagerObject as IExtensionManager;             IExtensionManagerAdmin extensionManagerAdmin = this.extensionManager as IExtensionManagerAdmin;                  // Add the PirsaExtension to the extension manager to load it.             UID uID = new UIDClass();             uID.Value = "PirsaX.Extension.PirsaToolsExtension";             extensionManagerAdmin.AddExtension(uID, this as IBatchApplication);             IExtension extension = this.extensionManager.FindExtension("PirsaMappingToolsExtension");             // Remember the extension manager as a PirsaExtension so that later we can use it to load             // a document.             PirsaToolsExtension pirsaExtension = extension as PirsaToolsExtension;             this.batchMapGenerator = pirsaExtension.BatchMapGenerator;             // Enable the extension.             IExtensionConfig extensionConfig = extension as IExtensionConfig;             extensionConfig.State = esriExtensionState.esriESEnabled;      Doing this loads the extension properly. In the debugger I see its Startup method being called and see the extension being enabled. The problem arises when I open the document. The extension's Load(IVariantStream stream) method never gets called. Here is how I open the document.                       mapDocument = new MapDocumentClass();                     if (mapDocument.get_IsMapDocument(filePath))                     {                         mapDocument.Open(filePath, String.Empty);             }      There is a pause when the mapDocument loads, and then I can access its details, but none of the custom state is there. How do I tie opening the document into the extension? Any advice or insights would be greatly appreciated. Tom Cuthill


Increased memory usage while zooming and dragging

I have a problem that deals with memory. When I run my GIS program, it uses 495K from my memory after 1 minute. And it continues to work with same value. ![enter image description here](http://i.stack.imgur.com/fSGrA.jpg) But when I zoom in / zoom out / drag the map to other sides, the memory usage of my programme increases to 500-600K. and it does not decrease back to old value, it becomes constant value after the zooming and dragging stops. ![enter image description here](http://i.stack.imgur.com/lhKd8.jpg) I am clearing the unused memory all 1 second with:               GC.AddMemoryPressure(GC.GetTotalMemory(true));          GC.Collect(GC.MaxGeneration, GCCollectionMode.Forced);          GC.Collect();      How can I resolve this problem?


How to render from Mapnik at a specific scale?

I'm trying to render a map to paper using Mapnik at a specific scale (such as 1:50k), but can't yet figure out how. So far I'm just using `map.zoom_to_box`:               map.zoom_to_box (mapnik.Envelope (101.5,3.2,102,3.3))      and play with `MaxScaleDenominator` and `MinScaleDenominator` in the styling rules.. But when done this way, I can only guess-work the map scale by adjusting the bounding box over and over, which is hard to obtain the exact 1:50k scale that I wanted.. I've also found this: `map.scale_denominator()` and `map.scale()`, but I think these are used only to display the map scale - not setting it.. Is there anyone here who can help me?


How to split a Polyline Geometry at a certain point in ArcObjects?

I have a polyline geometry and wish to split it into two different geometries, based on a given point on that line, in ArcObjects. I have tried to find out how to do this, but to no avail. I found that there are three methods which are sort of related to what I want.   1. IFeatureEdit.Split Method This seems to do exactly what I want, but it Works on a Feature, and not on a Geometry. I Do not want to edit existing features, but copy the geometry from an existing feature, split it in two parts, and then process those parts.   2. IPolycurve.SplitAtPoint Method I though that this method would be useful, but it just adds a new vertex at the point, and does not split the polyline   3. ITopologicalOperator.Cut Method This would also work, but when I use it, giving a perpendicular line as the input paramter, I am getting an error which says 'An Internal error has occured in the geometry system.' Is there some way of achieving what I want to do?


using arcpy outside arcmap

There may be something I'm missing, but is it possible to use the arcpy module outside arcmap? My situation is that we have one license on a computer which is shared over a network. I need to do some basic processing and I'd like to do it via python without having to log on to the GIS computer. Is this possible? Is it as simple as copying the location of the arcpy module into another instance of python? Or, can I just direct python to the directory arcpy is living in? Pardon my naivety if I'm out to lunch.


How can I relocate a georeferenced image, shapefiles and grid using Spatial Adjustment tool?

I somehow georeferenced an image about 120 miles east of where I should have georeferenced it. This should be a simple fix, except that I then proceeded to digitize that extremely detailed image (read: time consuming) into two shapefiles and also gridded that data all based on the incorrect location. A friend recommended to just re-georeference the original image and use the Spatial Adjustment tool to simply move the shapefiles and grid over to the right location. The problem is: I've never used the Spatial Adjustment tool and I'm having trouble figuring out how to do this properly. There are three options: edge snap, rubbersheet and transform. Can anyone help or suggest an easier way to achieve this without having to re-digitize everything? I sincerely thank you for any help you can offer me!


How can I export a shapefile to netCDF?

I have a shapefile of the worlds biomes   * Terrestrial Ecoregional Boundaries Shapefile (TNC), 12/14/09, 50MB download from available from http://conserveonline.org/workspaces/ecoregional.shapefile I would like to export it as a raster file; preferably a netCDF file with the MsTMIP format standard. Ultimately, I could work with a netCDF that keeps metadata from the shapefile, or even a csv with no metadata. I can generate the .csv myself, but I expect that existing tools will do much of the work for me. Do they exist?


best bluetooth gps for marine applications

What is the best gps to get as an add on for an android (asus tf300)? This is for a marine application I am writing.   1. I need sub 5 meter accuracy.   2. Would like decent accuracy at moderate speeds.   3. I dont want to spend more than 120 USD.   4. Must be bluetooth since device doesn't have usb Battery life is important since Ill be on a boat for 12+ hours at a time - the gps will be in standby mode some of this time - battery should be able to run at least 6 hours in active mode without charging Im assuming that most of the devices on the market today are waas enabled (this is what I want right?). Ive looked at some globalsat and dual models but not sure what is the best. Please be gentle as Im a noob when it comes to GPS techology. Thanks.


Python - Check for number of shapefiles in a directory

I want to test:   1. to see whether or not **ONE** AND ONLY ONE shapefile (which will be based on a filename wildcard) exists in a directory.    2. Add these shapefiles to a list    3. Use this list variable as an input to merge_managment function.  I already know how to walk through directories and pick out those filenames but not how to do the above. I was thinking something like:               rootDir = "\homePath"     featureinput1 = "path"     newOnlyShpList = []     for dirPath, dirNames, fileNames in os.walk(rootDir):         for file in fileNames:            if fnmatch.fnmatch(file, "*" + "2012" + "*" + ".shp")== True ##AND IF ONE SHAPEFILE EXISTS BY ITSELF IN DIRECTORY:##               ##append to newOnlyShpList               arcpy.Merge_managment([featureinput1, newOnlyShpList], "OutputHere")            elif               ##ignore if greater than one shapefile      All I know about is the arcpy .exists function but all that does is return a boolean on whether any shapefile exists. Maybe I need to check just for 1 .shp extension and it has nothing to do with arcpy? Thanks for any help.


Vector affine transformation in QGIS2

In QGIS 1.8, I can transform my point layer with the plugin "Affine transformation". So, this plugin don't exist in QGIS 2.0. Do you know a method to simply translate (i.e : X -> X+30000) in QGIS 2 ? It's possible in QGIS or I must use ogr2ogr, QGIS 1.8 or openjump ? Thank for your help. regards


flexviewer3.0 & wmts basemap

I'm using fleviewer 3.0 with wmts. I've got no result.. [white screen] from server-side i'm using both mapproxy.1.5a & geoserver2.2 my config.xml for flexviewer:                <layer label="Gwc-wmts" type="wmts" visible="true" imageformat="png"          url="http://xxx.xxx.xxx.xxx:8080/geoserver/gwc/service/wmts"                       servicemode="KVP" layerid="cite:my_layer"                     tileMatrixSetId="EPSG:4326"                          />                   <layer label="WMtS"                     type="wmts"                     url="http://xxx.xxx.xxx.xxx/mapproxy/service"                     layerid="my_layer"                     servicemode="KVP"                     imageformat="png"                     visible="true"                     tileMatrixSetId="grids_demo"                     />      I've succesfully display with openlayers. how can i use wmts with flexviewer?


Single tiled Mapserver WMS to avoid Labels and features cut along tile borders and repeated labels

I am using Mapserver-wms-openlayers for publishing maps. But there are some issues came across related to duplicate labeling for same feature in adjacent tiles, unwanted breaks in line features along tile borders, labels cut along tile boarders. Not much documentations to clear this anywhere. Can I create single tile using mapserver wms? Just increasing the tile-size to container (map-div) size is enough? My code is:               map = new OpenLayers.Map('map',       {zoomDuration: 1,projection: 'EPSG:3857'}     );          var mymap_all = new OpenLayers.Layer.WMS("EOL",     "http://192.168.0.233/cgi-bin/mapserv?map=/var/www/mstest/test_plant.map",       {'layers':"map_outline",        'transparent':true,        'format':'image/png'},       {isBaseLayer: false,opacity: 100},       {singleTile: true, ratio: 1}     );          var gmap = new OpenLayers.Layer.Google("Google Streets", // the default       {numZoomLevels: 25,visibility: false},       {isBaseLayer: true}     );          map.addLayers([mymap_all,gmap]);      ![See the cut off and duplicate labels along tile birders](http://i.stack.imgur.com/kh2o9.png) ![See an individual tile.](http://i.stack.imgur.com/vVmOj.png)


Understanding QGIS buffer tool units?

I have been trying to figure this out for a couple weeks now and have had no luck getting the buffer tool to accept anything but degrees as units of measure. I have found lots of stuff saying the layer needs to be reprojected and saved but it hasn't worked at all for me. Is there a way I could create a buffer without using ftools or at least force the units to meters somehow? As a workaround I converted meters to degrees (lat) and used that but the final product needs to be as close to reality as possible. Things I've tried:   * setting every unit option I could find to meters (where possible).   * setting everything to NAD83/Maryland (data is for Washington, DC) and saving it as such (as layers in ESRI shape files).   * reimporting the reprojected layers   * setting relevant layers to Google Mercator The was tried followed by creating a buffer. Many were tried in combination. QGIS 1.7.3 Slackware64 current (qgis from SBo-13.37 repo, tried on multilib and plain 64it with same results)


Ordnance Survey osgb:BNG spatial reference system not recognized by PostGIS

I'm trying to load an Ordnance Survey GML file into PostGIS using the ST_GeomFromGML function. The problem is that the spatial reference system that is used in the file, osgb:BNG, is not recognized by PostGIS:               # SELECT ST_GeomFromGML('<gml:Point srsName="osgb:BNG">              <gml:coordinates>527347.0,181346.0</gml:coordinates></gml:Point>');     ERROR:  unknown spatial reference system      Is there any workaround? Does "osgb:BNG" have an alternative name that is recognized by PostGIS? Thank you. * * * EDIT: Thanks to everybody for their answers. I ended up replacing "osgb:BNG" with "EPSG:27700" in the GML file (in the srsName parameter), although the other two options (modifying the spatial_ref_sys table, or using the ST_GeomFromGML function http://postgis.net/docs/ST_GeomFromGML.html with two arguments for PostGIS 2.0+) are perfectly valid too.


Defining datum for Lambert Azimuthal Equal Area and converting to geographic coordinates

I posted this question to a specialised mailing list for spatial data analysis using R here but didn't recieve a response. I am working with shapefiles and rasters in R, and I am unsure if I am specifying my projection information correctly (which I need to make sure I am as I want to reproject from one coordinate system to another). I have a shapefile (from the Hydro1K data). The projection information in the readme is described as:               Projection used:  Lambert Azimuthal Equal Area         Units = meters         Pixel Size = 1000 meters         Radius of Sphere of Influence = 6,370,997 meters         Longitude of Origin = 20 00 00E         Latitude of Origin = 5 00 00N         False Easting = 0.0         False Northing = 0.0      Looking at information in the readme and the associated .prj file I set the projection information using proj arguments like so:               proj <- CRS("+proj=laea +lon_0=20 +lat_0=5 +ellps=sphere") #the ellps 'sphere' has a radius of 6370997.0m     projection( myshpfile ) <- proj # In R the projection function allows you to set projection info for a file      However, I was wondering, do I also need to specify a datum for this projection? In the .prj file it says:               DATUM["D_Sphere_ARC_INFO",SPHEROID["Sphere_ARC_INFO",6370997.0,0.0]]      But I am not sure what datum this refers to? Does anyone know? Or can tell me where to find out? I also have some data which is in geographic coordinates. The .prj file of this data states:               GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]      Which I think is _standard_ geographic WGS84 projection? Am I correct in thinking that the proj arguments for this projection should be:               projgeo <- CRS("+proj=latlong +datum=WGS84 +ellps=WGS84")     projection(mygeoshpfile) <- projgeo`      Then to convert mygeoshpfile to the same projection as myshpfile, in R I can use spTransform like this:               mygeoshpfile2 <- spTransform(mygeoshpfile, proj)      I want to make sure I am accurately converting from one projection to the other. Do I need to specify further proj parameters? Thanks


How to split single shapefile into many, and use them as geoprocessing extents in ModelBuilder

I am trying to do the following things using ArcGIS model builder.   1. select by expression to output feature class.    2. use output feature class as spatial extent   3. raster to point The main goal is to reduce loading of computer, because the original raster is super large. If I convert all raster to point, the point shape file clashes. The problem is: how can I iterate the select function? In my model, it just exports one file. I have 15 shapes in a file, and I want to export each shape automatically. How can I revise my model?


Seeking a gvSIG plugin to go from shp to kml to cityGML

I'm looking for a gvSIG plugin to convert .shp to .kml and then to .cityGML. I'm working with gvSIG + 3D extension and I have .shp format data but I need it in .cityGML format.


Leaflet JS calling animatedMarker.stop() from event listener

I'm using the animated marker plug-in for Leaflet JS and would like to stop the marker from animating when it reaches a certain lat lon position. Currently I'm using Leaflet's 'move' event listener to detect when the marker reaches the specified lat lon. This part is working as I can console.log a message when the desired position is reached, however the stop method is not actually stopping the marker from animating. a live demo to my code can be found here My code is as follows:                                     <meta charset="utf-8">             <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">             <meta name="viewport" content="width=device-width">                          <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.css" />


How can i create a webservice the shortest route between two POIs?

I would like to create a prototype of a webservice that can calculate the shortest route between two POIs. How can I do that ? (I don't have any knowledge about the back-end of GIS and webmapping. So if you know any gis server or tool that can simplify this task it will be very helpful. I prefer opensource free tools. However, A very good tool or server that worth the price will be helpful for me )


How does the tolerance influence QgsGraphBuilder and tieing of points?

I am developing a script which uses OpenStreetMap data to calculate the distance (over the road network) between each building and the nearest hospital. To do this, I mainly follow the official tutorial http://www.qgis.org/en/docs/pyqgis_developer_cookbook/network_analysis.html My problem comes when calling QgsGraphBuilder. Because my buildings obviously don't lie exactly on the road network, I want to specify a tolerance value when creating the builder. However, with               builder = QgsGraphBuilder(crs, True, 200.0, "WGS84")      it doesn't "snap" my buildings to the network... Is there anything wrong with the way I call the function QgsGraphBuilder? I haven't seen any example which actually implements this tolerance parameter... **EDIT** I actually also tie all my buildings'centroids to the network:               builder = QgsGraphBuilder(crs, True, 200.0, "WGS84")          all_points = [] # A list that will contain the coordinates of all objects to be tied to the network     all_points.append(hospital) # I add the coordinates of the hospital          for building in coord_buildings.values():         all_points.append(building) # I add the coordinates of all the buildings'centroids              tiedPoints = director.makeGraph( builder, all_points ) # I tie the buildings'centroids to the graph              graph = builder.graph() # I build the graph              startId = graph.findVertex(hospital) # I take the id of the hospital in the graph              print startId # Displays -1      If I understand correctly, this means that my hospital doesn't match to anything in the network because it hasn't been tied properly... maybe because of the tolerance value? By the way, my data is in a PostGIS database, unprojected (EPSG 4326), in case it makes any difference **EDIT 2** I just saw that some buildings are actually tied to the network when I use only one parameter               builder = QgsGraphBuilder(crs)      or               builder = QgsGraphBuilder(crs, True, 0.0)      But rougly 1000 are still not tied. So probably really to do with the tolerance factor? When I specify the other parameters               builder = QgsGraphBuilder(crs, True, 200.0, "WGS84")      the dijkstra process fails (the tree only contains -1 values)


How can I get Google Fusion Tables to work in QGIS?

I am using GDAL/OGR 1.10 and QGIS 2.0.1. I am trying to load a google fusion table into QGIS using the method mentioned in this blog post. The only difference is that I am not declaring a email and password but using the OAuth refresh token I have generated. My VRT code is shown below.               <OGRVRTDataSource>         <OGRVRTLayer name="ps">            <SrcDataSource>GFT:refresh=<MY_VERY_LONG_TOKEN_IN_HERE> tables=1kQSkw-2cM_PU_jnu_T_PIksBkbyXm1feYaIooq8</SrcDataSource>         </OGRVRTLayer>     </OGRVRTDataSource>      But if I then add this layer to QGIS I get an OGR error that said "OGR[3] error 1: HTTP error code : 400", followed by another "OGR[3] error 1: Fetching OAuth2 access code from auth code failed." I thought that this would have worked because via the commandline I can use OGR to open the data source as shown in the image below. ![enter image description here](http://i.stack.imgur.com/thGHd.png) I have also tried structuring my VRT layer like in the blog post also with no luck. I'm a bit stuck on how to make this work. Any suggestions? Thanks Ando


In GRASS in QGIS, what do I do if "NVIZ module not found"?

I was a on a Windows system using GRASS in QGIS when the error below occurred. > NVIZ module not found I wonder how I can solve this problem?


How to add information to openstreetmap data?

I would like to add information to openstreetmap (routes,POI) but in a local version not to the version that is deployed on the web. So how can I do that ?


MultiLineString to separate individual lines using Python with GDAL/OGR, Fiona, Shapely

There are lots of MultiLineString features in a polyline shapefile. The problem is to split these lines into separate individual lines. There is a similar question with PostGIS, but I need to code in Python. I have been planning to extract the geometry from each MultiLineString feature and create separate features and append a shpfile with those new features. Later, in the second pass, I would delete the MultiLineString object which is no more required as it is now split into its components. It will require reading data from original shpfile and appending the newly created features to a copy of the shpfile. Then the appended (copy) shpfile needs to be rid of the MultiLineString features. It seems cumbersome as I find no way to read and write the shapefile simultaneously. There should be better ideas to do that. How to split these lines into separate individual lines using Python with OGR, Shapely, Fiona or Pyshp? A snippet of code to give an idea is below.               import fiona     from shapely.geometry import LineString          original_shpfile = fiona.open(path_to_road_network_shapefile)     with fiona.open(path_to_road_network_shapefile, 'a') as copy_shpfile:         rec = original_shpfile.next()         while rec:             try:                 vertices_on_link = rec['geometry']['coordinates']                 LineString(vertices_on_link) #reconstruct the line from vertices                 #if multipart,                  #has multiple lists within the list,                  #one for each of the Linestring component. also throws AssertionError                  except AssertionError:                 number_of_parts = len(vertices_on_link)                  for x in range(0,number_of_parts):                     part = rec                     part['geometry']['coordinates'] = vertices_on_link[x]                     copy_shpfile.write(part)             rec = original_shpfile.next()          #in the next phase, delete each of the the MultiLineString features from the copy of the shapefile


Raster incorrectly reprojected to OSGB(27700)

Ubuntu 12.04, QGIS 1.8.0, GDAL/OGR 1.7.3, GEOS 3.2.2 Open a Spatialite db with OS Mastermap poly layer (EPSG:27700);   Add OpenLayers Plugin (1.0) from QGIS offical repository;   Add a Google Satellite layer (EPSG:3857) and make OS poly fills transparent;   Zoom & drag map a bit till it 'settles down' - then both aligned nicely;   Make poly layer not visible and save map as image (jpg + jpgw);   Add saved jpg back in as a layer (EPSG:3857) - still aligned;   Reproject (warp) jpg layer from EPSG:3857 to a EPSG:27700 Gtiff;   Add this Gtiff layer - no longer aligned but shifted about 6m North.   ???!!!??? (On the fly CRS transformation is enabled) I've had this issue before with the unstable flavour of UbuntuGIS QGIS, so went back to the stable & all was ok. This time I'm getting the 'shift' in the stable UbuntuGIS QGIS and no amount of wiping out the libraries (with Synaptic) & reinstalling has so far got rid of this 'shift'. Any help or ideas gratefully received... * * * No problem reproducing the error (thanks underdark), but some more digging might narrow the issue a bit more. The proj4 CRS projection string for OSGB/27700 in GDAL1.9.1 is:   +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 The same thing in GDAL1.7.3 is:   +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs Even though QGIS is reporting the CRS as 27700 with the same proj4 string as the earlier GDAL1.7.3 it's probably using the later GDAL1.9.1 parameters for the reprojection behind the scenes. That would be fine if the image lined up after reprojection - but it doesn't. To test a step further I created a QGIS user-defined CRS with the same projection parameters as the earlier GDAL version, and then reprojected with this - everything now lines up fine. Are the EPSG:27700 projection parameters the likely suspect in the later GDAL (which QGIS is using) - or am I barking up the wrong tree? Many thanks.


Can't install pyspatialite with python3 and sqlite3

I can't install pyspatialite. When I try it gives me this error:               pip install pyspatialite     Downloading/unpacking pyspatialite     Could not find a version that satisfies the requirement pyspatialite (from versions:      2.6.2-spatialite.2.3.1, 2.6.2-spatialite.2.4.0-4, 3.0.1-alpha-0)     Cleaning up...     No distributions matching the version for pyspatialite     Storing debug log for failure in /home/jenia/.pip/pip.log      The python interpreter that's installed in the virtualenv is 3.4.1. When I run explicetly:               pip install pyspatialite==2.6.2-spatialite.2.4.0-4      I get this:               Running setup.py (path:/home/jenia/pip/app/build/pyspatialite/setup.py) egg_info for package pyspatialite     Traceback (most recent call last):       File "<string>", line 17, in <module>       File "/home/jenia/pip/app/build/pyspatialite/setup.py", line 83         print "Is sphinx installed? If not, try 'sudo easy_install sphinx'."                                                                            ^     SyntaxError: invalid syntax     Complete output from command python setup.py egg_info:     Traceback (most recent call last):          File "<string>", line 17, in <module>          File "/home/jenia/pip/app/build/pyspatialite/setup.py", line 83          print "Is sphinx installed? If not, try 'sudo easy_install sphinx'."                                                                             ^           SyntaxError: invalid syntax           ----------------------------------------      Cleaning up...      Command python setup.py egg_info failed with error code 1 in /home/jenia/pip/app/build/pyspatialite      Storing debug log for failure in /home/jenia/.pip/pip.log      Does anyone know how to fix this error?


GetCount raises exception

I opted to use gp.GetCount in my script. This raises an exception, though the process completes "successfully" while returning zero features (which is untrue). I'm wondering how this could be. Using ArcGIS 9.1 and Python 2.1.               file = open(txt).read().splitlines()     for line in file:         query = "[FIELD] = \"%s\"" % line         if line[:].isdigit():             gp.SelectLayerByAttribute("lyr1", "ADD_TO_SELECTION", query)     result = int(gp.getCount("lyr1").getOutput(0))          gp.Append("lyr1", "featureclass", "NO_TEST")     gp.DeleteFeatures("lyr1")     gp.SelectLayerByAttribute("lyr1", "CLEAR_SELECTION")      Output looks like..               Execution GetCount lyr1 0     Row Count = 0     Executed Successfully      Frankly I just want to check if my feature layer (created with makefeaturelayer) is null.


Is it possible to move/shift an annotation to a new XY using Python?

Real quick question, I was wondering if it is possible to move/shift an annotation to a new XY using Python.


Which character encoding is used by the DBF file in shapefiles?

Which character-encoding is used by the dbf-file in Shape-files? It seems it is handled different, based on the program and the local encoding-settings of the machine. Which encoding is 'right' - specified for the format?


How to select an limited TOP n from a specific column in arcgis query builder

I'd like to know what is the best way to select a limited top 'n' of rows from a specific column of a geodatabase file. Currently I use a function in the query builder of the select tool (arcgis10) in model builder which look a lot like the one posted on another item on this site (Select top 5 most items in a geodatabase). It looks like this in the expression of the query builder: `[Join_Count] in(SELECT TOP 9 [Join_Count] FROM spatial_join_geodat ORDER BY [Join_Count] DESC)` With this function I am able get a top n, but if the 9,10,11,12..... rows have the same value also these rows are selected. And sometimes the 9th row has a 0 as value and then all the rows are selected which I don't want. So, how do I limit the number of rows to 9 if this is the case? Has anyone a solution for this? Thanks in advance!


Automatically download Modis image using python script

I need download Modis imagery automatically from the website: https://earthdata.nasa.gov/. I found this link: http://gis-techniques.blogspot.com/2010/06/getting-modis- image-automatically-from.html but I can't run it. In that code there's the line: `logFileread=open(r"D:\MODIS\MOD09\lpdaac.txt",'r')` I don't know the structure of this file.I don't know how to create it. If anyone knows the answer, please tell me. Thanks for any help!


GetMap Geoserver Width and Height

I was wondering how to avoid the Geoserver transformation that takes place once you request an image via GetMap by using `image/geotiff` at the end of the url sentence in the browser. I am experimenting with a geotiff that has 300 x 300 pixels (290 KB) in the server. If I set the parameters in the GetMap request (url):`width=1012&height=1012` The output image will have 1012 x 1012 pixels (1,002 KB). If I request `width=300&height=300` - as in the original - the output image will have 300 x 300 pixels and 290 KB. If I overlap the two images, both have the same bounding rectangle but obviously the pixels don´t match, understood. But the most intriguing and worrying thing is that if we analyze these 2 output images by using `gdalinfo -stats` in the command line, you will see that the 1012x1012 image has its parameters totally wrong (Minimum, Maximum, Mean, etc.) but the 300x300 one too. In fact the original image is a Float32 raster and the 2 output ones are type Byte. Is there any way of getting the original one from Geoserver, via url, without any transformation at all?


Openlayer map not loading

Just another OpenLayers problem Plugin is installed correctly but when I add a layer I get following message. (CRS is on Pseudo mercator) Can anyone help me out? An error has occurred while executing Python code: > Traceback (most recent call last): File > "C:\Users\s58sj/.qgis2/python/plugins\openlayers_plugin\openlayers_layer.py", > line 109, in draw self.render(rendererContext) File > "C:\Users\s58sj/.qgis2/python/plugins\openlayers_plugin\openlayers_layer.py", > line 158, in render for res in self.resolutions(): TypeError: 'NoneType' > object is not iterable > > Python version: 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit > (Intel)] > > QGIS version: 2.0.1-Dufour Dufour, ebebdf3 > > Python path: ['C:/PROGRA~2/QGISDU~1/apps/qgis/./python/plugins\processing', > 'C:/PROGRA~2/QGISDU~1/apps/qgis/./python', 'C:\Users\s58sj/.qgis2/python', > 'C:\Users\s58sj/.qgis2/python/plugins', > 'C:/PROGRA~2/QGISDU~1/apps/qgis/./python/plugins', > 'C:\PROGRA~2\QGISDU~1\bin\python27.zip', > 'C:\PROGRA~2\QGISDU~1\apps\Python27\DLLs', > 'C:\PROGRA~2\QGISDU~1\apps\Python27\lib', > 'C:\PROGRA~2\QGISDU~1\apps\Python27\lib\plat-win', > 'C:\PROGRA~2\QGISDU~1\apps\Python27\lib\lib-tk', 'C:\PROGRA~2\QGISDU~1\bin', > 'C:\PROGRA~2\QGISDU~1\apps\Python27', > 'C:\PROGRA~2\QGISDU~1\apps\Python27\lib\site-packages', > 'C:\PROGRA~2\QGISDU~1\apps\Python27\lib\site-packages\PIL', > 'C:\PROGRA~2\QGISDU~1\apps\Python27\lib\site-packages\win32', > 'C:\PROGRA~2\QGISDU~1\apps\Python27\lib\site-packages\win32\lib', > 'C:\PROGRA~2\QGISDU~1\apps\Python27\lib\site-packages\Pythonwin', > 'C:\PROGRA~2\QGISDU~1\apps\Python27\lib\site-packages\wx-2.8-msw-unicode', > 'C:\PROGRA~2\QGISDU~1\apps\qgis\python\plugins\fTools\tools']


Drag a Feature in ESRI, ArcObjects Engine (AxMapControl)

I'm trying to implement moving a point feature in a custom C# ArcGIS Engine application on an AxMapControl. I've already created a custom tool to do some other things. And I can track when the user is doing a drag-type operation (i.e. click and hold while moving the mouse). What I'd like to be able to do is give some visual feedback of the drag operation, but I'm not sure how to do that. I can handle the feature selection, identifying the drag, and getting the new position, etc. Just need help specifically with the drag feedback. Ideally I would like to update the cursor to have the same symbology as the feature, but that's not an absolute requirement.


Road Symbol/Label issues

I am trying to control how many road symbols and how do I do that ? I have geodatabase that has Transportation and in it has a featureclass, "Major_Rds" and it also has three symbology for Interstate, NM state roads, and US roads. What I would like to do is to limit a few symbols to be display at a specific scale. Thanks![enter image description here](http://i.stack.imgur.com/DUpez.png) You can see there are too many road symbols in Southeast New Mexico but you see a few in Northwest Texas. HELP !!!!!


Normalizing and adding kernel density rasters

I have 4 years of road kill data for one road, though each year has a different sample time frame (i.e. May-June vs. April-October) and therefore each year has a different number of surveys and totals of road kill. I would like to compare kernel density rasters to find the worst kill locations when the 4 years are combined, but I do not want to bias the data toward the year with the greatest number of kills. (I am assuming kill locations in years with fewer samples are representative). How can I normalize the rasters so I can add them and find the greatest kill hot spots on the road?


Planetary-scale computing architectures for electronic trading: where is the data?

In his intriguing TED Talk, _How algorithms shape our world_ , Kevin Slavin shows this map from "Planetary-scale computing architectures for electronic trading" ... does anyone know if this data is available online? ![enter image description here](http://i.stack.imgur.com/PHt9L.png)


geoserver export shapefile chinese problem

I'm trying to export shpfile from a postgis to shape-zip . So i issue the standard GetFeature request with shape-zip as format to geoserver. The shpfile which i get Charset is ISO-8859-1 so the chinese is '????' . How can i change the iso-8859-1 to utf-8? postgis charset is utf-8 and geoserver global charset is utf-8 ![enter image description here](http://i.stack.imgur.com/xN67A.jpg)


Where do I find information where I can download the legislative mapping data

> **Possible Duplicate:**   >  Where I can download legislative mapping data? It is a collection of files downloaded from aristotle to map Zip to District data. Among the files are 1. Census Code (ILCENSUS) which has County Census Code, State Census Code and State County Name 2. Legislator Identification (IL105ZD) which has district address information, legislator number and name. 3. Legislative district mapping(ILLEGYY) which has County Code, State Census Code and Zip.


Best way to visualize Google Maps and Mapinfo (or SHP or SQLite) at the same time?

I am having a bunch of Mapinfo data of a large area. This data has multiple layers and is also available as SHP, and of course it could be easily converted to SQLite ("SpatiaLite"). Although probably only one layer needs to be visualized at this point. The problem is: **The customer needs to select a rectangle** from the data so it can be processed further. I already though of writing a Google Maps Plugin / Mashup that is fed by some AJAX/JSON. Or writing a Plugin for uDig. (OpenJUMP won't be appropriate because it has problems handling large amounts of data.) Another idea was writing a Java app with Google Maps embedded and maybe some (OSS) overlay that visualizes the SHP/Mapinfo data. Each solution has its good sides but also its bad sides. So, what do you think is the best way to realize it? Thanks, Philip BTW: The solution should not consist of expensive Closed-Source Tools.


Data ETL workflow optimization

I have a legacy workflow that I would like to optimize and automate (at least partially). The current workflow goes like this. I receive a MS Access .mdb file containing a single table. This table is then loaded into an an existing Access db that contained some macros ,which I will reference later, and renamed BTMUA. To the table BTMUA several fields are manually inserted into the middle of the table. Additionally two fields data types are changed from text to date to more accurately reflect the data they contain. Once these changes have been completed a series of queries, via two macros, are run to parse, trim, and concatenate data from the original fields into the new fields. Specifically Field A id parsed into fields A1 A2 using a left and right functions, likewise field B is parsed into field B1 and B2. Any whitespaces are removed from fields A1, A2, B1, and B2 fields are removed. Finally fields A1, A2, B1, B2, and C are concatenated in one of 7 different ways depending on which fields actually contain data. Here ends the data modification and my use of Access. I then use FME Desktop load this data into an existing table in my MS Sql based SDE GDB (after first truncating the table). I would like to redesign this workflow and remove Access from the equation although I cannot change the fact that the data will originate in a .mdb file. I would also like to automate the process as much as possible so it can run either with a few mouse clicks or on a fixed schedule. Basically I am trying to figure out if it is best to use FME to load the data from the .mdb into my GDB and use either ArcCatalog and Model Builder or MS SQL Server management Studio an T-SQL to transform the data. Or is it more efficient to utilize FME Desktop to do the data trans formations.


Errors when creating a TextElement from ArcObjects

I am attempting to add some text in the layout view of ArcMap. I’m using the following line for the TextElement that I’ve found online from numerous places including ArcObjects Library Reference. Being new to ArcObjects, I'm not sure if I'm doing something wrong or if there is something else going on that I'm unaware of.               ITextElement textElement = new TextElementClass();       I’m receiving the following errors:               The type TextElementClass has no constructors defined     Interop type TextElementClass cannot be embedded.       Full Code:               protected override void OnClick()         {             IMxDocument mxDoc = ArcMap.Application.Document as IMxDocument;             IMap map = mxDoc.FocusMap;             IActiveView activeView = map as IActiveView;             IPageLayout pageLayout = activeView as IPageLayout;                  if (activeView is IPageLayout)             {                 IGraphicsContainer graphContainer = pageLayout as IGraphicsContainer;                 ITextElement textElement = new TextElementClass();                  textElement.Text = "Test";                 IElement element = textElement as IElement;             }             else             {                 MessageBox.Show("This tool only functions in layout view");             }             activeView.Refresh();         }


How can I tell a GP model that exports a dbf to NOT add it to the 'List by Source' window?

I have a GP Model that simply exports a selected points lat and long to a DBF. I would like to make it so it does not add the table to the list by source window as it hangs for an annoying amount of time and I do not need to use the exported table in the map anyway.![Picture of model in question](http://i.stack.imgur.com/CihUR.jpg)


How to configure partial word matching in AnswerWorks-Vantage Linguistics on ESRI Desktop and Server products?

ESRI, like many companies, has licensed iSEEK AnswerWorks from Vantage Linguistics for natural language search of the ArcGIS Help system. At ArcGIS 10, ESRI dropped the Microsoft Keyword indexing search function from the Help system. Unfortunately, ESRI's default settings for the indexed AnswerWorks searches are "full word match" only. Has anyone figured out how the AnswerWorks settings in ArcGIS can be modified to return "partial word match" searches?


Import .cdr file into gis/cad format

I have a corel draw (.cdr) file that I would like to import into a GIS. It is a vector format which I thing has no geographic information associated. I would like to be able to get it into MapInfo Professional and use the vector registering tools to place it correctly. The problem I have is I cannot get it into .tab easily. Does anyone know a way of getting it into any GIS/CAD format I could work with Thanks,


Why does ModelBuilder lose data sources when copy/pasting or renaming toolbox?

I have a modelbuilder with a parent model that contains several sub-models. The parent and sub-models are contained w/in the same toolbox. Everytime I copy&paste or rename the toolbox, the parent models shows a red x and when i open it, I can see that the submodels w/in the parent also have red x's. The issue seem to be that the sub-models loose their input sde data sources and so I have to re-establish them and then re-add them to the parent model. I would like to find out what causes the models to fail like this when copying or renaming. I'm using Desktop 10.2. The screenshot is of the parent model. The top row shows the failed sub-models and the bottom row is me in the middle of editing and re-adding the submodels to the canvas.![enter image description here](http://i.stack.imgur.com/mL6GT.jpg)


ERROR: "Can't save to disk (check for space, write permission, or name)" while creating TIN in memory

I get the following error while creating TIN in memory : ERROR 999999: Error executing function. Can't save to disk (check for space, write permission, or name). Failed to execute (CreateTin). I don't have any issue with writing any feature class in memory, I wonder why it doesn't work for TIN.               TIN = arcpy.CreateTin_3d("in_memory/TIN", Coordinate_System, "XS_lyr P001 hardline FID", "DELAUNAY")      When I remove the "in_memory/" and just save it on local drive it works fine.


Can I use GeoTools with Gradle?

I am going to implement shapefile uploading from a webform, and ingestion into PostGIS. One problem I am having is that my project is using **Gradle** for dependency management. I am unfamiliar with Gradle and have no idea how to find the right string to get the jars into my project.


How to create 3D web application using Open Source GIS software?

I'm using OpenLayers - 2.11,GeoServer 2.13, ExtJS 3.4, and Java for developing GIS based web applications. How can we create GIS based 3d application like below attachment using opensource softwares in GIS. ![enter image description here](http://i.stack.imgur.com/U4iDk.png) ![enter image description here](http://i.stack.imgur.com/vJZVK.png)


Postcode Boundaries : India

I was wondering if there are shape-files for postcode regions in India. I did find some shape-files that give the outline of the administrative units in the country but not with postcodes. Right now I am using Google Map API that highlights the region under pin-code. ## Update It looks like the information is not present in public domain. It looks like either you can crowdsource the information or buy it from a thirdparty called MapMyIndia. I found a blog by Anand.S where he wrote about his crowdsourcing idea. Other than this I couldn't really find anything interesting. mapping-pin-codes Thanks


Are there downloadable samples of Geoprocessing tools that can be published as Geoprocessing Service tasks?

I am looking for examples of Geoprocessing Services which contain a tool/script for download.


PostGis ST_Transform: failed to load NAD27-83 correction file (-38)

So I'm getting some user drawn polygons in WKT with OpenLayers. (Web Mercator CRS) and I now need to now convert it to SRID4326 so can do some spatial queries. However, when it fails to do a ST_Transform. A simplified query I run that gives me the error:               SELECT ST_AsText(            ST_Transform('SRID=3857;POLYGON((-10179308.152034 5209576.5082574,-10140172.393558 4329021.9425348,-8516038.4167805 4329021.9425348,-9514000.2579329 5385687.421402,-10179308.152034 5209576.5082574))'::geometry,4326)     );      It gives me this error: > ERROR: transform: couldn't project point (-1.08446e+07 5.1652e+06 0): failed > to load NAD27-83 correction file (-38) > > HINT: PostGIS was unable to transform the point because either no grid shift > files were found, or the point does not lie within the range for which the > grid shift is defined. Refer to the ST_Transform() section of the PostGIS > manual for details on how to configure PostGIS to alter this behaviour. > cohere=> select postgis_full_version(); Even after a bit of google-foo, I still can't figure out how to install the correction file I can do And I can do other transformations just fine (I tried 4326 to 2026 and 3857). I read somewhere to check to make sure PROJ is installed and it is: `SELECT PostGIS_Full_Version();` > POSTGIS="1.5.2" GEOS="3.2.2-CAPI-1.6.2" PROJ="Rel. 4.7.1, 23 September 2009" > LIBXML="2.6.26" USE_STATS Thanks,


Can't cast from IFeatureClass to IFeatureClassLoad

I'm attempting to load a large number of features (up to 310k) into a feature class. It is functional at the moment, but speed is a major issue. It takes about .42 seconds per 1000 features. I've seen references to putting the feature class in LoadOnlyMode, but to do so I need to cast to IFeatureClassLoad. This cast always fails. Here is how the feature class is created. It's nearly ripped straight out of an esri example page. I'm passing in a scratchworkspace created using the ScratchWorkspaceFactory, and thats pretty much the only thing of importance.               public IFeatureClass CreateFeatureClass(IWorkspace workspace, IFeatureDataset featureDataset, Type modelType, String featureClassName, UID CLSID, UID CLSEXT, String strConfigKeyword)         {             if (featureClassName == "") return null;                  IFeatureClass featureClass;             var featureWorkspace = (IFeatureWorkspace)workspace;                  var dataset = workspace.Datasets[esriDatasetType.esriDTFeatureClass].Next();             while (dataset != null)             {                 if (dataset.Name == featureClassName)                 {                     featureClass = featureWorkspace.OpenFeatureClass(featureClassName);                     return featureClass;                 }             }                  // assign the class id value if not assigned             if (CLSID == null)             {                 CLSID = new UID();             }                  IObjectClassDescription objectClassDescription = new FeatureClassDescription();             var name = new FeatureClassName {NameString = "Collisions"};                  // create the fields using the required fields method             var fields = objectClassDescription.RequiredFields;             IFieldsEdit fieldsEdit = (IFieldsEdit)fields; // Explicit Cast                  var typeField = new Field();             var editableField = (IFieldEdit)typeField;                  editableField.Name_2 = "TYPE";             editableField.Type_2 = esriFieldType.esriFieldTypeString;             editableField.IsNullable_2 = true;             editableField.AliasName_2 = "TYPE";             editableField.DefaultValue_2 = "Collision";             editableField.Editable_2 = true;             editableField.Length_2 = 100;             fieldsEdit.AddField(typeField);                  foreach (var property in modelType.GetProperties().Where(x => x.GetCustomAttributes(typeof(SearchableAttribute), false).Any()))             {                 var returnType = property.GetGetMethod().ReturnType;                 var searchData = (SearchableAttribute)property.GetCustomAttributes(typeof(SearchableAttribute), false).First();                 IField field = new Field();                 var fieldEdit = (IFieldEdit)field;                      fieldEdit.Name_2 = searchData.DisplayName.Trim();                 fieldEdit.Type_2 = returnType == typeof(DateTime) ? esriFieldType.esriFieldTypeDate : esriFieldType.esriFieldTypeString;                 fieldEdit.IsNullable_2 = true;                 fieldEdit.AliasName_2 = searchData.DisplayName;                 fieldEdit.DefaultValue_2 = string.Empty;                 fieldEdit.Editable_2 = true;                 fieldEdit.Length_2 = 250;                      // add field to field collection                 fieldsEdit.AddField(field);             }             fields = (IFields)fieldsEdit;                  String strShapeField = "";                  // locate the shape field             for (var j = 0; j < fields.FieldCount; j++)             {                 var field = fields.Field[j];                 if (field.Type == esriFieldType.esriFieldTypeGeometry)                 {                     strShapeField = field.Name;                     IGeometryDef geomDef = new GeometryDef();                     var geometryDefEdit = (IGeometryDefEdit)geomDef;                     geometryDefEdit.GeometryType_2 = esriGeometryType.esriGeometryPoint;                     geometryDefEdit.SpatialReference_2 = ArcMap.Document.FocusMap.SpatialReference;                     ((IFieldEdit)field).GeometryDef_2 = geomDef;                     break;                 }             }                  // Use IFieldChecker to create a validated fields collection.             IFieldChecker fieldChecker = new FieldChecker();             IEnumFieldError enumFieldError = null;             IFields validatedFields = null;             fieldChecker.ValidateWorkspace = (IWorkspace)workspace;             fieldChecker.Validate(fields, out enumFieldError, out validatedFields);                  // The enumFieldError enumerator can be inspected at this point to determine              // which fields were modified during validation.                       // finally create and return the feature class             if (featureDataset == null)// if no feature dataset passed in, create at the workspace level             {                 featureClass = featureWorkspace.CreateFeatureClass(featureClassName, validatedFields, CLSID, CLSEXT, esriFeatureType., strShapeField, strConfigKeyword);             }             else             {                 featureClass = featureDataset.CreateFeatureClass(featureClassName, validatedFields, CLSID, CLSEXT, esriFeatureType.esriFTSimple, strShapeField, strConfigKeyword);             }                  return featureClass;         }      Once that's done I attempt to load the features from a list of geometry points. The code starts like this:               var featureWorkspace = (IFeatureWorkspace) workspace;     IFeatureClass featureClass = featureWorkspace.OpenFeatureClass(FeatureClassName);     var loader = featureClass as IFeatureClassLoad;     if (loader != null) loader.LoadOnlyMode = true;     var schemaLock = (ISchemaLock) featureClass;     schemaLock.ChangeSchemaLock(esriSchemaLock.esriExclusiveSchemaLock);      where the loader variable is always null. am i missing something obvious? is my feature class not compatible with that interface? ## **EDIT** In case anyone else comes across this, the problem here was that i was using the ScratchWorkspaceFactory. that class creates a personal geodatabase, and its features cannot be cast to IFeatureClassLoad. FileGDBScratchWorkspaceFactory creates Local file workspaces, and its feature classes can be cast to IFeatureClassLoad. Devil is in the details.