Loading data onto PostGIS using KML files with attibute data

So, I have a kml file which contains 317 data points (317 polygons and the respective 317 names). The kml file also contains attribute data which pops up in a bubble on Google earth with about 12 custom data points (Code, name, locality, no. of houses etc.) which could have been loaded onto the kml file using ArcGIS (I'm assuming this, cause I received just the kml file from my source) or could have been custom coded using a text editor. Now, I'm trying to build a PostGIS db using this data along with the custom data points (attribute data) which is stored in the kml file. I tried converting the kml file to a shapefile to load it onto PostGIS using shp2pgsql, but this ignores all the attribute data. Only the geometry and name gets converted. I also tried converting the KML file to xml/csv/xls format to atleast try and merge the attribute data with the main db on postgresql, but I failed cause there is no converter out there which pulls out all the data from a KML file. My question is, is there a way to load this kml file with attribute data onto PostGIS? Is there a simpler converter for KML to CSV, or similar spreadsheet formats? What's the best way to do this?


Vertical Datum Conversion Utilities

I have some data (points and rasters) that I would like to be able to convert to and from several vertical datums, including MLLW in coastal Florida. I would appreciate it if people could provide some insight into accuracy, pitfalls, requirements, etc. of using available utilities such as VDatum or corpscon. Is one more user-friendly than the other? Are there any others that I should consider? Thanks!


Check Text Mode when Typing text MapInfo

I'm writing a code MapBasic How do I know text mode when I add text to Map. Can help me!, check cursor texting mode


Error 14: Could not open CRS database

I am using Python Console and loading a Vector Layer using python commands. When the layer is added, QGIS first asks for the CRS to use, but I don't have all the CRS listed out to select the Reference system from and the "Error Log" shows the error as: **_> "Could not open CRS database C:/Program Files/QGISDufour/./resources/srs.db. Error(14): unable to open database file"_** Now what shall I do get this cleared. I cannot load my vector layer because of CRS problem.


Openlayers create, edit and save/export to kml

I'm trying to create, edit and save a point vector as kml file in an Openlayers app. I have managed the create and edit by adding and empty vector layer and then adding the control OpenLayers.Control.EditingToolbar("name of the layer") But how could I save/export this afterwards in kml format? I just need this on the browser side a popup to let me save the file locally not on the server side. Thanks Aris


ArcGIS Silverlight Web Mapping Application has two logins

I am trying to implement a Silverlight Web Mapping application with ArcGIS server and I'm trying to use the Token authentication with active directory as the user/roles store. I have the service running so that I can successfully obtain tokens but when I try to initialize a map service the ArcGIS server challenges me again to authenticate with widows even though I have successfully created a token. The IIS is set for windows authentication but in any other configuration (Anonymous, Impersonate) the map service never loads.                       //Import  Base Data Map Service             ArcGISTiledMapServiceLayer BaseMap = new ArcGISTiledMapServiceLayer();             BaseMap.Url = DataSourceStrings.ProductionServer + DataSourceStrings.I_GeneralWesternCanadaURL;             BaseMap.Token = Token; // This is a valid token             BaseMap.ID = "BaseMap";             BaseMap.Visible = true;             //BaseMap.ImageFormat = ArcGISDynamicMapServiceLayer.RestImageFormat.PNG32;             BaseMap.Refresh();             BaseMap.InitializationFailed += ArcGISDynamicMapServiceLayer_InitializationFailed;             BaseMap.Initialized += ArcGISDynamicMapServiceLayer_Initialized;             Map.Layers.Insert(0, BaseMap);      Solution...? So I managed to fix this by setting the Server.dat file to disable security but the services still require a token in their web.config files. Seems Arcgis server like to handle the windows authentication but the design was to handle the authentication in silverlight using a wcf service. I've tested this and everything seems to work the way i want it too. Kinda of a hack way of doing it but everything works right.


raster data retrieval from postgis using c++

I have raster data in a postgis server (I am able to see it in qgis). When I retrieve it and form gtiff image out of it using gdal, the generated image is not correct (there is a coloring problem). I am able to retrieve the metadata correctly. For raster I am doing `st_AsBinary(rast)`. And then passing it to gdal raster io buffer parameter Metadata is read first successfully. Image was stored as tiles **Code:**               for(int row=0;row<99;row++){     int xoff,yoff;             yoff=row*metadata.tilesizeY ;             for(int col=0;col<99;col++){                   xoff=col*metadata.tilesizeX;                   query<<"select st_asbinary(rast) from public.tkptest where rid ="<<(row*99)+col+1;                   retval = PQexec(options.connection,query.str().c_str());                   res= PQresultStatus(retval);                   if(res!=PGRES_TUPLES_OK){                         std::cout<<"We did not get any data\n";                         return res;                   }                   dstDS->RasterIO(GF_Write,xoff,yoff,metadata.tilesizeX ,metadata.tilesizeY ,PQgetvalue(retval,0,0),metadata.tilesizeX *metadata.datasize,metadata.tilesizeY *metadata.datasize  ,metadata.dtype,metadata.numBands,panBandMap,0,0,0);                   PQclear(retval);                   query.clear();                   query.str("");                  }     }     GDALClose(dstDS);


Features to 3D from 2D in QGIS

Is there a way to convert 2D features to "3D" features in QGIS? I know there is a way to do this in ArcMap by using an attribute value in the attribute table, but I am looking to do this with shapefiles in QGIS. Thanks...


How to compute the bounding box of multiple layers in lat/long?

I am writing an application to performance test all kinds of map services, primarily AGS 9.x, AGS 10, and WMS 1.x. Part of the application involves generating random bounding boxes for individual requests, within the service's full extent. This part is working fine for geographic and projected coordinate systems when the service's full extent is known (e.g. through an AGS service's fullExtent property). My problem is with WMS: each layer in a GetCapabilities response can define its bounding area in >= 1 CRSs. Some parts of the application need to know if a service's CRS is geographic or projected, so in order to remove ambiguity in WMS I am always using the layer's LatLonBoundingBox which is always defined and in EPSG:4326. I then have to calculate a full service bounding box based on all layers that go into an individual request (which are randomised). This is where it gets tricky. I am getting lost because for each lat / lon bounding box the LLx (lower left longitude) could be a larger or smaller number than the URx (upper right longitude), depending on which meridians it spans. Every time I start drawing square or circular diagrams I think I have an approach figured out, and then find a case that ruins it and my brain turns to mush. I am going to keep thrashing at it until it works, and if I get a solution post it here, but I'm sure there has to be an accepted and fully tested approach which would make my life easier. I just can't find it right now.


GeoDjango - How to secure tile map services?

I use geodjango to create and serve tiles that I usually display into OpenLayers as openLayers.Layer.TMS I am worried that anybody could grab the tms URL and plug it into their own map without asking permission, and then consume a lot of the server's CPU and violate private data ownership. On the other hand, I want the tile service to be publicly available without login, but from my website only. Am I right to think that such violation is possible? If yes, what would be the way to be protected from it? Is it possible to hide the url?


Black & White / Greyscale Maps and Illustrations

I think greyscale maps & illustrations (with geographic data) seem to be abandoned and the colour maps are mostly used nowadays. This is understandable and personally I also need less time to produce a colour map than a grey scale map, although in the end I fell much more satisfied with the grey scale results.   * What are your thoughts?   * Is it still feasable to elaborate grey scale maps and illustrations?   * Where can I find some good tutorials on this(e.g. advises on grey color selection, how to deal with such a limited color range,etc)? I am not looking for "converters" from color to grey scale, like the one from ESRI (that seems to work ok) that can easily and with soem quality export a colour map to grey scale: http://mappingcenter.esri.com/index.cfm?fa=ask.answers&q=2163


Calculate min distance between points in PostGIS

I have point layer in PostGIS database. Help please with query which add for each points in layer distance in attribute table between this point and another nearest point. Thanks! **Update**   Calculate distances between series of points in postgis there is similar question, but there is in answer:               UPDATE my_table SET dist=ST_Distance(my_table.geom, b.geom)      FROM (SELECT geom FROM my_table WHERE **gid = 1**) b;      distance added for points - from **gid = 1** point to another points. For me each point object in attribute table should have distance from point to another nearest point. **Update** ![enter image description here](http://i.stack.imgur.com/nACZY.jpg) For example, I need add distance between point and another **nearest** point in attribute table for point: for point 1 - distance between 1 and 2; for point 2 - distance between 2 and 3; for point 3 - distance between 3 and 2; for point 4 - distance between 4 and 3; for point 5 - distance between 5 and 4; for point 6 - distance between 6 and 3.


Does a geoprocessing tool exist that can find all DTED tiles that intersect an AOI? I have a area of interest represented by a polygon and DTED tiles (some of which intersect with the AOI). Is there a tool that I can use to find which tiles intersect? Thanks!


Using OpenLayers - seeking example for saving feature to database using Ajax

I'm trying to save a point to the database using a balloon that has an input field and a save button. The button triggers the code and sends the feature info to the PHP page. It works, but the save action refreshes the page. I would like it to save in the background without refreshing the page, like Ajax. Can someone advise how to do this ?                  var mySaveStrategy = new OpenLayers.Strategy.Save({ auto: true });              var myProtocolHTTP = new OpenLayers.Protocol.HTTP({                  url: "proc/newPoint.php",                  params: {                          m: 'r',                          srs: 'EPSG:4326'                  },                  callback: function() { alert("User callback called!"); },                  format: new OpenLayers.Format.GeoJSON({                          ignoreExtraDims: true,                          internalProjection: map.baseLayer.projection                 })          });       I edited the code to reflect my latest code (16.12.2012):                       function handler(request) {                 alert(request.responseXML);                             }                                 var myProtocolHTTP = OpenLayers.Request.POST({                 url: "api.php?action=insertPOI",                 data: "",                 params: {                     m: 'r',                     srs: 'EPSG:4326'                 },                 headers: {                     "Content-Type": "text/plain"                 },                 callback: handler             });                   function formAction(action) {             var feature = mytoolbar.selCtrl.openpopup.feature;             switch (action) {                 case 'delete':                     feature.state = OpenLayers.State.DELETE;                     vectorLayer.strategies[0].save();                     break;                 case 'cancel':                     break;                 case 'save':                     var attrs = feature.attributes;                     attrs.name = $('fname').value;                     attrs.name_lat = $('fname_alt').value;                     attrs.type = $('ftype').value;                     attrs.notes = $('fnotes').value;                          if (feature.mystate) {                         feature.mystate = null;                         feature.state = OpenLayers.State.INSERT;                         var ctrl = mytoolbar.controls[1];                         ctrl.layer.addFeatures([feature]);                         ctrl.featureAdded(feature);                         ctrl.events.triggerEvent("featureadded", {'feature': feature});                     } else {                         feature.state = OpenLayers.State.UPDATE;                         vectorLayer.strategies[0].save();                     }                    break;                  }              function getPopupForm(feature, context) {                  var gid      = feature.attributes.gid      || '';             var name     = feature.attributes.name     || '';             var name_alt = feature.attributes.name_alt || '';             var notes    = feature.attributes.notes    || '';             var html = "
" +                 "<form action='' name='baloon'>" +                    "<input id='fgid' type='hidden' value='" +                       gid + "' />" +                    "<button type='submit'  id='baloon-save' value='Save' onClick=\"formAction('save')\" />"+                    "	" +                    "
"+                    "<button type='submit' id='baloon-cancel' value='Cancel' onClick=\"formAction('cancel')\" /> " +                    "

"+                    "<button type='submit' id='baloon-delete' value='Delete' onClick=\"formAction('delete')\" />
"+                    "

</form>" +                "
";                  return html;         }      '


Cannot intercept Alt button when user drags a box (OpenLayers)

I am using OpenLayers. When a user holds Shift, clicks on map and moves the mouse, the box is shown. When user releases the mouse button, I intercept the event and use the coordinates of the box.                       var boxControl = new OpenLayers.Control();             OpenLayers.Util.extend(boxControl, {                 draw: function () {                     // this Handler.Box will intercept the shift-mousedown                     // before Control.MouseDefault gets to see it                     this.box = new OpenLayers.Handler.Box(boxControl,                             { "done": this.notice },                         { keyMask: OpenLayers.Handler.MOD_SHIFT });                     this.box.activate();                 },                      notice: function (bounds) {                          var ll = map.getLonLatFromPixel(new OpenLayers.Pixel(bounds.left, bounds.bottom));                     var ur = map.getLonLatFromPixel(new OpenLayers.Pixel(bounds.right, bounds.top));                     doSomething(ll, ur);                 }             });             map.addControl(boxControl);      It works when with Shift button. But when I change MOD_SHIFT to MOD_ALT, my code is ignored, the bounding box is never shown on screen and "notice" function is never called. Could you help to fix it (for either Alt or Control buttons), please? PS. I cannot use OpenLayers.Control.Select


problems with r.sun from GRASS

I´ve problems with r.sun from GRASS. I need to calculate beam radiation, reflect radiation and diffuse radiation wwith this tool. my problem is I do not understand that you have to put mandatory files as "imput" because I put MDT, aspect layer and slope layer, number of cells fromm MDT, ando MDT coordenates. when I put these file the result is: > Oooops! SEXTANTE could not open the following output layers Output > irradiation layer [Wh.m-2.day-1]: > C:\Users\Leticia\AppData\Local\Temp\sextante\irrad_layer.tif Output > insolation time layer [h]: > C:\Users\Leticia\AppData\Local\Temp\sextante\insol_time.tif Outpu diffuse > irradiation layer [Wh.m-2.day-1]: > C:\Users\Leticia\AppData\Local\Temp\sextante\diff_rad.tif Output ground > reflected irradiation layer [Wh.m-2.day-1]: > C:\Users\Leticia\AppData\Local\Temp\sextante\reflec_rad.tif Output global > (total) irradiance/irradiation layer [Wh.m-2.day-1]: > C:\Users\Leticia\AppData\Local\Temp\sextante\global_irrad.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 This > algorithm requires GRASS to be run. A test to check if GRASS is correctly > installed and configured in your system has been performed, with the > following result: GRASS seems to be correctly installed and configured" Can anyone help me? Please!!!!!!


How to display labels from many-to-many relationship in ArcGIS 10 using VB.NET?

I have two tables in a geodatabase:   * parcel; and    * person  1 or + parcel, can have 1 or + person (relationship is many-to-many) Using VB.NET I can display all the parcel labelled with the "id" field (see picture on left). What I want is to display the parcel with labels for the Names of their persons (see picture on right): ![enter image description here](http://i.stack.imgur.com/yRYjj.png) I think that I have to use join between two tables I can get the name with this code                Sub addNom()             ' Open the origin and destination classes.             Dim featureWorkspace As IFeatureWorkspace = CType(Sp, IFeatureWorkspace)             Dim originClass As IFeatureClass = featureWorkspace.OpenFeatureClass("parcelle")             Dim destinationClass As IObjectClass = CType(featureWorkspace.OpenTable("personne"), IObjectClass)                  ' Create a memory relationship class factory and open a relationship class with it.             Dim relClassFactoryType As Type = Type.GetTypeFromProgID("esriGeodatabase.MemoryRelationshipClassFactory")             Dim memRelClassFactory As IMemoryRelationshipClassFactory = CType(Activator.CreateInstance(relClassFactoryType), IMemoryRelationshipClassFactory)             Dim memRelClass As IRelationshipClass = memRelClassFactory.Open("pll_personne", originClass, "id", _                                                     destinationClass, "id", "Contains", "Is in", esriRelCardinality.esriRelCardinalityOneToMany)                  ' Find the counties related to the state with an ObjectID of 1.             Dim originFeature As IFeature = originClass.GetFeature(6)             Dim relatedSet As ISet = memRelClass.GetObjectsRelatedToObject(originFeature)             relatedSet.Reset()                  ' Iterate through the set while finding the names of the counties.             Dim nameIndex As Integer = destinationClass.FindField("nom_fr")             Dim setObject As Object = relatedSet.Next()             While Not setObject Is Nothing                 Dim row As IRow = CType(setObject, IRow)                 Console.WriteLine("OID: {0}, NAME: {1}", row.OID, row.Value(nameIndex))                 setObject = relatedSet.Next()             End While         End Sub      The Question is: **How can I display the labels using this result?**


Submit empty string via POST wfs in GeoExt.form.FormPanel

I have a two textfields in FormPanel. When one of them is empty, after pressing the search button the form sends the empty string in WFS query. How can I disable the empty field which sends the WFS request after I pressed the search button?                   formPanel = new GeoExt.form.FormPanel({         ref: "formPanel",         width: 300,         height: 200,         region: "west",         protocol: protocol,         buttons:[{          text: "search",          handler: function() {              formPanel.getForm().search();          },          //scope: formPanel      }],         items: [{             xtype: "textfield",             name: "trans_id__eq",             value: "",             fieldLabel: "ID",             disabled: true,             ref: 'myTextField'         },              {             xtype: "textfield",             name: "nabywca__eq",             value: "",             fieldLabel: "nabywca",             submitEmptyText: false          },         ],         listeners: {             actioncomplete: function(form, action) {             // this listener triggers when the search request             // is complete, the OpenLayers.Protocol.Response             // resulting from the request is available             // through "action.response"                 features = action.response.features;                 app.featureGrid.store.loadData(features);   //załadowanie zwróconego wyniku wyszukiwania do "app.featureGrid.store"                 vm=app.mapPanel.map.getLayersByName("Results");                 if(vm.length==0){                     vecLayer = new OpenLayers.Layer.Vector("Results");                    app.mapPanel.map.addLayer(vecLayer);                     app.featureGrid.store.bind(vecLayer);                     app.featureGrid.getSelectionModel().bind(vecLayer);                 //app.featureGrid.getSelectionModel().bind(vectorLayer);             }         }         }                         })                   );      When I leave blank first textfield and put the value to the second my wfs request send empty string and I get the error. My protocol:               var protocol= OpenLayers.Protocol.WFS({                      version: "1.1.0",                 url: "http://localhost:8080/geoserver/wfs",                 featureType: "transakcje_punkty",                 featureNS: "http://geoserver.org/transakcje",                  srsName: "EPSG:900913"                       });      Wfs is working properly when I have one field, but I would like to add 7 "textfields". The user fills the fields with the attributes he want to find and rest leaves empty. But empty field send some empty value to WFS and I get an error.... instead results


How to solve routes to offset points in Network Analyst?

The scenario is that there are points on a grid with intervals of 1000m covering an area of hundreds of square kilometres. I want to find routes on a road network to any one of these points. A road network built with Network Analyst works fine and the points are also built into the network. However the points do not intersect with the roads and sometimes offset 10s to 1000s of metres so no solution/route can be found to these points. How can routes be solved to the closest part of a road nearest to these points if they are loaded as stops?


Osgeo Welcome window

Is it possible to disable OsGeo Live 7.0 Welcome window? It annoys me a bit appearing each time I Run the system. Solved by: menu->settings->settings manager->session and startup->"Application Autostart"->uncheck the message appearance


How to get features in Openlayers vector layer

What is the exact API to get all features in a vector layer in OpenLayers? Suppose I have the "map" object, within which is a "Vector Layer": how can I obtain features in the layer?


Why does ArcMap 10 export circles instead of diamonds?

My default symbol for building is a small square. A jpg export or any other export renders it as a small circle. ## It's a killer for hydrology maps which use circles for many other items. Solutions? From the posts i went back and looked at the default symbols that the open- source layer provided. It LOOKED like a square rotated. But it was something else...yes a circle! Not sure why this happens in Arc...However I simply changed my symbol and voila! it exported just fine. While i got what i needed the probelm persists. When i went back and looked at the square it said it was a polygon! Odd. Anyway thanks to these posts i now have a work around; many thanks ![compostite of parameters for default symbol](http://i.stack.imgur.com/Te9s5.gif)


What does "Input geometry has unknown (-1) SRID" mean?

I am trying to run the following query to determine the area and number of points of a polygon:               Select osm_id, st_npoints(the_geom) as numPoints, st_area(transform(the_geom, 3395))/1000000 as areakm2 from water_table where st_isvalid(the_geom);      I receive the following error:               Input geometry has unknown (-1) SRID      Anyone know what the problem is?


arcgis server 10 tif mxd problem

i am using arcgis server 10. first i opened arcmap and added a.tif file. then i saved it using                File ->  Save As       as a ArcMap Document (*.mxd) file, let's say b.mxd. Now i open arccatalog and added arcgis server let's say "test". then by right click on this server i added new service (my b.mxd). when i press finish, it says the following:                Server Object instance on machine arcgis-server is created with errors.         The Layer: 'a.tif' in Map: 'Layers' is invalid.      Failed to open raster dataset      Can you plz explain what am i doing wrong? thanks in advance!!!


How to add an identify button with Arcgis JS API?

GIS stackexhange is the first website that i've come across that has come near to answering my question, but some how i can't work the answer out in my head/or the answers here have confused things more. I'd like to put a simple identify button on a web map. In simple terms, i want a map where the identify task is disconnected onload with an equally simple toggle on/off identify button. i understand that you need to dojo.disconnect the onclick identify function and that you then need to dojo.connect it back in the onclick of a button but i cant work out how it all comes together. I've read and re-read the arcgis js api 'working with events' page but this too has lost me. any help would be great.


Append and Merge tools issues in Arc 10

Append and Merge tools issues in Arc 10. keep getting error 000278 - failed on input OID ...... (could not write value to one field or the other). Does anyone know how to fix this? Never had this problem in Arc 9.3, where if the value did not fit, it would get chopped off.


GPS - Garmin 60CSX connectivity issue

I have a Garmin 60csx, about 2 years old and I have attempted to connect it to my laptop/ArcView (GPS toolbar) using the Detect GPS Port to no avail. There is no port number being displayed and that is what it states in the popup box. the baud rate, parity etc... are accurate. Should the Comm Port have a number displayed upon connection if it is working? Is there a patch or a specific usb cable to use or specific Garmins will only function properly in ArcVIEW? * * * now it is saying the USB is not recognized. I'm thinking a new USB cable as one solution.


Where deploy Custom Provider DLL for ArcGIS Server if GAC is not an option

I have a client that has developed a custom Membership Provider for ArcGIS server and cannot deploy the provider to the GAC. Does anyone know where we could put the DLL such that the ArcGIS Security and Token applications can "see" it? Thanks, Carl


Google Maps 3d with geoserver wms

I am using opengeo suite with openlayers and google maps as my base layer. I have points in a postgis database that I am using to generate wms tiles. I'm pretty sure I have the projections right because the points are spot-on for the most part. I run into problems when I get in to the last two zoom levels when the google maps turn into that 3d view in some areas. The markers then show up as in the wrong places and if I pan the map they pan at a different pace. If I don't let the map zoom in that far, its fine, but we have to be able to zoom in closer. Can I turn off the 3d view on google maps or adjust the projection?


Detect city from coordinates

I need to know how to detect which city belong certain coordinates. Wich is the best way to do this? Thanks in advance. Pd: excuse my english


Struggling with ArcGIS REST API and tokens

I'm doing my best to secure my AGS (9.3.1) services, but have struggled with tokens. As you can see, my _nw_ account belongs to the _agsadmin_ and _agsusers_ roles: ![enter image description here](http://i.stack.imgur.com/t9DSq.png) I have assigned these same roles to my service and its containing folder: ![enter image description here](http://i.stack.imgur.com/GIfmp.png) Generating a token is no problem: ![enter image description here](http://i.stack.imgur.com/alJ6B.png) But alas, upon logging in to the REST interface, I am presented with this _Unauthorized access_ message: ![enter image description here](http://i.stack.imgur.com/WRX60.png) I found a post on the ESRI forums describing the same problem, but responses are inconclusive. ("Please make sure that the Security settings for this map service is correct.", blah blah.) Has anyone encountered this? What could I be doing wrong? **Update: we have abandoned AGS-based security because of its many flaws and capricious inconsistencies. Beware!**


labeling in qgis 2.0: if one letter in string is "X"

I have a shapefile and I want to label all shapes with a "B" or "A" in its name (string). All others should be ignored. Like: _If [field] contains "B" draw label_ Im using qgis 2.0.


The simplest way to uninstall any and all ArcGIS products?

What it is the simplest and most straightforward way to uninstall any and all ArcGIS products more or less in one go that might be present on a Windows machine? perhaps scriptable? Add/Remove Programs from the Control Panel is straightforward, but when there a several products installed it's a process of click-click-click, wait for product 1 to be uninstalled, which could take some time, then click-click- click for #2, and so on. This is okay for one machine but when there are several it's real pain.


Why am I losing part of my raster when I reproject?

QGIS 2.0 Working with tiff raster file. Reprojections are in WGS84 Mercator. Here is my problem: I am trying to use buffers or urban areas to analyze light intensity on a raster layer. I want 30 miles, 60 miles, and 100 miles for the buffer sizes. I have reprojected the vector layers to WGS84 / World Mercator. When I ran a zonal statistics, everything went smoothly until I was double- checking the output. I saw "null" on a few of the rows of information in the data table. When I looked at the raster image, which I also reprojected to WGS84 / World Mercator, a large chunk of the raster layer was missing. Images below. Non-reprojected raster layer: ![enter image description here](http://i.stack.imgur.com/YrygV.jpg) Reprojected raster layer: ![enter image description here](http://i.stack.imgur.com/PRuph.jpg) I am assuming there is a problem with my reprojections. I am still new at GIS, so please bear with me. Thanks in advance.


Lat/lon of pixel inside Landsat scene

How do I find the lat/lon of each pixel inside a landsat scene. Either the equations for converting i,j to lat/lon or just a bunch of files, one for each scene. Background: I have downloaded a bunch of scenes from Greenland and now I want to compare them to some MODIS data. MODIS provides files with lat/lon for every pixel.


How to write to Sql server from MapBasic and insert rows

I have created a table in Sql server 2014 with the columns: Id (int), Geom (geometry), RouteId (int), Desc (varchar(MAX)) I have succeeded in making the table mappable through MapInfo I have checked .TAB file for the table, that it has IsReadOnly = false Stil when i try to execute an insert query on the table I get the error messsage that the table is read only. Anyone knows how to fix this? Also I cannot figure out how to write a correct insert query I have tried doing that on a copied version of the table code is as follows               Dim rId As Integer     Dim oPline as Object     rId = 20     Dim t As String     t = "test"     Create pline into variable oPline 2 (1,2)(1,3)          Insert into TestGeom1 (Geom, RouteId, Desc) VALUES (oPline, rId, t)      Writing like above I get the error messsage field Geom does not exist in table TestGeom1 If i replace Geom with obj or just remove it completely i get the error Expression does not evaluate to a column or a table name. So please who can tell me what is the correct syntax for this?


How to cluster Google Maps kml overlay

I have several thousand markers stored in a kmz file that I load into a Google Maps (v3 API). I've looked around to find a way to cluster the overlay data, but to no avail.   MarkerClusterer looks nice, but it only seems to work with a marker array?               function initialize() {         geocoder = new google.maps.Geocoder();         var latlng = new google.maps.LatLng(25,-20);         var myOptions = {             zoom: 2,             center: latlng,             mapTypeId: google.maps.MapTypeId.ROADMAP         };         map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);         var ctaLayer = new google.maps.KmlLayer('thedata.kmz');         ctaLayer.setMap(map);              //cluster         var mcOptions = {gridSize: 50, maxZoom: 15};         var mc = new MarkerClusterer(map, ctaLayer, mcOptions);     }      How can I cluster the markers in the overlay, just like markerclusterer does it?


solar radiation calculation

I have tried to calculate solar radiation (whole year with monthly interval) for Portugal from an ESRI grid (27m DEM) in Arcgis10. It seems to work, however it takes much more than a week and in the meantime there was an energy failure. I use ArcToolbox/Spatial Analyst Tools/Area Solar Radiation. I have cut the dem so as to have only the south of Portugal in the hope that the processing would be faster. However, ArcGIs 10 crashes after a few minutes and I get the error: "Background processing has encountered a serious error and is unable to continue. Contact ESRI". I have also tried in Arcgis 9.2 and I get the same message. It simply seems not to like the cut dem. Could anyone help? Teresa calvão


Opticks 4.11.0 (Ubuntu 64bit) - unable to load TIFF file

I am trying Opticks 4.11.0-1 - have official release opticks_4.11.0-1_amd64.deb but unlike in Windows I am totally unable to load Landsat 7 TIFF files. In Windows I can do this using auto importer. In linux it reports The dataset is empty" although I am able to load the same file on windows machine without problem. The package looks to be OK in Muon Package Manager (so not corrupted), gdal is installed (I also have QGIS) and Opticks do not show any error message during startup. Do you have any idea what could be problem? thanks


Which data providers support loading attribute tables without geometry?

I have a table in Memory from a cx_Oracle query (a list of rows, and a list of field names and their types) in my python plugin and I want to load it as a geometry-less layer (Attribute table) in qgis. Which data Provider will Support that? QgsOracleProvider has a constructor that Returns false, disconnects and sets valid to False if the table queried has no geometry column. QgsMemoryProvider only allows Point, Linestring, Multipoint, MultilineString, and Multipolygon geometries. Any other geometry is interpreted as WKBUnknown, which causes the `QgsMemoryProvider.isValid()` to return False. If I cheat and create a `QgsVectorLayer("Point", "myLayerName", "memory")`, and add features with no geometries, then I get a seg fault when I add the layer to the map layer registry. Also important to note, is that when a layer is imported using QgsMemoryProvider, it is not possible to Join against it (A Join from the layer does work.) Since mostly people want to load non-geometric tables into Qgis in order to join them to an existing vector, this reduces the Memory provider's suitability for non geometric tables. (Unless I am wrong. I would be delighted to be wrong.) QgsDelimitedTextProvider requires an Input file, and I would much rather not write out a csv to the file and then Import it again when I already have the data. But maybe I have to? Thanks


Compare two tables. Show values only in one table

I have two tables. Each table has a column with a reference number. Most of the records in these tables are the same but there are some which are in one table but not in the other. How can I compare these columns and pick out the records which are only in one table? I could write a MapBasic program that loops through each record and looks it up in the other table but I'm wondering if there is a simpler SQL-like way of doing this.


Open software tool or QGIS plug-in to make land cover classification

Is there any tool or plugin for QGIS/GRASS to make an automatic land cover classification from satellite imagery --- based on CLC nomenclature for example? Of course, it will not be 100% sure but it would be a first step of the classification process. I have seen a similar tool expressed into a pdf file on the QGIS blog, but it seems the plugin has not been implemented (at least, not listed into the plugin repository). I have also the existence of the Molusce plugin. I haven't tested it yet but the approach seems to be based on land use changes.


QGIS layers no longer overlay when Enable 'on the fly' CRS transformation is on

My QGIS project has two layers - one retrieved from GADM (administrative boundaries of Guinea Bissau) and another one of the villages collected in the field using GPS Decimal Degrees - D.ddddd. If I have in Settings - Project Properties - CRS - Enable 'on the fly' CRS transformation clicked on, these layers no longer overlay. If it is off it is not possible to know distances in Km. It would be great if someone has a clue about what is going on... Thanks! Ila


ArcGIS Full-Text search

I've set up Full-Text searching on a table in my SDE database (ms sql backend). I can perform the full-text commands from SQL queries, but it doesn't seem to work in ArcMap or any rest services. I full-text supported at all in arcgis server? ie: if i run this SQL query on my server, it returns all trail names that have trail in it (trail, Trail, Trails, etc) SELECT * FROM dbo.TRAILS WHERE CONTAINS(Webname, '"trail"'); if i add CONTAINS(Webname, '"trail"'); to the "WHERE" section in arcmap, querying the same table, it gives me an error, saying full-text indexing is not set on that table. EDIT: i've got it so it doesn't give me the error anymore, but the CONTAINS(Webname, '"trail"') doesn't search for any iteration of trail in the field, it only returns the exact text i was looking for (webnames with "trail" in it, not "trail", "Trail, "Trails", etc) and ideas?


What's the proper way of deleting versioned data from an SDE geodatabase?

I haven't really read this anywhere. What is the proper way of deleting versioned data from an SDE geodatabase to make sure nothing is left behind in the A & D tables? Do I need to unversion the data before I delete it? Do I need to remove the user versions? Or does it matter? Thanks.


Call MRT Swath from IDL

Do you know how to call MRT Swath from IDL? I would like to work with Modis L1B (MOD02HKM), read it, reproject, some processing and writing the results. Any help highly appreciated.


Specifying a file for VirtualShape in SpatiaLite

I'm ~~fairly~~ very new to spatialite, and am stuck on something very basic. I'm creating a virtual table from a shapefile using virtualshape. This works fine when the shapefiles are in the same folder as spatialite.exe. `CREATE VIRTUAL TABLE test USING VirtualShape(test, CP1252, 28356);` I can't figure out how to specify an absolute path ie `C:\1. Project Data\1814\test` `CREATE VIRTUAL TABLE test USING VirtualShape("C:\1. Project Data\1814\test", CP1252, 28356);` Fails. What's the syntax that's required here?


Identify all layers on the map without pre-designing the infoWindow

This applies to the ArcGIS Server JavaScript API 2.4. The Identify Task sample shows how IdentifyTask can be used to find features in multiple layers, as specified in the IdentifyParameters:               identifyParams.layerIds = [0,2];      In this sample, the infoWindow already contains elements for the expected layers, which are used to display multiple features in separate tabs of the infoWindow:

          //In the JavaScript:     dijit.byId("bldgTab").setContent(layerTabContent(bldgResults,"bldgResults"));     dijit.byId("parcelTab").setContent(layerTabContent(parcelResults,"parcelResults"));      **Is there a way to handle this dynamically, and create the required tabs at run-time?** For example, I wish to run IdentifyTask on all visible layers, and return the results in a separate tab of the infoWindow. How can I create the tabs dynamically?


Just view topology errors in ArcGIS

I have a basemap (parcels), which is to be used as target for several conflation tasks. This basemap MUST NOT be modified in any way. The basemap ist part of numerous topology rules. Each time topology is validated ArcGIS inserts vertices in the basemap and/or the other layers. I want ArcGIS to simply show errors, rather then trying to dissolve them. Assigning the highest rank to the basemap doesn't prevent ArcGIS from changing it. Finding the appropriate solution for error correction (e.g. verification of measurements in the field) or accept the error as exception is part of MY job. How can I make ArcGIS to simply show errors without any attempt to fix them?


leaflet geojson contextmenu

I want to add a context menu on right click for various elements on my geojson layer (I'm doing a road map so on a right click on the road at any part I want to show the context menu). I've managed to get the left click working fine by using the onEachFeature and doing the following               function onEachFeature(feature, layer) {             layer.on({                 click: showAssetInfo,                 contextmenu: contextreg             });              }              function showAssetInfo(e) {             AssetMouseClick(e.target.feature.properties.objectid, e.latlng);         }      For the context menu I have followed the example here . The context menu library is found here I have the following that gets called on the document ready (jquery)               $.contextMenu({         selector: 'path.leaflet-clickable',         zIndex: 99999,         callback: function (key, options) {             var m = "clicked: " + key;             window.console && console.log(m) || alert(m);         },         items: {             "edit": { name: "Edit", icon: "edit" },             "cut": { name: "Cut", icon: "cut" },             "copy": { name: "Copy", icon: "copy" },             "paste": { name: "Paste", icon: "paste" },             "delete": { name: "Delete", icon: "delete" },             "sep1": "---------",             "quit": { name: "Quit", icon: "quit" }         }     });      I've tested it and the selector does return the GeoJson features, also if it attach the same menu to something else it works correctly. Is there something I am missing here? Also is there a good way to pass in the objectid to the menu when it starts up so I can use it when calling the different options of the menu I have created this fiddle to demonstrate http://jsfiddle.net/Q3L4c/22/


Reproject raster catalog - ArcGIS 9.3/FME 2012

I have a couple of raster catalogs in different file geodatabases and I need to re-project them to a new coordinate system. Now there is no option to project a whole raster catalog, nor can I use the 'Project Raster' tool, as it won't accept a raster catalog as file type (for selecting single rasters within the catalog). There are two options that I thought about so far:   * use tool 'Raster Catalog to Raster Dataset', reproject the raster dataset and bring it back into a catalog. Now the problem is on the one hand that this process takes ages (incl. building of pyramides + calculating statistics) and I loose the single items within the raster catalog (after loading the dataset back into a raster catalog), as it just mosaics the datasets together.   * use Python and loop through raster datasets in raster catalog and reproject them individually. I have not investigated this version, but I doubt whether that will work. In case it would, that could be a solution. Anyone did something like that before? My question therefore is, whether there is a proper/efficient way of reprojecting a raster catalog or the raster datasets within a raster catalog respectively from one coordinate system to another? I basically want to end up with raster catalogs that look exactly as the originals (incl. file names of raster datasets within them), but they do need to have a different projection. Any tips appreciated as my problem is quite urgent! **UPDATE:** I have access to FME 2012 now, never used it before though. Does anyone have an idea whether this exercise could be accomplished using FME? (it looks like FME can only access SDE raster catalogs, so that may not be the full solution either..)


viewshed analysis for observers wearing visors?

I'm starting with a DEM, and looking to identify every point that can be directly "seen" from any point in a particular polygon on an overlaid layer defining an area on that DEM - like any other viewshed analysis, but with the additional stipulation that the observer points can only "see" at certain downward angles. To help motivate what I'm looking for, my real goal is to identify run-out zones for avalanches. It's easy to identify "slideable slopes": just everything that's, say, 30-45 degrees. But if I want to identify the areas which snow would slide from the slideable areas into, the above quasi-viewshed starts to look like what I'm after. My exploring the surface and hydrology tools (and help files for the tools) in Arc hasn't turned up anything that I think will do the trick. Any ideas - either in Arc or otherwise? Thanks in advance for any insight.


add new SRID to sql server

Is it possible to add a new SRID to sql server 2012? I've tried               insert into sys.spatial_reference_systems values (4938, 'GEOCCS["GDA94",DATUM["Geocentric Datum of Australia 1994",SPHEROID["GRS 1980",6378137.0,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0.0,0.0,0.0,0.0,0.0,0.0,0.0],AUTHORITY["EPSG","6283"]],PRIMEM["Greenwich",0.0,AUTHORITY["EPSG","8901"]],UNIT["m",1.0],AXIS["Geocentric X",OTHER],AXIS["Geocentric Y",EAST],AXIS["Geocentric Z",NORTH],AUTHORITY["EPSG","4938"]]', 'metre', 1)      But I get > Ad hoc updates to system catalogs are not allowed. Haven't had much luck on google with any answers as well


Adjacent DEM files have narrow triangular gaps when joined

Newbie here. I've downloaded several DEM files from GeoCommunity which correspond to adjacent regions. When I join them together to form a larger relief map there are triangular 'gaps' on all four sides of each 'tile'. It turns out this is because the elevations are all the same in these triangular regions. Visually, it looks like trimming the triangular regions would allow the remainder to fit properly. Is this because the regions are not in fact rectangular? Something to do with UTM projection? If so how do you know which areas to trim?


How to understand google map overlay type from object (polygon or polyLine)

var Line = new google.maps.Polyline({         path:predectionArray,         editable: false,         strokeColor: '#FF0000',         strokeOpacity: 1.0,         strokeWeight: 2       });               var Rect=new google.maps.Polygon({         path:predectionArray2,         editable: false,         strokeColor: '#FF0000',         strokeOpacity: 1.0,         strokeWeight: 2       });      the object Line is poly Line and Rect is Polygon .The question is how can i retrive it's type from Object name ,Like Rect.type or Line.type ?


Geodesic measurements for short distances throughout US?

My ArcGIS experience has been limited to working on large-scale maps with planar projections. I'm moving to a project in which I want to calculate the distance between pro sports facilities throughout the U.S. and their city's respective downtown/central business district (both defined as geocoded points). My primary interest is in relative distances, and my question is whether using a geographic coordinate system for US map points and using "Near" to calculate geodesic distances between stadia and downtowns is a sound approach to avoiding issues that would arise from calculating distance based on a projection of the US?


ArcPy Empty Buffers

I have written an ArcPy script to process a DTM into a point feature class to be used in Landform classification and ranking. It successfully produces what I need most of the time. Randomly the buffer polygon step produces an empty feature class. If I run the same process "by hand" it works. If I run the script again, or from a value just before it failed, it also works. The issue is not consistent, it may do it on the 3rd loop, or the 300th loop. I've attempted to mitigate this issue by checking my delete variable statements (memory leak management), and by writing a get count followed by an "if" statement that runs a "compact", "repair geometry", "add spatial index", "Delete the last buffer feature class", and "re buffer". But to no avail. The first part of the script is below.. Any ideas would be welcome..               import arcpy     import winsound          ######## Check out any necessary licenses     arcpy.CheckOutExtension("spatial")     from arcpy.sa import *          ######## Script arguments     FolderLocation = "C:\\Data\\Basin\\"     InRaster = "C:\\Data\\DEM\\Basin1"     GDB = "C:\\Data\\Basin1.gdb"          LandForm = GDB+"\\LandForm"     TempP = GDB+"\\TempP"          TopVal = 1037     ProcessingVal = 772     BotVal = 150     Range = TopVal-BotVal     Range2 = ProcessingVal - BotVal     Range3 = Range2     print "There are: "+ str(Range) +" values in this raster. With: " +str(Range2) + " to process"     print " "          #### Naming Conventions     SingleValue = "s_"     BandValue = "b_"     CountValue = "r_"     LandFormIValue = "u_"     PNeigbours = "p_"     Frequency = "f_"     BufferName = "buf_"     MultiName ="m_"     IntName = "i_"     DisName = "d_"          MegaBuffCount = 0     MegaMultiCount = 0     MegaCount = ProcessingVal +1          while (MegaCount) > (BotVal):         MegaCount = (MegaCount-1)         ## Reclass Single Values         SingleValueName = SingleValue + str(MegaCount) +".tif"         SingleValueNamePath = FolderLocation + SingleValueName         SingleValuePolygonName = SingleValue + str(MegaCount)         SingleValuePolygonNamePath = GDB+"\\"+SingleValuePolygonName         SingleValueCountName = CountValue + str(MegaCount)+".tif"         SingleValueCountNamePath = FolderLocation + SingleValueCountName         LandFormIncrementName = LandFormIValue + str(MegaCount) +".tif"         LandFormIncrementNamePath = FolderLocation + LandFormIncrementName              RC1 = str(BotVal)         RC2 = str(MegaCount -1)         NODATA = "NODATA"         RC3 = str(MegaCount)                RC4 = str(TopVal)         Val = 1         Equ = "{0} {1} {2}; {3} {4} {5}".format (RC1,RC2,NODATA,RC3,RC4,Val)         print "Process Number: " + str(Range2) + "   Height Value: "+ str(MegaCount) + " Count Processed: " +str(int(Range3)- int(Range2))         print "A: Raster S Single Band:" + str(Range2) + " Equ: " +str(Equ)         Range = Range -1         Range2 = Range2-1              Raster = arcpy.sa.Reclassify(InRaster,"Value",Equ, "NODATA")         Raster.save(SingleValueNamePath)              ## To Poly         arcpy.RasterToPolygon_conversion(SingleValueNamePath, SingleValuePolygonNamePath, "NO_SIMPLIFY", "Value")         print "B: Conversion Polygon: "+ SingleValuePolygonNamePath              ####### TEST DIAGONALS         print "      B1: Processing Diagonals"         BufferNearName = BufferName + str(MegaCount)         BufferNearNamePath = GDB+"\\" + BufferNearName         MultiPartName = MultiName + str(MegaCount)         MultiPartNamePath = GDB+"\\" + MultiPartName         IntersectName = IntName + str(MegaCount)         IntersectNamePath = GDB+"\\" + IntersectName         DissolveName = DisName + str(MegaCount)         DissolveNamePath = GDB+"\\" + DissolveName              #Spatial Ref: GDA 94 Z50         sr = arcpy.SpatialReference(28350)              arcpy.Buffer_analysis(SingleValuePolygonNamePath,BufferNearNamePath,"100 decimeters","FULL","ROUND","ALL","")         bufcount = arcpy.GetCount_management(BufferNearNamePath)         result_value = bufcount[0]         buffercount = int(result_value)              MegaBuffCount = MegaBuffCount + buffercount              if buffercount == 0:         print "DANGER!!!!!!!!"             arcpy.Delete_management(BufferNearNamePath)             arcpy.Compact_management(GDB)             arcpy.RepairGeometry_management (SingleValuePolygonNamePath)             arcpy.AddSpatialIndex_management(SingleValuePolygonNamePath,0)             arcpy.Buffer_analysis(SingleValuePolygonNamePath,BufferNearNamePath,"100 decimeters","FULL","ROUND","ALL","")             winsound.PlaySound("SystemHand", winsound.SND_ALIAS)                  print "      B2: Buffer Error: " +str(bufcount) +" polygons. This Processing run: " + str(MegaBuffCount)                  bufcount2 = arcpy.GetCount_management(BufferNearNamePath)             result_value2 = bufcount2[0]             buffercount2 = int(result_value2)                  if buffercount2 == 0:                 arcpy.Delete_management(BufferNearNamePath)                 arcpy.Delete_management(SingleValueNamePath)                 arcpy.Delete_management(SingleValuePolygonNamePath)                 winsound.PlaySound("SystemHand", winsound.SND_ALIAS)                 winsound.PlaySound("SystemHand", winsound.SND_ALIAS)                 STOP # Deliberate error              else:             print "      B2: Buffer: " +str(bufcount) +" polygons. This Processing run: " + str(MegaBuffCount)              arcpy.MultipartToSinglepart_management(BufferNearNamePath,MultiPartNamePath)         Multicount = arcpy.GetCount_management(MultiPartNamePath)         Mulresult_value = Multicount[0]         MulCount = int(Mulresult_value)         MegaMultiCount = MegaMultiCount + MulCount              print "      B3: Multi Part: " +str(Multicount) +" polygons. This Processing run: "+ str(MegaMultiCount)


How can I do edit-and-continue in ModelBuilder?

I'm constructing a model in ModelBuilder, and I ran into an error with one of my tools. I fixed the error and want to continue running my model from that step onward without having to repeat the entire model. Is there any way to do this? Thanks!


Does anyone have aquifer depletion/recharge data for China, India, or any other country that isn't the United States?

Im doing a project for my capstone class in Geoenvironmental Studies and i am having a hard time finding data for aquifers in other countries.


Looking for web service to get State, County, and Place FIPS codes from an address

I have been searching for a few days to find a web service that will provide the State, County, and Place FIPS codes from an address input. Most of the services I've found only provide a State, County, and Census block code. For example, for the address 4139 S 143rd Cir, Omaha, NE 68137 would return: State: 31 County: 05 Place: 537000


Arcobjects initializing license error

I have ArcObjects .NET code that is running on a machine with ArcGIS for Server 10.1. The application worked on the dev server. But when I moved to Test server, I am not able to initialize the licenses. This is the code I am using               RuntimeManager.Bind(ProductCode.Server);     bool succes = false;     AoInitialize arcObjectInitEnv = new AoInitializeClass();     if (arcObjectInitEnv.IsProductCodeAvailable(esriLicenseProductCode.esriLicenseProductCodeStandard) == esriLicenseStatus.esriLicenseAvailable)     {         status = arcObjectInitEnv.Initialize(licenseCode);     }     else     {         throw exception(...);     }      I am sure I authorized the server right. and I am able to run ArcGIS server manager. And test the services and they are working fine. I compile as "Any Cpu" , which is the same I used for Dev. Is there tool that give me "availablity" for server, like desktop? I didn't install ArcObjects SDK on the test server, because I assume it is not required there. Is that true? How can I troubleshoot this?


Open Source Engine for Geocoding

I would create a service to geocode from existing shapefiles. I know that ArcEngine does not allow the creation of Windows Services. Is there an open source option someone could recommend?


Calculating length with Python and the PYTHON_9.3

(Please critic wholly if possible) If I have polyline data in NAD83 and I want to calculate geometry using the PYTHON_9.3 parameter from the arcgisscripting.create(9.3), I am getting mixed results. If I calculate geometry in ArcMap, I set the dataframe to the state plane that my data resides, then calculate geometry in the attribute table view but I don't know that I am doing it right. I don't project the data to the state plane that the polyline record resides that I want to calculate geometry on but instead just set the dataframe and let the project on the fly by arcmap work or not work. Now trying to automate the process, I do a gp.selectbylocation against state plane data then clip the polyline data for each selected state plane and then project the data to that state plane and do the "PYTHON_9.3" in gp.calculatefield_management piece. What environment settings should I consider or research more. Thanks guys!


ESRI Javascript v API 3.3: Format Info Window Content

I'm attempting to query a parcel layer and display the information in a popup infoWindow when I click on a parcel, and I'm having some issues dealing with different datatypes.               var content = "Address: ${ADDR}" + "
Owner Name: ${OWNER}" + "
Parcel ID: ${APN}" + "
City: ${CITY}" + "
Acres: ${TOTAL_ACRES:NumberFormat}" + "
County Assessor Site"        var popUpTemplate = new esri.InfoTemplate("Parcel", content);      The ADDR, OWNER, APN and CITY datatypes are all string so they appear in the infoWindow without issue, but I'm having trouble getting TOTAL_ACRES and COUNTY_LIN to appear. TOTAL_ACRES is a double, and i thought that using the dojo.number.format method as outlined on the esri website would help, but it doesn't seem to do anything. COUNTY_LIN is a url, and has a data type of text, but it isn't appearing and I'm not exactly sure why. I've included screenschot of the relevant data info from inside ArcGIS, hopefully they are helpful. Any help is appreciated! I'm new at this and very stuck as to what I'm doing wrong. ![APN](http://i.stack.imgur.com/nHEZb.png) ![TOTAL_ACRES](http://i.stack.imgur.com/sEnj4.png) ![COUNTYLINK](http://i.stack.imgur.com/iowaS.png)


Using PHP to create a GIS Web application

I've developed many GIS Applications using ESRI ArcGIS 9.3 and 10.0 for ASP.NET . I'm wondering if i can do a GIS application using my SHAPE files and Pure PHP scripting . I've googled for that purpose , found many Map Servers solutions , but they were a little bit complicated , my question is : can i have a little Web Application to mange the shape files ,create tiles for them ,deals with Aerial Images, and then display map layers using OpenLayers for example ? i need a lite solution (No php extensions installing required - NO special setup ...etc) . Thank you .


How can I Enable Google Earth 3D features in QGIS?

I want to ask if there is any plugin or any other way where I can use Google Earth features in QGIS. When I'm saying Google Earth features I mean to be able to see roads, towns, etc and to be able to use the 3D option (Street view tool) I have already installed the OpenLayers Plugin but I did not find something to do it.


Copying netCDF coordinate system

**UPDATE: 7/26/2013** The issue I'm encountering is a known bug with the netCDF-Java API described in ticket TDS-391: _A user would like to convert radar data to netCDF format. Unfortunately, the data files have structure data, which fails badly for writing netcdf-3 (illegal data type, as netcdf-3 does not support structures) or netcdf-4 (unimplemented) files._ The issue is targeted for a fix in API ver. 4.4, which will hopefully will be out this summer, as per an email from Unidata netCDF Java Support received on July 8: _We are going to implement a solution for this in version 4.4, but it won't be out before our training workshop later this month. We may limit the implementation to NetCDF-4, and offer to skip trying to write structures in NetCDF-3._ * * * I have many level-III NEXRAD precipitation netCDF files which I created from the raw files using the netCDF-Java API (ver. 4.3.17). I am now trying to compute monthly average rainfall rates and returning a new netCDF file which I will then need to convert to ESRI GRID format. I am new to working with netCDF files, but have read up a bit on creating dimensions and variables using the `scipy.io.netcdf` module. I am using the first netCDF file in the directory as a sort of template file from which I'm grabbing the x and y locations and projection information. I have 3 dimensions:               In [4]: ncfile.dimensions     Out[4]: {'textStringSize1': 1, 'x': 131, 'y': 131}      I also have 4 variables:               In [3]: ncfile.variables     Out[3]:      {'FlatEarth': <scipy.io.netcdf.netcdf_variable at 0x67527d0>,      'PrecipArray_0': <scipy.io.netcdf.netcdf_variable at 0x6752690>,      'x': <scipy.io.netcdf.netcdf_variable at 0x67526d0>,      'y': <scipy.io.netcdf.netcdf_variable at 0x6752430>}      I have successfully created my `x` and `y` dimensions and variables and populated the `precip_array_0` variable with my monthly average values. The last piece of the puzzle, I think, is to copy the projection info which I believe is what the `FlatEarth` variable holds. I'm not sure how to look at what's in the variable:               In [5]: ncfile.variables['FlatEarth'][:]     ---------------------------------------------------------------------------     IndexError                                Traceback (most recent call last)     C:\Users\jbellino\Desktop\<ipython-input-5-aec6027d7a77> in <module>()     ----> 1 ncfile.variables['FlatEarth'][:]          C:\Python27_epd32\lib\site-packages\scipy\io\netcdf.pyc in __getitem__(self, index)         837          838     def __getitem__(self, index):     --> 839         return self.data[index]         840          841     def __setitem__(self, index, data):          IndexError: 0-d arrays can't be indexed.               In [6]: ncfile.variables['FlatEarth']     Out[6]: <scipy.io.netcdf.netcdf_variable at 0x67527d0>               In [10]: ncfile.variables['FlatEarth'][()]     Out[10]: ' '      Calling help on the object returns help for the entire `variables` object, not just the `FlatEarth` variable:               In [11]: ncfile.variables['FlatEarth']??     Type:       dict     Base Class: <type 'dict'>     String Form:{'y': <scipy.io.netcdf.netcdf_variable object at 0x06752430>, 'x': <scipy.io.netcdf.netcdf_variab <...> e object at 0x067527D0>, 'PrecipArray_0': <scipy.io.netcdf.netcdf_variable object at 0x06752690>}     Namespace:  Interactive     Length:     4     Docstring:     dict() -> new empty dictionary     dict(mapping) -> new dictionary initialized from a mapping object's         (key, value) pairs     dict(iterable) -> new dictionary initialized as if via:         d = {}         for k, v in iterable:             d[k] = v     dict(**kwargs) -> new dictionary initialized with the name=value pairs         in the keyword argument list.  For example:  dict(one=1, two=2)      I'm assuming that the `FlatEarth` variable uses the `textStringSize1` dimension, but I'm not sure how to create this variable in the new netCDF file or populate it once it's been created. Any help is much appreciated!


Using ArcPy for Copy Parallel, Move, etc (from Editor toolbar)?

Since VB can activate the Editor, then use the tools listed in the Editor, such as copy parrallel, I am wondering whether Python can do the same job? I have been searching the website all day. Still can't find the answer from early questions-and-answers. Can someone help me? Thanks in advance.


Which BC Albers should I use and is there any difference?

I was about to calculate the area of some polygons and before I did I did some research. I found that the area of the polygon will be represented in the units of the projection used. So I did some digging to find that the projection I need is BC Albers, but when I went into the list of projections in QGIS, I found that there were two that could the correct ones. The first is EPSG:3005 NAD83 BC ALBERS, and the second one is EPSG:3153 NAD83(CSRS)/BC ALBERS I have projected the polygon as both and saw no difference in the result. I was looking on http://prj2epsg.org/epsg/3005 and it says: "This CRS name may sometimes be used as an alias for NAD83(CSRS) / BC Albers. See CRS code 3153" Just wondering if anyone knows why there are two seemingly identical projections and if there is any difference. Also what does CSRS stand for? Thanks!


How to determine optimal windmill placement to maximize production?

How can I add automatically the maximum number of points (dots) with 6m diameter and 100m distance each point from other into an area. The dots will present the windmill base (6m) and I want the maximum number of points with 100m distance (Ratio) each in order to reach the highest level of production.


clipped data not going into the folder

I created a model in python that clips and converts different data sets into DWG based on the the grid number. I will like the DWG data (Output) to go into the folder I created as part of the geoprocessing.               # Import system modules     import sys, string, os, arcgisscripting          # Create the Geoprocessor object     gp = arcgisscripting.create()          # Load required toolboxes...     gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Conversion Tools.tbx")     gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Data Management Tools.tbx")     gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Analysis Tools.tbx")          # Set the Geoprocessing environment...     gp.overwriteOutput = 1     gp.autoCommit = "1000"     gp.XYResolution = ""     gp.XYDomain = ""     gp.scratchWorkspace = ""     gp.MTolerance = ""     gp.randomGenerator = "0 ACM599"     gp.outputCoordinateSystem = ""     gp.ZDomain = ""     gp.snapRaster = ""     gp.configKeyword = ""     gp.outputZFlag = "Same As Input"     gp.qualifiedFieldNames = "true"     gp.extent = "MAXOF"     gp.XYTolerance = ""     gp.MDomain = ""     gp.spatialGrid1 = "0"     gp.outputZValue = ""     gp.outputMFlag = "Same As Input"     gp.geographicTransformations = ""     gp.spatialGrid2 = "0"     gp.ZResolution = ""     gp.spatialGrid3 = "0"     gp.MResolution = ""     gp.ZTolerance = ""     mapNO = "035A2"           # Script arguments...          Expression = "MAPNO = '" + mapNO + "'"      # Local variables...     grid = "C:\\Export\\Geodatabases\\Planimetrics.gdb\\grid"     GRID_200SCALE = "C:\\Export\\BaltimoreAppendedFINALDB.gdb\\PLANIMETRIC\\GRID_200SCALE"     BuildingAnno = "C:\\Export\\Geodatabases\\Planimetrics.gdb\\BuildingAnno"     Building = "C:\\Export\\Geodatabases\\Planimetrics.gdb\\Building"     Building_DWG = "C:\\Export\\Completed\\Building_" + mapNO + ".DWG"     BUILDING__2_ = "C:\\Export\\BaltimoreAppendedFINALDB.gdb\\PLANIMETRIC\\BUILDING"     BUILDING_ANNO = "C:\\Export\\BaltimoreAppendedFINALDB.gdb\\PLANIMETRIC\\BUILDING_ANNO"     Contours__2_ = "C:\\Export\\Geodatabases\\Planimetrics.gdb\\Contours"     ContourAnno = "C:\\Export\\Geodatabases\\Planimetrics.gdb\\ContourAnno"     Contours_DWG = "C:\\Export\\Completed\\Contours_" + mapNO + ".DWG"     CONTOURS = "C:\\Export\\BaltimoreAppendedFINALDB.gdb\\PLANIMETRIC\\CONTOURS"     Rec = "C:\\Export\\Geodatabases\\Planimetrics.gdb\\Rec"     RecAnno = "C:\\Export\\Geodatabases\\Planimetrics.gdb\\RecAnno"     RecAnno__3_ = "C:\\Export\\BaltimoreAppendedFINALDB.gdb\\PLANIMETRIC\\RecAnno"     Rec_DWG = "C:\\Export\\Completed\\Rec_" + mapNO + ".DWG"     CONTOUR_ANNO = "C:\\Export\\BaltimoreAppendedFINALDB.gdb\\PLANIMETRIC\\CONTOUR_ANNO"     Rec__2_ = "C:\\Export\\BaltimoreAppendedFINALDB.gdb\\PLANIMETRIC\\Rec"     CommTowers = "C:\\Export\\Geodatabases\\Planimetrics.gdb\\CommTowers"     COMMUNICATION_TOWERS = "C:\\Export\\BaltimoreAppendedFINALDB.gdb\\PLANIMETRIC\\COMMUNICATION_TOWERS"     Comm_DWG = "C:\\Export\\Completed\\Comm_" + mapNO + ".DWG"     CultAnno = "C:\\Export\\Geodatabases\\Planimetrics.gdb\\CultAnno"     CultAnno__2_ = "C:\\Export\\BaltimoreAppendedFINALDB.gdb\\PLANIMETRIC\\CultAnno"     Cult = "C:\\Export\\Geodatabases\\Planimetrics.gdb\\Cult"     Cultural = "C:\\Export\\BaltimoreAppendedFINALDB.gdb\\PLANIMETRIC\\Cultural"     Cultural_DWG = "C:\\Export\\Completed\\Cultural_" + mapNO + ".DWG"     HydroAnno = "C:\\Export\\Geodatabases\\Planimetrics.gdb\\HydroAnno"     HYDROLOGY_ANNO = "C:\\Export\\BaltimoreAppendedFINALDB.gdb\\PLANIMETRIC\\HYDROLOGY_ANNO"     HydroL = "C:\\Export\\Geodatabases\\Planimetrics.gdb\\HydroL"     HydroP = "C:\\Export\\Geodatabases\\Planimetrics.gdb\\HydroP"     HYDROLOGY_LINE = "C:\\Export\\BaltimoreAppendedFINALDB.gdb\\PLANIMETRIC\\HYDROLOGY_LINE"     HYDROLOGY_POLY = "C:\\Export\\BaltimoreAppendedFINALDB.gdb\\PLANIMETRIC\\HYDROLOGY_POLY"     Hydro_DWG = "C:\\Export\\Completed\\Hydro_" + mapNO + ".DWG"     Rail = "C:\\Export\\Geodatabases\\Planimetrics.gdb\\Rail"     Rail__2_ = "C:\\Export\\BaltimoreAppendedFINALDB.gdb\\PLANIMETRIC\\Rail"     RailAnno = "C:\\Export\\Geodatabases\\Planimetrics.gdb\\RailAnno"     RailAnno__2_ = "C:\\Export\\BaltimoreAppendedFINALDB.gdb\\PLANIMETRIC\\RailAnno"     Rail_DWG = "C:\\Export\\Completed\\Rail_" + mapNO + ".DWG"     Road = "C:\\Export\\Geodatabases\\Planimetrics.gdb\\Road"     ROAD__2_ = "C:\\Export\\BaltimoreAppendedFINALDB.gdb\\PLANIMETRIC\\ROAD"     RoadAnno = "C:\\Export\\Geodatabases\\Planimetrics.gdb\\RoadAnno"     ROAD_ANNO = "C:\\Export\\BaltimoreAppendedFINALDB.gdb\\PLANIMETRIC\\ROAD_ANNO"     Road_DWG = "C:\\Export\\Completed\\Road_" + mapNO + ".DWG"     Trans = "C:\\Export\\Geodatabases\\Planimetrics.gdb\\Trans"     Transmission = "C:\\Export\\BaltimoreAppendedFINALDB.gdb\\PLANIMETRIC\\Transmission"     Trans_DWG = "C:\\Export\\Completed\\Trans_" + mapNO + ".DWG"     Veg = "C:\\Export\\Geodatabases\\Planimetrics.gdb\\Veg"     Veg_DWG = "C:\\Export\\Completed\\Veg_" + mapNO + ".DWG"     Vegetation = "C:\\Export\\BaltimoreAppendedFINALDB.gdb\\PLANIMETRIC\\Vegetation"     MAPNO____001A3_ = "C:\\Export\\Completed\\MAPNO = '" + mapNO +"'"          #### what does this do ?????????????????     Completed = "C:\\Export\\Completed"##########This should contain the expression/concatination that inserts data into its folder                                                                                # Process: Select...     gp.Select_analysis(GRID_200SCALE, grid, Expression)          # Process: Clip (3)...     gp.Clip_analysis(BUILDING__2_, grid, Building, "")          # Process: Clip (2)...     gp.Clip_analysis(BUILDING_ANNO, grid, BuildingAnno, "")          # Process: Create Folder...     gp.CreateFolder_management(Completed, Expression) ######### This should go on top /// Replace this with a create folder function I already created ?????????????          # Process: Export to CAD...     gp.ExportCAD_conversion("C:\\Export\\Geodatabases\\Planimetrics.gdb\\Building;C:\\Export\\Geodatabases\\Planimetrics.gdb\\BuildingAnno", "DWG_R2000", Building_DWG, "Ignore_Filenames_in_Tables", "Overwrite_Existing_Files", "")          # Process: Clip (5)...     gp.Clip_analysis(CONTOURS, grid, Contours__2_, "")          # Process: Clip (4)...     gp.Clip_analysis(CONTOUR_ANNO, grid, ContourAnno, "")          # Process: Export to CAD (2)...     gp.ExportCAD_conversion("C:\\Export\\Geodatabases\\Planimetrics.gdb\\Contours;C:\\Export\\Geodatabases\\Planimetrics.gdb\\ContourAnno", "DWG_R2000", Contours_DWG, "Ignore_Filenames_in_Tables", "Overwrite_Existing_Files", "")          # Process: Clip (6)...     gp.Clip_analysis(Rec__2_, grid, Rec, "")          # Process: Clip (7)...     gp.Clip_analysis(RecAnno__3_, grid, RecAnno, "")          # Process: Export to CAD (3)...     gp.ExportCAD_conversion("C:\\Export\\Geodatabases\\Planimetrics.gdb\\Rec;C:\\Export\\Geodatabases\\Planimetrics.gdb\\RecAnno", "DWG_R2000", Rec_DWG, "Ignore_Filenames_in_Tables", "Overwrite_Existing_Files", "")          # Process: Clip (8)...     gp.Clip_analysis(COMMUNICATION_TOWERS, grid, CommTowers, "")          # Process: Export to CAD (4)...     gp.ExportCAD_conversion("C:\\Export\\Geodatabases\\Planimetrics.gdb\\CommTowers", "DWG_R2000" , Comm_DWG, "Ignore_Filenames_in_Tables", "Overwrite_Existing_Files", "")          # Process: Clip (9)...     gp.Clip_analysis(CultAnno__2_, grid, CultAnno, "")          # Process: Clip (10)...     gp.Clip_analysis(Cultural, grid, Cult, "")          # Process: Export to CAD (5)...     gp.ExportCAD_conversion("C:\\Export\\Geodatabases\\Planimetrics.gdb\\CultAnno;C:\\Export\\Geodatabases\\Planimetrics.gdb\\Cult", "DWG_R2000", Cultural_DWG, "Ignore_Filenames_in_Tables", "Overwrite_Existing_Files", "")          # Process: Clip (11)...     gp.Clip_analysis(HYDROLOGY_ANNO, grid, HydroAnno, "")          # Process: Clip (12)...     gp.Clip_analysis(HYDROLOGY_LINE, grid, HydroL, "")          # Process: Clip (13)...     gp.Clip_analysis(HYDROLOGY_POLY, grid, HydroP, "")          # Process: Export to CAD (6)...     gp.ExportCAD_conversion("C:\\Export\\Geodatabases\\Planimetrics.gdb\\HydroAnno;C:\\Export\\Geodatabases\\Planimetrics.gdb\\HydroL;C:\\Export\\Geodatabases\\Planimetrics.gdb\\HydroP", "DWG_R2000", Hydro_DWG, "Ignore_Filenames_in_Tables", "Overwrite_Existing_Files", "")          # Process: Clip (14)...     gp.Clip_analysis(Rail__2_, grid, Rail, "")          # Process: Clip (15)...     gp.Clip_analysis(RailAnno__2_, grid, RailAnno, "")          # Process: Export to CAD (7)...     gp.ExportCAD_conversion("C:\\Export\\Geodatabases\\Planimetrics.gdb\\Rail;C:\\Export\\Geodatabases\\Planimetrics.gdb\\RailAnno", "DWG_R2000", Rail_DWG, "Ignore_Filenames_in_Tables", "Overwrite_Existing_Files", "")          # Process: Clip (16)...     gp.Clip_analysis(ROAD__2_, grid, Road, "")          # Process: Clip (17)...     gp.Clip_analysis(ROAD_ANNO, grid, RoadAnno, "")                                                                                # Process: Export to CAD (8)...     gp.ExportCAD_conversion("C:\\Export\\Geodatabases\\Planimetrics.gdb\\Road;C:\\Export\\Geodatabases\\Planimetrics.gdb\\RoadAnno", "DWG_R2000", Road_DWG, "Ignore_Filenames_in_Tables", "Overwrite_Existing_Files", "")          # Process: Clip (18)...     gp.Clip_analysis(Transmission, grid, Trans, "")          # Process: Export to CAD (9)...     gp.ExportCAD_conversion("C:\\Export\\Geodatabases\\Planimetrics.gdb\\Trans", "DWG_R2000", Trans_DWG, "Ignore_Filenames_in_Tables", "Overwrite_Existing_Files", "")          # Process: Clip (19)...     gp.Clip_analysis(Vegetation, grid, Veg, "")          # Process: Export to CAD (10)...     gp.ExportCAD_conversion("C:\\Export\\Geodatabases\\Planimetrics.gdb\\Veg", "DWG_R2000", Veg_DWG, "Ignore_Filenames_in_Tables", "Overwrite_Existing_Files", "")


What are Differences between Feature and Image Services from ArcGIS Online?

Esri has recently released what they call their **Landscape Layers** which look to be mostly image services, rather than map or feature services. These image services look to have feature level detail where you can change the symbology to many different attributes, like a soil type name for example and even show them in a table. I believe they are planning to release feature services for each of or most of these layers. What are the main differences, advantages or disadvantages of these image services vs. feature services? There looks to be a lot of overlap between the two, or am I missing something here?


How to create contours from smoothed DEM instead of using Terrain to Raster?

I'm fairly new to working with lidar and have been assigned the task of creating 2ft contours for the entire county using USGS-provided lidar tiles. Is there a significant difference in the accuracy of contours when simply generating them from a smoothed DEM versus building a terrain dataset, creating a new raster from the terrain and then generating contours from the derived raster? The contours will become one of our data layers for purchase and may be used for anything from architectural design to wetland mitigation, so I would like them to be as accurate as possible in reducing noise and retaining real information. Any help would be greatly appreciated.


In MapBasic, how do I allow a user to choose a folder?

I have used the FileOpenDlg() function to allow the user to choose a file. I would like to do the same thing to allow them to choose a folder so I can save files to the folder without the user having to interact every time a file saves. Is there a function for this?


Where to find Data with site that have hazardous, toxic or radioactive substances?

Does anybody know where to find data that lists the location of sites that have hazardous, toxic or radioactive substances? I'm working on a HUD project and need to be able to find out if sites for new housing is within a certain distance of gas stations or other places that are potentially hazardous. Specifically interested in Florida, USA.


Do any of the SQL Server 2008 R2 SP 2 cumulative updates contain the MAXDOP spatial index fix?

I am troubleshooting ArcGIS 10.1 performance issues with SQL Server 2008 R2 SP 2 (10.50.4000) and the issue appears to be this MAXDOP issue: https://connect.microsoft.com/SQLServer/feedback/details/625896/spatial-index- not-used-on-multiproc-machine-unless-maxdop-set-downward The issue is that the query optimizer is not using the spatial index when it should. Setting a `OPTION (MAXDOP 1)` query hint on a SQL statement will cause the spatial index to be used as will an index hint, but neither are an option for the Arc-clients. I've read that SQL Server 2008 R2 SP 1 - Cumulative Update 3 and higher has the fix but I'm seeing it at SP2. And I don't see the fix listed in the documentation for any of the CUs, but I'm hoping it is undocumented and present in one of the cumulative updates. Has anyone had this issue at SP2 and fixed it with one of the SP2 cumulative updates?


Editing of vector layer programmatically with QGIS

I'm trying to edit vector layer using Python console and have couple of questions. Why this approach doesn't work and I have to use `canvas.refresh`? If I will use this code not in python console but in script file should I also use `canvas.refresh`?               # This approach doesn't work     layer = qgis.utils.iface.activeLayer()     layer.startEditing()     layer.moveVertex(7402946,6186167,0,0)          # This one works fine     canvas = qgis.utils.iface.mapCanvas()     layer = qgis.utils.iface.activeLayer()     layer.startEditing()     canvas.refresh()     layer.moveVertex(7402946,6186167,0,0)      What is the right way to perform such operation? I've found that I can make the same things using `QgsVectorLayerEditUtils`:               layer.startEditing()     eu = QgsVectorLayerEditUtils(layer)     canvas.refresh()     eu.moveVertex(7402946,6186167,0,0)


Overlapping Polygons in same feature class using Arcobjects

I have a polygon feature classs with millions of records, I need to find list of overlapping or intersecting polygons in the same feature class, and how to do it efficiently?   1. I need a ESRI Arcobjects code snippet for the same.    2. I want to know how much percentage overlap is occured.   3. Object ID's of overlapping polygons   4. Attached image and requirement in pictorial view. ![enter image description here](http://i.stack.imgur.com/6LiFb.jpg)


Making development patterns more efficient with ZSH

A common pattern I find myself encountering is converting a CSV to a projected GeoJSON as described here. That entails 3 steps, and I'd like to get it down to the following:               GEOIFY {file} {originalProjection} {newProjection} =         csv2geojon {file.csv} > {file.geojson} &&         ogr2ogr              -F geojson              -s_srs epsg:{originalProjection}              -t_srs epsg:{newProjection}             {reprojectedFile.geojson} {file.geojson}      If anyone has any good resources on how to create functions and use variables with ZSH (which is what I think I need to do this) that would be beautiful. I must be using the wrong vocabulary, because my googling hasn't yielded anything so far. _As always, thanks!_


Geographic Transformations using ArcPy vs. Coordinate Systems used by ArcGis online basemaps

I have 3 shape files with undefined projection, but I know which one it was used (Lisboa_Hayford_Gauss_IPCC). I need to 1st Define Projection. It works. I need to transform it from WGS_1984, so I've used:               import sys, arcpy     #globals set env.workspace and other used paths     import globals as g               def main():         # set local variables         inDataset = ["rede_Coimbra_node.shp", "rede_Coimbra_link.shp", "rede_Coimbra_zone.shp"]              prjFile = g.coveragePath + "Lisboa Hayford Gauss IPCC.prj"         prjFileDatum73 = g.coveragePath + "Datum 73 Hayford Gauss IPCC.prj"         prjFileWGS = g.coveragePath + "WGS 1984.prj"         # Geographic transformation -          transformation1 = "Datum_Lisboa_Hayford_To_Datum_73_1"         transformation2 = "Datum_73_To_WGS_1984_4"              sr1 = arcpy.SpatialReference(prjFile)         print sr1.name         #"spatialRef.name = Lisboa_Hayford_Gauss_IPCC"         #sr2= arcpy.SpatialReference(prjFileDatum73)         #print sr2.name         #print (arcpy.ListTransformations(sr1, sr2))         #spatialRef.name = "Datum_73_Hayford_Gauss_IPCC"         sr3 = arcpy.SpatialReference(prjFileWGS)         print (arcpy.ListTransformations(sr1, sr3))         #spatialRef.name = "GCS_WGS_1984"              try:             print "..."             for fc in inDataset:                 fcFullPath = g.coveragePath+fc                 #arcpy.DefineProjection_management(fcFullPath, prjFile)                 outfc= fc.strip(".shp")                 outfc = arcpy.env.workspace+"/"+outfc+"_wgs1984"                 print outfc                      arcpy.Project_management (fcFullPath, outfc,prjFileWGS, u'Datum_Lisboa_Hayford_To_Datum_73_1 + Datum_73_To_WGS_1984_4',prjFile)                           #arcpy.Project_management (fcFullPath, outfc,prjFileDatum73, transformation1,prjFile)                 #arcpy.Project_management (outfc, outfc+"_wgs84",prjFileWGS, transformation2,prjFileDatum73)              except Exception, e:             # If an error occurred, print line number and error message             tb = sys.exc_info()[2]             print "-->Line %i" % tb.tb_lineno             print e.message          if __name__ == '__main__':         main()      I also have a layer from OSM, which I also projected to WGS_1994 CS and it feets perfectly to the World Imagery provided by ArcGIS online or OSM basemap. However, my projected 3 shapefiles (now converted to feature classes) don't seem to fit so well: they have a deviaton from 1-2m to the raster basemap. Did I did something wrong or is it because the online basemaps are in other CS and I can't change that?


Dividing map into features (whole squares)

I'm using QGIS 1.8.0. I divided a map of a state with its municipalities into many features using a GRID (small squares), but instead of creating one ID per feature (one ID per square), it creates one ID per feature considering also the features divided by the municipalities lines, which I don´t want. I mean if a square is divided by the borderline between two municipalities, it considers two features. I would like to have the map of the state with its municipalities divided into many "whole" squares, and each and every one of those squares should have one unique ID. Could anyone help me? Thanks in advance!


QGIS on Windows Surface

I was wondering if anyone has had any success running QGIS on the Windows Surface tablet? Specifically with the Windows RT OS. Thanks...


Saving geotiff in R - why resolution on x and y is not the same?

I have some data and i want to save it as a geotiff in R. This is not a problem but even if in my command line i set the resolution on x as 1 and on y as 1 after the geotiff is generated the resolution on x is 0.999 .... something instead on 1. Resolution on y is 1 as i set it previously. I saw same behavior in ArcGIS as well when i generate geotiffs form data. I am wondering why this happens. Any explanation will be welcome. PS. this time my raster in R has no projections - i have user define "coodinates" which can be considered metric. Thanks, Monica OK here it is some generated data and the R code to generate the geotiff:                      set.seed(333)         v1 <- rnorm(100, mean=0.23, sd=0.47)         v2 <- rnorm(100, mean=0.17, sd=0.83)         v3 <- rnorm(100, mean=0.34, sd=0.68)         v4 <- rnorm(100, mean=0.59, sd=1.25)         v5 <- rnorm(100, mean=-0.27, sd=0.91)         v6 <- rnorm(100, mean=0.03, sd=1.37)         test.m <- cbind(v1, v2, v3, v4, v5, v6)         test.m <- t(test.m)         r2a <- raster(test.m, xmn=1, xmx=dim(test.m)[2], ymn = 1, ymx=7, crs=NA)         r2a              class       : RasterLayer          dimensions  : 6, 100, 600  (nrow, ncol, ncell)         resolution  : 0.99, 1  (x, y)         extent      : 1, 100, 1, 7  (xmin, xmax, ymin, ymax)         coord. ref. : NA          data source : in memory         names       : layer          values      : -3.397683, 4.136409  (min, max)      So, i expected to have resolution 1 x 1 and not 0.99 x 1. It is not really a big deal in the large scheme of things for what i am doing but i have to recognize - i am very curious why. Thanks again, Monica


Adjusting GPS collected data to a polyline shapefile

I am collecting data from a GPS that is attached to a car. When I display this data in a map, the set of collected points are supposed to match with the street shapefile. However what I see in my map is points overlying places where the car cant go, Ex. Buildings, Parcels etc. I understand this is a GPS accuracy issue. My question is: Is there any script or any way to spatially adjust this points to place them on top of the line so the collected data display on its right position in the map. Thanks


Is it possible to redesign OpenStreetMaps tiles?

We have an application working with open layers and are using open street maps for the map tiles However they don't look great Is there anyway to style these maps? I read something about Mapbox but it uses Leaflet API, however we use OpenLayers and our app is heavily using it what options do i have? thanks


Whats the name of vertices order property?

I'm trying to find the next vertices on polyline using python script in order to calculate the angle between them. Whats the name of vertices order property ? Vertices have an attribute for X,Y and for his number- at polyline the number is also the sequence of the vertices. how can i use this property ?   Thank Geog


Plotting X, Y coordinates generated from MySQL database in QGIS

Currently running QGIS 1.8.0 on Mac OS X 10.8.4. I can plot points on a map using the "Add delimited text layer" plugin to get x-y coordinates from a text file. However, I'd like to be able to extract the x-y coordinates from a MySQL database directly rather than having to create an intermediate text file. Can this be done? The database consists of numerous tables containing info about postcodes, eastings, northings, and other information. I can select "Add vector layer" and connect to a MySQL database but I'm not given the option to provide the SQL query necessary to extract the coordinate data or to define which variables should be defined as x and y coordinates.


Python Delete point in a distance of x meters

I took this code from this source Select maximum number of points more than x meters apart It seems to work for other users, but for me it's an endless loop. I do not understand why, though the code makes sense. The code itself gives me the result I want to get. Can you help me out of this endless loop: #               import arcpy, sys          feature = arcpy.GetParameterAsText(0)     distance = 500          arcpy.gp.overwriteOutput = True          #running NEAR analysis - every point gets attribute of a distance to the nearest point      #in same feature class     arcpy.AddMessage("running first near analysis")     arcpy.Near_analysis(feature, feature)          arcpy.AddMessage("inserting cursor")     cur = arcpy.UpdateCursor(feature)     row = cur.next()          arcpy.AddMessage("starting loop")          i=0     while row:         i+=1         #fids list will store list of deleted points so if any other point will have          #deleted one as the nearest and distance < 150 will not get deleted as this         #distance is no longer true         fids = []         while row:             if row.NEAR_DIST < distance:                 try:                     #it seems I didn't know if .. in .. at the time ;) such a fun to dig                     #this script up! index throws an exception if element is not in the                      #list                     fids.index(row.NEAR_FID)                     arcpy.AddMessage("OBJECTID = " + str(row.OBJECTID) + " is listed!")                 except:                     arcpy.AddMessage("deleting OBJECTID = " + str(row.OBJECTID))                     fids.append(row.FID)                     cur.deleteRow(row)                     d = 1             row = cur.next()         del cur, row, fids         try:             #this idiotic test is to break the loop when no points will have              #NEAR_DIST < 150, shameful - I know!             if d == 1:                 pass         except:             sys.exit()         d = 0         arcpy.AddMessage("loop iteration " + str(i))              #and again we go..         arcpy.Near_analysis(feature, feature)         cur = arcpy.UpdateCursor(feature)         row = cur.next()      The fonctionnal CODE:               import arcpy, sys          feature = arcpy.GetParameterAsText(0)                    def nearRoutine():         #calculate the distances using the current dataset         arcpy.Near_analysis(feature, feature)              #iterate through any features which are within the distance         cur = arcpy.UpdateCursor(feature, '"NEAR_DIST" < 500')         row1 = cur.next()         while row1:                  #this point is within the distance of its neighbor, so delete it             cur.deleteRow(row1)                  #now re-run this routine on the new dataset             del row1, cur             cur = arcpy.UpdateCursor(feature, '"NEAR_DIST" < 500')             row1 = cur.next()             nearRoutine          #call the recursive routine. It will get progressively faster to run as it will loop through fewer points each time     nearRoutine()      Thanks @Stephen Lead


How to prepare or normalize raw shape (.shp) files for Openlayers use

Hi all it seems like I am having difficulties in normalizing raw map files' resolutions to openlayer's use most probably in parameters mapext and imgext. I hope you can help me with this. Using raw (.shp, .shx, .xml, .prj, .dbf) and associated raster files for landuse-related data included in an ArcGIS 10 project (.mxd) that I've obtained from a credible private source, I have used Mxd2Qgs to read .mxd project to .qgs. Then I used quantum GIS' Mapserver Export plugin to export selected layers to MAP FILE. I can view the generated map on browser but cannot do so when I use it in openlayers. The generated map file has an extent: EXTENT 272813.696194 1546212.773835 340292.781152 1587773.606956 (its quite huge). I have tried adding to openlayer's map initialization properties maxResolution, numZoomLevels, units, projection and displayProjection but there is no map rendered, although the map has been queried. Btw I have just guessed the maxResolution here, copying from other huge datasets online :) The map has never been queried when I added the map file's EXTENT to maxExtent: OpenLayers.Bounds(...). The same thing goes when I used the files included in the MS4W tutorial #1 data set. My questions would be:   * How to know a given map's maxResolution parameter for openlayers? Can this be guessed?   * Are there any special processing needed for map/shapefiles before they can be used in openlayers?   * How should a map file be written so that it could be used in openlayers? Thank you so much in advance for your tips. EDIT: Attached MAP FILE and javascript files.


How to convert coordinates from meters to decimal degrees?

I have a shape file. The coordinates (Lat/Long) are projected as meter (555000, 155000). But, I want to re-project it to decimal degrees(51.523666, -0.07467). How can I do it with ArcMap or Quantum GIS? Thanks, In advance


How to reduce trajectories with Bellman algorithm?

I need an algorithm to reduce trajectories with Bellman algorithm. I haven't found anything searching in Google. Can someone help me? It would be cool have it in MATLAB. Thank you


Query to find lat/lon of a house by street.name & house.number

How can I get house coordinates (latitude, longitude) by street.name and house.number? If it is possible, how I can get it? Many thanks!


How to debug ogr2ogr ERROR 1: Did not get at least 2 values or invalid number of set of coordinates?

I'm trying to convert a government data contour GML (http://geo.data.linz.gv.at/katalog/geodata/hoehenschichten/2011/1m-Hoehenschichten.gml) to Shapefile. It seems like it was created by FME:               <?xml version="1.0" encoding="UTF-8"?>     <gml:FeatureCollection xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:fme="http://www.safe.com/gml/fme" xsi:schemaLocation="http://www.safe.com/gml/fme 1m-Contour.xsd">     <gml:boundedBy>     <gml:Envelope srsName="AUT-GK31-5" srsDimension="3">     <gml:lowerCorner>67741.3127211605 341935.72972973 245</gml:lowerCorner>     <gml:upperCorner>79959.5666279546 360502.420825918 602</gml:upperCorner>     </gml:Envelope>     </gml:boundedBy>     <gml:featureMember>     <fme:Contour gml:id="ida7f8be19-1a86-42be-886c-2238b778e00d">     <fme:_elevation>434</fme:_elevation>     <fme:_length>2987.20354766336</fme:_length>     <gml:curveProperty>     <gml:LineString srsName="AUT-GK31-5" srsDimension="3">     <gml:posList>68485.5237522595 355869.11751307 434 68487 355867.757575758 434 68488.6860465116 355866 434 68492 355862.369426752 434 68493.6929133858 355861 434 68497 355858.324840764 434 68498.921052631$     </gml:LineString>     </gml:curveProperty>     </fme:Contour>     </gml:featureMember>      Ogrinfo (OGR 1.9) recognizes multi line strings:               > ogrinfo 1m-Hoehenschichten.gml      Had to open data source read-only.     INFO: Open of `1m-Hoehenschichten.gml'       using driver `GML' successful.     1: Contour (Multi Line String)      But                ogr2ogr -f "ESRI Shapefile" -nlt MULTILINESTRING25D  -skipfailures  out 1m-Hoehenschichten.gml Contour      fails with               ERROR 1: Did not get at least 2 values or invalid number of     set of coordinates <gml:posList>68485.5237522595 355869.11751307 434 68487 355867.757575758 434 68488.6860465116 355866 434 68492 355862.369426752 434 68493.6929133858 355861 434 68497 355858.324840764 434 68498.9210526316 355856 434 68502 355851.9375 434 68502.5818965517 355851 434 68503.5340909091 355849.465909091 434 68505.6853448276 355846 434 68507 355843.896551724 434 68509.2459893048 355841 434 68512 355836.846774194 434 ....      My interpretation so far is that OGR does not recognize that the file contains 3D geometries. How can I find out if the file is broken or whether I'm dealing with an OGR bug/missing feature?


Recommended Eclipse Plugins for development with OpenLayers and GeoExt?

we plan to create an map oriented online application and muse about the 'best' / helpful plugins for Eclipse. The used technology is OpenLayers and GeoExt. For example is the Javascript development tools (JSDT) helpful? Or - are there any other tools, not necessarily Eclipse plugins, which help during development? Can you share your experiences? D3


Newbie to GIS Development

Greetings everyone, I am new to GIS development and was wondering if there are tutorials available for development in ArcGIS 10. I have some experience writing simple scripts in python and fooling around in model builder, and I want to take the dive and make an effort to become a real programmer. I need some more info to get a better grasp on doing some real GIS programming to make some custom tools in ArcGIS 10. Where/how did you guys learn all your GIS development skills? Any book/web site recommendations? Just an FYI I will being doing my coding in visual studio using the .net framework. Thank you all for your recommendations.


Alternatives to Windows Explorer and ArcCatalog when copying a file gdb

I need to copy a file gdb from my local machine to a server using a remote desktop connection. I have been doing this using a simple copy/paste operation in Windows Explorer. I know that it is best practice to do this using ArcCatalog, but in this situation I can't. What I would like to know is how risky this procedure is. I know there is a chance that there may still be locks on the datasets, or other processes accessing it, which could cause the data to be copied partially/incorrectly. I have indeed noticed this where just having ArcCatalog open on my local machine (and not inside the folder the containing the gdb) could cause the paste to fail/complete incorrectly. What I have found is that it is quite inconsistent. Yesterday I had an mxd open which was referencing the file gdb. I then copied it through Windows Explorer and pasted it on the server. I was able to work with the contents on the server without a problem. Today, the first thing I did after logging in was to copy and paste the same file gdb onto the server again. When I tried to open it in ArcMap, it was identified as a normal folder `test.gdb` and not an actual geodatabase with the name `test`. Would using something like TeraCopy help in this case, or do I just have to hope that all the data will get carried over each time? I see a similar question noted that ArcCatalog is the safest for moving the gdb (I agree, I would not dare to cut and paste the gdb through Windows).


1'' DHM: Hillshade is too rough - how to "generalize"?

I got this hillshade from my DHM (I used the hillshade-module from qgis). For my purpose there is too much relief detail (roughness). How can I get rid of this in QGIS or GRASS? ![hillshade from 1" DHM](http://i.stack.imgur.com/oINrc.png) Thanks! Martin