title: Copy Jp2000 from Mosiac Dataset turns white

text: I am trying to copy a raster to jp2000 from another File Geodatabase that I created as a Mosaic Dataset. It came out as a whiteout in the middle. I don't know what it cause this. See screenshot : Mosiac Dataset : ![Mosaic Dataset ](http://i.stack.imgur.com/ckphT.jpg) See Post copied from Mosiac Dataset to the new File Geodatase : ![Post Jp2000](http://i.stack.imgur.com/PL1gU.png) See Result log : ![enter image description here](http://i.stack.imgur.com/x3x7c.png) Any suggest or ideas why this jp2000 cause it to turn white and I appreciate it. Thanks !


title: how to remove a point or polygon in shapely python

text: I want to place minimum number of sensors(circles) to cover a maximum area(polygon). I am using "Shapely",python module. I want to know if a sensor i.e a point buffer inside the range of the other sensor(point buffer), how to remove that point. For this i need to know how to remove point in shapely.               from functools import partial     import random     import shapely     from shapely.geometry import *     polygon=Polygon([(0,0),(20,0),(0,20),(20,20)])     r = partial(random.uniform, 20.0, 20.0)     points = [Point(r(), r()) for i in range(10)]     # Buffer the points, producing 10 polygon spots     spots = [p.buffer(2.0) for p in points]      now i want to remove the points (spots) which falls within the range of other points in spots. I dont know how to visualise my results. My problem is : i need to cover maximum area with minimum of sensors(wifi). i need some guidance to start with. which environment to use, how to optimise, visualise in any gis environment. Please anyone help me..


title: Orux Maps raster display

text: Does anyone know what format of raster images works with Orux Maps? I tried to export maps acc to Orux Maps specs from ArcGIS 10.1 in every possible format (Geotiff, GRID, jpeg2000...), loaded with a .tfw file and it always displayed a colorless tile.


title: Convert the_geom to text and then transform

text: I have this query that returns the_geom as text. However how could I also apply a transform to the same query. I can do this separately with the second example. Though I would like to do this to all the rows in my table, and in that example I copied the st_astext output into the transform query. **`select sitename, st_astext(the_geom) from sites_tbl;`** sitename | st_astext Belfast A | POINT(145592 530021) **`ST_AsText(ST_Transform(ST_SetSRID('POINT(145592 530021)'::geometry,27700), 4326));`**


title: How to download the lulc map from Bhuvan

text: I need land use land cover map of entire Tamil Nadu State in India. its available in Bhuvan, but I don't know how to download it, can any one help me to get it, or is there any other source from I can get the LULC map of Tamil Nadu.


title: Is there any way to load pre-rendered svg from the server into the Polymaps?

text: I need to render 30000 grid cells (polygon) into a Polymap map. Is there any way to load pre-rendered svg from the server into the Polymap?


title: Checking current user privileges for an SDE dataset with Python/arcpy

text: I am managing data distribution via an ArcSDE Oracle gdb to a number of users (schemas?), each of which can only have read only access to datasets they have requested access to, and have then been licensed to see - due to the confidential nature of the data. Currently I keep these privileges in a spreadsheet as 0, 1, or 2 for each user, and with a Python program, I then update each dataset in the SDE to match the privileges in the spreadsheet using the ArcGIS "Change Privileges" tool. However, this means I am currently running the change privileges on all SDE datasets, when in reality only a handful may actually need be changed, which is then taking a lot longer than it really needs to. So I am looking for a way to find out what privileges each dataset already has, to know if they do need to be updated or can be skipped, probably with a custom function (nothing Oracle please), as in a simplified example of my existing code below:               import arcpy          #  New function here      def CheckPrivileges(sde_fc, user):         etc..         return privileges_value  #  e.g. 'Select'          #  Input SDE and spreadsheet paths     sde = r'SDEConnectionPath'     in_xl = r'SpreadsheetSheetPath'          #  Dictionary to convert 0, 1, 2 values from spreadsheet to privilege lists     new_privileges = {"0": ["REVOKE",  "REVOKE"], "1": ["GRANT",  "AS_IS"], "2": ["GRANT",  "GRANT"]}          #  A second dictionary to check against the returned value from the CheckPrivileges function,      #  but using the same values from the spreadsheet e.g.         privileges_check = {"0": "", "1": "Select", "2": "All"}  #  (This is almost certainly incorrect)          #  In the spreadsheet, each user has a column with the 0, 1, 2 privilege values e.g.     user = 'USER1'          #  Search cursor with each dataset and the users privileges.     rows = arcpy.da.SearchCursor(in_xl, ['SDE_DATASET', user])     for row in rows:              #  Path to SDE dataset having privileges altered.         sde_fc = sde + '\\' + row[0]              #  Pulls out the correct privilege values from the dictionaries.         user_privs = new_privileges[str(row[1])]              check_privs = privileges_check[str(row[1])]              #  This is where I would call the new function I need e.g.         current_privs = CheckPrivileges(sde_fc, user)               #  And then check against what it should be according to the dictionary.         if current_privs != check_privs:                  #  If not equal, then amend privileges, otherwise continue to the next row             arcpy.ChangePrivileges_management(sde_fc, user, user_privs[0], user_privs[1])      If anybody has any ideas of how to construct the missing "CheckPrivileges", I would love to hear them. Apologies in advance if this isn't enough detail, or my terms aren't quite correct, as I'm new to ArcSDE, and also to this site itself. Cheers.


title: BV LISA using PySal?

text: I want to run a LISA with a time series spatially lagged variable using PYSAL. I see that LISA will allow the definition of y & w but not Wy(t-k). Any thoughts how I can get the lagged variable into PYSAL? I also notice that PySal has a BV Morans but I can find nothing for a BV LISA.


title: Vector Layer not visible in openlayers

text: I'm trying to create a map where I have one wms layer and then a vector layer which is created from a kml file - held in the same directory as the web page. I'm trying to implement the cluster strategy but to no avail. I think I might me going wrong even before the cluster strategy kick is in as I can't see the vector layer at all when I remove the wms layer? This is the code for the vector layer:               var map;          function init() {        map = new OpenLayers.Map('map_element', {});        var wms = new OpenLayers.Layer.WMS(         'WMS Layer Title',         'http://vmap0.tiles.osgeo.org/wms/vmap0',         {layers: 'basic'},         {}     );          var masts = new OpenLayers.Layer.Vector("Masts", {     projection: displayProjection //EPSG:4326,     protocol: new OpenLayers.Protocol.HTTP({     url: "masts.kml",     format: new OpenLayers.Format.KML({             extractStyles: true,              extractAttributes: true             })     }),     strategies: [     new OpenLayers.Strategy.BBOX(),     new OpenLayers.Strategy.Cluster()     ],          styleMap: new OpenLayers.StyleMap({     "default": {             fillColor: "#8aeeef",             strokeColor: "#32a8a9"             }          })     });          var StaffTravel = new OpenLayers.Layer.Vector("StaffTravel", {     protocol: new OpenLayers.Protocol.HTTP({         url: "staff.kml",         format: new OpenLayers.Format.KML()     }),     strategies: [         new OpenLayers.Strategy.Fixed(),         new OpenLayers.Strategy.Cluster({distance: 15, threshold: 3})     ]     });          map.addLayers([StaffTravel]);       Any ideas where I might be going wrong?


title: Splitting polygon layer and joining attributes

text: I have two shape layers -- one a layer of counties in Florida and another a layer of MSAs in Florida. I would like to generate a new layer that has the following properties:   1. MSAs that overlap more than one county is split into mulitple polygons.   2. The new shape file must have new non-overlapping polygons with attributes MSAID (in case the polygon is part of an MSA) and CountyID. These attributes are currently separately specified in the two layers. So for a county that completely envelops an MSA, the new layer must have TWO polygons, the "non-msa" polygon and the MSA polygon. Here is picture of what the two layers look like now. I'm very very new to GIS, so any help would be greatly appreciated. I would rather do this in QGIS, but I'm open to other suggestions that involve using python+shapely. ![florida](http://i.stack.imgur.com/31RsI.png)


title: Missing Dependency in SAGA. Orfeo Toolbox does not work

text: Hej guys, I am trying to perforem segmentation from Orfeo Toolbox (QGIS last version 2.2), whenever I try to use the toolbox, I get the following message: **Oooops! The following output layers could not be open Output labeled image: D:/ERDAS_examples/Sardegna 1954/segmnentation.tif The above files could not be opened, which probably indicates that they were not correctly produced by the executed algorithm Checking the log information might help you see why those layers were not created as expected** The same when I try to use SAGA toolbox: **Missing dependency.This algorithm cannot be run :-( This algorithm requires SAGA to be run.Unfortunately, it seems that SAGA is not installed in your system, or it is not correctly configured to be used from QGI, Click here to know more about how to install and configure SAGA to be used with QGIS** How to solve this? I am using normally ArcGIS, ERDAS, geomedia etc. I have only basic knowledge of QGIS.... pls help, many thx


title: who to contact about issues with geoserver plugin for qgis

text: I have a project in QGIS that I am trying to publish using GeoServer via the plugin. When I try and publish a layer I get:               global name 'provider' is not defined Traceback (most recent call last):      File "/Users/rful011/.qgis2/python/plugins/opengeo/gui/explorer.py", line 118, in run command(*params)      File "/Users/rful011/.qgis2/python/plugins/opengeo/gui/confirm.py", line 18, in publishLayer catalog.publishLayer(layer, workspace, overwrite, name)      File "/Users/rful011/.qgis2/python/plugins/opengeo/qgis/catalog.py", line 379, in publishLayer self.upload(layer, workspace, overwrite, title)      File "/Users/rful011/.qgis2/python/plugins/opengeo/qgis/catalog.py", line 245, in upload self._publishExisting(layer, workspace, overwrite)      File "/Users/rful011/.qgis2/python/plugins/opengeo/qgis/catalog.py", line 171, in _publishExisting uri = QgsDataSourceURI(provider.dataSourceUri())           NameError: global name 'provider' is not defined      I have looked at the plugin code and can not find any references to ‘provider’ before the fateful reference that fails. Any ideas what is wrong? I am aware that this plugin is labeled as experimental but it is unclear who I should contact. I have tried to contact boundlessgeo without response and posted to the geoserver mailing list, again without any resolution.


title: How do you access the Draw toolbar symbol(s) from ArcObjects?

text: I'm dropping a text element onto a map and I'd like to use whatever settings the **Draw** toolbar has (font, size, color, etc). Is there a convenient way to access symbol interfaces? Or do you have to create those from the individual settings? ![enter image description here](http://i.stack.imgur.com/0a75N.png)


title: Sorting individual points by shapefile overlay

text: I have a couple hundred individual locations across Australia saved in a KML/KMZ file. Is it at all possible to use QGIS or something similar to sort these individual locations into a statistical area overlay? What I really want is to be able to extract a table where each individual location is assigned it's relevant statistical area; I want to do this without going through each one my hand. Any thoughts? You all are brilliant people.


title: How can i figure out what Geoprocessing Tool is selected in ArcMap? (ArcMap 10)

text: I am working on an arcobjects extension, that basically provides universal batch / task scheduling for the geoprocessing tools (similar to ERDAS's Batch/Scheduling System), the project is 99.9% complete. Anyways my issue is, i have looked, and looked, dug through the API, searched, posted questions on ESRI's forums (got no answer) for the last few days. However i cannot find any method for retrieving the currently selected geoprocessing tool. What i have tried (blank map no layers loaded):   * Accessing the IMxDocument.SelectedItem, and IActiveView.SelectedItem, seem to return a com object with a empty guid string (i am guessing its only for layers etc)   * Trying to hook into the underlying Arctoolbox tree (i cannot figure out what it is though) via the hwnd (i was desperate)   * IApplication.CurrentTool, this returns null Most curiously there is an IArcToolBoxFind, and a IArcToolBoxTool within the ESRI.Framework, which is where i would expect this kind of functionality to reside in. However i cannot find any examples, of this anywhere. Nor can i find any sort of documentation, and according to the object model there is nothing. _EDIT_ Nevermind ignore the comment about the above two they are for implementing an arctoolbox. Does anyone have any ideas? _EDIT 2_ Its basically a universal, batch/scheduling tool. When the user opens any of the tools i first want to open a custom dialog, then the geoprocessing dialog however in order to open the georpocessing dialog without actually having the event go to the geoprocessor you need a handle on IGPTool, or something similar. However to find this i would need to know what geoprocessing tool is opened. Also i found a solution, which is basically use arccatalogue + the tree browser, toolboxes showup within the tree. And you can easily find out what is selected. This is just a stop gate solution however but yeah damn it esri.


title: In an aggregated layers situation, how to perform a CQL query on one layer out of many?

text: I'm a newbie trying to filter things out in geoserver using CQL, hence the bar on top when displaying layers in geoserver. In that bar, where you are supposed to type in your CQL request, I'm actually trying to make a request over a layer rather than the other. Let me explain : Got a map which is an aggregation of two layers, let's say Layer1 and Layer2. Layer1 and 2 are now merged and displayed. Now I want to make a CQL request against the feature in Layer2 only. Let's say that Layer2 is actually a POI layer, with lots of points, and in this layer, there's a feature field called "type". So I display the map, comes with the dots of the second layer and the first layer which actually displays streets. Now, I'm trying to view only POI referencing schools, the CQL there should be : " type = 'SCHOOL' ". Well, that didn't work. And maybe the most frustrating thing is that I know why : Geoserver's trying to search for the attribute "type" in Layer1, but I want him to search in the second ! This is provided by the error I get : "Could not find attribute 'type' in Layer1" I also would like to tell you that if I try that query in a single-layered map view, it worked perfectly. My first attempt was to do it SQL-style, by putting the name of the feature before the field name, separated by a dot, resulting in Layer2.type. Didn't work, syntax error I think. My second attempt was to provide two conditions, one of them being dummy, hoping that geoserver would affect condition 1 to layer 1 and condition 2 to layer2, it might go something like : " INCLUDE;type='SCHOOL' " which actually is equal to a BLANK condition according to the OGC definition, thus providing me with the map unfiltered, OR "type = 'SCHOOL';INCLUDE;" which actually generates an error : Could not parse CQL filter list. Encountered "" at line 1, column 23... My third attempt was to add TYPENAME as an URL parameter, then trying to curl it. Results were the same as described above. I'm pretty clueless actually, as there isn't a very clear specification about using multiple layers, or I just feel that everybody is assuming what I'm asking to be ... quite obvious. So you'll excuse me if I'm wasting your time on such an (easy ?) question, but hey, I've been crawling google for ages now, and my attempts just shows how desperate I am. **_Ideally, please let me know how should I write a CQL request telling geoserver to apply it on only ONE feature of only ONE layer instead of the other, and then displaying everything._** Edit after Iant's answer : It's more something like the second alternative, given the fact that the black line is a result of a filtered layer. I've been trying stuff with INCLUDE, and it seems that, at least with the files I'm using, geoserver using the CQL top bar to input request, and in case of aggregated layers, applies that CQL only on the TOP layer, the one ordered first when you aggregate the layers in geoserver. I've been playing around with the order of the layers, and I got some stuff working, but doing so messes up my display, which is DOTS -> Streets -> Places. In this layer order, any VALID CQL request will only be applied on "DOTS", even if you specify 3 filters separated by a semi-colon. Not only that, it hides all the other layers. So basically here's how it goes : ( Layer1 -> Layer2 means Layer 1 is on top of Layer 2)   1. Created an aggregated layer composed of DOTS -> STREETS -> GOMETRIC_FILLINGS.   2. Viewed that newly created aggregated layer   3. Typed in, for instance "INCLUDE;INCLUDE;type='SCHOOL'". No changes on the map and no errors. Interverting that order will generate an error. Came here and posted my question.   4. Created a new aggregated Layer composed of only DOTS -> STREETS, just in case.   5. Tried the request "INCLUDE;type='SCHOOL'", it worked, I got the restults I expected, except that it COMPLETELY removed STREETS, and by INCLUDE, I clearly specified NO FILTERING on the second layer. Tried two filters simultaneously, but got the very same result, as if the request concerned by the second layer was purely IGNORED.   6. Felt like progressing, but wondering if there's an issue with the files I got, or I'm just missing something. Anyhow, here's my opinion about this :   * Order seems to be important. Not only when you write requests, but also when you create the aggregated layers.   * Even if provided with correct syntax in the CQL filter field, Geoserver seems to apply the filter on ONLY ONE layer, and "not caring" about the others. Even worse, it kinds of assume sometimes that you don't want to keep seeing the other layers, where I specified exactly the opposite by stating "INCLUDE" in my query. I know this is probably wrong, and I hope so, but could someone give us an insight about this point precisely ? It's like geoserver "selects" ,by his own will, only one layer, applies the filter on it, and just ignores the other filters on other layers. It's like applying only one condition at a time. Wish I could specifically tell him : "Apply this on Layer1, that on Layer 2, and that on Layer 3, AND DO THE JOB WITH ALL THE LAYERS, DO NOT IGNORE WHAT I TOLD YOU TO DO WITH THE OTHER LAYERS !" Man, that CQL bar is surely mysterious ... so guys, any insight ? I'm really close to deep despair ...


title: Getting SAGA-GIS Python Bindings without compiling from source

text: I am very new to SAGA-GIS, but I recently developed a workflow using SAGA for processing LiDAR data. Now I need to batch the process using Python. I installed SAGA from the Windows installer and I already have GDAL and other open source packages installed as well. When I create a python script for a module using the SAGA GUI (right-click on module), my Python installation (Python 2.6 installed with ArcGIS 10.0) does not recognize the module called saga_api. I found saga_api.dll in my SAGA install directory, but not saga_api.py. All the instructions I have found for installing the SAGA Python Bindings require compiling SAGA from source, but I would rather not mess with that since I already have it installed an working. Not to mention, I worry that compiling all the dependencies, like gdal, will break the installations of those packages I already have installed. Can anyone offer any insight?


title: SRS: geographic or cartesian?

text: Let's have a list of SRS with proj4 definitions (e.g. spatial_ref_sys table). Is there a way to determine whether given SRS is geographic (lon,lat) or cartesian (x,y)?


title: How to automatically create 2D-point features from addresses in an SQL database

text: I currently have an SQL-Table which contains our buildings. I already added the table and now want to create features ( 2D-Points ) from that information. The biggest problem I have is that the "location" of those buildings is stored as an address. I think I may have to use python and ArcPy to automatically add those buildings from the database as features on my map. However, I am new to ArcGis, so maybe I don't know about some functionality that comes with it. So: Is there a tool to read addresses from a data source and automatically create points out of those? Thanks in advance for your help!


title: How to run an Identify task on a WMS layer

text: I'm new to WMS layers, and am looking for a way to retrieve a layer's attributes when clicking on the map, using the ArcGIS Server JS API. The documentation is a bit sparse, but from this question it appears that I'll need to construct a query using GetFeatureInfo. Before I re-invent the wheel, has anyone written a wrapper function or sample code which builds the appropriate query when the user clicks on the map?


title: Can I update the service on ArcGis Server programmatically?

text: There is Windows Service. This service adds user raster data to the Raster Dataset in sde database. The Raster Dataset registred on the ArcGis Server. This Raster Dataset also was publishing on ArcGis Server. When the user data has been added to this Raster Dataset, the data is not updated on ArcGis Service. How update service on the ArcGis Server from my Windows Service? (I know IP address, password, and service name)


title: How to load Georeferenced Scanned Maps in R

text: I have a geo-referenced scanned Map in GeoTiff format, which I would like to load into R. My intention is to plot some vector data (points and polygons) over this map using maptools package. Is there any way to do this in R? I have tried the raster and rgdal packages, however they give a gridded raster file, rather than the original image. I would like to load the map as an image itself and not a gridded raster file to plot the vector data.


title: How to close the current mxd document through arcmap add-in

text: First, I open a mxd document named A in arcmap, then i use my add-in to generate another mxd document named B, then I use                ArcMap.Application.OpenDocument(arcmapMapFileName);      to open the document, but the document does not display normally, it has both A and B's layers. I want to only open B, so before open B, I have to close A. How can I achieve this through an arcmap add-in in c#?


title: GDAL TMS (WMS) mini driver

text: I've a problem with GDALs TMS mini driver. I've created an xml file, which i can open in qgis. I am using local tiles on my computer which i prerendered with mapnik, the map covers entire country of Austria and the XML looks like this:               <GDAL_WMS>         <Service name="TMS">             <ServerUrl>file:///f:/austria/map/${z}/${x}/${y}.png</ServerUrl>             <SRS>EPSG:3857</SRS>             <ImageFormat>image/png</ImageFormat>         </Service>         <DataWindow>             <UpperLeftX>-20037508.34</UpperLeftX>             <UpperLeftY>20037508.34</UpperLeftY>             <LowerRightX>20037508.34</LowerRightX>             <LowerRightY>-20037508.34</LowerRightY>             <TileLevel>17</TileLevel>             <TileCountX>1</TileCountX>             <TileCountY>1</TileCountY>             <YOrigin>top</YOrigin>         </DataWindow>         <Projection>EPSG:3857</Projection>         <BlockSizeX>256</BlockSizeX>         <BlockSizeY>256</BlockSizeY>         <BandsCount>3</BandsCount>         <ZeroBlockHttpCodes>204,303,400,404,500,501</ZeroBlockHttpCodes>         <ZeroBlockOnServerException>true</ZeroBlockOnServerException>     </GDAL_WMS>      The problem is: Whenever i zoom/pan into such window extents that is not completely covered with my tiles, the result is a scrambled image like this: ![enter image description here](http://i.stack.imgur.com/vBnmT.jpg) When i zoom/pan to an area covered with my tiles, the result is ok: ![enter image description here](http://i.stack.imgur.com/JmHxQ.jpg) What i think is the issue: GDAL cannot merge and display the map correctly if there are missing tiles. If i was loading tiles from an http source, the server would probably return http request codes like 404 or 204. When configuring the TMS service in the xml, you have an option to define what to do when a tile is not returned/cant be found using these 2 tags:               <ZeroBlockHttpCodes>204,303,400,404,500,501</ZeroBlockHttpCodes>     <ZeroBlockOnServerException>true</ZeroBlockOnServerException>      The problem is, i dont know what is the response when accesing locally stored tiles and some are not found, or how do you specify what to do in such a case. I was also thinking of limiting the extent of the layer, but there are no options in the xml syntax for doing so.


title: How to dispatch events from javascript

text: I am trying todispatch events from external javascript to open tooltips or infowindows from feature points. What I am doing using google maps api is something like this:               function myClick(id){             google.maps.event.trigger(markers[id], 'click');     }        1. Could it be possible using Cartodb.js api or I need to keep track all feature points in an external array?


title: Using Tile Mill and GeoJSON

text:
I am trying to use Tile Mill and GeoJSON layers to have an image appear within a tooltip but it is not working properly. The process I go through to get the GeoJSON:   1) load .shp into QGIS   2) save file.shp as file.geojson   3) open file.geojson in geojson.io to edit attributes and export to geojson   4) open new file.geojson in Tile Mill   The issue I run into is when I call the {{fieled}} within the teaser section of Tile Mill, it only calls [OID 0].

     {{label}}
      If I open the geoJSON at gejson.io I can see the all of the polygons have the correct attributes associated with them but when I look at the JSON I can only see [OID 0] and all of the polygon coordinates. How do I over come this? Is there a proper way to convert a shapefile to a geojson and I am not doing that? I am just lost on this right now... Thanks for any help!


title: Add locations individually in map view to existing table rows?

text: (Edited for clarity, sorry!) I have a table in which many records have long/lat info, but many others do not. In other words the locations for those records are currently unknown. Therefore there are many records that are visible in table view, but not in map view. This is not an error, it is just the current state of my database. I would like to be able to add the locations manually, case by case, as they become known. I was hoping there was a way to do that. I know you can add new records via the map view and table view. And you can edit existing records in the table view. I am wondering if you can edit an existing record in the map view by clicking on the map to indicate that location. The long and lat where clicked would populate the table. If not, through the existing UI, what would be the best way to implement such functionality? Thanks! Kenny


title: What's wrong with my IDW interpolation function (Python)?

text: **Original Question** Can anyone see what's wrong with my custom IDW interpolation below? I know there are existing libraries that can do this for me, but for various reasons including educational and stubbornness, I'm trying to create a pure Python Inverse Distance Weighted Interpolation function. I'm basing myself off the "basic form" of the Shepard algorithm from this Wiki article: ![enter image description here](http://i.stack.imgur.com/TFRT4.png) and ![enter image description here](http://i.stack.imgur.com/BcjtE.png) The way I interpret these equations is `weightofknownpoint = 1/(knowntounknowndistance to the power of the P parameter)` and `IDWforunknownpoint = sumforallknownpoints(weightofknownpoint*valueofknownpoint/thesumof(allknownweights))` The Python code I came up with produces interpolated values that are way off (the values spike in between known points instead of doing a smooth transition). To limit the length of this post I'm not going to show all of my code, so you won't be able to run this on your own. Just assume that everything else is correct (btw I know the code might not be very optimized but I'll deal with that later); is there anything about the code below that doesn't look right in terms of what the IDW algorithm is supposed to be doing, that might explain my odd results:               #ASSUMPTIONS     #math module is imported     #unknowncell and knowncell refer to custom created instances with a .x and .y position properties, and a .value property for their data value to be interpolated     #the unknowncell argument that I use for the _CalcIDWvalue function are all the unknown cell instances in the grid     #knowncells = list of known cell instances (ie the known points used to inform the interpolated value)     #sensitivity = 3 #ie the power parameter          def CalcIDWvalue(unknowncell):         calclist = []         for knowncell in knowncells:             if cell.x == knowncell.x and cell.y == knowncell.y:                 continue             #prep             def _getweight(unknowncell,knowncell):                 dist = math.sqrt((unknowncell.x-knowncell.x)**2 + (unknowncell.y-knowncell.y)**2)                 return 1/float(dist**sensitivity)             weight = _getweight(unknowncell,knowncell)             sumofallweights = sum([_getweight(unknowncell,tempknowncell) for tempknowncell in knowncells                                    if unknowncell.x != tempknowncell.x and unknowncell.y != tempknowncell.y])             #calculate             tempcalc = (weight*knowncell.value) / sumofallweights             calclist.append(tempcalc)         return sum(calclist)      My input grid is this:               [0, None, 1, None, 2, None, 3, None, 4, None, 5]     [None, None, None, None, None, None, None, None, None, None, None]     [0, None, 1, None, 2, None, 3, None, 4, None, 5]     [None, None, None, None, None, None, None, None, None, None, None]     [0, None, 1, None, 2, None, 3, None, 4, None, 5]     [None, None, None, None, None, None, None, None, None, None, None]     [0, None, 1, None, 2, None, 3, None, 4, None, 5]     [None, None, None, None, None, None, None, None, None, None, None]     [0, None, 1, None, 2, None, 3, None, 4, None, 5]     [None, None, None, None, None, None, None, None, None, None, None]     [0, None, 1, None, 2, None, 3, None, 4, None, 5]      And my incorrectly interpolated output grid is:               [0.0, 4.92, 1.0, 11.76, 2.0, 18.79, 3.0, 26.47, 4.0, 36.33, 5.0]     [1.42, 0.66, 5.54, 1.56, 9.92, 2.5, 14.64, 3.44, 20.43, 4.34, 39.83]     [0.0, 3.17, 1.0, 7.51, 2.0, 12.0, 3.0, 16.82, 4.0, 22.8, 5.0]     [1.43, 0.67, 5.22, 1.57, 9.28, 2.5, 13.68, 3.43, 19.11, 4.33, 36.8]     [0.0, 3.03, 1.0, 7.1, 2.0, 11.32, 3.0, 15.86, 4.0, 21.53, 5.0]     [1.44, 0.68, 5.17, 1.57, 9.15, 2.5, 13.48, 3.43, 18.84, 4.32, 36.14]     [0.0, 3.03, 1.0, 7.1, 2.0, 11.32, 3.0, 15.86, 4.0, 21.53, 5.0]     [1.43, 0.67, 5.22, 1.57, 9.28, 2.5, 13.68, 3.43, 19.11, 4.33, 36.8]     [0.0, 3.17, 1.0, 7.51, 2.0, 12.0, 3.0, 16.82, 4.0, 22.8, 5.0]     [1.42, 0.66, 5.54, 1.56, 9.92, 2.5, 14.64, 3.44, 20.43, 4.34, 39.83]     [0.0, 4.92, 1.0, 11.76, 2.0, 18.79, 3.0, 26.47, 4.0, 36.33, 5.0]      **Update** I found out what was wrong and posted the solution as an answer below. Another answer by Rickhg23s has further helped optimize the speed of the code, so see his answer for the final most up-to-date version of the IDW code.


title: Need to merge overlapping line segments

text: I'm working with fish distribution data, and have combined several 24k habitat maps into a single layer that I'll call "critical habitat" In merging multiple distributions into one dataset, there are line segments that overlap one another. Part of my project involves measuring the stream mileage in this "critical habitat" data set, but because there are stream segments with overlapping geometry, I'm unable to simply calculate each stream length and sum the for the whole dataset. I believe doing so would 'double-count' in those areas where there is feature overlap. Is there a way to merge these multiple overlapping features into one? or is there any way to accuracy calculate the total feature extent while avoiding any 'double-counting'? Thanks!


title: How to connect a dbo database through the add database server in ArcCatalog?

text: I am trying to add my database through the _" **add database server** "_ so that I can add users and maintain their permissions. We are running a dbo schema and our spatial database connection is working but not the server itself. Our database is running a SQL Server 2008 full edition instead of the Express edition. When we are prompted to enter it, we enter ourdatabasename\sqlserver2008. Is this correct?


title: In QGIS2.2.0 raster layers (.asc) with very low values get rounded of

text: In QGIS2.2.0-Valmiera I import raster layers in asc-format. The values in these files are very low. If I render them to single band pseudo color all values below 0.000001 are rounded off to zero. I can change the values and when I "apply" they'll change, but QGIS doesn't seem to be able to store it, since when I check the layer style again, all low values are 0.000000. The values in the color table are right. I need values at least as low as E-09. I could try to change the file, but I need to import about 60 asc-files. This is the color table; the three lowest values are rounded off to 0.000000: # QGIS Gegenereerd Kleurenpalet ExportBestand INTERPOLATION:INTERPOLATED 1e-09,21,129,21,255,Aangepast Kleurpalet 1e-08,0,174,0,255,Aangepast Kleurpalet 1e-07,149,229,0,255,Aangepast Kleurpalet 1e-06,255,224,0,255,Aangepast Kleurpalet 1e-05,255,126,0,255,Aangepast Kleurpalet 0.0001,255,0,0,255,Aangepast Kleurpalet Thanks, Leon van Raaij


title: Can I automate State Plane to Lat/Lon conversion in CartoDB?

text: Reading this: How do I convert State Plane coordinates to latitude-longitude? but ... I'm using CartoDB and wondering if there's a straightforward way to convert New York-Long Island State Plane coordinates to lat/long geometry en masse? Happy to accept a pointer to documentation I should be reading.


title: How to Properly Loop Through a List With a Cursor?

text: My team is working on a python script that does various updating tasks to our streets file. A part we are getting stuck on is trying to update a field. Currently we have a field FEDROUTE that is populated with federal, local, state route numbers. We want to loop through a list of federal route numbers and if the search cursor finds a number in the list, leave it alone, however if it finds a number that isn't within the federal route list, then delete the value in that field, leaving it blank. Right now the script will run through the first value in the list but won't start over and go through the remaining values in the list. The code we have written so far is:               import arcpy     import os     import StringIO     import datetime          Target_SDE_FC = r"C:\Users\craig\Desktop\10X_Testing_databases\SDE_TEST.gdb\RoadCenterline_test"     Source_Layer = r"C:\Users\craig\Desktop\10X_Testing_databases\SDE_TEST.gdb\RoadCenterline_sample"     SL_Layer = "CreateSource_Layer"     arcpy.DeleteFeatures_management(Target_SDE_FC)          print "Target_SDE_FC features deleted"          arcpy.MakeFeatureLayer_management(Source_Layer, SL_Layer, "", arcpy.env.scratchWorkspace)          fms = arcpy.FieldMappings()     fms.addTable(Target_SDE_FC)          #fedRts = ("75","441","41","301","27","21")     fedRts = ("21","27","301","41","441","75")          # Define the output layer for the append     arcpy.env.workspace = r"C:\Users\craig\Desktop\10X_Testing_databases\SDE_TEST.gdb"     outFC = "RoadCenterline_test"          # Try block to Append Feature Layer to the SDE (Test Data) with field mappings     try:         arcpy.Append_management(SL_Layer,outFC,"NO_TEST",fms)     #    test_output.close()     finally:     #    outFC.close()         print "append finished from try loop"               #arcpy.env.workspace = r"C:\Users\craig\Desktop\10X_Testing_databases\SDE_TEST.gdb"     #sde = "RoadCenterline_test"          print "start cursor"          #create update cursors to delete the records not needed in Federal, State, and County Routes     try:         for i in (fedRts):             print "reading a new i value"             with arcpy.da.UpdateCursor(outFC, "FEDROUTE") as fCursor:                 for record in fCursor:                     print "start cursor"                     if record == i:                         print "record is not i"                         break                     elif record == "":                         print "record is blank"                         break                     else:                         print "read a new record from cursor for same i"                 fCursor.deleteRow()             break                    finally:         del record         del fCursor         del SL_Layer         print "script finished"      I feel like we are really close to getting this working, but its our first time with cursors and loops. Any help is appreciated. **EDIT** Big thanks to Jason Scheirer. Your answer helped clean up our code considerably. To achieve what we wanted to do we wound up with:               import os     import arcpy          fedRts = ("21","27","301","41","441","75")     original_fc = r"C:\Users\craig\Desktop\10X_Testing_databases\SDE_TEST.gdb\RoadCenterline_sample"     Target_SDE_FC = r"C:\Users\craig\Desktop\10X_Testing_databases\SDE_TEST.gdb\RoadCenterline_test"          arcpy.Append_management(original_fc, Target_SDE_FC, "NO_TEST")     newValue = ""          with arcpy.da.UpdateCursor(Target_SDE_FC, "FEDROUTE") as fCursor:         for record in fCursor:             print "start cursor"             if record[0] not in fedRts:                 record[0] = newValue                 fCursor.updateRow(record)


title: How to add pins to my map?

text: Is there a way to add locations and info windows to my own map in .tif format? I'm using MySQL and PHP. Can I use Google Maps API pins but not their map? I thought I can put my georeferenced map (WGS84) and add Google Maps API pins on it. Is that possible and if it is not with Google Maps API, maybe you can recommend me some other way? Thank you.


title: ArcGIS API for Silverlight - pass geometries to ESRI service

text: How would I test this service to find what it wants? http://sampleserver4.arcgisonline.com/ArcGIS/rest/services/Elevation/ESRI_Elevation_World/MapServer/exts/ElevationsSOE/ElevationLayers/1/GetElevations It says geometries. But does it want a polyline or a point. I tried just putting a lat/long in the dialog box but no go. What I have is a result from a densify service               void DensifyService_DensifyCompleted(object sender, GraphicsEventArgs e)         {             GraphicsLayer graphicsLayerVertices = MyMap.Layers["VerticesGraphicsLayer"] as GraphicsLayer;             foreach (Graphic graphic in e.Results)             {                 ESRI.ArcGIS.Client.Geometry.Polyline p = graphic.Geometry as ESRI.ArcGIS.Client.Geometry.Polyline;                           foreach (ESRI.ArcGIS.Client.Geometry.PointCollection pc in (graphic.Geometry as Polyline).Paths)                 {                     foreach (MapPoint point in pc)                     {                         Graphic vertice = new Graphic()                         {                             Symbol = LayoutRoot.Resources["DefaultMarkerSymbol"] as ESRI.ArcGIS.Client.Symbols.Symbol,                             Geometry = point                         };                         graphicsLayerVertices.Graphics.Add(vertice);                     }                 }                  }             DensifyButton.IsEnabled = true;         }      So what I am wanting to do is get each MapPoint geometries from the foreach (MapPoint point in pc) And figure out how to get that into a list or whatever format is needed by the elevation service at the top of the question. Thanks.


title: ArcPy - Dataframe rotation - Getting a polyline length wise in the dataframe in layout view in ArcMap

text: EDITED: I'd like to rotate my dataframe until a polyline fits dataframe-width wise in the layout view of a .mxd. If the lines runs north/south I would like the dataframe rotated until the line is shown east/west (the north arrow adjusts accordingly). I can rotate the dataframe with arcpy. But how would I check that my polyline is running dataframe-width wise. Or would I get the envelope of the feature and then do some math to figure out how much the rotation angle should be to have the data frame rotated to meet my goal? The end result would be to capture the entire polyline in the dataframe in layout view of ArcMap (dataframe-width wise) at the smallest extent possible. Like an alignment sheet. Thanks.


title: How to do spatial join in autocad without Map3d?

text: My colleague tells me (vaguely) that spatial join is possible in standard versions of autocad using reference manager and xref. Does anyone know how to do this? Or if not, how to do a spatial join of data in autocad. (Map3d versions excluded.) **Edit:** Yes, I mean the same kind of spatial join as in arcmap. I will probably have some extended entity data attached to a bunch of lines. I am wondering how you would join this to data from either the nearest, or all overlapping, points or polygons.


title: How to implement Previous extent in mapxtreme

text: I want to implement **Zoom to previous and next extent** on click of a button using Mapxtreme functionality in Asp.net Kindly give your inputs.


title: Free .exe for coordinate transformation lat-long - UTM

text: I need to find a simple program for Windows which transforms lat-long to UTM. I know that there a websites to do this, but this is for use with the emergency services. The forestry commision use gps hardware which gives coordinates in Lat-Long. The software back in the Emergency central have to use UTM. The software doesn´t transform coordinates. They have asked me to find a solution to do a quick conversion. I wouldn´t like to put lives at risk by using a website which could go offline just when we need it, so I would prefer an installed program. Any good ones out there?


title: Make lists of shapefiles using loop

text: There are the following shapefiles in workspace.               L01-1983_01.shp     L01-1983_02.shp     ...     L01-1983_46.shp     L01-1983_47.shp     L01-1984_01.shp     L01-1984_02.shp     ...     L01-1984_46.shp     L01-1984_47.shp     ...     L01-2012_01.shp     L01-2012_02.shp     ...     L01-2012_46.shp     L01-2012_47.shp     L01-2013_01.shp     L01-2013_02.shp     ...     L01-2013_46.shp     L01-2013_47.shp      File name has the following rule.               L01-(year)_(city code).shp      (year) is 1983~2013 and (city code) is 01~47 I want to make lists of each year below.               list_1983=["L01-1983_01.shp","L01-1983_02.shp",...,"L01-1983_46.shp","L01-1983_47.shp"]     list_1984=["L01-1984_01.shp","L01-1984_02.shp",...,"L01-1984_46.shp","L01-1984_47.shp"]     ...     list_2012=["L01-2012_01.shp","L01-2012_02.shp",...,"L01-2012_46.shp","L01-2012_47.shp"]     list_2013=["L01-2013_01.shp","L01-2013_02.shp",...,"L01-2013_46.shp","L01-2013_47.shp"]      Below is my script.               from arcpy import *     env.workspace="C:\LandPrice(1983-2013)"     list_year=["list_%d" % x for x in range(1983,2014)]     year=1983     for i in list_year:         i=ListFeatureClasses("*year*")         year=year+1      But it doesn't work well. How can I make lists of each year?


title: Find position of a character within a string in Spatialite

text: I have a bunch of data generated as a .dbf by ArcMap that I imported in Spatialite for processing. One of the columns (text data) is of critical importance since it contains the ID of a point and a second ID of another point separated by a dash: `54 - 145` for instance. What I need is to be able to extract the number that is before the "-". In order to do this, I found about the `instr(X, Y)` function wihch should be able to locate the position of the "-": > The instr(X,Y) function finds the first occurrence of string Y within string > X and returns the number of prior characters plus 1, or 0 if Y is nowhere > found within X. After this, `substr(X,Y,Z)` should be enough to get only the first number. It should be noted that the length of the first number ranges from one to six digits, extracting the substring based on a constant length is this not possible. > The substr(X,Y,Z) function returns a substring of input string X that begins > with the Y-th character and which is Z characters long. After several tests, it seems that `instr(X,Y)` does not exist in Spatialite. **Does anyone know about a function similar to instr(X,Y) in Spatialite?** Thank you! (I am using Spatialite-GUI 1.6.0 with Spatialite 4.0.0).


title: extracting pixel value from a table in postgresql

text: I have a table in postgresql that contains ID, row number, column number, pixel value and centroid of the pixel in WGS84 lat-lon system(4326). How could I extract the pixel value by giving a point in 4326 reference system?


title: Migrating from FME Server 2008 (with Spatial Direct) to FME Server 2011

text: I am about to migrate a web app from it's old architecture to new. Part of this is migrating the old FME Server 2008 (using a Spatial Direct service) instance to FME Server 2011. I understand it is quite different; has anyone got any experience of moving to 2011 and can offer some advice? Thanks in advance.


title: How to union polylines with the same name?

text: I have a shapefile containing streets that have to be counted. But these streets in each case consist of several polylines. Maybe I should buffer these polylines and union the generated polygons that have the same name as well as they overlap. Is there a tool or do I have to write a VBA script or something?


title: How to load NASA JPL WMS Global Mosaic into QGIS

text: I was playing around with uDIG and realized that its WMS capabilities are awesome! The Global Mosaic perfectly fits a map I created! However, I was planning to use the WMS layer as an orientation for cleaning up my polygons, yet geoprocessing (merge etc.) is not very much straightforward in uDIG (is it?). Therefore I wanted to load the WMS into QGIS (1.7.2). After I set up the connection as http://wms.jpl.nasa.gov/wms.cgi? the connection works but when loading any service I get the following response:               Antwort: <?xml version='1.0' encoding="UTF-8" standalone="no" ?>     <!DOCTYPE ServiceExceptionReport SYSTEM "http://wms.jpl.nasa.gov/exception_1_1_1.dtd ">     <ServiceExceptionReport version="1.1.1">     <ServiceException>     This server no longer provides full WMS services!     </ServiceException>     </ServiceExceptionReport>        can anyone suggest a solution for correctly loading this WMS into QGIS? thank you! Jens


title: Getting ST_Difference between two different tables in postgis

text: One table has a series of grid squares in it, and the other has millions of voronoi polygons in it. I need to create a table that has the difference between the two of the them so that I effectively get the **holes in the voronoi layer**. I've tried several things like this:               SELECT st_astext(ST_Difference(density_squares.geom,             st_collect(density_squares_voronoi.geom))) As new_geom         FROM density_squares_voronoi left JOIN density_squares ON            ST_Intersects(density_squares.geom,density_squares_voronoi.geom)     group by             density_squares.geom;      But I get one output gridsquare for every voronoi polygon instead of the one cropped polygon like I need. Will I need to union the voronoi layer first or something? * * * I had to crack on and get it finished, so I just wrote some .net code to run it as a batch process. However I'm now trying to union the data and that is also taking a long time. A screen shot is here of what it looks like ![enter image description here](http://i.stack.imgur.com/qYTFj.png) and the sql i'm trying to use is this:               Select st_union(density_square_islands.islands)      into density_square_islands_union      from density_square_islands      where st_touches(density_square_islands.islands,density_square_islands.islands)      You can see the individual squares within the cropped islands. I just need to union the squares within each island into a single polygons


title: Should I use gdal_retile.py or gdal2tiles.py?

text: I have many GeoTif files that I want to display in google earth with Geoserver. I am wondering if I want to use gdal_retile.py or gdal2tiles.py to create the image pyramids for them to be usable in Geoserver. I am also wondering if I need to use gdal_warp on these images or are they ok since they are already in WGS 84? Here is my output of gdalinfo: Here is the gdalinfo output:               C:\Program Files (x86)\FWTools2.4.7>gdalinfo "c:\Users\dh\Desktop\output.tif"     Driver: GTiff/GeoTIFF     Files: c:\Users\dh\Desktop\output.tif            c:\Users\dh\Desktop\output.tfw     Size is 4000, 1920     Coordinate System is:     GEOGCS["WGS 84",     DATUM["WGS_1984",         SPHEROID["WGS 84",6378137,298.257223563,         AUTHORITY["EPSG","7030"]],     AUTHORITY["EPSG","6326"]],     PRIMEM["Greenwich",0],     UNIT["degree",0.0174532925199433],     AUTHORITY["EPSG","4326"]]     GeoTransform =       -85.7491388451308, -4.524787279609347e-008, 2.666305185835285e-007       30.00095207244157, -3.078813571247076e-007, -3.918543136581411e-008     Metadata:       AREA_OR_POINT=Area     Image Structure Metadata:       INTERLEAVE=BAND     Corner Coordinates:     Upper Left  ( -85.7491388,  30.0009521) ( 85d44'56.90"W, 30d 0'3.43"N)     Lower Left  ( -85.7486269,  30.0008768) ( 85d44'55.06"W, 30d 0'3.16"N)     Upper Right ( -85.7493198,  29.9997205) ( 85d44'57.55"W, 29d59'58.99"N)     Lower Right ( -85.7488079,  29.9996453) ( 85d44'55.71"W, 29d59'58.72"N)     Center      ( -85.7489734,  30.0002987) ( 85d44'56.30"W, 30d 0'1.08"N)     Band 1 Block=4000x2 Type=Byte, ColorInterp=Palette       Color Table (RGB with 256 entries)


title: Font not available in MapInfo v11

text: I have a font called Univers 55 on my PC (Windows XP). I would like to use this in MapInfo but it is unavailable in the font drop down. Does anyone know how it would be possible to make this font available?


title: Generating GeoJSON tiles from GeoDjango - basic overview?

text: I'm working with the glorious PolyMaps and I want to build a map similar to the population example. I understand that this needs GeoJSON tiles. I have a GeoDjango database, with a bunch of County objects, each of which has a Polygon field - these are what I'd like to display on the map. Can anyone give me a high-level overview of how to turn these County polygons into GeoJSON tiles? I've seen this question recommending TileStache, but is TileStache the most sensible thing to use with GeoDjango? And if so, how would TileStache fit in? Bonus points for explaining what a GeoJSON tile, um, _is_. Thanks :)


title: How do dissolve polygons from shapefile using open source tools?

text: In my current project I'm visualizing data on a map representing some values for each administrative areas of a country. I'm given a shapefile of this country, which I'm converting to GeoJSON for use with PolyMaps. Now I've got a requirement to cluster multiple areas into bigger ones, since there is no data for some of the smaller parts, but aggregated data for big ones can be acquired. Those clusters are predefined (e.g. A+B+C=D), so I figured it would be easier to produce a clustered shapefile and convert that to GeoJSON afterwards. But how do I create such a cluster, preferably automated and with open-source tools? Any other sensible way is of course welcome too.


title: A random "Could not load cross-domain" message when loading Esri map

text: My application displays an Esri map, by accessing the Esri public sampleserver. I use Esri dojo API for this purpose. The Esri dojo I use is of version 1.6 and is locally installed (as a war) on my server. It's important to say that the rest of my dojo code is an older dojo version (1.3.2).   I use Firefox 3.6 and the strange thing is, I sometimes get a "Could not load cross-domain resources" message (at about **10%** of my attempts). This problem happens more often on another pc (Firefox 3.6 as well): at about **80%** of my attempts. It is usually (but not necessarily) solved after clearing Firefox cookies and cache.   Now, I know the code is ok, as I can see the map in most of my attempts. However, I can't figure out why it sometimes fails on my browser, and why the other browser almost constantly fails.   What do you think? What could be the cause for it?


title: Setting up TileStache

text: I want to set up TileStache, but I'm new enough to the world of GIS to find the TileStache docs a bit impenetrable. I've just about figured out that I need to run               tilestache-server.py -c tilestache.cfg       to start TileStache, and navigate to http://127.0.0.1:8080/ to see the results. However, I'm unclear on what to put in `tilestache.cfg`. Eventually I want to use GeoJSON, generated from a PostGIS database, but for now I'd just like to start with a simple example to make sure that TileStache is working. There is a 'minimal sample configuration' in the docs, but it seems to rely on Mapnik \- and refers to a `style.xml` file - do I need to install and configure Mapnik before I can use TileStache? *** UPDATE *** Okay, I've tried using a 'proxy' config as follows in `tilestache.cfg`:               {       "cache":  {"name": "Test"},       "layers":       {         "roads":         {           "provider":           {             "name": "proxy",              "url": "http://tile.openstreetmap.org/{Z}/{X}/{Y}.png"           }         }       }     }      And then restarting Tilestache and going to http://127.0.0.1:8080/, but I still see:               Bad path: "/". I was expecting something more like "/example/0/0/0.png"      If I go to http://127.0.0.1:8080/example/0/0/0.png then I get a 404 - any ideas? *** UPDATE 2 *** For the benefit of others: `roads` should be part of the URL, so visit http://127.0.0.1:8080/roads/0/0/0.png or http://127.0.0.1:8080/roads/preview.html to see tiles!


title: How to Create Multiple Start and Destination Cost Paths?

text: I have a suitability matrix which was created in model builder based on elevation data and multiple start data points and end data points representing schools. I'd like to link all the schools up using cost paths. I can only use one iterator in model builder so was wondering how best to do this. Many thanks


title: Invalid data source issue when trying to use lyr.replaceDataSource

text: When I run the following code in an open mapdocument, it executes and does what I want it to, replace the datasource of the Indianacounty_shp layer with the County_Boundary feature class.               import arcpy, os, datetime     mxd = arcpy.mapping.MapDocument("CURRENT")             lyr = arcpy.mapping.Layer('Indianacounty_shp')             lyr.replaceDataSource(r"N:\3_PLANNING\6_GIS\GIS Data\Indiana_County_Database_201201.gdb", "FILEGDB_WORKSPACE", 'County_Boundary', True)             mxd.save()      I'm attempting to write a script the have it run through a list of mxd's in a folder, and do the same thing for all of them. When I run the following script, i get a "Runtime error : Object: CreateObject Layer invalid data source"               import arcpy     import arcpy.mapping     import os     import sys     from arcpy import env     import string          env.workspace = r"N:\3_PLANNING\6_GIS\GIS Projects\CompPlanMaps\test"     for mxd in arcpy.ListFiles("*.mxd"):         mapdoc = arcpy.mapping.MapDocument("N:/3_PLANNING/6_GIS/GIS Projects/CompPlanMaps/test/" + mxd)         lyr = arcpy.mapping.Layer('Indianacounty_shp')         lyr.replaceDataSource("N:/3_PLANNING/6_GIS/GIS Data/Indiana_County_Database_201201.gdb", "FILEGDB_WORKSPACE", 'County_Boundary', True)         mxd.save()     del mxd, addLayer, mapdoc      I've tried with both / or \ in the file names, and with and without the r in front. Any ideas what I'm doing wrong?


title: Does Oracle MapViewer support PostGIS?

text: I use Oracle MapViewer to generate my mapping data and currently I'm using an Oracle database as my spatial back-end. I would like to move my data over the PostGIS but I can't find any references if Oracle MapViewer actually supports PostGIS. So my question is? Is there out of the box support for PostGIS? Would I have to write my own custom spatial data provider?


title: Given a C# ArcMap custom toolbar with engine source files in a folder is there a way to install the toolbar and engine without going through VS?

text: I was given ArcMap toolbar and tool engine files without instructions on how to install but the code was done by someone else and it should work. How do I install it in ArcMap 10? I attempted to add the tool by going to customize->toolbar->customize->new and add files, but it wouldn't take the dll files in my directory. Is there another file type it is supposed to take? Or do I need to go through some kind of workaround in VS? I haven't installed ArcMap dev on my version of VS.


title: Ist there a way to calculate a Service Area from the Network Analyst in ArcGIS for each feature in a feature class?

text: I am trying to implement a python script that creates in a first step a Network Dataset and that in a second step gets a point feature class for which the tool should create for each feature in the feature class a service area. The first step is no problem, but the second... My first idea was to use the cursors in python which should run through the whole attribute table. For each feature a temporary feature class should be created which should be used as input for the service area. Is this the right direction or is there an more easy way to calculate for each feature individually a service area? Thanks for any tips or suggestions!


title: How to control road labels in Atlas QGIS 2.0?

text: I'm producing map books for our water assets. These books are taken out into the field by the workers so they can see where various 'things' are for the work they need to undertake. There are over 200 pages of maps and I've been using the Atlas functionality and I love it. But my problem is that my road name labels jump around a bit and when the PDF is produced, the road names tend to be truncated and close to the edge of the page. My roads are made up of segments so in Properties, I have checked the box that 'merges connected lines to avoid duplicate labels'. In Composer, if I manually move the map, I can see the labels jumping from one location to another. It's not too much of a problem in denser urban areas. But in rural areas where there are only one or two roads, it presents a problem if I don't have a road name or it is truncated. How can I fix this?


title: Is it possible to provide proxy.ashx for the other domain?

text: Usually, we use `proxy.ashx` for the same domain by this code. (working well.)               esri.config.defaults.io.proxyUrl = "proxy.ashx";      esri.config.defaults.io.alwaysUseProxy = true;      If the other domain need to use my proxy, is it possible to provide `proxy.ashx` for the other domain? I have try from my localhost but not working               esri.config.defaults.io.proxyUrl = "http://www.mydomain.com/proxy.ashx"; //can't access     esri.config.defaults.io.alwaysUseProxy = true;      Thanks in advance.


title: How to subset some polygons from shapefile?

text: I have a shapefile of lakes with lots of polygons. The area I'm interested in is only big lakes. Is there any way to subset only the polygons I interested from the shapefile? How can I do it in ARCGIS? Thanks a lot


title: Why does ArcGIS 10 Convert Time Field geoprocessing tool return <null> when using custom format?

text: I have dates in my attribute table that are stored as strings - they look like 02/22/2012 (mm/dd/yyyy) - and I would like to convert them to Date type. When I try to input a custom date format in the Convert Time Field geoprocessing tool it returns in all the records and I am not sure what I am doing wrong. I've tried MM/dd/yyyy and MMddyyyy - is there something I'm missing about setting up a custom date format? Or, is there another way I can do this?


title: How can I dynamically supply the value of mapextents to the Mapfile?

text: Is it possible to query a PostGIS database from a browser where I set the extents of the map? I have previously queried a PostGIS database from the browser and, separately, used mapserver to display a raster using a WMS query. Now I'm wondering if I can join these two separate pieces together. The part that I am not understanding is how to insert the query into the Mapserver code. For example, if my mapserver layer piece is as follows:               LAYER                                                                       # start layer                  CONNECTIONTYPE postgis                 NAME "roads                 CONNECTION "user=username                  password=**** dbname=databasename host=hostdb.com port=5434"                  DATA "geom from tablename where ST_Intersects(geom, mapextents)"                 STATUS ON                 TYPE LINE                 CLASS                     STYLE                         COLOR 0 0 0                     END                  END     END                                                                         # end layer      How can I dynamically supply the value of mapextents to the Mapserver file? I have considered the `.map` piece usually to be static but perhaps this is incorrect. An example of the type of query that I want to perform is as follows:               SELECT         ST_Clip(r.rast, 'POLYGON((-8293673 4952790,-8137619 4952790,-8137619 5036076, -8293673 5036076,-8293673 4952790))'::geometry)        FROM             raster AS r                      WHERE                ST_Intersects(r.rast, 'POLYGON((-8293673 4952790,-8137619 4952790,-8137619 5036076, -8293673 5036076,-8293673 4952790))'::geometry)      Secondly, where should I be storing the `.map` file? At the moment I have them in a web readable folder but I know this is not a good strategy once I need to store a password.


title: Creating Ellipse in WGS84, but with metric parameters

text: I have the function               --Ellipse(x,y,rx,ry,rotation,#of segments in 1/4 of ellipse)     SELECT ST_Translate( ST_Rotate( ST_Scale( ST_Buffer(ST_Point(0,0), 0.5, $6), $3, $4), $5), $1, $2)      I have points in WGS84 (x,y), radiuses in meters (rx, ry), rotation angle in degrees. And I need a new WGS84 geometry as a result. As you can see I can't call this function without conversions between WGS84 and some metric SRID. But my points aren't in a definite region. So a SRID which is optimal for one point, throws an error for another point during conversion. _**Is there a common way to get an optimal metric projection (SRID) for a WGS84 point?_** Or at least to use some rough, but world-wide universal metric projection? Or maybe there's a trick for this case?


title: Set Up Geoserver with .sid Files

text: I was given a folder of .sid, .sdw, and .sid.aux.xml files to use as tiles on our map. I'm pretty sure I can use ImageMosaic for this and have followed the doc at http://docs.geoserver.org/stable/en/user/tutorials/image_mosaic_plugin/imagemosaic.html. When I get to the step to add a Store and click save, I get the error "Could not list layers for this store, an error occurred retrieving them: Argument "value" should not be null." What can I do to fix this? Thanks!


title: Geoserver Raster layer cropped by polygon?

text: I've got a Geoserver raster layer which represents a satellite image. I use the Geoserver WMS to display the raster in OpenLayers. I want to display only parts of the raster - those within a certain region. **Is it possible to send a parameter to the server (like a bbox, or a CQL expression), which will tell it to render only within a polygon?** Can i make any 'tweaks' in OpenLayers to accomplish this behavior? For vector layers I can use a cross-layer CQL filter in the WMS request, but what to do with a raster?


title: Add a .lyr file to multiple mxd's within a specified folder using python

text: I need to create a python script that will look in a certain folder or workspace, and add a certain .lyr file to each mxd in the folder. I am able create a python script that adds the layer by specifying the path to each .mxd, but ideally, I don't want the name of each .mxd to have to be hard coded in the script. I've tried using the arcpy.ListFiles("*.mxd") but I can't get my script to read the list when I need to specify the mxd's to point to when identifying the dataframe in the arcpy.mapping.ListDataFrames function. This is what I have so far...Not sure what I'm missing.               import arcpy     import arcpy.mapping     import os     import sys     from arcpy import env          env.workspace = workspace = "M:\projects\mcag\Project_Site_Packet"     mxdlist = arcpy.ListFiles ("*.mxd")     for mxd in mxdlist:         mapdoc = arcpy.mapping.MapDocument(mxd)         df = arcpy.mapping.ListDataFrames(mapdoc, "Layers")         addlayer = arcpy.mapping.Layer(r"M:\projects\mcag\Project_Site_Packet\Subject Property.lyr")         arcpy.mapping.AddLayer(df,addlayer,"TOP")         mapdoc.save()         del mapdoc, addlayer


title: Converting set of points to polygon using C#?

text: I want to convert a set of gps ponints to polygon.I used a simple loop to convert it to a WKT and than used makevalid() in sql server and save it in a gemetry column in databasae.Is this way right?or I missed something. for example I have this points               <x1,y1>,<x2,y2>,<x3,y3>,<x4,y4>      I used a loop to creat a string like               Geometry::STFromText('Polygon(x1 y1,x2 y2,x3 y3,x4 y4,x1 y1)',4326).Makevalid()      Is this method right?Do I need any convertin on points .


title: OSM data - ways table features

text: I have made this web-app `http://160.75.133.173/openWebApp/routing.jsp` Users just have to click two points to figure out the shortest possible route available connecting them. I am using OSM data and pgrouting extension in postgresql. But the OSM ways table is missing any feature which could be used to rank the roads (like Highways, one-lane, two-lane etc, or any sort of ranking depending upon road's width or any other feature). How to deal with questions like "I don't want the shortest route but the route using Highways only or as much Highways as possible", using OSM data? Thx beforehands Zia


title: Using a Search Cursor with a list

text: I'm hoping someone knows the answer to this as I am pretty new to Python. What I'm attempting to do is create a list of .dbf tables using a wildcard which I've managed to do. From there my goal is to search the list and extract the value of a specific field. This field only contains 1 row, the value will then be used to populate a field contained in another table which, I haven't begun to attempt yet.Below is a code snippet:               tableList05 = arcpy.ListTables("*_2005.dbf")     #for table05 in tableList05:     with arcpy.SearchCursor(tableList05, ['SUM'])as cursorFive:         for row in cursorFive:            print row      For now I'm simply trying to get those values to print before trying to manage how to copy them and update the records in an existing table. The error message I receive when I run this section of code tells me the .dbf tables don't exist. Sorry if this is an easy one, this is my first post also,so there is the possibility that my code is not formatted properly. Thank you.


title: Using gdal_merge to create a grayscale mosaic

text: My gdal fu is weak and I need help! ;) I'm creating a mosaic in geotiff from hundreds of ecw. I created a list of all my rasters and used this command:               gdal_merge -o c:\temp\output_image.tif -q -v --optfile c:\temp\rasterlist.txt      It's working, but I'd like now to create one with only the red band. Is it possible to do it with gdal_merge? Thanks!


title: ArcObjects Resources

text: What are the best books/web sites for C# development with ArcObjects? The ArcGIS Resource Center is very helpful, but I am trying to find sources with more examples. Thanks


title: How to use makeline() function for more than 2 points in spatialite?

text: Is it possible to use makeline() function to make linestring geometries in spatialite for connecting more than 2 sequence points? Suppose I have four sequence points P1, P2, P3, P4. Or are there any other way to do this instead of using makeline()? Thx.


title: Maximum number of layers in openlayers with geoext

text: i have been developing webgis application that requires around 45 different layers served from geoserver. I had created openlayers wms layers and added them to geoext, everything works fine till the 35 th layer after i add 36th layer then openlayers gives pink tiles. Here is my snippet:                WGS84 = new OpenLayers.Projection("EPSG:4326");                  WGS84_google_mercator = new OpenLayers.Projection("EPSG:900913");                       map = new OpenLayers.Map({                      height: '300px',                      // allOverlays:true,                      width: '500px',                      projection: WGS84_google_mercator, displayProjection: WGS84,                      maxExtent: new OpenLayers.Bounds(80.0509262084961, 26.348379135131836, 88.20467376708984, 30.4458065032959).transform(new OpenLayers.Projection("EPSG:4326"), WGS84_google_mercator),                      //  )                      controls: [             new OpenLayers.Control.Navigation(),             new OpenLayers.Control.ArgParser(),             new OpenLayers.Control.Attribution()                      ]                  });     nnt_dyear_child_layer=new OpenLayers.Layer.WMS("Child Death Rate Yearly",                              "hostname1/geoserver/wms", {                                  name: 'nnt_indicator_d',                                  layers: "vpdms:nnt_dyear-child", transparent: true,                                  //viewparams: a,                              }, {                                  layerid: 'nnt_dyear-child_layer',                                  singleTile: true,                                  visibility: false,                                  group: "Indicators/NNT"                              });      nnt_dweek_child_layer=new OpenLayers.Layer.WMS("Child Death Rate Weekly",                              "hostname1/geoserver/wms", {                                  name: 'nnt_indicator_d',                                  layers: "vpdms:nnt_dweek-child", transparent: true,                                  //viewparams: a,                              }, {                                  layerid: 'nnt_dweek-child_layer',                                  singleTile: true,                                  visibility: false,                                  group: "Indicators/NNT"                              });     map.addLayers([nnt_dweek_child_layer,nnt_dyear_child_layer]);                    and finally  a geoext tree to hold the layer list:     tree1 = new GeoExt.ux.tree.LayerTreeBuilder({                      region: "west",                     // title: "Layers",                      renderTo: 'layers',                      width: 240,                      height:200,                      autoScroll: true,                      rootVisible: false,                      lines: false,                      enableDD :true,                      // widget custom properties                      wmsLegendNodes: true,                      vectorLegendNodes: true                  });      I have used google base layers. I'm using openlayers 2.11 and geoext 2 Btw i have already read Here and Official Here Any help would be great. Thanks, Bishrant Adhikari


title: Spatial Duplicates & Address Duplicates

text: I am working on ArcGIS 10.0 and I want to SELECT (and not remove) all the spatial and address duplicates from the attribute table in a layer, either by code or in a table window or else with spatial operations.


title: Tilemill Shield placing not working

text: I am trying to put road No in the shield with tilemill .mss. Here is the code I used.               #road {         shield-file:  url(C:\wamp\www\shield.png);         shield-name: [ROAD_NO];         shield-face-name:"DejaVu Sans Bold";         shield-size:10;         shield-fill: white;         shield-spacing:50;         shield-line-spacing:5;         shield-type: png;             }      Its return two errors in the `shield-file` and `shield-name` fields. What wrong I have done here?


title: How to make geoserver return JSON for WMS GetFeatureInfo?

text: I wish to get the results of a WMS GetFeatureInfo request as a JSON instead of the table that comes up by default. Out of the box, the only options for the response from a WMS GetFeatureInfo are the table, XML and text.


title: Is it possible to run the address locator in ArcGIS via Python?

text: I have a question regarding the address locator in ArcGIS. It is possible to create an address locator by using Python, but is it also possible to run an address locator via Python? This means, is there any Python code that does the same as the address locator toolbar in ArcGIS? The code should get the address by an user and should then locate the address and zoom on it. I would be happy about any suggestions.


title: Start-Marker from geojson polyline

text: i have a map with some walking- and bike-routes and popups with a few details and a picture. Now i want to set a marker on the first vertex of a geojson polyline, but i cant find out how. Btw. i´m new to leaflet/mapbox, and i put my map togehter from code snippets. The map, as it is now, is available **here**.


title: how to convert personal geodatabase feature class to coverage using arcobjects

text: how to convert personal geodatabase fatureclass to coverage using arcobjects with vba pls provide me any documentation or samples.


title: How to create Stored Procedure in versioned SDE_SQLServer geodatabase using DDL?

text: I've almost used SQL server_SDE geodatabases for 3 years in GIS projects and I don't know how can I create a stored procedure in geodatabase.I use ESRI case tool to create a geodatabase in ArcCatalog(using xml file as described in ESRI documentations),so I never created a geodatabase with DDL scripts,But i would like to know (and do) creating a geodatabase using DDL commands in SQL Server(while using SDE and versioning) and adding stored procedure to this geodatabase.As I know,sde creates some metadata tables and breaks data of versioned tables into some other tables(like a_xx and f_xx,for example a89,f89) so that some records of table is saved in these helping tables,so that I don't know how can I find the name of these helping tables and basically do i have to work with them in stored procedure or not. Is there any document or guide line to show how can create a geodatabase using DDL command in an environment like SQL server management studio?and how can create stored procedures in geodatabase and how can call it? Best Regards


title: How to get Intersection point from two lines (coordinates)

text: I have tried for ages to find the algorithm for getting the coordinate of two intersecting lines from a given coordinate (latlong). As the picture below suggest. I have two coordinates (A and B). With these two coordinates, comes two bearings or directions. I am looking for a way to find coordinate of C, when the lines intersect. ![proof](http://i.stack.imgur.com/XVXxb.png) Note: I am going to build it into a Java / C# Application. If there exist an library that already contains the math, that would help too. Thank you in advance.


title: Shell script commands

text: I have this shell script:               #!/bin/sh     r.mapcalc water = 120     d.rast water     i=1     while [ $i != 100 ]     do         n=1         while [ $n != 10 ]             do                 r.mapcalc < water.mapcalc                 d.rast water                 n='expr $n + 1'             done             g.copy rast=water,water.$i             i = 'expr $i + 1'         done      It is from http://grass.osgeo.org/gdp/raster/mapcalc-algebra.pdf. I understand the syntax of the code since I am a programmer, but I cannot understand the line `r.mapcalc < water.mapcalc`. What does it mean? Sorry first time to use a shell script.


title: Python package for processing GRIB data in windows

text: I would like to know what python packages can be used to process GRIB (Gridded Binary) data on a Windows system. I know there is something called pygrib, but to use that I have to use cygwin windows installation (something I want to avoid). I am looking for the package to streamline the processing of gridded precipitation data available from NCDC website (for example: http://data.eol.ucar.edu/codiac/dss/id=21.093). NCDC delivers the archived gridded precipitation data as: Unix Compressed (.Z) Gridded Binary (GRIB) Format Currently I use NOAA Climate and Weather Toolkit (http://www.ncdc.noaa.gov/wct/), but this adds another level of processing (something I want to avoid). I am seeking python packages, and workflow, perhaps with some examples to automate the seamless processing of GRIB files to derive the precipitation data.


title: How to Export Selected Feature to New Shapefile Using ArcPy?

text: I currently have a search cursor iterating through a shapefile in ArcGIS 10.1 that selects a feature and runs a viewshed analysis on that feature (and only that feature). What's the easiest way to also export that same feature to a shapefile with the same name in Python?               fieldFID = 'FID'     arcpy.CheckOutExtension("Spatial")          arcpy.MakeFeatureLayer_management (inPoints, "pts")          with arcpy.da.SearchCursor('pts',[fieldFID]) as cursor:         for row in cursor:             fid = str(row[0])             print fid             arcpy.SelectLayerByAttribute_management ("pts", "NEW_SELECTION", '"FID" = {}'.format(fid))             outViewshed = Viewshed(inDEM,"pts",1,"CURVED_EARTH",0.15)             outViewshed.save("C:/temp/output/viewsheds/"+fid)      Thanks again!


title: Why are my combo boxes not filled with a list of layers?

text: I am developing a Qgis plugin (layer_gui) and I am having a problem with populating the list of layers. When I first run the plugin my combo boxes are not filled with a list of layers, I have to reload the plugin to get them to fill in. I am sure I do not have the correct sequence of events. Source Code from layer_gui.py: class layer_gui:               def __init__(self, iface):         # Typical stuff from plugin builder          def initGui(self):         # Typical stuff from plugin builder          def unload(self):         # Typical stuff from plugin builder          # run method that performs all the real work     def run(self):         # show the dialog         self.dlg.show()         # Run the dialog event loop         result = self.dlg.exec_()         # See if OK was pressed         if result == 1:             input_source_layer = unicode( self.dlg.ui.source_layer_cb.currentText() )               input_dest_layer = unicode( self.dlg.ui.dest_layer_cb.currentText() )               QMessageBox.information(None, "Dangling Nodes:", str(input_source_layer) + " -- " + str(input_dest_layer))      Source Code from layer_guidialog.py               def __init__(self):         QtGui.QDialog.__init__(self)         # Set up the user interface from Designer.         self.ui = Ui_layer_gui()         self.ui.setupUi(self)         QObject.connect(self.ui.source_layer_cb, SIGNAL("currentIndexChanged(QString)"), self.update)         QObject.connect(self.ui.dest_layer_cb, SIGNAL("currentIndexChanged(QString)"), self.update)         self.success = False         self.manageGui()               def manageGui(self):         myList = []         self.ui.source_layer_cb.clear()         self.ui.dest_layer_cb.clear()         myList = self.getLayerNames( "all" )         self.ui.source_layer_cb.addItems( myList )         self.ui.dest_layer_cb.addItems( myList )         self.accept()               def getLayerNames(self, vTypes ):         layermap = QgsMapLayerRegistry.instance().mapLayers()         layerlist = []         if vTypes == "all":             for name, layer in layermap.iteritems():                 layerlist.append( unicode( layer.name() ) )         else:             for name, layer in layermap.iteritems():                 if layer.type() == QgsMapLayer.VectorLayer:                     if layer.geometryType() in vTypes:                         layerlist.append( unicode( layer.name() ) )         return layerlist


title: How can I use a tif and a SID to make a basemap in QGIS?

text: I am trying to add a basemap in QGIS, projected correctly for PA. I have been directed to PASDA. When I click on the FTP download link, it gives me the option to download TIF data or SID data. What do I want, and how will I add it to QGIS as a basemap?


title: How to copy File Geodatabase, in its entirety, while it is in use?

text: I'm wondering if there is any way to duplicate an in use File Geodatabase? The Geodatabase I have is being used by ArcGIS Server for a few of our web mapping applications. I understand I could stop the services and copy the Geodatabase after, and that is an option, but I'd have to do it at 2 AM when our users aren't online. So being lazy and wanting to enjoy my sleep, I want to find a way to copy this GeoDatabase in its entirety while it is in use. I am a pretty good programmer, so a programming or ArcGIS solution would be perfect.


title: Creating a 3D line feature based on 3D point features

text: In ArcGIS for Desktop 10.0, is it possible to create a 3D line feature by drawing a line that connects 3D point features?


title: Ogr2Ogr: Failed to create GPX file output.gpx

text: When i try to export an shapefile to gpx using ogr2ogr.               ogr2ogr -f GPX output.gpx D:\mypaste\input.shp -sql "SELECT Id AS name FROM layername"      It gives me the following error "Failed to create GPX file output.gpx." "GPX driver failed to create output.gpx." Does anyone knows why this happens? How can i rectify this?


title: Quantum GIS ->ArcGIS Server configuration possible?

text: Is it possible to connect a Quantum GIS Desktop 1.8.0 to an ArcGIS Server 10.0 ? and of course publish services on it?. The configuration would be like this **Quantum GIS-> ArcGIS Server 10.0 on Amazon EC2+ POstgreSQL (+PostGIS)-> web app**. Is it possible to create a configuration like this? Do you think I could use it for networking? Thanks a lot for suggestions.


title: How to identify unused Step Types in ArcGIS Workflow Manager (WMX)?

text: Is there a way to bulk identify unused step types using ArcGIS Workflow Manager Administrator? Or has anyone worked up( _and is willing to share_ ) a SQL select statement that returns unused step types?


title: How can I unselect a feature in Openlayers?

text: I am able to identify the selected features on my map using the following line:               vector_layer.selectedFeatures      I would like to be able to deselect this feature using a standalone function (not an event-handler). I've tried using the functions `unselect()` and `unselectAll()` unsuccessfully and can't find any examples of this approach. I am aware that clicking on the selected object can be used to `unselect`. In this case I want a programmatic solution.


title: How to use a search cursor on a joined table in ArcMap?

text: I'm struggling to get a search cursor to work on a joined table view. I've used search cursors before, but never on data that has been joined. Arcpy keeps saying that some of my joined fields don't exist. I used arcpy.ListFields() and sure enough, the fields are there. Some of them look different though. They look like this: Shapefile1.FID Shapefile1.name Shapefile1.LPOLY source_id title author My search cursor code:               searchRows = arcpy.SearchCursor(theJoinedView)          for row in searchRows:         if row.source_id == None:             arcpy.AddMessage(row.Shapefile1.FID)      It says Shapefile1.FID does not exist, when it should. Any ideas?


title: Making Table data available to a map service

text: I am trying to make a non geographic table available to a map service. I thought you simply added the table to the MXD and publish it with a relate to the field they were linked and then publish the service, where the data would be available as a table layer. I have done this, and only the geographic data is shown as an available layer. Am I missing a step? I now know, I do not want a Join or relate; I want the table to available via a query on the table. **edit** OK, there seems to be a few issues here. We are using a direct connect, and this needs Oracle Client installed on the ArcGIS Server. The SOC and SOM accounts were a red herring. If we're going straight through the SDE connection port, then you don't need the client, but as we're going through to the db, i.e. using 2 tier architecture, rather than 3 tier, then we need the client. So we're installing the client on the server, as we've never directly connected before, and I'll post the results. But now, looking back on it, it all seems logical really, as we're bypassing the SDE layer **This is for a Web application, so the data is exposed via REST on the 'net** I am actually not too sure it is possible, which is very odd... **edit** Just to ensure I am not going mad, and am doing this all the right way; I am creating an MXD, adding a featurelayer to it, then adding a 'flat' table (no geo data), saving it and serving it up on the ArcGIS server. when I do, all of the features display, but querying the Rest interface tells me there are no tables, just this one polygon layer. That's all cool isn't it? I am not insane?


title: Should I Reproject Data Which Has Been Captured Incorrectly?

text: I'm working on a project for a client which is migrating data from an Oracle database to an ESRI Geodatabase. When data for this project was initially captured over 15 years ago, the coordinate system used was either UTM Zone 56 South or GDA94 MGA Zone 56 because much of the data was for South East Queensland, Australia. However, as the company grew, they continued to add data further west and maintained the same coordinate system. The data now extends as far west as Darwin, Australia which is in Zone 52. My instinct is to reproject the data to GDA94 Lat/Long. However, I'm not sure if this will make things worse or better. I have two questions:   1. How much error is in the data which is 4 zones out (i.e. in metres/kilometres)?   2. Will I introduce more error by reprojecting the data to GDA94 Lat/Long? Or is this the right approach?


title: What is the shell command for the tool 'simplify geometry' in QGIS?

text: I was wanting to batch the tool 'simplify geometry' for a set of shapefiles, in the osgeo shell.


title: ArcObjects: modifying feature field value

text: I'm developing an ArcMap extension and looking for a way to change feature attributes knowing its feature class and OID (and, presumably, everything else that there is in `IFeature`). All layers use ArcSDE datasets. What's the right way to do it? Should I change the data in database? It feels like I shouldn't but I can't figure out how to change feature fields values using ArcObjects. The documentation for ArcObjects looks incomplete and awkward to use. Background info: the extension provides a custom tool that processes selected feature and changes one of its attributes. Now, feature processing involves calling a remote service so it's an asynchronous operation and I should place all my updating logic in the callback method. The tool should work with any of the project layers all of which are ArcSDE datatsets. That's basically the requirements. If anyone can help me with an advice or a working sample, I would be really grateful. Thanks in advance.


title: how to prevent a mixture of "old" and "new" Bing Maps tiles

text: The Bing Maps blog states that the "new" Bing Maps style will be implemented today. I'm seeing a strange mixture of old and new tiles when using the ArcGIS Server JavaScript API (use this sample to test, choosing the Roads option). http://www.bing.com/maps does not exhibit this problem. ![Bing Maps showing old and new styles](http://i.stack.imgur.com/J5cQw.jpg) **Questions** 1) am I just unlucky in trying this exactly as ESRI/Microsoft are changing the tiles over? (ie, does it work differently for you?) 2) if not, how can I force my users to download new Bing Maps tiles (but only once, allowing them to cache them hereafter)? As luck would have it, I have a product launch scheduled for tomorrow so I'm hoping desperately that this problem will resolve itself overnight, Australian time...


title: vba code for algorithm to assign track file gps UTM coordinates (East Africa) to an overlay 5x5km grid cell

text: The GPS coordinates are temporarily imported in to an Access database from DNR Garmin files downloaded (as dbf file(s)), and then exported for mapping in AEJEE (ArcExplorer Education Edition). I need to be able to run the vba code on importing the dbf aerial track files and populate another database table with the grid cell reference associated with the track file coordinates, so that I get grid cell 'hits' per flight ie. the number of times each 5x5km grid cell has been 'visited' by the aircraft. Any help with this would be fantastic!


title: Want to be a GIS Developer

text: I want to be a GIS Developer. I know .net. Do I need to know COM also? Is COM outdated? Please tell me the way. Presently I am in Production.


title: How do I calculate the latitude and longitude of points using QGIS?

text: I'm trying to figure out how to calculate the lat/long of points using the QGIS field calculator. Is there an easy way to do this? I saw a previous related question, but it deals with a more advanced approach. In ArcGIS this is similar to the `Calculate Geometry` function; I just can't find where do this in QGIS.


title: Proj4js objects not readyToUse

text: I am using Proj4js to transform between WGS84 and a local Swedish grid RT90 (EPSG:2400). It works in FF, but in IE the Proj objects often is not readyToUse when I need them to. I use this code to initialize the transformation objects (part of a bigger object): **wp.js**               tera.wp = {     reproject: {              referenceSystem2400: null,         referenceSystem4326: null,              initializeReferenceSystems: function() {                  Proj4js.defs["EPSG:2400"] = "+proj=tmerc +lat_0=0 +lon_0=15.80827777777778 +k=1 +x_0=1500000 +y_0=0 +ellps=bessel +units=m +no_defs";                  var self = this;             if (self.referenceSystem2400 == null) {                 self.referenceSystem2400 = new Proj4js.Proj("EPSG:2400");             }             if (self.referenceSystem4326 == null) {                 self.referenceSystem4326 = new Proj4js.Proj("WGS84");             }                  var loaded2400 = self.referenceSystem2400.readyToUse;             var loaded4326 = self.referenceSystem4326.readyToUse;                  alert("init: " + loaded2400 + ", " + loaded4326);              }     },          init: function() {         var self = this;              self.reproject.initializeReferenceSystems();              // In this call, the transformation is performed         this.repopulateFromSession(function() {                  self.disableLoader();         });     },      **the web page**               <script src="http://maps.google.se/maps/api/js?v=3&sensor=false&language=sv&region=SE" type="text/javascript"></script>     <script src="/scripts/proj4js/lib/proj4js.js" type="text/javascript"></script>     <script src="/scripts/proj4js/lib/defs/EPSG2400.js" type="text/javascript"></script>     <script src="/scripts/wp/wp.js" type="text/javascript"></script>          <script type="text/javascript">              $(document).ready(function() {                 tera.wp.init();         });      The explicit declaration of the 2400 parameters is to really ensure that the parameters are ok, and does not have to be loaded from anywhere. (I've been at this a while now) Although, when I load the page and run the `initializeReferenceSystems` function, the alert shows `init: false, true` indicating that the 2400 object has not loaded properly. What can I do to ensure that both my transformation objects are ready to use like this?


title: How to use shortcuts in dockable windows?

text: I have developed a custom dockable window with textboxes, comboboxes and buttons for use in ArcMap. After the user clicks on a button in the dockable window a function is invoked. How can I invoke the function/button_click-event using short cuts. Where do I have to wire the event?:               this.KeyDown +=new KeyEventHandler(MyDockableWindow_KeyDown);      Where do I have to impement the event?               private void MyDockableWindow_KeyDown(object sender, KeyEventArgs e)         {             switch (e.KeyCode)             {                 case Keys.F1:                     button1.PerformClick();                     break;                 case Keys.F2:                     button2.PerformClick();                     break;                 case Keys.F3:                     button3.PerformClick();                     break;                 case Keys.F4:                     button4.PerformClick();                     break;             }         }


title: Serial Int Primary Key not recognized by QGIS 2.2.0

text: I have a table "lines" stored as MULTILINESTRING features in PostGIS 1.5               ----------     -- Begin Table Definition:           CREATE TABLE lines(          gid serial NOT NULL,     geom geometry,       CONSTRAINT roadgeo_can_pk PRIMARY KEY (gid),       CONSTRAINT enforce_dims_the_geom CHECK (st_ndims(geom) = 2),       CONSTRAINT enforce_geotype_geom CHECK (geometrytype(geom) = 'MULTILINESTRING'::text OR geom IS NULL),       CONSTRAINT enforce_srid_geom CHECK (st_srid(geom) = 4326)     )          --indices, etc.          --EndTableDefinition          ----------      I've been successfully manipulating these features in qGIS 1.7.4 for some time without issue. I have recently updated QGIS to 2.2.0 When I add the lines table, QGIS recognizes all rows as the same feature. I've performed several tests using different data types as a PK and I'm pretty sure it's because QGIS 2.2.0 won't recognize my SerialInt PK. Which is different than 1.7.4 which could use a SerialInt. I know integer PKs have been discussed at length with respect to QGIS. **Does anyone know of a way I could set QGIS 2.2.0 to "use" my SerialInt PK?** I'd really rather not have to change my table schema to add a strinct Integer as my PK. Thanks!


title: Representation of network flows

text: **This is a sample transportation network flow I've done a year ago based on 26 zones.![alt text](http://97.107.136.148/network_flows.jpg)** For a project I'm working on now, I need to represent the flows over 1,000 zones with directionality.   * Any suggestions on displaying the information in a nice and non overwhelming way?    * Any examples on displaying network flows in heavy urban areas?   * Color suggestions and thickness schemes?   * any "not to dos" when representing network flows? thanks


title: generate massive shapefiles

text: I have a shapefile with 1475 records, and I want to generate a shapefile for each record. What can I do to generate them avoiding selecting and exporting each record to do that?


title: How to set Symbology On Create Feature Window using arcobjects?

text: programmatically I set the custom symbology for the layers. When i started the edit session programmatically, the create feature window did not show the respective symbology assigned to feature. pl see this screenshot. ![enter image description here](http://i.stack.imgur.com/hZYtn.png) See the Code:               'lay' is ifeaturelayer     Dim pLayer As ILayer = lay     Dim pRender As IUniqueValueRenderer     pRender = New UniqueValueRenderer     pRender = TryCast(lay.Renderer, IUniqueValueRenderer)          Dim templateArray As IArray = New Array     subTypeField = pRender.Field(0).ToString          For pp As Integer = 0 To pRender.ValueCount - 1       Dim newEditTemplate As IEditTemplate = editTemplateFact.Create(pRender.Label(pRender.Value(pp)), pLayer)       templateArray.Add(newEditTemplate)     Next          pEditor.RemoveAllTemplatesInMap(pMap)     pEditor.AddTemplates(templateArray)          Dim layerExtensions As ILayerExtensions     Dim editTemplateMgr As IEditTemplateManager = Nothing     layerExtensions = pLayer          For j As Integer = 0 To layerExtensions.ExtensionCount - 1       Dim extension As Object = layerExtensions.Extension(j)       If TypeOf extension Is IEditTemplateManager Then         editTemplateMgr = extension         Exit For       End If     Next          If Not editTemplateMgr Is Nothing Then       Dim pEditTemplate As IEditTemplate       For pp As Integer = 0 To pRender.ValueCount - 1         pEditTemplate = editTemplateMgr.EditTemplate(pp)         pEditTemplate.SetDefaultValue(subTypeField, pRender.Label(pRender.Value(pp)).ToString, True)       Next     End If