ESRI: ADF + Geodatabase

I'm a .NET Develop. I'm using ESRI / ADF and I have a problem whit some methods of Geodatabase. On the beginning of development I needed connect on GeoDB and execute queries. On this moment I got this error, ACCESS DENIED: **(Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))** So I solved this, creating my IWorkspace object through ServerContext property in the connection object. In other step of development I needed resolve some relations. Through the IObject I got the IEnumRelationshipClass then, I got IRelationshipClass object to resolve the relation. The object IRelationshipClass give me some methods: 1) GetObjectsRelatedToObject(expects a IObject) returns a ISet with all related objects from the object; 2) GetObjectsRelatedToObjectSet(expects a ISet) returns a ISet with all related objects from the ISet with OBJECTID or IObject; 3) GetObjectsMatchingObjectSet(expects a ISet) returns a IRelClassEnumRowPairs (I don't now how use this method or his purpose, so, I don't use this method) When I'm using the method (1), I don't get the error, but when I'm try to use the others methods, I had the same error, access is denied. I tryed everything, add all references, using the IAoInitialize for start the ESRI license, set the access and authorizations on the ArgGIS Server. Give access to ArcSOM, ArcSOC on some COM objects through de MMC. To connect in GeoDB I'm using a GeoDatabaseService with ArcGIS Web Service. Here some pieces of the code: <---Connection--->                       internal bool DoOpenAuthenticateConnection()             {                 Identity identity = null;                 IServerObjectManager icServerObjectManager = null;                 IGeoDataServer icGeoDataServer = null;                 IGeoDataServerObjects icGeoDataServerObjects = null;                      try                 {                     this.Initialize();                          if (IsCon())                         return true;                          using (ComReleaser comReleaser = new ComReleaser())                     {                         identity = new Identity(Authentication.User, Authentication.Password, Authentication.Domain);                         comReleaser.ManageLifetime(identity);                              Connection = new AGSServerConnection(Host, identity, true);                         comReleaser.ManageLifetime(Connection);                              icServerObjectManager = Connection.ServerObjectManager;                         comReleaser.ManageLifetime(icServerObjectManager);                              //this is a property of class GObjectClass, I use this to create the IWorkspace...                         this.GIServerContext = icServerObjectManager.CreateServerContext(NomeServico, TipoServico);                              icGeoDataServer = this.GIServerContext.ServerObject as IGeoDataServer;                         comReleaser.ManageLifetime(icGeoDataServerObjects);                              icGeoDataServerObjects = icGeoDataServer as IGeoDataServerObjects;                         comReleaser.ManageLifetime(icGeoDataServer);                              //I use this to create get accessibility to GeoDB.                          this.GIWorkspace = icGeoDataServerObjects.DefaultWorkingWorkspace;                              this.DoSchemaResolve();                         this.DoResolveDomain();                              return true;                     }                 }                 catch (Exception ex)                 {                     throw ex;                 }                 finally                 {                     GReleaseComObject.ReleaseComObject(identity);                     GReleaseComObject.ReleaseComObject(Connection);                     GReleaseComObject.ReleaseComObject(icServerObjectManager);                     GReleaseComObject.ReleaseComObject(icGeoDataServer);                     GReleaseComObject.ReleaseComObject(icGeoDataServerObjects);                 }             }       <---Relates--->               internal void DoResolveRelationshipClass(IObject[] icObjects, bool resolveDomain, ref DataSet dataSet, ref GListFieldDataset gListFieldDataset, params string[] RelationshipClassName)             {                 IEnumRelationshipClass icEnumRelationshipClass = null;                 IRelationshipClass icRelationshipClass = null;                      DataTable dataTable = null;                 GListFieldTable gListFieldTable = null;                      try                 {                     //for com os objeto com todos os relate                     if (icObjects == null)                         return;                          if (icObjects.Length < 1)                         return;                          using (ComReleaser comReleaser = new ComReleaser())                     {                         //get first object, other objects has the same type.                         icEnumRelationshipClass = icObjects[0].Class.get_RelationshipClasses(esriRelRole.esriRelRoleAny);                         comReleaser.ManageLifetime(icEnumRelationshipClass);                              while ((icRelationshipClass = icEnumRelationshipClass.Next()) != null)                         {                             if (RelationshipClassName != null && RelationshipClassName.Length > 0)                                 if (!DoFindRelateshipClass(DoRelationshipClassName(icRelationshipClass), RelationshipClassName))                                     continue;                                  if (dataSet != null)                                 dataTable = new DataTable();                                  if (gListFieldDataset != null)                                 gListFieldTable = new GListFieldTable();                                       //resolver todas as linhas no relate                             this.DoResolveRelationshipClass(icObjects, icRelationshipClass, resolveDomain, ref dataTable, ref gListFieldTable);                                  if (dataTable != null)                                 dataSet.Tables.Add(dataTable);                                  if (gListFieldTable != null)                                 gListFieldDataset.Add(gListFieldTable);                         }                     }                      }                 catch (Exception ex)                 {                     throw ex;                 }                 finally                 {                     icEnumRelationshipClass = null;                     icRelationshipClass = null;                 }             }                  internal void DoResolveRelationshipClass(IObject[] icObjects, IRelationshipClass icRelationshipClass, bool resolveDomain, ref DataTable dataTable, ref GListFieldTable gListFieldTable)             {                 ISet icSet = null;                 IObject icObjectResult = null;                 ISet icSetFull = null;                 string relateionshipClassName = string.Empty;                      try                 {                     if (icObjects == null)                         throw new ArgumentNullException("The parameter icFeature can't be null.");                          using (ComReleaser comReleaser = new ComReleaser())                     {                         relateionshipClassName = DoRelationshipClassName(icRelationshipClass);                              icSetFull = new SetClass();                         comReleaser.ManageLifetime(icSetFull);                                       for (int i = 0; i < icObjects.Length; i++)                         {                             icSet = icRelationshipClass.GetObjectsRelatedToObject(icObjects[i] as IObject);                             comReleaser.ManageLifetime(icSet);                                  icSet.Reset();                                  while ((icObjectResult = icSet.Next() as IObject) != null)                             {                                comReleaser.ManageLifetime(icObjectResult);                                icSetFull.Add(icObjectResult);                             }                                  icSet = null;                         }                              if (dataTable != null)                             dataTable = DoObjectToDataTable(relateionshipClassName, icSetFull, icRelationshipClass, resolveDomain);                              if (gListFieldTable != null)                             gListFieldTable = DoObjectToListFieldTable(relateionshipClassName, icSetFull, icRelationshipClass, resolveDomain);                     }                 }                 catch (Exception ex)                 {                     throw ex;                 }                 finally                 {                     icRelationshipClass = null;                     icSet = null;                     icSetFull = null;                     icObjectResult = null;                      }             }


Anyone have any ideas why this tiny code snippet throws a COM exception?

System.Object obj = Activator.CreateInstance(Type.GetTypeFromProgID("esriLocation.LocatorManager"));     ILocatorManager2 locatorManager2 = obj as ILocatorManager2;     ILocatorWorkspace locatorWorkspace = locatorManager2.GetLocatorWorkspaceFromPath(@"Z:\ESRI\DataMaps10\streetmap_na");     locator = locatorWorkspace.GetLocator("Street_Addresses_US");     IAddressGeocoding addressGeocoding = (IAddressGeocoding)locator;  //this  fails      Inspecting the addressCoding object gives 'addressGeoCoding.matchFields' threw an exception of type Interop.COMException


show position on google map/earth, from gps data, using google API

For those that have used google's API for mapping (google maps/earth), I would like to know if is it possible to develop an application to receive NMEA data from a gps receiver, extract position, and show online on a map from google map/earth. Best regards! Carlos


How to overlay a flat image onto google maps with two points of reference?

The Android API allows for images to be superimposed onto a map. To do so, the developer specifies a set of lat/long coordinates for an "anchor point" within the image, the width (or height) of the image in meters, and "bearing" value by which the image will be rotated before it is superimposed. More info here: http://developer.android.com/reference/com/google/android/gms/maps/model/GroundOverlay.html Instead of an anchor point + width + bearing what I have instead is an image and two points of reference inside it, with coordinates for each. So, for example, I might have a 1000 x 1000 pixel image and know that pixel (100,100) corresponds to coordinates (X,Y) and that pixel (600,600) corresponds to (X',Y'). What I'm unclear on is how to correctly calculate the anchor point, bearing and "width" values to plug into the Android maps API such that (100,100) in my image appears at (X,Y) on the map and (600,600) in my image appears at (X',Y') on the map. Found this page: http://www.movable-type.co.uk/scripts/latlong.html with info on how to calculate the distance between two points and both starting and ending bearing. Using the distance formula I can calculate the actual physical distance between my two points of reference. Using basic geometry I can calculate the "pixel distance" between the two points in my image. Taken together, this should give me a conversion factor between pixels and meters, so I should be able to calculate the "width" of the image. Is that right? But any "flat" image is going to be a projection of some sort, though, so I'm worried that this method of computing "width" won't be entirely accurate. If that inaccuracy is small then I can live with it. The actual physical size of the images I'm planning to overlay shouldn't be more than 20 miles x 20 miles max. Then there's the issue of "bearing". I can compute the forward azimuth between (X,Y) and (X',Y') and I can compute the angle between (100,100) and (600,600) in my image. If I choose (X,Y) as my anchor and then subtract the latter angle from the former angle then that should give me the amount by which my image needs to be rotated before being its superimposed onto the map. Right? Again, though, I'm worried about curvature issues. Is that a legitimate concern given I'm only talking about (approximately) 20 x 20 mile overlay images?


Easy Guide to ESA satellite data?

Can anybody provide user friendly guidance to ESA datasets? What is available? When will new stuff be available? I struggle to work out what might be interesting amongst the many websites and their somewhat verbose format. For example this question indicates that there is probably some high resolution imagery available or coming soon somewhere.... When I try to find anything I find page after page after page about data access but very little information about the type of data itself. The whole Copernicus Project looks fascinating! I appreciate that its all very new and many things aren't functioning yet nevertheless I would love to begin preparing ideas.... Can anybody point me in the right direction?


Cannot Register Database

I want to publish a database to ArcGIS Server. When I try and register the database, I get this error: ![ArcGIS Server Database Registration error](http://i.stack.imgur.com/Qf5l5.jpg) Can anyone help me? I am using ArcGIS Server and Desktop 10.2 with Microsoft SQL Server 2008.


Managing error with GPS routes (theoretical framework?)

I'm looking for the appropriate theoretical framework or speciality to help me deal with understanding how to deal with the errors that the GPS system has - especially when dealing with routes. Fundamentally, I'm looking for the requirements on the data and any algorithms to use to be able to establish the length of a trail. The answer needs to be trustworthy. A friend of mine was the race director of a race which was billed as 160km but the Garmin watches everybody has makes it more like 190km+. It caused quite some grief at the finish line, let me tell you! So my friend went back to the course with various GPS devices in order to remap it and the results are interesting. Using a handheld Garmin Oregon 300 she got 33.7km for one leg. For the same leg on a wrist watch Garmin Forerunner 310xt it came out to 38.3km. When I got the data from the Oregon it was obvious that it was only recording data every 90 seconds or so. The Forerunner does it every couple of seconds. When I plotted the data from the Oregon I could see that it got confused by some switchbacks and put a line straight through them and a curve was made a little less. However, I muse that the difference in the recording frequency is much of the explanation. i.e. by recording every couple of seconds the Forerunner is closer to the real route. However, there will be an amount of error because of the way GPS works. If the points recorded are spread around the real route randomly (because of the error) then the total distance will be larger than the real route. (A wiggle line going either side of a straight line is longer than the straight line). So, my questions: 1. Are there any techniques I can use on a single dataset to reduce the error in a valid way? 2. Does my theory about the difference in recording frequency hold water? 3. If I have multiple recordings of the same routes are there any valid techniques to combine them to get closer to the real route? As I say, I don't really know what to search for to find any useful science about this. I'm looking for ways to establish just how long a given piece of trail is and it is very important to people. An extra 30km in a race is an extra 5+ hours we weren't expecting. Thanks for any advice you can give.


Syncing private S3 data with CartoDB?

I've been using the new Synced Table feature of CartoDB, and it's working great. But some of the data I want to sync with is not public data. The data provider keeps it on S3, but requires authentication. Is there a way that I can use the sync tables if I have a password to access it? Can I plug that in to CartoDB somehow?


QGIS DXF file projection match

I need to use this file on a map but I am not able to match the projection with the others I have, primarily data downloaded from OSM (city of Boston). I read many articles, I have repeatedly tried to change the layer CRS, convert to Shapefile but to no avail. Can anybody help? This is the link to the dxf file: http://www.bostonredevelopmentauthority.org/documents/planning/udtg/2d/city- blocks


ArcGIS Server Tiles as Basemap in CartoDB

Has anyone successfully used their ArcGIS Server Tilecache as a CartoDB Basemap? I'm trying to hit mine directly using the XYZ Tile URL Template as follows: http://mercator10.library.yale.edu/ArcGIS/rest/services/Digital_New_Haven/Atlas_of_New_Haven_1911_Mosaic/MapServer/tile/{z}/{x}/{y} without success. I'm probably missing something obvious.


SVG control not visible on top of Leaflet.js

I'm using Leaflet 0.7.1 and want to draw a radial menu (like openstreetmap's iD editor) on top using d3. Some examples I found use Leaflet's overlayPane to append the svg element to:               var svgContainer= d3.select(map.getPanes().overlayPane).append("svg");      On mouseclick, I add the menu and reposition it to the screen xy coords:               map.on('contextmenu', function(e) {         console.log('contextmenu()');         var tooltip;         var center = [e.layerPoint.x, e.layerPoint.y];         var menu = svgContainer.append('g')             .attr("class", 'leaflet-zoom-hide')             .attr('class', 'radial-menu')             .attr('transform', 'translate(' + center + ')')             .attr('opacity', 0);             menu.transition()                 .attr('opacity', 1);                  menu.append('path')                 .attr('class', 'radial-menu-background')                 .attr('d', 'M' + r * Math.sin(a0) + ',' +                                  r * Math.cos(a0) +                           ' A' + r + ',' + r + ' 0 ' + 0 + ',0 ' +                                  (r * Math.sin(a1) + 1e-3) + ',' +                                  (r * Math.cos(a1) + 1e-3)) // Force positive-length path (#1305)                 .attr('stroke-width', 50)                 .attr('stroke-linecap', 'round');         });      Somehow, the SVG paths get drawn (this is visible in the Chrome Inspector) but are behind the map object. When I 'drag' the SVG element just below the body tag in Inspector, I _can_ see the circle paths. Any ideas on how I can draw SVG 'menu' elements on top of Leaflet? Thanks!! ![Screenshot](http://i.stack.imgur.com/PVFTn.jpg) See this fiddle for a demo. Right click or hold to add an invisible element. Ps. I also asked this question on StackOverflow. Sorry for crossposting.


Geoserver getlegend graphic returning diagonal lines for polygon

I have been developing a dot density map using certain attributes and have been successful in doing so. But there has been a problem while getting the legend from geoserver wms using a getlegendgraphic request. What I get is shown below: ![sld from geoserver](http://i.stack.imgur.com/x43QU.png) What I want is like the ones for <5 and not specified not with the diagonal line in between. A snippet of my sld is below:                <sld:Rule>           <sld:Title>Not Specified</sld:Title>           <sld:LineSymbolizer>             <sld:Stroke>               <sld:CssParameter name="stroke">#1A8C8C</sld:CssParameter>               <sld:CssParameter name="stroke-dasharray">2.0 4.0</sld:CssParameter>             </sld:Stroke>           </sld:LineSymbolizer>           <sld:PolygonSymbolizer>             <sld:Fill>               <sld:CssParameter name="fill">#F1EBEB</sld:CssParameter>             </sld:Fill>             <sld:Stroke/>           </sld:PolygonSymbolizer>         </sld:Rule>         <sld:Rule>           <sld:Title>< 5</sld:Title>           <ogc:Filter>             <ogc:PropertyIsLessThan>               <ogc:PropertyName>total</ogc:PropertyName>               <ogc:Literal>5</ogc:Literal>             </ogc:PropertyIsLessThan>           </ogc:Filter>           <sld:PolygonSymbolizer>             <sld:Fill>                <sld:GraphicFill>                                 <sld:Graphic>                                     <sld:Mark>                                         <sld:WellKnownName>shape://dot</sld:WellKnownName>                                         <sld:Fill/>                                         <sld:Stroke>                                             <sld:CssParameter name="stroke">#fd849c</sld:CssParameter>                                             <sld:CssParameter name="stroke-width">3.0</sld:CssParameter>                                         </sld:Stroke>                                     </sld:Mark>                                     <sld:Size>10.0</sld:Size>                                 </sld:Graphic>                             </sld:GraphicFill>             </sld:Fill>             <sld:Stroke/>           </sld:PolygonSymbolizer>              </sld:Rule>         <sld:Rule>           <sld:Title>5 - 10</sld:Title>           <ogc:Filter>             <ogc:And>               <ogc:PropertyIsGreaterThanOrEqualTo>                 <ogc:PropertyName>total</ogc:PropertyName>                 <ogc:Literal>5</ogc:Literal>               </ogc:PropertyIsGreaterThanOrEqualTo>               <ogc:PropertyIsLessThan>                 <ogc:PropertyName>total</ogc:PropertyName>                 <ogc:Literal>10</ogc:Literal>               </ogc:PropertyIsLessThan>             </ogc:And>           </ogc:Filter>           <sld:PolygonSymbolizer>             <sld:Fill>                <sld:GraphicFill>                                 <sld:Graphic>                                     <sld:Mark>                                         <sld:WellKnownName>shape://dot</sld:WellKnownName>                                         <sld:Fill/>                                         <sld:Stroke>                                             <sld:CssParameter name="stroke">#fd849c</sld:CssParameter>                                             <sld:CssParameter name="stroke-width">3.0</sld:CssParameter>                                         </sld:Stroke>                                     </sld:Mark>                                     <sld:Size>8</sld:Size>                                 </sld:Graphic>                             </sld:GraphicFill>             </sld:Fill>           </sld:PolygonSymbolizer>           <sld:LineSymbolizer>             <sld:Stroke/>           </sld:LineSymbolizer>              </sld:Rule>         <sld:Rule>           <sld:Title>10 - 20</sld:Title>           <ogc:Filter>             <ogc:And>               <ogc:PropertyIsGreaterThanOrEqualTo>                 <ogc:PropertyName>total</ogc:PropertyName>                 <ogc:Literal>10</ogc:Literal>               </ogc:PropertyIsGreaterThanOrEqualTo>               <ogc:PropertyIsLessThan>                 <ogc:PropertyName>total</ogc:PropertyName>                 <ogc:Literal>20</ogc:Literal>               </ogc:PropertyIsLessThan>             </ogc:And>           </ogc:Filter>           <sld:PolygonSymbolizer>             <sld:Fill>                <sld:GraphicFill>                                 <sld:Graphic>                                     <sld:Mark>                                         <sld:WellKnownName>shape://dot</sld:WellKnownName>                                         <sld:Fill/>                                         <sld:Stroke>                                             <sld:CssParameter name="stroke">#fd849c</sld:CssParameter>                                             <sld:CssParameter name="stroke-width">3.0</sld:CssParameter>                                         </sld:Stroke>                                     </sld:Mark>                                     <sld:Size>6</sld:Size>                                 </sld:Graphic>                             </sld:GraphicFill>             </sld:Fill>           </sld:PolygonSymbolizer>           <sld:LineSymbolizer>             <sld:Stroke/>           </sld:LineSymbolizer>              </sld:Rule>      Thanks in advance.


Adding points in Empty Polygon

I have a number of polygons on which I wish to make analysis using points data symbols... Is there a method through which I may add points automatically within each polygon in separate locations. For Example I found centroid (x,y), and used it as one location. I need 12 locations in one polygon where the polygons are not of regular shape and points may not overlap too. Suggestions are appreciated! Regards,


Correct usage of a counter using arcpy.da.UpdateCursor

In the Python code inside a `Calculate Value` tool in my model, I have the following:               getNum("%Selected Features%")      * * *               def getNum(ftr):       lst = [4, 11, 15] #values for SQL expression       x = 20       fields = ('TYPE_A', 'TYPE_B', 'NUM_ID')       for l in lst:         y = x + 1         whereclause = """"NUM_ID" = %s """ % l         with arcpy.da.UpdateCursor(ftr, fields, whereclause) as cursor:           for row in cursor:             if row[0] ! = row[1]:               row[2] = y             cursor.updateRow(row)         y += 1      What I would like to do is, for every element in `lst`, create a cursor based on a selection of records where `NUM_ID = l`. The values in `TYPE_A` and `TYPE_B` should be compared for each record and updated if necessary. The script is failing after the cursor is created, with the error `Item not in collection`. If I remove the `whereclause`, it executes. Once the records have been selected and the values compared and updated if necessary, I need to increment the counter `y` by 1. I think I'm doing it in the wrong place though, because if I run the script without the `whereclause` it does execute correctly.When I check the records with the changed values, they are now all set to `y`, which indicates that `y` was not incremented.


Tools to compare unversioned copies of geospatial data

My office has about 100 GB of geospatial data of varying forms (imagery, feature classes in geodatabases, LIDAR, tables, etc) that have gone somewhat unmanaged for the decade during which they were collected. I have now been put in charge of inventorying and restructuring the data. The data is stored on the filesystem and is unversioned, but many datasets and geodatabases have been copied to new places without additional metadata describing what or why. Without going into what we should have done or how to structure it in the future (I'm working on it), I'm trying to figure out if there is a decent way to compare the feature class data and geodatabases when I encounter a copy to determine what changed between the two copies. I can use Beyond Compare to compare many of the types of data. I came across a few GIS.SE questions on the topic of comparing specific items, but I don't know that they would work - at least not without further scripting, which isn't desirable but is an option.   1. Is there a good way to get a diff between an old and a new version of an SDE database?   2. How can one compare two geometries in arcpy successfully? (this one could work with finessing, but I'm hoping for something better) I realize that the comparison is a pretty difficult operation given all of the different types and properties of GIS data, but I'm hoping for something that can at least handle differences in spatial location, associated data tables, and ideally metadata. Commercial software, on the one end, and relatively barebones code on the other, are both ok for me. Does this even exist? **Edit:** Just to be clear - we're using ArcGIS 10.0 and 10.1 - I'm happy to use solutions that involve other open source or commercial providers too, but any ESRI solutions would need to be compatible in 10.0. Also, our data are not currently in a true database (SDE, postGIS, etc), but I'm willing to move the stuff I want to compare into another format if it means I can compare it.


How to join two tables using date, time, lat and lon as common field?

I am sorry if the question is elementary but I did not find any clear discussion or guide to understand how to run a query in postgresql. So that a pointer to another website would be also useful. Anyhow, I have two tables: Table 1   id|day|time|lat|lon|   1a|2010-09-12|4:35:04|44.66038|10.74039|   2a|2010-09-12|13:04:38|44.65472|10.76201|   3a|2010-09-12,15:41:55,44.65450|10.76198|   4a|2010-09-12|15:43:54|44.65469|10.76197|   5a|2010-09-12|15:44:26|44.65476|10.76199|   6a|2010-09-12|15:45:40|44.65480|10.76202|   7a|2010-09-18|07:22:00|44.65480|10.76202|   8a|2010-09-18|07:23:57|44.65477|10.76186|   9a|2010-09-18|07:47:32|44.65470|10.76199|   Table 2   id|day|time|lat|lon|depart/arrive   1b|2010-09-12|4:35:04|44.66038|10.74039|D   2b|2010-09-12|15:45:40|44.65480|10.76202|A   3b|2010-09-18|07:47:32|44.65470|10.76199|D      Table 2 has been obtained from table 1 and it includes an additional column: depart/arrive. This column indicates if the coordinate (or row) is the first coordinate of a path (D) or the last coordinate (A).   Using postgres, I would like to use as common field of the two tables "day", "time", "lat", "lon" in order to obtain a new table 3 that includes all the fields of table 1 plus the "depart/arrive" field of table 2.   Table 3   id|day|time|lat|lon|depart/arrive   1a|2010-09-12|4:35:04|44.66038|10.74039|D   2a|2010-09-12|13:04:38|44.65472|10.76201|NULL   3a|2010-09-12,15:41:55,44.65450|10.76198|NULL   4a|2010-09-12|15:43:54|44.65469|10.76197|NULL   5a|2010-09-12|15:44:26|44.65476|10.76199|NULL   6a|2010-09-12|15:45:40|44.65480|10.76202|A   7a|2010-09-18|07:22:00|44.65480|10.76202|NULL   8a|2010-09-18|07:23:57|44.65477|10.76186|NULL   9a|2010-09-18|07:47:32|44.65470|10.76199|D      I thank you in advance.


Need advice on converting large geodatabase into shapefile or postgis

tl;dr: I have a fgdb w/ 800k tiny polygons representing high risk flood areas. I need to sum the area of these polygons within each administrative boundary (HUCs) and have a ratio per huc of high risk flood area/total huc area. I have a a layer in a file geodatabase with 800,000+ polygon features. I need to dissolve all of these features into one multipart polygon feature for use in a union geoprocess. I tried to dissolve directly in ArcMap but this failed after several hours (I think a memory issue or maybe some bad geometry). I ran check and repair geometry, this was successful after 80 hours(!) but only deleted about 20 polygons (I believe there are more polygons with bad geometry). I did a spatial selection and export to narrow down the data to only polygons that intersect w/ the continental US. I thought that perhaps it would be best to conduct the dissolve in either QGIS or in PostGIS using the St_Union function. However, I have not been successful in getting the data out of the file geodatabase format. I tried to export to shapefile, but it was over the max shapefile size of 2gb so this failed. I tried to split into 2 shapefiles, but they are still each maxing out at 2gb. Any suggestions on importing this file into postgis or processing in QGIS? My next step, I suppose, is to break it into many smaller shapefiles, but I am hoping there is a better way. :) Or I guess I could convert to raster but I think I'd lose some precision. Thanks!


gdalwarp increase resolution

I currently have a 87Mb Compressed GeoTiff with a resolution of 50m. I need to interpolate this to 2.5m I have used gdalwarp to achieve this using a cubicspline, but it took 12hrs and resulted in a 44Gb GeoTiff. I did use -co COMPRESS=LZW but wondering if gdal_warp uses these creation options? I then tried -r average which only took a few hours but still resulted in a 22Gb GeoTiff. If I look at the results the image still looks very course (granular) even though gdalinfo does say it now has a pixel size of 2.5 Am i doing something wrong or expecting too much from gdal thanks


How to solve sqlite_rtree_geometry_callback error?

I have just installed qgis 1.8 and it show error message > the procedure entry point sqlite3_rtree_geometry_callback could not be > located in the dynamic link library sqlite3.dll How to fix this?


When will visibleAtMapScale property be populated for a map/image service?

To my knowledge, the service layer property, visibleAtMapScale, represents the service scale dependency. I like to know when visibleAtMapScale value is populated. I tried to get it when the layer is loaded, but seem not the right timing. Anyone any idea? Thanks. Jason Z.


ArcGIS for iOS slowdown after update

My polygon feature layer hosted on Arcgis.com (ArcGIS Online) is slow to load on iPads and iPhones after the latest ArcGIS for iOS update (version 10.1.2 August 6, 2013). If you search for Taupo Fire Jurisdictions within the ArcGIS for IOS app and try to open it you might (hopefully?) experience the delay on your device too. It was working without issues prior to the ArcGIS for IOS update this morning (NZ). Layer: http://www.arcgis.com/home/item.html?id=bb0caa0612ef464494625fef0d60ed13 Any ideas?


QGIS Regex substring for Labelling

I'm trying to plot a series of contours in QGIS based on dxf data exported from some specialised mining software. The attirbute output is pretty ugly and merges a few fields together.               DXFName=C$5 DXFGroup= DXFFeature= DXFValue=50.0 DXFDescription=Major contour at level 50.000 DXFPrimitive= DXFLine=0 DXFPattern=0      I need to extract just the 'DXFValue=' value to allow categorised symbology, and labelling of the contours. I've played around with rule based symbology using the 'regexp_substr' function, but I don't have the regex knowledge to produce what I need. Anyone able to assist?   Thanks!


Bar graph - cartodiagram in QGIS

Can I create a cartodiagram in QGIS 1.7.3? I need one bar graph in every territorial unit of one layer. It must vizualize organization on X and number of research in one organisation. Is it possible? Is there some plugin? Thank you!


Raster layer invalid

Im trying to load tiff image using QGis1.8. But Im getting "Layer Not Valid", even though the raster image path is correct. I want to know the reason behind this error. Thanks, suma


How to set Scale Factor for Lambert Conformal Conic (LCC) projection in ArcGIS Desktop?

The projection for my state according to my country's Mapping Agency is in a specific Lambert Conformal Conic (LCC) projection. They have given values for the following parameters:   * False Easting   * False Northing   * Central Meridian   * Standard Parallel 1   * Standard Parallel 2   * Scale factor   * Latitude of origin    * Datum/GCS When I go to ArcCatlog, to update an existing LCC projection, I can see all the parameters except for the `Scale Factor`: ![enter image description here](http://i.stack.imgur.com/9haG5.png) How do I enter the Scale Factor? The ArcGIS help mentions this parameter but does not mention how it to be used. A semi-related question is: How important/required is the Scale Factor? I have seen several LCC projection without the Scale Factor. Even Snyder's Map Projections: A Working Manual does not mention it, when describing the Lambert Conformal Conic projection.


Gdal: highest and lowest point/pixel, how to get their altitudes?

Given a .tiff topographic raster image. **How to get the altitudes of the highest and lowest point/pixel ?**


Better ways to check if GRASS r.water.outlet works out fine output

I use my python script to call GRASS module **r.water.outlet** from outside, and here's my script(I perform this script in pyscripter):               import os     import sys          #set up GRASS environment variables     sys.path.append(os.path.join(os.environ['GISBASE'], 'etc', 'python'))     import grass.script as g     import grass.script.setup as gsetup     gisbase = os.environ['GISBASE']     gisdb = 'C:\Users\Heinz\Documents\grassdata'     location = 'newLocation'     mapset = 'TC'     gsetup.init(gisbase, gisdb, location, mapset)          #csv file reading and importation     import csv     rows = list(open('tc_sta.csv'))     totalrows = len(rows) - 1          #loop through the csv(coordinates) file in r.water.outlet module     f = open('tc_sta.csv', 'r')     element = list(csv.reader(f))     i = 0     j = 0     while True:         if i <= totalrows:             g.run_command('r.water.outlet', drainage = 'dra', basin = 'b' + str(i + 1), east = element[i][j], north = element[i][j + 1])             i = i + 1         else:             break          #print all files in grass database to check results of the module     print g.read_command('g.list', _type='rast')      and here's the output in console, ![enter image description here](http://i.stack.imgur.com/iF0Ud.png) The output shows that the GRASS module successfully runs and generates 8 new basin area raster files(b1 to b8), but I still want to check if there are something wrong. So I launch GRASS GUI (GRASS command line can't display map under Windows platform), using **d.rast** command to get visual of those output maps. But I can only see b4 in display window. Others' are blank in display window. I 've checked the attribute of every output map using **r.category** , and they all have the same value as b4's. I display b4 and input coordinates of module r.water.outlet(thus, batch point) together to check if other coordinates except b4's are out of range of basin area, but it shows not, ![enter image description here](http://i.stack.imgur.com/R3C0j.png) I am wondering that are there better ways to check this？(Seems that I can't use python from outside to display maps.) Because somehow maybe the outputs are all right. I work with GRASS 6.4.3 and python 2.7.6 under Windows 8.1 64-bit.


Maperitive rule per source

I'm trying to make my own tiles for OpenStreemMaps but with a more "Google Maps" look. After a long time of playing with the rule properties I finally have the look I want but I have a problem. The data that Maperitive downloads in the Overpass API option is great but for some reason it doesn't render the ocean, or at least "Rio de la Plata" which is the widest river (but I don't think its a river problem because other rivers render just fine). The XAPI option renders the coast and ocean just fine but it's missing some data. This tiles are for a NGO project and we use OSM because we added slums streets. I don't know if it's because it's outdates or what but XAPI doesn't have this streets we added the the OSM project. If I add both sources as different layers I get both the new streets and the ocean but road name text many times differ position so it renders "ghost" text. If I could apply a rule to the XAPI source/layer in which there is no text and in top of it put the Overpass source/layer I could get the perfect map, but when I change a rule it gets applied to all sources. Is there a way to have a different rule per source? Maybe, but Most Likely Not. Thanks


PHP Query Tables of Active Layers

I currently have an "Identify Features" function on my site that works by passing a the Lon and Lat of the click, along with a list of active layers to a PHP script that will then query my PostGIS database. It works well for custom queries as I have full control over what is returned and it's format. However, I now have over 80 layers of information and would like to look into a generic identify that returns the default table structure. My PHP knowledge is quite basic and I can't figure out a way to loop through the active layers (they have the same name as the tables) and query just these to return results. Example of my current code is:               include("databaseConnect.php");     $lon = $_GET['lon'];     $lat = $_GET['lat'];     $activelayers = $_GET['activelayers'];     $explodedlayers = explode(',',$activelayers);     $totallayers = count($explodedlayers);     $vectorLayers = array('vector_layer_one','vector_layer_two');          if(count(array_intersect($vectorLayers, $explodedlayers)) > 0){      if(in_array('vector_layer_one',$explodedlayers)) {       $vector_layer_one_query = "SELECT * FROM vector_layer_one WHERE    ST_DWithin(ST_Transform(ST_SetSRID(ST_Point('$lon','$lat'),4326),27700),   vector_layer_one.geom, 10) ORDER BY   ST_Distance(ST_Transform(ST_SetSRID(ST_Point('$lon','$lat'),3857),27700), geom)";       $vector_layer_one_result = pg_query($vector_layer_one_query);        $vector_layer_one_numresults = pg_num_rows($vector_layer_one_result);     }     if(in_array('vector_layer_two',$explodedlayers)) {       $vector_layer_two_query = "SELECT * FROM vector_layer_two WHERE ST_DWithin(ST_Transform(ST_SetSRID(ST_Point('$lon','$lat'),4326),27700), vector_layer_two.geom, 10) ORDER BY ST_Distance(ST_Transform(ST_SetSRID(ST_Point('$lon','$lat'),3857),27700), geom)";       $vector_layer_two_result = pg_query($vector_layer_two_query);        $vector_layer_two_numresults = pg_num_rows($vector_layer_two_result);     }     $vectorLayers_total = $vector_layer_two_numresults + $vector_layer_one_numresults;     if($vectorLayers_total > 0){     printf("
Vector Layers ($vectorLayers_total)

");     if(in_array('vector_layer_one',$explodedlayers)) {         while($myrow = pg_fetch_assoc($vector_layer_one_result)) {              printf ("
Vector Layer One - ID:%s

Selected Feature

ID:	%s

Name:	%s

Info:	%s

"             ,htmlspecialchars($myrow['gid'])             ,htmlspecialchars($myrow['gid'])             ,htmlspecialchars($myrow['gid'])             ,htmlspecialchars($myrow['gid'])             ,htmlspecialchars($myrow['Name'])             ,htmlspecialchars($myrow['Info']));          }     }     if(in_array('vector_layer_two',$explodedlayers)) {         while($myrow = pg_fetch_assoc($vector_layer_two_result)) {              printf ("
Vector Layer Two - ID:%s

Selected Feature

ID:	%s

Name:	%s

Info:	%s

Column1:	%s

Column2:	%s

Column3:	%s

Column4:	%s

Column5:	%s

"             ,htmlspecialchars($myrow['gid'])             ,htmlspecialchars($myrow['gid'])             ,htmlspecialchars($myrow['gid'])             ,htmlspecialchars($myrow['gid'])             ,htmlspecialchars($myrow['Name'])             ,htmlspecialchars($myrow['Info'])             ,htmlspecialchars($myrow['Column1'])             ,htmlspecialchars($myrow['Column2'])             ,htmlspecialchars($myrow['Column3'])             ,htmlspecialchars($myrow['Column4'])             ,htmlspecialchars($myrow['Column5']));          }     }     printf ("
");     }     }      This has worked well (if not a little long winded) for a small amount of layers. Is there a way to make something much more generic and use a single query / output builder to loop through the active layer names and use the returned results (if there are any) to build the layout that I'm using above? Returning all of the columns, with their default column heading isn't a problem. Thanks for your time,


Reinitialize ArcGIS10.0 Python installation

I am developing a Python script for a Toolbox that required a few libraries which I installed manually into C:\Python26\ArcGIS10.0\ and it worked just fine. To make the distribution easier, I dived into the Python installation and libraries files and ended up deleting the wrong files and messing up my installation. I fixed a few things but I don't trust that setup anymore. For example, it runs fine outside of ArcMap (from command line or PyScripter) but raises weird errors when run from ArcMap (with the same parameters) .I know that was a mistake and I should have been more careful. FYI: The _fix_ that I have done was to follow the advice on Esri's blog article _A simple approach for including 3rd party Python libraries with your scripts_ : "The secret to most Python modules and packages: _they’re just files_. You can copy any Python library into the same folder as the .py file that imports them and _it will just work_ ". I copied the necessary library files to the same folder as my main script. Result: it's still missing libraries or gives me a "bad argument to internal function error" when run from ArcMap but works fine when run separately. My question is: **is there a way to clean up the Python configuration without uninstalling/reinstalling everything?** I would like to restart with a clean config. This may seem a bit dumb but I've been struggling with that since I messed things up...Also, if you have advice or good practices concerning this kind of things, I'd gladly hear them as I am quite new to developing on Windows... Thanks!


How can I pass a WorkspaceName to another thread for opening?

My winforms app gets an `IWorkspaceName` from an `IDatasetName` via the `GxObject` selected in a `GxDialog`. I want to pass it across to a worker thread for opening. I know how to write multithreaded arcobjects code - particularly the need to create the workspace factory class on the worker thread but my app makes no assumptions as to the type of workspace factory. I've considered passing it as a serialized xml string, but the documentation seems strangely vague on this topic. Does anyone have code to do this? **On preview** , I'm asking much the same as this question. Has anyone cracked the xml serialization / deserialization? It seems the simplest way to go or is there a better way?


Are North Arrows Pointless?

A recent post on Cartastrophe refers to a "Worldwide Campaign to Eliminate Needless North Arrows." So when, if ever, are North arrows necessary? ![alt text](http://i.stack.imgur.com/wY7iQ.gif) As an interesting aside the concept of **North** being **up** is not an arbitary one, but in the Northern hemisphere > "due to the visible rotation of the night sky around the visible celestial > pole" however > "Chinese and Islamic culture even considered south as the proper top end for > maps." http://en.wikipedia.org/wiki/North


What is the difference between WGS84 and EPSG4326?

What is the difference between WGS 84 and EPSG 4326? It seems like for a given dataset it might be both WGS 84 _and_ EPSG 4326.


Normalizing point cloud data

How I can get Digital Height Model (only object heights, DSM - DTM = DHM)? Many applications can do this, but they convert it to GRID or TIN format. I was wondering if it was possible to keep the data as point clouds.


Is there a method to tell which hemisphere a point belongs to, in WGS84 geoid, where the equator is an arbitrary ellipsis?

I use the WGS84 geoid (because I'm working with a GPS chip). I define an ellipsis that splits the surface in two parts, lets name these 'A' and 'B'. This ellipsis is defined by two points 'a' and 'b' , using their coordinates in WGS84. 'A' is the surface left of the vector 'ab', and therefore 'B' is right of vector 'ab'. How do I tell if point 'c' belongs to 'A' or not? Any language will do, even pseudo code. I'll figure out how to translate to ATMega assembly later... Many thanks. PS: What I currently think of is switching origins so that my ellipsis is the new equator, then applying the transform on my point and finding out if it's North or South. But whereas I could find out how to do it in polar coordinates systems, I'm totally lost in geoids... maybe its not even possible? PPS: Here is an example: ![Example](http://i.stack.imgur.com/B2CeT.jpg) The points are:   * 50°21'37.9"N 3°05’01.8"E : A   * 50°21'36.3"N 3°05'04.2"E : B   * 50°21'40.2"N 3°05'05.9"E : C1, belongs to A   * 50°21'32.1"N 3°04'52.7"E : C2, does not belong to A


pgRouting：routing problems using reverse_cost

I saw this post：Routing issues with pgrouting, and try the ability of reverse_cost. As the result of this post, if there is only one way to go from one node to another, even though the reverse_cost is very huge, pgRouting can still give the result the same as the one that I do not use reverse_cost(but this time the cost is drastically huge), but apparently it's unreasonable. Then I try to set the reverse_cost to **negative value** , unfortunately under Win7 the error occurs： ![enter image description here](http://i.stack.imgur.com/IOyCX.png) Can someway I can do to solve this problem？ Or under this condition can pgRouting return one acceptable and operable result like "route not found" or "route not connected"？


qgis polygonize error 4 "file does not exist in the file system"

When I try to convert a raster DEM (in asc or geotif format) to polygons I get the error below. > >     ERROR 4: `Y:/GIS/oversvmmelser/tmp/out.tif' does not exist in the file > system, >     and is not recognised as a supported dataset name. >   using QGIS 2.4 any idea what the problem is? ![screenshot](http://i.stack.imgur.com/YBS1c.png)


Can I edit shapefile while using a definition query in QGIS?

Is it possible to edit shapes while using a "definition query" or "query builder" in QGIS? I'm trying to do this in the same way I used to in ArcGIS. Thanks!


PostGIS Better ST_Intersects Query

I am currently using the following queries to return all features that intersect a large and complex polygon. I initially tried to use a single ST_Intersect query but because the number of features it is searching through is over 400 million this took a significant amount of time (+24hrs). So I now start by using a bounding box query to drop the number of features that the second query (the ST_Intersects one) uses. However, I think this is extremely verbose way of doing this, but I cannot figure out a better or quicker way. Can anyone think of a more efficient way? thanks PS Extra Information Windows 2008 Server 64-bit Postgis 2.0 64-bit PostGIS is configuration settings are tweaked using the wiki advice. All geometries have GiST indexes.               CREATE TABLE temp_lines AS SELECT lines.* FROM lines,counties WHERE lines.wkb_geometry && counties.geom AND counties.name = 'County';     COMMIT;     CREATE INDEX temp_lines_idx ON temp_lines USING GIST(wkb_geometry);     COMMIT;     CREATE TABLE new_lines AS SELECT temp_lines.* FROM temp_lines, counties WHERE      ST_Intersects(counties.geom, temp_lines.wkb_geometry) AND counties.name = 'County';     COMMIT;     DROP TABLE IF EXISTS temp_lines;          CREATE INDEX lines_idx ON new_lines USING GIST (wkb_geometry);     COMMIT;      ## EDIT After Paul's comment I went back and re-tried some of my earlier queries. This first one took well over 24hrs               CREATE TABLE new_lines AS SELECT * FROM lines WHERE ST_Intersects((SELECT geom FROM counties WHERE name = 'County'), lines.wkb_geometry);      Then I found the following post http://revenant.ca/www/postgis/workshop/indexing.html and I changed my query to this               CREATE TABLE new_lines AS SELECT lines.* FROM lines, counties WHERE ST_Intersects(counties.geom, lines.wkb_geometry) AND counties.name = 'County';      This took a matter of hours. Not sure why there is such a difference as I thought my first query was the most efficient?


Finding depression with contour lines

How can I find depression contour lines? I already have find depressions via Fill-method, but now I try to detect them by using the contour lines, anyone have an idea ?


Improve Performance of Geoprocessing Service - GPServerSync.Load

I have a geoprocessing service in ArcGIS Server 10.1 that is a simple Print Task. The task is running as an Asynchronous service. It renders one MapService from the same ArcGIS Server instance, and another basemap mapservice from ArcGIS online and generates a PDF. The service is taking over 3 minutes to run. When I turn verbose logging on, I notice that the elapsed time between the following log messages is around 3 minutes:               <Msg time='2014-06-16T06:11:55,546' type='VERBOSE' code='20023' target='WebPrinter.GPServer' methodName='GPServerSync.Load.PrintTask' machine='AGDC-DEV4.LOCAL' process='9632' thread='10020' user='null' elapsed='0.00084'>Load job jc01d9192a4bb4eecbc8317b3d12b34d9 message type REST message size 1218</Msg>     <Msg time='2014-06-16T06:14:13,724' type='VERBOSE' code='103004' target='WebPrinter.GPServer' methodName='Map.Draw' machine='DEV4.LOCAL' process='9632' thread='10020' user='null' >Beginning of geography phase.</Msg>      Once the draw phase starts, the job finishes in seconds. I am unclear on what the GPServerSync.Load method does, and how to optimize it. If I try making a PDF in ArcMap of the two same services, it takes seconds. I do not think that the services involved in making the map are the holdup. **EDIT** Upon digging further, the culprit is in this following line of arcpy:               result = arcpy.mapping.ConvertWebMapToMapDocument(Web_Map_as_JSON, templateMxd)      The method ConvertWebMapToMapDocument is taking 2+ minutes to complete. Now, I feel like this issue is related to the issue Why is arcpy.mapping.ConvertWebMapToMapDocument slow? Thoughts?


Exporting geodata from QGIS to Esri File Geodatabase?

For a project I need to create a set of vector data that I think I could do in QGIS. However the customer demands that the final data set needs to be delivered in a Esri File Geodatabase. Is there a way to export geodata from QGIS into an Esri File Geodatabase? (I have only little experience with QGIS and not found a solution to this problem yet)


Calculating acreage using ArcGIS Field Calculator?

What is the expression to calculate an acreage in USA ? I am aware that there is a geometry calculate but when you convert raster to polygon it doesn't do it's job and I have to use the field calculator to manual it. I am writing a model builder and in it I have tools for Add field and calculate them for 83 datasets.


How can I Connect between Oracle 64 bit 11g and Arcgis10.1 ? Thanks


Google Maps Engine Connector error

I have recently installed the Google Maps Engine Plugin for QGIS 2.0 and it doesn't seem to work. Whenever I click on the Log in button it pops up with: **Google Error:invalid_client Bad request.** **cookie_policy_enforce=false response_type=code scope=https://www.googleapis.com/auth/mapsengine https://www.googleapis.com/auth/userinfo.profile redirect_uri=urn:ietf:wg:oauth:2.0:oob approval_prompt=auto state=123456789 client_id=myemailaddress@googlemail.com** I have uninstalled and re-installed the plugin several times but it doesn't seem to make a difference. Any ideas would be appreciated.


How to transfer attribute from polyline feature to polygon feature

How can I transfer the fields and attributes from a polyline feature to a polygon feature in ArcGIS 9.3?


Qgis OSM and layer projection problem

I am using QGIS 2.1.0, and trying to import my vector layer(parcels) with OpenStreetMap layer.   My vector layer (parcels) use EPSG 31277 coordinate system. This is the definition for EPSG 31277:               (+proj=tmerc +lat_0=0 +lon_0=21 +k=0.9999 +x_0=7500000 +y_0=0 +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +units=m +no_defs)      OpenStreetMap layer use WGS 84/Pseudo Mercator EPSG 3857. My project use WGS 84 / Pseudo Mercator EPSG 3857. In project properties I enable 'on the flay' crs transformation. The problem is that my parcels do not match with OpenStreetMap layer! The difference is about 300 m. Here is a picture that shows that. ![enter image description here](http://i.stack.imgur.com/y9dRD.jpg)


SQL questions testing pgRouting 2.0

Following the post:pgRouting 2.0 for Windows quick guide, cuz I have some problem with DB manager(here is the problem I posted:DB manager in QGIS 2.0), I skip DB manager and save the test shapefile, using SPIT load the shapefile into PostgreSQL. Then I type this SQL in pgAdmin:               alter table network.publictransport add column source integer;     alter table network.publictransport add column target integer;     select pgr_createTopology('network.publictransport', 0.0001, 'the_geom', 'gid');      and go check the table below:![enter image description here](http://i.stack.imgur.com/0y3Az.png) Then I type in this SQL as in Anita's post:               SELECT seq, id1 AS node, id2 AS edge, cost, geom     FROM pgr_dijkstra(     'SELECT id, source, target, st_length(geom) as cost FROM network.publictransport',     1, 3000, false, false     ) as di     JOIN network.publictransport pt     ON di.id2 = pt.id ;      but the message below shows: ![enter image description here](http://i.stack.imgur.com/rqixf.png) I am new to SQL, and I don't know how to modify the SQL to get the same result as in Anita's post. Please give some advice to solve this problem.


Perform "Add Join" on multiple tables ArcMap or R

The operation I want to perform is the Add join in ArcMap 10.0. It works perfectly when done with one file but I need to do it with a few hundreds tables. What I have is ONE shapefile with divisions, and multiple tables for different years/species. For each table I want to add join to the shapefile and save the result. I am trying to use model builder and the problem I have is that in the "layer name or table view" input it doesn't let me pick a shapefile unless it's loaded in the workspace. Also when I use the "copy features" to save the result of the add join to disk, it messes up the column names of the new shapefile. I also don't want to use the Join Field because it doesn't have the option Keep All that Add Join has. Does anybody have a solution for this? I can try in Python or R if it's needed. I am adding links to the two files table shapefile Thanks


Linear referenced data driven pages

I am trying to create a form of data driven page that incorporates linear referencing very similar to the "Linear referencing scenarios" example: ![enter image description here](http://i.stack.imgur.com/xwqsf.gif) I have a map that I will display on each page that shows a long polygon of a construction section for a pipeline. However, I just want the map to show the base imagery layer and the polygon. The linear referenced data needs to be displayed outside the map area in an abstract manner much the same as the example, almost like a table underneath the map. If one were to take a straight edge and draw a vertical line on the page through the table, one would be able to determine each of the variables in question. (I keep thinking of the London Underground example, considering how the diagram shows a straight horizontal line where in reality it twists and turns) I have eleven such routes (variables) to display for each page which shows about 8 km of the pipeline. (in the example, it would be accidents, lanes, material, speed, and quality). Seven of my routes are line referenced and 4 are point referenced. The line data are such things as political districts, or construction segments, etc. and the point data is road and stream crossings, etc. I feel certain that someone must have paved the way in this area before. I am not the first person mapping multiple pages and multiple variables. With data driven pages, in order to display some variable data on the page, you have to select one of the data driven page attributes. So I am thinking this route data has to be incorporated into my data driven page centers table. I understand how routes work when drawn on a single map, but am not sure how to make the leap to data driven pages with linear referencing and dynamic segmentation, or how to abstract it outside the map, yet retain the linear horizontal reference of the map. (I have 60 pages to map) How do I incorporate these routes and their linear referenced data into a data driven page? I am running ArcMap 10.2.


I need to find the longest string of ALL cells in a table. Unfortunately, the table can have varying number of fields each time. This need to be a generic function. Any leads please?


Combining edits from multiple Geodatabases into a Master Geodatabase

Is there a way to automate combining edits from multiple, single project geodatabases into a master geodatabase based off the date the edits were made without creating duplicated of the same project data in the master (based on project name)? Edit: So I am just trying to combine daily edits from around 20 projects with their own personal geodatabases into a master personal geodatabase which holds info from around 200 projects. I am thinking of making a master csv that I update daily with with which projects I have edited that day and trying to make a tool that just pulls that day's edits and updates the master personal geodatabase with the new info. No SDE just good ol' fashioned personal geodatabases. Using ArcMap and ArcCatalog.


Interpolation with netcdf4 file

I have a netcdf4 data set that contains array and information about latitude and longitude which can be accessed with the following R command:               ncvar_get(dataname, 'lon');     ncvar_get(dataname, 'lat');      where               dataname <- nc_open(paste(filename,".nc",sep=""))      I have another file containing the location (with latitude and longitude also) of the grid contained in `dataname`. I'd like to implement interpolation (spline, kriging, etc.) using these two files but can't find any tutorial which is clear about the subject. Could anyone guide me? (package that should be used, I have seen `gstat` and `gam` but examples provided are far away similar to what I want to do, practical implementation) Thanks in advance.


Geometry Projection Speed Test

Lately I've been using the OGR projection classes that come with ogr/gdal, but pyproj was recommended to me, so I thought I'd give it a try. To help me decide if I should make the switch, I did a speed test. The following is a small (almost) reproducible example that I came up with to test the two. I'm not sure if this test is totally fair, so comments and recommendations are welcome! Imports first, to make sure we start off with a level playing field:               from pandas import Series # This is what our geometries are stored in     from shapely import wkb     import functools     from shapely.geometry import shape     from osgeo import ogr     # The following two imports are the important ones     from pyproj import Proj, transform     from osgeo.osr import SpatialReference, CoordinateTransformation      Because I'm storing the shapely geometries in a pandas 'Series', the functions need to work with `Series.apply()`. Here I define two functions (one using 'ogr.osr' and one using 'pyproj') to perform coordinate transformations inside a call to `Series.apply()`:               def transform_osr(geoms, origin, target):         target_crs = SpatialReference()         target_crs.ImportFromEPSG(origin)         origin_crs = SpatialReference()         origin_crs.ImportFromEPSG(origin)         transformer = CoordinateTransformation(origin_crs, target_crs)         def trans(geom):             g = ogr.CreateGeometryFromWkb(geom.wkb)             if g.Transform(transformer):                 raise Exception("Ahhhh!")             g = wkb.loads(g.ExportToWkb())             return g         return geoms.apply(trans)          def transform_pyproj(geoms, origin, target):         target = Proj(init="epsg:%s" % target)         origin = Proj(init="epsg:%s" % origin)         transformer = functools.partial(transform, origin, target)         def trans(geom):             interface = geom.__geo_interface__             geom_type = interface['type']             coords = interface['coordinates']             result = apply_to_coord_pairs(transformer, coords)             return shape({'coordinates':result, 'type':geom_type})         def apply_to_coord_pairs(fun, geom):             return [not all([hasattr(y, "__iter__") for y in x]) and \                     fun(*x) or apply_to_coord_pairs(fun, x) for x in geom]         return geoms.apply(trans)      Each of these functions takes an EPSG code as input for the origin and destination coordinate reference systems. Both libraries offer alternative ways to define projection information, but EPSG codes keeps the code pretty simple for now. Here are the results, using the `%timeit` magic function in ipython:               In [1]: %timeit transform_pyproj(l, 29903, 4326)     1 loops, best of 3: 641 ms per loop          In [2]: %timeit transform_osr(l, 29903, 4326)     10 loops, best of 3: 27.4 ms per loop      Clearly the 'ogr.osr' version is faster, but is it a fair comparison? The 'pyproj' version is done on individual points, and is mostly run in Python, whereas the 'ogr.osr' version operates directly on the OGR geometry object. Is there a better way to compare these?


Geoprocessor object won't execute

I've tried several different approaches to getting the simple geoprocessing package that I created to execute from my C# project . . .                       ESRI.ArcGIS.Client.Tasks.Geoprocessor _localGPService = null;             string gpkPath = ConfigurationManager.AppSettings["EsriRuntimeGeoPackageLocation"];             string geoObjectPath = ConfigurationManager.AppSettings["EsriRuntimeGeoProcessorObject"];         LocalGeoprocessingService.GetServiceAsync(gpkPath, GPServiceType.Execute, (gpService) =>         {             if (gpService.Error != null)             {              MessageBox.Show(gpService.Error.Message);             }             _localGPService = new ESRI.ArcGIS.Client.Tasks.Geoprocessor(gpService.UrlGeoprocessingService + geoObjectPath);             DataContext = this;          });         List<ESRI.ArcGIS.Client.Tasks.GPParameter> parameters = new List<ESRI.ArcGIS.Client.Tasks.GPParameter>();         _localGPService.ExecuteAsync(parameters);      I've also tried the following . . .                private LocalGeoprocessingService _localGPService = null;         string gpkPath = ConfigurationManager.AppSettings["EsriRuntimeGeoPackageLocation"];         _localGPService = new LocalGeoprocessingService(gpkPath, GPServiceType.Execute);              _localGPService.StartAsync((callback) =>         {             if (callback.Error == null)             {                 CoverButton.IsEnabled = true;             }             else             {                 MessageBox.Show("Error starting gp service");             }         });         string geoObjectPath = ConfigurationManager.AppSettings["EsriRuntimeGeoProcessorObject"];         ESRI.ArcGIS.Client.Tasks.Geoprocessor gp = new ESRI.ArcGIS.Client.Tasks.Geoprocessor(_localGPService.UrlGeoprocessingService + geoObjectPath);        List<ESRI.ArcGIS.Client.Tasks.GPParameter> parameters = new List<ESRI.ArcGIS.Client.Tasks.GPParameter>();        gp.ExecuteAsync(parameters);      When it gets to the last line (execute), I don't get an error, but it also doesn't do anything. I've been tracing through the code, and the geoprocessor object does get created and invoked with a URL, so I don't know why it does nothing. Tracing through, it appears as if everything is OK. The tool that the gpk was created from runs OK when I execute it in ArcMap. Any ideas as to what might cause this? I just don't know what to look for anymore. Thanks!


How can I open georeferenced ArcMap raster files in Qgis?

How can I open georeferenced arcmap raster files in Qgis?


How to optimise and speed up Python code?

Again my lines of surface runoff... I made a script, solving the issue when lines cross other lines. Something like generalization. Like on the picture below. The problem is that I have to solve 30 million. of these lines. I tested it on 20 000 lines and time needed to run was 2h 30 min. So approximately, if I will do it for whole 30 million lines, the time needed to run is 5 - 6 months. Eh! I am a beginner to Python scripting and I know that this question is almost spam, but I appreciate any advice or tips like how I can adjust my script to run it faster. I'm using Python 2.7.3, ArcGIS 10.2 and Windows 7. I put my script here: ![enter image description here](http://i.stack.imgur.com/4k1EG.png) '               #IMPORT MODULES, SETTINGS         # ##############################################################################     import arcpy, datetime     start = datetime.datetime.now()     arcpy.env.overwriteOutput = True     arcpy.env.workspace = r"C:\Users\david\Desktop\GAEC\TEST\TEST1.gdb"          # DEFINITION OF VARIABLES     # ##############################################################################     OL = "OL"                             # LAYER WITH LINES     OL_FC = "in_memory" + "\\" + "OL_FC"     OL_buff = "in_memory" + "\\" + "OL_buff"     memOne = "in_memory" + "\\" + "OL_one"     memSelect = "in_memory" + "\\" + "memSelect"     memErase = "in_memory" + "\\" + "OL_erase"     memOut = "in_memory" + "\\" + "OL_out"     memOutTemp = "in_memory" + "\\" + "OL_outTemp"     memDissolve = "in_memory" + "\\" + "memDissolve"     memSplit = "in_memory" + "\\" + "memSplit"     memUnsplit = "in_memory" + "\\" + "memUnsplit"     OL_final = "OL_final"          # TESTING AND CREATING FIELDS IN ATRB TABLE, CALCULATING LENGTH     # ##############################################################################     if len(arcpy.ListFields(OL, "LENGTH")) > 0:         print "Table already has a field LENGTH!..."     else:         arcpy.AddField_management(OL, "LENGTH", "LONG")         print "Missinf field LENGTH -> creating..."     arcpy.CalculateField_management(OL, "LENGTH",  "!shape.length!", "PYTHON")     print "Calculate length for lines..."          if len(arcpy.ListFields(OL, "EDIT")) > 0:         print "Table already has a field EDIT!..."         arcpy.DeleteField_management(OL, "EDIT")         arcpy.AddField_management(OL, "EDIT", "SHORT")     else:         arcpy.AddField_management(OL, "EDIT", "SHORT")         print "Missinf field EDIT -> creating..."          arcpy.MakeFeatureLayer_management(OL, OL_FC)     rows = arcpy.SearchCursor(OL_FC)     sql = '"LENGTH" < ' + str(10)     lengths = list()     lengths0 = list()     i = 1     a = -1          # CYCLE WHICH MAKE LIST OF LENGHTS, USED FOR NUMBER OF LINES (CYCLES)     # ##############################################################################     for row in rows:         x = row.getValue("LENGTH")         lengths.append(x)          # WHOLE PROGRAMM CYCLE     # ##############################################################################     for q in (lengths):         # COUNTING LENGTHS FOR LINES, NEED TO BE UPDATED CAUSE LENGHTS ARE CHANGING         rows0 = arcpy.SearchCursor(OL_FC)         for row0 in rows0:             x0 = row0.getValue("LENGTH")             lengths0.append(x0)             lengths0.sort()         # ##########################################################################         leng = lengths0[a]         # SELECTION OF ACTUAL LONGEST LINE, STARTS FROM END OF THE LIST AND DESCENDING         sql1 = '"LENGTH" = ' + str(leng)         arcpy.SelectLayerByAttribute_management(OL_FC, "NEW_SELECTION", sql1)         # ##########################################################################         curA = arcpy.SearchCursor(OL_FC)         for rowA in curA:             # TESTING IF LINE WAS EDITED BEFORE (IF YES, FIELD 'EDIT' = 1, THEN SKIP)             test0 = rowA.getValue("EDIT")             if test0 != 1:             # ######################################################################                 arcpy.MakeFeatureLayer_management(OL_FC, memOne)                 print "Line exported into independently layer"                 arcpy.Buffer_analysis(memOne, OL_buff, "1.3 Meters")                 print "Created buffer around the line"                 arcpy.SelectLayerByLocation_management(OL_FC, "INTERSECT", OL_buff, "", "NEW_SELECTION")                 curAA = arcpy.UpdateCursor(OL_FC)                 for w2 in curAA:                     # FILLING FIELD EDIT WITH 1, SETTING FIELD LENGTH TO 0                     # ##############################################################                     w2.setValue("EDIT", 1)                     w2.setValue("LENGTH", 0)                     curAA.updateRow(w2)                 arcpy.MakeFeatureLayer_management(OL_FC, memSelect)                 print "Exporting affected lines"                 test = int(arcpy.GetCount_management(OL_FC)[0])                 # TESTING IF LINE TOUCHES AT LEAST ONE ANOTHER LINE, IF NO, SKIP                 # ##################################################################                 if test != 1:                     arcpy.Dissolve_management(memSelect, memDissolve)                     arcpy.Erase_analysis(memDissolve, OL_buff, memErase)                     arcpy.SplitLine_management(memErase, memSplit)                     arcpy.UnsplitLine_management(memSplit, memUnsplit)                     arcpy.Merge_management([memUnsplit, memJedna], memOut)                     print "Merge with original line (which buffer erases)"                     arcpy.Snap_edit(memOut, [[memOne, "EDGE", "1.4 Meters"]])                     print "LINES ARE SNAPPED TO ORIGINAL LINES"                     # DELETING LINES THAT ARE SHORTER THAN 10 M                     # ##############################################################                     arcpy.MakeFeatureLayer_management(memOut, memOutTemp)                     arcpy.CalculateField_management(memOutTemp, "LENGTH",  "!shape.length!", "PYTHON")                     arcpy.SelectLayerByAttribute_management(memOutTemp, "NEW_SELECTION", sql)                     arcpy.DeleteFeatures_management(memOutTemp)                     print "Lines shorter than 10 m deleted"                     # FIRST CYCLE CREATES OL_finan, AFTER LINES ARE APPENDING TO FINAL                     # ##############################################################                     if i == 1:                         arcpy.CopyFeatures_management(memOutTemp, OL_final)                     else:                         arcpy.Append_management(memOutTemp, OL_final)                         print "New layer is append to layer before"                 # LINES WITHOUT CROSSING ANY OTHER LINE                 # ##################################################################                 else:                     for w2 in curAA:                         w2.setValue("EDIT", 1)                         w2.setValue("LENGTH", 0)                         arcpy.Append_management(OL_FC, OL_final)                         curAA.updateRow(w2)                     print "Standalone line appends to final layer"                 print "Imputed i, i = " + str(i) + "..."         # DELETE RAM MEMORY         # ##############################################################         arcpy.Delete_management("in_memory")         # IMPUTED TO NEXT CYCLE         # ##########################################################################         i+=1         a-=1          # DELETE ASSISTANT FILEDS     # ##############################################################     arcpy.DeleteField_management(memOutTemp, "LENGTH")     arcpy.DeleteField_management(memOutTemp, "EDIT")          # ENDING OF TIMER     # ##############################################################################     end = datetime.datetime.now()     print "\nStart: " + start.strftime("%Y-%m-%d %H:%M:%S")     print "End of script: " + end.strftime("%Y-%m-%d %H:%M:%S")


Show different marker for cluster and icon for single vector features in OpenLayers

I have a vector layer which is geoJSON file containing school points and their attributes,to visualize this i defined cluster and show circle which size is based on the number of features it contains. Whenever the zoom level reaches individual schools, i need to display symbol of school. In style, i can define the size of cluster using the pointRadius property, and show icon using the externalGraphic property. i need to use both at once i.e use rendering as circle if cluster is more than one and render as icon in individual feautures. How can i do this?


Python: 'Select by Attribute' in ArcMap 10

I would like to get the search the field value               'SURFACE LOCATION%' in column 'RefName' in layer '*.dwg Annotation'      This is what I have so far...               # Find the Dataframe     df = arcpy.mapping.ListDataFrames(mxd, "Project Area")[0]          #Find the table named "*.dwg Annotation"     Table = arcpy.mapping.ListLayers(mxd, "*.dwg Annotation", df)[0]          whereClause = """RefName" LIKE 'SURFACE LOCATION%'""" % RefName          Anno = arcpy.SelectLayerByAttribute_management(AnnoTable, "NEW_SELECTION", whereClause)      Right now "Table" outputs the group layer name and the layer name. However The link below shows that the the file path of the layer to work with SelectByAttribute. http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001700000071000000 Thoughts on how to get the file path of the layer? and many thanks.


Is there a way to prevent labels from being on top of everything else?

I'm having a problem in `QGIS 1.7.4`. The labels I have produced for one layer are overlapping an entirely different layer that has a higher precedence. This should not happen. Am I doing something wrong or is this a bug? And just to make sure my question was clear, I'm asking if there is a way to prevent labels from being on top of everything else regardless of layer order


Load shape file with different FTypes into a GDB Feature class with different sub types

I have a contour shape file with different FTypes (FTYPE_CODE) data type is text my task is to load this contours shape file into a GDB Feature class (Contour50K) with different sub types (FeatureCode). I just started to explore FME by downloading the trial version. **Kindly help**. Regards, Kiran


Multicriteria Analysis : how to?

I have to do a multi-criteria analysis to answer the question : "which is the best lot to develop". A few of the criterias are :   * distance of the nearest bus stop (point layer with bus stops)   * distance of the nearest shop (point layer with shops)   * what is the flood danger (polygon layer, with danger grade attribute from 1 to 4)   * is the lot in a nature-protection area (polygon layer)   * is the owner already planning something on his lot (manual entered information in the lot's attributes) and so on... I thought I'd give it a try with QGIS, and here's how I've done :   1. add the following columns in my lots layer attributes table :     * "analysis_BUS"     * "analysis_SHOPS"     * "analysis_FLOOD"     * "analysis_PROJECT"     * "..."     * "analysis_MEAN"   2. Convert my lots layer to points using "polygons to centroids"   3. Run the "distance matrix" tool   4. Open the CSV to run an operation in excel (bus stop grade is 1.0 if nearer than 200m, and 0.0 if more than 750m, but I coulnt find the MIN() function in QGIS)   5. Join the resulting CSV back in QGIS   6. Repeat the same for shops   7. Run the "point in polygon" tool to select all the points in nature-protection area   8. Set 0.0 to all selected points   9. Repeat for other "in ... area" criterias   10. Run the "spatial join" tool to merge flood danger area information   11. Run a calculation using the column calculator to have the mean grade (using determined factors for each criteria)   12. Once all that done, re add the BUILDING LOTS shapefile once for each criteria   13. For each criteria, join the converted layer (that one with the centroids) on the LOT id   14. Set the display to a gradient from red to green according to the corresponding criteria attribute and the mean grade attribute VOILA, after a good 2 days of work, i now have all my criterias displying in green if good choice for building, and red if bad choice, and I have my synthesis which aggregates all my criterias in one beautiful red-green map. (and I also have a huge mess in my "shapefiles" folder) Now the problem. What if :   * i'd like to try the same analysis with another bus network scenario ?   * i receive an updated lots shapefile (with, let's say, 13 modification in all the 13000 lots)   * i'd like to test different weights for my criterias ? **Do I have to start all over again ?** **Am I correctly using the wrong tool, or am I using the correct tool wrong ?** **Would it be easier with a commercial GIS software ?** Many thanks for any hint or suggestion about how to improve that ;) * * * ### Update Thanks for your answers ! I see what you mean, and i didn't really think of using rasters. However, the main question was more about the ability to try different scenarios or update the base data without having to restart all the process from scratch. It seems that your suggestions are not much more flexible than what I suggested (even maybe more complex) since you have news steps : - (for each criteria) rasterization. - (in the end) sampling (quite complex if you want to include partial overlaps) Maybe I was just having a dream about a modern, interactive and user friendly GIS where in fact the actual state of the art in GIS software is archaic. > Input your punched card in a machine, machine outputs another punched card. > Repeat. > > Don't make any mistake ! Don't mix up your cards ! Write down every single > step to do it again in some weeks. Be absolutely sure of what you want to > obtain before even starting the process. (and optionally buy thick glasses, > a white shirt with short sleeves and under-sized trousers) ;) * * * and thanks again for new answers ! That Sextante Model builder seems awesome; in fact I was exactly thinking at something like that when posting my last comment. I've used Grasshopper3D quite alot (it has nothing to do with GIS software) which is a great plugin for the Rhino3D modeler and which uses the same concept of node graph workflow construction. (example : http://designreform.net/2009/07/rhino-grasshopper-parametric-truss ) This seems so well adapted to a lot of GIS data analysis that I'd love to see a GIS software really built around such a node graph tool. I'm looking forward to try Sextante Modeler and let you know how it worked out. Thanks again and sorry if my last post sounded rude ! (and i wish i had found about it by myself by googling it, but i didn't know the keyword "model builder")


using google maps, the mouse cursor and the dot on the map not inline

i'm trying to implement the example http://openlayers.org/dev/examples/drag- feature.html . When i'm implementing this with a Google map, I have a strange bug: the mouse pointer and the dot on the map are not in the same place. Now if I change the line that in bold: map.addLayers([gmap,vectors]); to map.addLayers([wms,vectors]); everything works. (in other words I dont use google maps). Can someone tell me what is happening? Thanks in advance. Here is my page and code:               <title>OpenLayers: Google Layer Example</title>
OpenLayers: Google Layer Example


Is it possible to sort an arcpy.da.UpdateCursor()

I have an arcpy data access update cursor that I would like to sort before making updates to. The cursor makes updates if I don't sort but if I add a sort to the cursor I get an error, "iteration not started." The sort is working correctly but it must be busting the cursor for some reason. Is it not possible to sort an update cursor like a search cursor? Does it change the type or something? Thanks                   idList = ['100100', '100200', '100300', 200100']         count = 0         with arcpy.da.UpdateCursor(newFC, ("SHAPE@X", "SHAPE@Y", "Label")) as addLabelCursor:                         for row in sorted(addLabelCursor, key=itemgetter(0), reverse = True):                  print idList[count]                 row[2] = str(idList[count])                 addLabelCursor.updateRow(row)                 count += 1


MultiPolygon from database

I would like to know how to create an instance of a Multipoint from a PostGIS database.. I do the query , then got the ResultSet named "area" , the column with MultiPolygon attributes is named "geom" so i do the following:               MultiPolygon m = (MultiPolygon)area.getObject("geom");      xD forced cast Doesn't work though! :\ Anyone? Thanks


JP2 fails to open in QGIS and GDAL

I am trying to open a JP2 file in QGIS and it fails, and I'd appreciate any advice to try and track down the cause of the issue, be it with my system or with the file itself. The file is a HiRISE image of Gale Crater on Mars, and is available here: http://hirise- pds.lpl.arizona.edu/download/PDS/RDR/ESP/ORB_032400_032499/ESP_032436_1755/ESP_032436_1755_COLOR.JP2 On my ageing MacBook running QGIS 1.8.0 and GDAL 1.9.2 on Mac OS 10.7.5 the file does open in QGIS, but gdal can't deal with it...               $ gdalinfo ESP_032436_1755_COLOR.JP2     ERROR 4: `ESP_032436_1755_COLOR.JP2' not recognized as a supported file format.      I could use the file using QGIS on that machine, but I'd rather use my new laptop which runs GDAL 1.9.0 and QGIS 2.1.0-Master on Ubuntu 13.04 (I installed the Master version because of difficulties installing QGIS 1.8 on Ubuntu 13.04, perhaps the release of 2.0 will have fixed those issues). On this machine if I try to open the file in QGIS it freezes for 2-3 minutes, then QGIS crashes and closes with no error messages. gdalinfo works a little...               $ gdalinfo ESP_032436_1755_COLOR.JP2     Driver: JPEG2000/JPEG-2000 part 1 (ISO/IEC 15444-1)     Files: ESP_032436_1755_COLOR.JP2            ESP_032436_1755_COLOR.JP2.aux.xml     Size is 9679, 44908     Coordinate System is:     PROJCS["Equirectangular MARS",         GEOGCS["GCS_MARS",             DATUM["unknown",                 SPHEROID["unnamed",3396190,0]],             PRIMEM["Greenwich",0],             UNIT["degree",0.0174532925199433]],         PROJECTION["Equirectangular"],         PARAMETER["latitude_of_origin",0],         PARAMETER["central_meridian",180],         PARAMETER["standard_parallel_1",0],         PARAMETER["false_easting",0],         PARAMETER["false_northing",0],         UNIT["metre",1,             AUTHORITY["EPSG","9001"]]]     Origin = (-2523306.125000000000000,-268608.875000000000000)     Pixel Size = (0.250000000000000,-0.250000000000000)     Corner Coordinates:     Upper Left  (-2523306.125, -268608.875) (137d25'49.08"E,  4d31'53.74"S)     Lower Left  (-2523306.125, -279835.875) (137d25'49.08"E,  4d43'15.60"S)     Upper Right (-2520886.375, -268608.875) (137d28'16.04"E,  4d31'53.74"S)     Lower Right (-2520886.375, -279835.875) (137d28'16.04"E,  4d43'15.60"S)     Center      (-2522096.250, -274222.375) (137d27' 2.56"E,  4d37'34.67"S)     Killed      The system freezes for 2-3 minutes between the "Center" line and the "Killed" line. I've also tried using gdal_translate to convert the JP2 to a tif image, but with similar results. Any ideas?


QGIS mapserver - fails to display some raster images

QGIS 2.0.1 running on Linux, with mapserve support. Randomly, it seems, some raster images simply fail to display. No errors, just no image (well actually the mapserve returns a blank white image). I've tried with both ECW and TIF formats; some load, some don't (it's always the same ones that will or won't load). The map files (and their associated images) load fine in the desktop version of QGIS. The image files aren't particularly big - less then 30 MB for the ECWs, and under 100MB for the TIFs


An error has occured while executing Python code while doing home range analysis (Qgis 1.8.0)

It keeps appearing:               Traceback (most recent call last):       File "C:/Users/Worten/.qgis//python/plugins\HomeRange_plugin\HRplugin_dialog.py", line 80, in          QObject.connect(self.buttonBox, SIGNAL("accepted()"), lambda mth=mth: self.run(mth))       File "C:/Users/Worten/.qgis//python/plugins\HomeRange_plugin\HRplugin_dialog.py", line 186, in run         if not robjects.r.require(i)[0]:     NameError: global name 'robjects' is not defined          Python version:     2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)]               QGIS version:     1.8.0-Lisboa Lisboa, 6416f38          Python path: ['C:\\Users\\Worten\\.qgis\\python\\plugins\\GeoCoding',      'C:\\Users\\Worten\\.qgis\\python\\plugins\\GeoCoding',      'C:\\Users\\Worten\\.qgis\\python\\plugins\\elevation',      'C:/OSGeo4W/apps/qgis/./python',      'C:/Users/Worten/.qgis//python',      'C:/Users/Worten/.qgis//python/plugins',      'C:/OSGeo4W/apps/qgis/./python/plugins',      'C:\\Windows\\system32\\python27.zip',      'C:\\OSGeo4W\\apps\\Python27\\DLLs',      'C:\\OSGeo4W\\apps\\Python27\\lib',      'C:\\OSGeo4W\\apps\\Python27\\lib\\plat-win',      'C:\\OSGeo4W\\apps\\Python27\\lib\\lib-tk',      'C:\\OSGeo4W\\apps\\qgis\\bin',      'C:\\OSGeo4W\\apps\\Python27',      'C:\\OSGeo4W\\apps\\Python27\\lib\\site-packages',      'C:\\OSGeo4W\\apps\\Python27\\lib\\site-packages\\PIL',      'C:\\OSGeo4W\\apps\\Python27\\lib\\site-packages\\win32',      'C:\\OSGeo4W\\apps\\Python27\\lib\\site-packages\\win32\\lib',      'C:\\OSGeo4W\\apps\\Python27\\lib\\site-packages\\Pythonwin',      'C:\\OSGeo4W\\apps\\Python27\\lib\\site-packages\\wx-2.8-msw-unicode',      '.',      'C:\\Users\\Worten\\.qgis\\python\\plugins\\ziplayers\\logic',      'C:\\Users\\Worten\\.qgis\\python\\plugins\\ziplayers\\gui',      'C:\\OSGeo4W\\apps\\qgis\\python\\plugins\\fTools\\tools',      'C:/Users/Worten/Desktop/Relatorio Anual 2012 - 2 de Mar\xc3\xa7o - 30 de Julho']      Please help. Thanks, João


osm2po vs osm2pgrouting: workshop pgRouting

As osm2po was a more reliable way to convert an .osm I went for that solution to load my date in postgres. In the workshop however the author points out to check the result after osm2pgrouting. The following tables must be created: "classes"   "geometry_columns" "nodes"   "spatial_ref_sys" "types"   "vertices_tmp"   "vertices_tmp_id_seq" "ways" After the sql (generated from osm2po) has run, only the tables "geometry_columns" and "spatial_ref_sys" are created. How do I fix this difference?   Is osm2po incomplete? Did something go wrong? Can anyone point me in a better direction? Thanks alot!


Error creating a spatial database. ERROR : could not load library "/usr/pgsql-9.1/lib/rtpostgis-2.0.so"

I am running `PostgreSQL 9.1` with `Postgis 2.0` on `Fedora 15`. When trying to install the raster support,               psql -d mydb -f rtpostgis.sql -v ON_ERROR_STOP=1      I get the following error               psql:rtpostgis.sql:46: ERROR:            could not load library "/usr/pgsql-9.1/lib/rtpostgis-2.0.so": libhdf5.so.6:           cannot open shared object file: No such file or directory      A `locate libhdf5.so.6` gives the following paths.               /usr/lib64/mpich2/lib/libhdf5.so.6     /usr/lib64/mpich2/lib/libhdf5.so.6.0.4      Reinstalling the `GDAL` from the repositories did not solve the problem. The version of the installed `GDAL`.               gdal.x86_64                                1.7.3-14.fc15                @updates


Can I increase the number of processes in ArcGis Server 10.1?

I use ArcMap 10.1. I have a map with many Mosaic and Raster layers. They are stored in many gdb-s. I publish this map with option "Create tiles on demand". But this tiles are created very slowly (may be 2 minutes!!!). How increase the number of processes in arcgis server, which created this cache? P.S. I know that ArcMap use only one сore. But maybe ArcGis server can use more cores? _**Update_** Thanks. I have the same problem. I set 24 cores. But CPU usages between 10-14%


Script to extract UTM Zone using Range and Meridian information

* * * Hi Everyone, I am looking for a phython or php script that will accept the Range and Meridian values of a location and use it to identify the UTM zone. I have a table that comprises of Easting, Northing, Range and Meridian but im missing the UTM zones of these points. I am able to manually identify the UTM zone knowing the range and Meridian of the location. I wish to automate this by using a python script that will scan in these parameters as variables and extract the UTM zones based on the parameters. Can someone please help me out! It will really be exciting to achieve this as i really need to get it going , its so clumsy having to go through thousands of point data to this manually. Thanks for your most valued input! * * *               Meridian      Range      UTM Zone             W1M           1 to  30   14             W2M           1 to  30   13             W3M           1 to  15   13                               16 to 30   12                  W4M           1  to 30   12             W5M           1  to 30   11      Every data collected is described by a combination of meridian and range value. e.g NW-05-046-06-W4M to NW-05-046-05-W5M.


External hyperlinks to control Openlayers map

I have a basic map defined like show below (pseudo code). After the map.addLayers call there is a displayData(theid) which I want to call from the main body of the html document, the problem is I can't call the method. I can achieve what I am after if I bind an onclick event to the id of the  tag but there's going to be too many links to bind to each and every  tag Clicking on one of the hyperlinks below results in no method displayData() defined. Thanks for reading!

View on map
View on map
View on map
View on map