title: Open source solutions for Landsat-8 mosaicing and correction?

text: I am familiar with the major commercial remote sensing packages (ENVI, IDRISI ERDAS, etc), but I haven't previously had the opportunity to utilize open- source solutions. I have a several new Landsat-8 images that I would like to mosaic for both simple display and analysis (land cover classification). Is there a go-to open source software for this, or are there many options? A tutorial would also be excellent.


title: Should We Be Using a GIS?

text: I'm actually a graphic designer - the manufacturing company I work for wants to develop a map with layers for Regional Sales Managers territories, Internal Sales Associates territories, Local Rep territories - each with accompanying contact info. Our product is essentially specialized plumbing products, so we'd like a map layer displaying plumbing code territories, and another layer for Authorities Having Jurisdiction (the people responsible for determining plumbing codes, reviewing/planning projects). So there's going to be a several layers describing territories, likely a few layers with point locations, and a fair amount of related contact information, plumbing codes, etc. I'm also working on setting up some interactive web pages which will feed information into a database for easy retrieval of select info for customers visiting our website and/or integration into the maps we develop. We're trying to figure out which mapping software and DBMS to use. My supervisor started up a trial run using ArcGIS a few months ago, and I've been fooling around with MySQL for a database, which I have up and running (albeit a very simple test version). I've been looking at some other online mapping programs like Geometrx, eSpatial, build-a-map - not true GIS. I also fooled around with QGIS a bit, and while its definitely capable of everything we'd like to do, its seems like something geared more for a GIS expert - and doesn't have some of the basemaps readily accessible with ArcGIS like population density, vector based county and city boundary maps - I'm sure they exist, but I'd have to hunt them down/purchase them separately or create them from scratch. So my real questions here are: Are we on the right track if we go with ArcGIS and a MySQL database? Is there a better mapping program to use for our particular needs? Are we better off keeping our database and maps separate, and manually updating one when the other changes? This is essentially a request for consultation! I'm having a hard time finding someone knowledgable within this realm that doesn't have a vested interest in pushing their own particular software solution. If anyone reading this is or wants to be a consultant, or knows one that we should be talking to, please let us know!


title: CMYK Lines and Fills in QGIS

text: In QGIS, you can apply CMYK to text, using the CMYK sliders palette. However, I can only find an RGB colour picker for lines and fills. Is there a way to apply CMYK to these elements? Thanks. Sean.


title: How to change the projection of a UTM-georeferenced raster in Quantum?

text: I have a project file in Quantum which contains some shapefiles and rasters that are properly georeferenced. However, I have started using GeoTiffs which are in UTM - WGS84 that don't seem to be projecting properly. When I import the GeoTiffs, Quantum reads their X,Y (Eastings, Northings) coordinates like they were lat,lon. How can I convert these X,Y values into lat,lon coordinates? I have set all the layers in the project file to the same coordinate system and I have also enabled on the fly CRS transofrmation to no avail. Thanks for you help!


title: Why is the plugin list so short?

text: i have installed QGIS with GRASS and QDAL complete... I followed the instructions for additional QDAL configuration (adding usr/bin to the QDAL path). When i try to "fetch plugins" my list is short and does not include geocoding. I have downloaded a plugin from the main repository but it sits on my desktop undetected by QGIS How do i access these plugins?


title: Alignment/Projection issue when opening a shapefile in ArcMap that was created from DotSpatial code

text: I have a number of Polyline and Point features stored in a SQL Server 2012 database. I am using a website with C# and DotSpatial to create and export a shapefile of any one of these features successfully, however when I import the file into ArcMap, the points are mis-projected onto the map (they are all about 6.6 miles to the northwest of where they should be, to be exact). I have checked some of the individual points by converting them to lat/lon, and they are exactly what they should be. I've checked the shapefile's projection information (NAD83 State Plane Oklahoma North feet), and it looks good:               PROJCS["NAD_1983_StatePlane_Oklahoma_North_FIPS_3501_Feet",     GEOGCS["GCS_North_American_1983",     DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],     PRIMEM["Greenwich",0.0],     UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],     PARAMETER["False_Easting",1968500.0],PARAMETER["False_Northing",0.0],     PARAMETER["Central_Meridian",-98.0],     PARAMETER["Standard_Parallel_1",35.56666666666667],     PARAMETER["Standard_Parallel_2",36.76666666666667],     PARAMETER["Latitude_Of_Origin",35.0],UNIT["Foot_US",0.3048006096012192]]      I have a different shapefile of the same points that was created using a different third-party tool that is displaying in ArcMap correctly. I've checked the projection information for both files and they both have the above projection information. Any ideas as to why they aren't projecting right in ArcMap? It seems like the projection may just not be working at all, and not have to do with the specific State Plane coordinate system, because when I use WGS 84 I still have the same problem. Here is the C# code I use for exporting the shapefile. Thanks!               var featureSet = new FeatureSet(FeatureType.Point);     var dt = _dataAccessLayer.GetTableByFeature(shapeFileName);          // Copy all of the columns from the database table to the feature set     for (int colIdx = 0; colIdx < dt.Columns.Count; colIdx++)     {         var col = dt.Columns[colIdx];         featureSet.DataTable.Columns.Add(new DataColumn(col.ColumnName,              col.DataType));     }          int rowIndex = 0;     foreach (DataRow row in dt.Rows)     {         // Convert the projection from Spherical Mercator to          //   NAD1983 State Plane Oklahoma North (feet)         var vertices = new double[2];         vertices[0] = Convert.ToDouble(row[COL_X_COORD]);         vertices[1] = Convert.ToDouble(row[COL_Y_COORD]);         var z = new double[1];              Reproject.ReprojectPoints(vertices, z, KnownCoordinateSystems             .Projected.WorldSpheroid.Mercatorsphere, KnownCoordinateSystems.Projected             .StatePlaneNad1983Feet.NAD1983StatePlaneOklahomaNorthFIPS3501Feet, 0, 1);         featureSet.AddFeature(new Feature(new Coordinate(vertices[0], vertices[1])));              // Add the rest of the attributes to the feature set         for (int colIdx = 0; colIdx < dt.Columns.Count - colOffset; colIdx++)         {             featureSet.DataTable.Rows[rowIndex][colIdx] = row[colIdx + colOffset];         }         rowIndex++;     }          featureSet.Projection = KnownCoordinateSystems.Projected         .StatePlaneNad1983Feet.NAD1983StatePlaneOklahomaNorthFIPS3501Feet;     featureSet.SaveAs(shapefilePath + shapeFileName, true);


title: Point shapefile is not displaying.

text: I have created a point shapefile in ArcGIS 10.0 that has a geographic projection, but it will not display/draw. When I view the properties it has no "extent" information. Is this the problem? Thanks in advance!


title: ArcGIS JS Modular Feature Layers? Possible?

text: My ultimate goal is a map which can toggle the visibility of layers on an ArcGIS map. However the data I need to use is not available as a feature service, I have to build it programatically from feature collections. I want to make AMD modules that will return FeatureLayers to a script that is in control of the map. I also want the FeatureLayers to contain events. Does anyone have any advice on how to accomplish this? Can I setup the events and map markers without access to the map object? Maybe pass the map object to the FeatureLayer constructor? Any advice is greatly appreciated. EDIT: This is what the code that calls my modules looks like.               require(["dojo/parser", "dojo/_base/array", "dojo/request", "dojox/layout/TableContainer", "dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dijit/layout/AccordionContainer", "esri/map", "esri/layers/FeatureLayer",                  "esri/dijit/Popup", "esri/tasks/query", "dgrid/Grid", "dojo/json", "js/cbibsModule", "dojo/domReady!"],                        function (parser, array, request, TableContainer, BorderContainer, ContentPane, AccordionContainer, map, FeatureLayer, Popup, query, Grid, JSON, cbibsModule) {                     function init(){                         _map = new map("mapDiv", {                           basemap: "oceans",                           center: [-77.0357, 38.7877],                           zoom: 7                         });                         var cbibs = new cbibsModule();                         var fl = cbibs.requestCBIBS(_map);                         console.log(_map);                     }                     dojo.ready(init);                   }                 )      `cbibs.requestCBIBS(_map)` should not only return a Feature Layer object, but should also pass the `_map` variable by reference so the Feature Layer can attach events to it. This is not working. I don't get any errors but the map does not display. **UPDATE: This is my updated code but my markers are still not drawing on the map, nor am I getting any errors. I build the Graphic objects in a module and return them in an array. I then add them to the Graphics Layer and add it to the Map (at least I think that's what's going on). Any suggestions??**                         function (parser, ready, array, request, TableContainer, BorderContainer, ContentPane, AccordionContainer, map, GraphicsLayer, Popup, query, Grid, JSON, cbibsGfxModule, crwoModule) {                 var Map, gfxLayer;                 function init(){                     Map = new map("mapDiv", {                       basemap: "oceans",                       center: [-77.0357, 38.7877],                       zoom: 7                     }),                     dojo.connect(Map, "onLoad", addGraphics);                 };                      function addGraphics(){                     gfxLayer = new esri.layers.GraphicsLayer();                     var gfxContainer = []; // Store array returned by cbibsGfxModule.getAllCurrentReadings()                     var cbibs = new cbibsGfxModule();                     gfxContainer = cbibs.getAllCurrentReadings();                     array.forEach (gfxContainer, function (item, i) {                        gfxLayer.graphics.push(item);                      });                                         Map.addLayer(gfxLayer);                     console.log(Map);                 };               dojo.ready(init);               }


title: How to generate overlapping polygons from lines output from Table To Ellipse tool?

text: I have a feature class of line-based ellipses generated by the **Table to Ellipse** tool that looks like this: ![enter image description here](http://i.stack.imgur.com/6PgKe.png)   What I want is polygons of the individual ellipses, however tools like **Feature to Polygon** will create a polygon for every intersection. My solution to this right now is a **Search Cursor** in Python that makes a layer from each line ellipse and then runs the **Feature to Polygon** tool on that layer. This is extremely slow and means I have a feature dataset with hundreds (soon to be thousands) of individual polygon feature classes in it instead of one file. I saw from this question that there is a Python package, _Shapely_, that might run much faster than the arcpy tool in a loop. I can't believe, however, that there isn't some way to do this in ArcGIS. Can anyone think of a better solution?


title: Buffer in QGIS/R is 650-670 m wide instead of 500 m

text: I am trying to make a 500 m buffer for my polyline layer. Unexpectedly, I receive buffer varying from 650 to 670 m, depending on location. As many resources recommend to use UTM before making a buffer, I use UTM projection for zone 31N - EPSG:23031 - ED50 / UTM zone 31N (actually, the layer is already provided in this CRS). Whole polyline layer is located in Catalunya (SE Spain). Even the buffers placed near in the very SE of Spain, which is right in the middle of the zone 31N (where no distortion should happen), are 650 m! ![enter image description here](http://i.stack.imgur.com/VF9gC.png) PS: I did this in QGIS and also in my script in R, receiving exactly the same result in both cases. ## EDIT: using QGIS measure line tool (View > Measure > Measure line) ![enter image description here](http://i.stack.imgur.com/Lir9i.jpg)


title: Migration from ArcSDE (SQL Server) to PostGIS (PostgreSQL)

text: We've got all the geospatial information of our company within an ArcSDE Database (over SQL Server):   * points (locations of the antennas),    * lines (elevation, rivers),    * polygons (protected areas, houses).  We consume these data with ArcGIS Desktop and with ArcGIS Server. We are planning to migrate all the information to PostGIS (over PostgreSQL), and wonder if there is any documentation/webpage to follow some steps, and some considerations to keep in mind. Is it very hard to export the Data Model? I've been investigating and been doing some tests with GDAL-Python scripts to read from SDE and write into PostGIS, but any experience will be appreciated. By the way, we plan to consume the information from PostGIS with ArcGIS Desktop (along with QGIS) and GeoServer. Thank you very much in advance.


title: Adding Layer in current session using ARCPY

text: I wanted to add a layer through the toolbox using arcpy. The below script works fine through the python console in ArcMap, but does not when executed through the toolbox. The layer flashes for a second in the layer management window and disappears. This looks very unlikely and I am not able to figure out how it could not work in the toolbox. Let me know if I had missed something.               import arcpy     mxd = arcpy.mapping.MapDocument("CURRENT")     df = arcpy.mapping.ListDataFrames(mxd, "*")[0]     sourceLayer = arcpy.mapping.Layer('C:/WIP/Shape files/KARTHIK.TEST_TABLE.lyr')     arcpy.mapping.AddLayer(df,sourceLayer,"TOP")     arcpy.RefreshActiveView()


title: How to upload shapefile to PostGIS using cURL and GeoServer REST API

text: The GeoServer REST API docs here does not detail how to do this. I'd like to create a PostGIS table and corresponding featureType in GeoServer using the REST API, without having to chain requests. For now I can upload a shapefile to geosever, but not to PostGIS. I can also create a PostGIS data store in a separate request. Unfortunately, its not possible to use an existing PostGIS data store when uploading a new shapefile. Anyone with experience on how to achieve, please assist.


title: Debugging CalculateField_management ERROR 000623: Invalid value type for parameter field?

text: I am trying to select records in my table that have certain words in the "Name" field and then code them as 0 (not pharmacy) or 1 (pharmacy) This is just a test searching for two words to select non-pharmacies. I am getting a: > ExecuteError: ERROR 000622: Failed to execute (Calculate Field). Parameters > are not valid. ERROR 000623: Invalid value type for parameter field. I don't know which variable is invalid. Any thoughts? I also do not know if the Calculate Field will work on only the records selected. I cannot get far enough to check that.               # import system modules     import arcpy     import random          # set workspace environment     myWorkspace = arcpy.env.workspace = "C:/PharmacyProtocol/tables"     arcpy.env.overwriteOutput = True          # set variables     out_table = "VT_TRL_DLC.dbf"          # set field variables     fieldList = arcpy.ListFields(out_table)          for field in fieldList:         if field.name == "Name":             nameF = field         elif field.name == "Pharmacy":             pharmF = field          #create list of words that are NOT pharmacies     noPharmWords = ['AMERICAN LEGION','BAR']          expression = 0          #find words in Name field, code Pharmacy as "0" if not already coded     for codeWord in noPharmWords:          #create SQL text clause     fldName = '"Name"'     endClause = "%'"     SQLstr = fldName + " LIKE '%" + codeWord + endClause          #select records from table with codeWord     cursor = arcpy.da.SearchCursor(out_table, ["Name"], SQLstr)          arcpy.CalculateField_management(out_table, pharmF, expression)          del cursor


title: how to increase request feature speed?

text: I use Geoserver with Oracle DB. Amount of records in DB is less than 4000, but feature request takes 5-6 seconds. How can I speed up this? P.S. Native JAI is false in my Geoserver **UPDATE:** I have view which joins two tables. int view sdo.geometry is polygon with 12 points. when I open it from layer preview from there is takes from 5 to 6 seconds. **UPDATE 2** I removed view and joins and it works great. I had to copy columns from one table to another for reading directly from table all fields. If someone knows solution when using views or joins please share :) Thanks.


title: nx_spatial does not read all shapefile features

text: I have a polyline shapefile for a road network. The roads are split at every intersection (node), e.g. if two roads intersect at one point, then they are split into four links(edges). So using the attribute table of the shapefile, I know this shapefile has 600 edges. But when the shapefile is read in `nx_spatial`, total edges found is only 497. I would like to know why it is missing other 103 road links (edges). Thanks               import nx_spatial as ns          roads = ns.read_shp(path)   #path = path to polyline shapefile     roads.number_of_edges()     #output = 497      Hope these info helps: Windows7, Python 2.7 Anaconda 64bit, Eclipse. The problem is related to nx_spatial. But I could not create such tag for low reputation.


title: How to set pen width of rivers based on scalerank attribute (QGis 2.2)?

text: I have a Vectorlayer from NaturalEarth.com with riverdata that includes "scalerank" information. Now I want to display these with different pen width based on their scalerank, like this: scalerank 1 = 0,5 mm pen width scalerank 2 = 0,3 mm and so on. I guess you do this in the Layer Properties. I selected the "Simple Line" and opened the "data defined properties". Here I selected "pen width" to the left, under "field" i selected "scalerank" and then I don´t know how to build the expression. Were my steps even correct up to this point? It would be really great if someone could describe in detail how I would proceed or point me towards a simple guide for beginners. I already read through the "Symbology" and "Classification" Chapter of the Training manual but they focus on the fill element there :(


title: Entity Framework 6 and ST_Geometry column type

text: I have ArcSDE 9.3 database and I'm trying to use EF6 with it. When I generate the model from database, I get the following message:               The data type 'st_geometry' is currently not supported for the target .NET Framework version; the column 'SHAPE' in table '...' was excluded.      But the thing is, I need to save SHAPE column with all other attributes. Is there a way to make Entity Framework save st_geometry/SHAPE columns?


title: How to Create site cells sectors in MapBasic for over 1000 records

text: I am new to mapbasic and i need to learn to create the cells of a site in MapInfo using the Mapbasic if any one can help me thanks in advance i Used the bellow script i found in the Web, and it was for only single site I made automated it to do from xls table, but it still very slow for only 500 record, and there is other issue, I don't know how to attach the table records for each sector to the plotted object so i can see the site information using the Info tool in MapInfo and i wanted the sector length and the Pen & brush to be depending on specific record on the table               SUB CreatePie(x as Float,y as Float,Brg as float,Ang as float,Dst as float,aBrush as brush,aPen as Pen)     dim sAng as float     dim eAng as float     dim Cntr as integer     dim NewArc as Object     dim Pnts as integer     dim IncVal as float     dim rTemp as float     dim DMS as float     dim aRow as float     dim cnvt as float             Set ProgressBars OFF       '>>>> SET DISTANCE UNIT TO uDIST > "mi" "km" "m" "ft"       Set Distance Units "km"       Set Map Distance Units "km"         Set Map Area Units "sq km"                                 DO CASE uDist         CASE "km"           cnvt=1         CASE "mi"           cnvt=1.609344         case "m"           cnvt=0.001         case "ft"           cnvt=0.000305       END CASE       Dst=Dst*cnvt     'note dst+" "+uDist            '>>>> CREATE A TEMP TABLE TO BUILD OBJECTS <<<<       Trash=ApplicationDirectory$()+"temp.tab"       Create Table Temp (id Char(10)) file Trash TYPE NATIVE Charset "WindowsLatin1"       Create Map For temp CoordSys Earth Projection 1, 0                      if Ang=-1  then ''' OMNI-DIRECTIONAL         aObj=CreateCircle(x,y,Dst)         Alter Object aObj Info Obj_Info_Brush , aBrush         Alter Object aObj Info Obj_Info_Pen , aPen         insert into Cosmetic1 (Obj) Values (aObj)         exit sub       else         sAng=brg-(Ang/2)         eAng=Brg+(Ang/2)       end if            while sAng<0         sAng=sAng+360       wend       while sAng>360         sAng=sAng-360       wend       while eAng<0         eAng=eAng+360       wend       while eAng>360         eAng=eAng-360       wend       Pnts=Fix(Ang)                 if Pnts=0 then              NOTE "CAN NOT HAVE '0' BeamWidth [points]"         exit sub       End IF       IncVal=Ang/Pnts       rTemp=0       DMS=sAng            Call CalcLine(x,y,sAng,Dst)       insert into Temp (obj) values (aobj)       Create PLine into Variable NewArc 0       Alter Object NewArc NODE Add (sx ,sy)       DMS=DMS+IncVal       do         Call CalcLine(x,y,DMS,Dst)         Alter Object NewArc NODE Add (sx ,sy)         rTemp=rTemp+IncVal         DMS=DMS+IncVal       Loop Until rTemp>=Ang       insert into Temp (obj) values (NewArc)       Create Line into variable aObj (x,y) (sx,sy)       insert into Temp (obj) values (aObj)       select * from Temp into Sel       Objects Combine       fetch last from Temp       aObj=Temp.obj       aObj=ConvertToRegion(aObj)       Alter Object aObj Info Obj_Info_Brush , aBrush       Alter Object aObj Info Obj_Info_Pen , aPen       insert into CellLayer (Obj) Values (aObj)       Drop Table Temp       Set ProgressBars ON               END SUB          '=====================================================================================================================          SUB CalcLine(cx as float, cy as Float, degree as float, fLength as float)            define DegDist 111.3216 '' Km a zero lat per lon       define deg2Rad 0.01745329252       define rad2deg 57.29577951          dim x, y as Float            while Degree>360  ''' make bearing 0 to 359.999999999------         Degree=Degree-360       wend       while Degree<0         Degree=Degree+360       wend       if Degree=0 or Degree=360 then         Y = CY + ( ( (cos(Degree * Deg2Rad) * fLength)  / DegDist ) )         X = CX       elseif (Degree > 0) and (Degree < 90) then         Y = CY + ( ( (cos(Degree * Deg2Rad) * fLength)  / DegDist ) )         X = CX + ( ( (sin(Degree * Deg2Rad) * fLength)  /(DegDist * cos(cy*Deg2Rad))) )       elseif (Degree = 90) then         Y = CY          X = CX + ( ( (sin(Degree * Deg2Rad) * fLength)  /(DegDist * cos(cy*Deg2Rad))) )       elseif (Degree > 90) and (Degree < 180) then         Y = CY + ( ( (cos(Degree * Deg2Rad) * fLength)  / DegDist ) )         X = CX + ( ( (sin(Degree * Deg2Rad) * fLength)  /(DegDist * cos(cy*Deg2Rad))) )       elseif (Degree = 180) then         Y = CY + ( ( (cos(Degree * Deg2Rad) * fLength)  / DegDist ) )         X = CX       elseif (Degree > 180) and (Degree < 270) then         Y = CY + ( ( (cos(Degree * Deg2Rad) * fLength)  / DegDist ))         X = CX + ( ( (sin(Degree * Deg2Rad) * fLength)  /(DegDist * cos(cy*Deg2Rad))) )       elseif (Degree = 270) then         Y = CY         X = CX + ( ( (sin(Degree * Deg2Rad) * fLength)  /(DegDist * cos(cy*Deg2Rad))) )       elseif (Degree > 270) and (Degree < 360) then         Y = CY + ( ( (cos(Degree * Deg2Rad) * fLength)  / DegDist ) )         X = CX + ( ( (sin(Degree * Deg2Rad) * fLength)  /(DegDist * cos(cy*Deg2Rad))) )       end if            aObj=CreateLine(cx,cy,x,y)       sx=x       sy=y     END SUB     ===================================================================


title: ArcGIS JS API Polygon's WKID conversion with gsvc.project

text: I'm trying to convert polygon from wkid 3301 to wkid 4326. I've been using this code snippet for converting points, but I'm not sure how I would accomplish this to create a polygon object. I'm not even sure if gsvc.project() is the best solution. Any suggestions would be appreciated.               dojo.require("esri.tasks.geometry");     var outSR = new esri.SpatialReference({ wkid: 4326 });     mapHandler.gsvc.project([ geometry ], outSR, function(projectedPoints) {         pt = projectedPoints[0];     });


title: Why are there changes in location when printing inserted points?

text: Añadí una capa de texto delimitado por comas y luego agregue una imagen satelital de google earth. Realizo un diseño de impresión y al imprimir cambia la ubicación de los puntos en varios metros. Cual es la solucion? **(Edit)** Google Translation: I added a layer of comma delimited text then added a satellite image from Google Earth. I do a print design and during printing the locations of the points change by several meters. What is the solution?


title: How to debug QGIS Server WMS "Download of capabilities failed"?

text: Currently I am using a QGIS server with a linux Centos system. I am attempting the create a WMS in QGIS and upload it to my website. I have followed the instructions in the "Quantium GIS User Guide: version 1.7.0 Wroclaw" . I am trying to call the newly created WMS in QGIS by "Add Layer(s) from a server" button. I am very certain I am entering the correct address but I always get this error below               Could not understand the response. The wms provider said:     Download of capabilities failed: Error downloading          http://***************/cgi-bin/projects/qgismapserv.fcgi?SERVICE=WMS&REQUEST;=GetCapabilities     Server replied Internal Server Error      Thank you for your time and consideration.


title: How to efficiently check for feature overlaps with Arcpy?

text: In an effort to reduce processing time, I am looking for ways to pre-process data within my script. I have ~18,000 featureclasses with ~500 features each (all simple circle polygons) from which I want to eliminate coastal land area (another simplified polygon) using the Erase function. My idea for reducing overall processing time is to check for overlap between each feature class and the coastline polygon. If there _is_ overlap, the script should erase the land from the features. If there is _no_ overlap, the script should move on, and look at the next feature class. ## Specific questions:   1. What is the most efficient, Pythonic way to say "if there is overlap, do XX?" I cannot find documentation to do something similar to "if Overlap == True" besides the method: MakeFeatureLayer-->SelectFeatureByLocation-->CopyFeature-->GetRowCount--> if RowCount>0   2. Would this actually reduce processing time or am I crazy? I'm working locally on my machine, running the script in IDLE, with ArcGIS 10.1 (with all licenses) on a 32-bit Windows 7, 3.33GHz Intel DuoCore, 4GB RAM computer. Thanks for your input.


title: Python comtypes and ArcObjects: Snippets GetApp() fails at 10.2

text: I have been experimenting with Python's comtypes module to access ArcObjects. We are still using ArcGIS 10.0 as we are in the process of upgrading our ArcGIS for Server to version 10.2.2. I am currently running ArcGIS desktop version 10.0 and have a VM with 10.2 installed for testing. Anyways, the following from the Snippets module works to access an open mxd in version 10.0, but fails in 10.2:               def GetApp(app="ArcMap"):         import arcpy         """app must be 'ArcMap' (default) or 'ArcCatalog'\n\         Execute GetDesktopModules() first"""         if not (app == "ArcMap" or app == "ArcCatalog"):             print "app must be 'ArcMap' or 'ArcCatalog'"             return None         import comtypes.gen.esriFramework as esriFramework         import comtypes.gen.esriArcMapUI as esriArcMapUI         import comtypes.gen.esriCatalogUI as esriCatalogUI         pAppROT = NewObj(esriFramework.AppROT, esriFramework.IAppROT)         iCount = pAppROT.Count         if iCount == 0:             return None         for i in range(iCount):             pApp = pAppROT.Item(i)             print pApp             if app == "ArcCatalog":                 if CType(pApp, esriCatalogUI.IGxApplication):                     return pApp                 continue             if CType(pApp, esriArcMapUI.IMxApplication):                 return pApp         return None      In 10.2, I get the following error message:               Traceback (most recent call last):       File "\\arcserver1\GIS\_Resources\ESRI\Python\BMI_Library\bmi_arcobjects\_snippets.py", line 264, in <module>         GetApp()       File "\\arcserver1\GIS\_Resources\ESRI\Python\BMI_Library\bmi_arcobjects\_snippets.py", line 86, in GetApp         pAppROT = NewObj(esriFramework.AppROT, esriFramework.IAppROT)       File "\\arcserver1\GIS\_Resources\ESRI\Python\BMI_Library\bmi_arcobjects\_snippets.py", line 128, in NewObj         ptr = CreateObject(COMClass, interface=COMInterface)       File "\\arcserver1\GIS\_Resources\ESRI\Python\BMI_Library\comtypes\client\__init__.py", line 235, in CreateObject         obj = comtypes.CoCreateInstance(clsid, clsctx=clsctx, interface=interface)       File "\\arcserver1\GIS\_Resources\ESRI\Python\BMI_Library\comtypes\__init__.py", line 1145, in CoCreateInstance         _ole32.CoCreateInstance(byref(clsid), punkouter, clsctx, byref(iid), byref(p))       File "_ctypes/callproc.c", line 936, in GetResult     WindowsError: [Error -2147221164] Class not registered      I thought this may be an issue with versions since in the gen folder all wrappers ended with "_10_0". Everyone's sys.path has access to the same comtypes which is on our server, so I blew away all the modules in the gen folder and called the following function to load all esri modules to ensure I was getting the most up to date wrappers:               def load_all():         '''loads all object libraries'''         from comtypes.client import GetModule         mods = glob.glob(os.path.join(GetLibPath(), '*.olb'))         for mod in mods:             GetModule(mod)         return      This loaded everything, and I still get that same error when running at 10.2. I saw this post with a similar problem but the solution did not work for me: Python, comtypes and ArcObjects: Error creating AppROT object Has anyone else had this problem? If so, how did you alter the GetApp() function. Thanks.


title: When would a PostGIS geometry compare using ~= return true when ST_Equals returns false?

text: I have a couple of featureclasses in a 10.2 geodatabase/PostgreSQL 9.2.2 database and I've been struggling with the FeatureCompare tool--it is telling me geometries are different on some features where I know them to be at least spatially equal. Luckily, I have an ID and I could join between the 2 tables in PGAdmin and compare geometry. The `~=` opreator and the ST_Equals both return true for every row. Then I modified 1 feature by moving 1 vertex 800 ft to the South. When I run my query, ST_Equals returns false which is what I expect. But `~=` still returns true??? Why is that?               select t1.shape,t2.shape ,(t1.shape ~= t2.shape) as exactequal , ST_Equals(t1.shape , t2.shape) spatialequal, (t1.shape = t2.shape) bndequal     from  pg.Test1 t1     inner join pt.Bnd2 t2     on t1.polygon_id=t2.polygon_id     where t1.objectid = 6389      ![enter image description here](http://i.stack.imgur.com/h2kXo.png) I trying to figure out if this is a bug or if I'm misunderstanding the operators. _"PostgreSQL 9.2.2, compiled by Visual C++ build 1600, 64-bit"   "POSTGIS="2.0.4" GEOS="3.4.2-CAPI-1.8.2 r0" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.10.0, released 2013/04/24"_


title: What's the most appropriate tool(set) for creating a community map?

text: When you move to a new place, it's very useful to have maps tailored to your interests available at the click of a mouse or tap of a smart phone. The following projects are great examples of more personal local maps:   * Map of independent bookshops (seemingly a dying breed) at the national level   * Map of independent shops in Peterborough:    * Best of all, the 'urbal map' of a wide range of urban features and activities, based in Leeds. These resources are fantastic, adding independence and providing a counter to the homogeneity of massive worldwide maps such as Google and Bing. The question is: how best to implement this on a small scale for a local organisation? For example maps are needed to locate fruit trees for an urban agriculture project such as abundance. The criteria are as follows:   * Low price or free   * User friendly, allowing more than 1 person to contribute   * Scalable   * (preferable but not essential) levels of security so sensitive information is only viewable by some people The options I have considered for such a tasks, along with +s and -s are:   * QGIS Cloud: + works on very accessible GIS, free. - seemed glitchy, not necessarily user friendly or easy to add new features for new users   * Create geojson files and serve them from Github, using OpenLayers on the client side to process the files, allowing different layers to be added/removed (I have actually experimented with this on, adding a couple of shop polygons not yet on OSM or Google Maps) + simple, lightweight and free, - not user friendly - must edit geojson files externally   * Geoserver: I've used this before, and enjoyed it until AWS, my remote server, started charging me + scalable, user interface, security levels - potential costs, - overkill for a small project.   * MapQuest Open + uses pre-existing OSM data, - seemed limited in terms of functionality Which of these would you recommend? Have I missed any better options from the list? And how should I organize different tools to work harmoniously together in the final solution? Will try to keep people updated with progress on this as I think there is a real need for development of interactive local and community maps.


title: Cause of ExecuteError: ERROR 999999: Error executing function from Spatial Join?

text: I'm trying to use the spatial join to append rows to my target feature from my join feature. Here's my code:               #import the module     import arcpy     from arcpy.sa import *     from arcpy import env     env.overwriteOutput = True          #set the workspace     arcpy.env.workspace = r"C:\Users\Windows\Documents\JO_GIS_Analyst"          #Adding the municipality to the attribute table     for fc in arcpy.ListFeatureClasses("reclassnofptphil_onlyreprojected_2014121_geog*"):         print fc #checking of feature classes         outputFeature = "withjoin" + fc # specify output feature         arcpy.SpatialJoin_analysis(fc, "PHL_adm2_UTM.shp", outputFeature)               print "Finish"      I'm getting an error of:               Traceback (most recent call last):     File "C:\Users\Windows\Dropbox\Python Scripts\batch_convert_raster_to_polygon.py", line 71, in <module>     arcpy.SpatialJoin_analysis(fc, "PHL_adm2_UTM.shp", outputFeature)     File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\analysis.py", line 481, in SpatialJoin     raise e     ExecuteError: ERROR 999999: Error executing function.     Item not found in this collection.     Failed to execute (SpatialJoin).      Here is the ouput of the print statement:                reclassnofptphil_onlyreprojected_2014121_geog.shp      Actually I'm doing a loop for six files only, since I'm just using my sample files to test my code.


title: How to Add OSM Layer to QGIS

text: **How can i add OSM layer in QGIS?** The help says there is an OSM plugin i can use. But i don't see it the list of plugins. ![enter image description here](http://i.stack.imgur.com/XEi4F.png) **Or maybe there is a WMS URL for OSM i can use?** > QGIS version 1.7.0-Wroclaw on Windows 7 64bit


title: ArcSDE Best Practices; Your thoughts

text: After spending a little time Googling for ArcSDE management best practices, I came up empty handed. I have a good understanding of Spatial Databases and their management having implemented several large scale Oracle Spatial databases, but wanted to get your thoughts on practices or patterns one should adhere to make their life easier, and their spatial holdings usable and secure. My Question is, what practices do you employ on your ArcSDE database to ensure integrity, security, and consistency of your ArSDE Instance? **`****`EDIT`*****`** What design goals do you aim for when planning your ArcSDE instance and why? They are broad questions, and the answer can change significantly with the size, requirements and scope of the implementation, but I would like to gauge the interest in a community based guide for this topic. **`********`** Thank you. (Sorry if this is redundant, I could not find anything specifically on Best Practices)


title: drawToolbar is undefined

text:
I keep receiving the error "drawToolbar is undefined" when I click a button to enable the Draw Toolbar from the ArcGIS JavaScript API. I also have the navTool bar in the map so as I understand I need to make sure that only one toolbar is active at a time. My HTML and JavaScript code are in separate files so I will split them up below. HTML (excerpt):
Click for XY
      Javascript: dojo.require("esri.map"); //dojo.require("esri.dijit.Legend"); //dojo.require("esri.dijit.OverviewMap"); dojo.require("esri.toolbars.navigation"); dojo.require("esri.arcgis.utils"); dojo.require("esri.dijit.BasemapGallery"); //dojo.require("esri.virtualearth.VETiledLayer"); dojo.require("esri.toolbars.draw");                   setConfigProperties();              var map, navToolbar, symbol, geomtask, visible = [];         var drawToolbar;         var gsvc = null;           var pt = null;                function init(){             var layersLoaded = 0;  //variable to keep track of when all layers have been loaded.             var loading = dojo.byId("loadingImg");  //loading image. id             var initialExtent = startExtent;  //Extent values are in config.js.             map = new esri.Map("map", {                 extent: initialExtent, logo:false             });                  gsvc = new esri.tasks.GeometryService("http://dal-gisweb/ArcGIS/rest/services/Geometry/GeometryServer");                  dojo.connect(map, "onLoad", showLoading);             dojo.connect(map, "onZoomStart", showLoading);             dojo.connect(map, "onPanStart", showLoading);             dojo.connect(map, 'onLoad', function(map){                 dojo.connect(dijit.byId('map'), 'resize', resizeMap);             dojo.connect(map, "onLoad", createdrawToolbar);             //dojo.connect(map, "onClick", projectToLatLong);             });                  function showLoading() {               esri.show(loading);               //map.disableMapNavigation();               //map.hideZoomSlider();             }                  function hideLoading(error){                 layersLoaded++;                 if (layersLoaded === map.layerIds.length) {                     esri.hide(loading);                     //map.enableMapNavigation();                     //map.showZoomSlider();                     layersLoaded = 0;                 }             }                  //Set up the TOC for initial map load.             //Use the ImageParameters to set the visible layers in the map service during ArcGISDynamicMapServiceLayer construction.             var imageParameters = new esri.layers.ImageParameters();             imageParameters.layerIds = initialLayers;             imageParameters.layerOption = esri.layers.ImageParameters.LAYER_OPTION_SHOW;             //can also be: LAYER_OPTION_EXCLUDE, LAYER_OPTION_HIDE, LAYER_OPTION_INCLUDE                  //The path to the services are located in the config.js.             basemap = new esri.layers.ArcGISTiledMapServiceLayer(basemapservice);             //oppllayer = new esri.layers.ArcGISDynamicMapServiceLayer(opplservice);             dynamicLayer = new esri.layers.ArcGISDynamicMapServiceLayer(dynamicservice, {"imageParameters":imageParameters});                  dojo.connect(map, 'onLayersAddResult', function(results){                 //add the legend                          var legend = new esri.dijit.Legend({                             map: map,                             layerInfos: [{                                 layer: dynamicLayer,                                 title: "Crosstex"                             }],                             arrangement: esri.dijit.Legend.ALIGN_Left                         }, "legendDiv");                         legend.startup();                     });                     dynamicLayer.setOpacity(0.8);                     map.addLayer(basemap);                     dojo.connect(basemap, "onUpdateEnd", hideLoading);                     map.addLayer(dynamicLayer);                     dojo.connect(dynamicLayer, "onUpdateEnd", hideLoading);                               //Add the ArcGIS BaseMap Gallery.                     createBasemapGallery();                     dojo.connect(dijit.byId('map'), 'resize', resizeMap);                               function resizeMap(){                         //resize the map when the browser resizes - view the 'Resizing and repositioning the map' section in                         //the following help topic for more details http://help.esri.com/EN/webapi/javascript/arcgis/help/jshelp_start.htm#jshelp/inside_guidelines.htm                         var resizeTimer;                         dojo.connect(map, 'onLoad', function(theMap){                             dojo.connect(dijit.byId('map'), 'resize', function(){ //resize the map if the div is resized                                 clearTimeout(resizeTimer);                                 resizeTimer = setTimeout(function(){                                     map.resize();                                     map.reposition();                                 }, 500);                             });                         });                     }                     navToolbar = new esri.toolbars.Navigation(map);                     dojo.connect(navToolbar, "onExtentHistoryChange", extentHistoryChangeHandler);                          //set position of the zoom slider at X pixels offset from left/bottom of map                     esriConfig.defaults.map.slider = { left:"10px", top:"35px", width:null, height:"200px" };                 }                  function extentHistoryChangeHandler() {             dijit.byId("zoomprev").disabled = navToolbar.isFirstExtent();             dijit.byId("zoomnext").disabled = navToolbar.isLastExtent();           }     //Sets up the ability for dynamic layers to be toggled.             function updatedynamicLayerVisibility(){                 var inputs = dojo.query(".list_item"), input;                 //Placing layer numbers below will enforce them to be visible.                 visible = [];                 for (var i = 0, il = inputs.length; i < il; i++) {                     if (inputs[i].checked) {                         visible.push(inputs[i].id);                     }                 }                 dynamicLayer.setVisibleLayers(visible);                  }     //Sets up the ability for OPPL layers to be toggled.             function updateOPPLLayerVisibility(){                 var inputs = dojo.query(".list_item"), input;                 //Placing layer numbers below will enforce them to be visible.                 visible = [];                 for (var i = 0, il = inputs.length; i < il; i++) {                     if (inputs[i].checked) {                         visible.push(inputs[i].id);                     }                 }                 oppllayer.setVisibleLayers(visible);                  }              function createBasemapGallery() {                   var basemapGallery = new esri.dijit.BasemapGallery({               showArcGISBasemaps: true,               map: map             }, "basemapGallery");                  basemapGallery.startup();                  dojo.connect(basemapGallery, "onError", function(msg) {console.log(msg)});           }     //Sets up the funcions for the GoToXY         function createPoint(){             map.graphics.clear(pnt_xysym);             var infoSymbol = new esri.symbol.SimpleMarkerSymbol(esri.symbol.SimpleMarkerSymbol.STYLE_X, 15, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([0,0,0]), 2), new dojo.Color([0,255,0,1]));                      //add point using the coordinates fromt he form below.            var pnt_X = document.getElementById("frm_X").value;            var pnt_Y = document.getElementById("frm_Y").value;            var pnt_xy = new esri.geometry.Point(pnt_X, pnt_Y, map.spatialReference);                 var pnt_xysym = new esri.Graphic(esri.geometry.geographicToWebMercator(pnt_xy), infoSymbol);                 map.graphics.add(pnt_xysym);            map.centerAndZoom(esri.geometry.geographicToWebMercator(pnt_xy), map.getLevel()+1);                 }           //Create the drawing toolbar.           function createdrawToolbar(map) {                  drawToolbar = new esri.toolbars.Draw(map);             //drawToolbar.activate(esri.toolbars.Draw.POINT);             dojo.connect(drawToolbar, "onDrawEnd", addToMap);                }                function addToMap(geometry) {           map.graphics.clear();           drawToolbar.deactivate();           map.showZoomSlider();            switch (geometry.type) {               case "point":                 var symbol = new esri.symbol.SimpleMarkerSymbol(esri.symbol.SimpleMarkerSymbol.STYLE_X, 10, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255,0,0]), 2), new dojo.Color([0,255,0,1]));                  }                  var graphic = new esri.Graphic(geometry, symbol);             map.graphics.add(graphic);             projectToLatLong(geometry);           }                function projectToLatLong(evt) {             //map.graphics.clear();             var point = evt;             var outSR = new esri.SpatialReference({ wkid: 4326});                       gsvc.project([ point ], outSR, function(projectedPoints) {                   pt = projectedPoints[0];               //display list of points in extent               dojo.byId("results").innerHTML = " Lat: " + pt.y.toFixed(6) + ", Long: " + pt.x.toFixed(6);                  });           }           //Used to deactivate tools in order to enable others.           function deactAllTools() {            navToolbar.deactivate();            drawToolbar.deactivate();             }                //show map on load            dojo.addOnLoad(init);      To view this in action you can follow the link below. http://geoville.org/viewers/samplesviewer/ I appreciate the great help that this site offers. -Mike


title: How Can I get the Open Modeller plug-in for Quantum GIS 1.7.4?

text: I would appreciate if you can tell me to install the plug-in of Open Modeller in Quantum GIS 1.7.4. It is not in the list of plug-in in the spanish version of the QGIS. Thank you,


title: GIS Software Choice for a small university research centre

text: I need to choose a GIS system for a small university research centre. We are handling a broad range of data, (for example, numerical tidal analyses, weather data, poverty, isolated economic activity, skills availability and renewable energy resource availability) and operate primarily in countries with relatively poor existing data sets. We interact with other groups, some of which use ARCGIS. Do I have to wade through every GIS software descriptor on the web, or can someone please give an indication of likely candidates?


title: How to dynamically view Python script results in ArcMap?

text: I want to view the output of arcpy scripts (run in Python IDLE) in ArcMap. I tried refreshing the ArcMap data frame after I run the script. This does not work. Please advice me on this.


title: API to suggest nearby streets

text: For an app I'm developing, I want to use the phone's GPS to locate it. I then want it to list streets that are nearby. The customer might be in his back garden for example, and this may be closer to another street, but not be the street he actually lives on. I am thinking, I can ask the API several times and skew the coordinates slightly in each request. But that might be expensive in money and time. Is there an API that can do such a thing in one request?


title: How to add GDAL Programs folder to ~/.bash_profile

text: I have recently installed on Mac OS X Lion 10.7.4 the GDAL Framework 1.9 with Python bindings from [http://www.kyngchaos.com/software:frameworks][1]. I need to add the following Programs folder to my ~/.bash_profile as described in the ReadMe file: `export PATH=/Library/Frameworks/GDAL.framework/Programs:$PATH` This is what's currently on my ~/.bash_profile:               # Setting PATH for Python 2.7     # The orginal version is saved in .bash_profile.pysave     PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"     export PATH      What is the right syntax for adding the new path? I am new with everything (Mac, Python and GDAL) so please excuse me if I wasn't clear. Many Thanks Andrea


title: Error transforming EPSG:4326 to EPSG:90013

text: When I'm trying to run a map on geomajas an error has occurred: > o.g.internal.service.GeoServiceImpl - Problem during transformation > EPSG:4326->EPSG:900913 of MULTIPOLYGON The multipolygon coordinates are x = -170 and y = -85.0511... .


title: Creating points on multiple lines

text: How would I create points along a line on multiple lines? We are mapping our vineyards, and in some cases the rows are straight, and parallel. So for example, I've got 86 rows, and each row has 93 vines. How do I first create the 86 rows without having to copy parallel every time, and then how do I create the 93 vines along each one of those rows without needing to construct points every time? I've been messing around, and cant figure out


title: Split Large GeoTIFF to smaller regions with python and gdal

text: I have quite a large GeoTIFF-file (compressed 50MB but unpacked 6GB) and want to split it into several smaller regional files. Therefor I am using python. As I am a new gdal user I do not really have an idea how to start. Is gdalwarp ChunkAndWarpImage the function I am looking for? And how do I apply it in python? Can I or must I define the region size? Quite a lot of questions, I hope someone can help me!


title: Issue with UpdateCursor and if/else statement

text: I have been working on this code for awhile and I can't make it work the way I need it to. The code is suppose to move a feature according to a set distance from types in a designated field. As the code is now the point features move at the angle and distance for elif Type == 'Type2': distance = .707107 in the code below. The problem might be the updateCursor or in_features causing the if statement to be ignored. I am still new to python and arcpy but I would like to get this code to work.               import arcpy, os, sys     from math import radians, sin, cos          arcpy.env.workspace = "C:/data"     arcpy.env.overwriteOutput = True          def move():         def shift_features(in_features, x_shift, y_shift):             with arcpy.da.UpdateCursor(in_features, ['SHAPE@XY']) as cursor:                 for row in cursor:                     cursor.updateRow([[row[0][0] + x_shift, row[0][1] + y_shift]])         return              infc = "Point.shp"         rows = arcpy.SearchCursor(infc)         for row in rows:             x = row.Easting             y = row.Northing             Type = row.feat_Type             if Type == 'Type1':                 distance = .3535535                   elif Type == 'Type2':                 distance = .707107                  else:                 print Type              shift_features(infc, distance * sin(radians(45)), distance * cos(radians(45)))          #Variables for creating the XY event     infc = r'Database Connections\Test.odc\Units'     x_coords = "Easting"     y_coords = "Northing"     z_coords = ""          out_Layer = "points_layer"     Saved_Layer = "Point.shp"          # Add a spatial reference to the new shapefile     prjfile = "C:/data/LocalGrid.prj"     spRef = arcpy.SpatialReference(prjfile)          # Make the XY event layer...     arcpy.MakeXYEventLayer_management(infc, x_coords, y_coords, out_Layer, spRef, z_coords)     arcpy.CopyFeatures_management(out_Layer, Saved_Layer)     move()               # Print feature count and messages     print arcpy.GetMessages()      Thanks Also I am using ArcGIS 10.2.1


title: exporting DWG from ArcMap need to unify segments to polylines

text: I am a green ArcGIS user so please bear with my poor nomenclature and rudimentary understanding of the software........ I am attempting to export to CAD a contour shapefile I have derived from LIDAR imagery. Once exported I bring the contour DWG into ArchiCAD, drag ' drop, boom it opens. All good.......except: Any curves are broken down into thousands of single small co-joined lines, and unlike Autocad I don't have an effective-efficient way to polyline edit......make continuous sections into single polylines or splines as they'd be referred to in ArchiCAD. Is there a way to set up my shapefile, edit or geoprocess it prior to export that will net me what I am after? Thanks in advance!


title: Where can I find a dataset containing locations of all USPS post offices?

text: I searched the USPS web site, queried GeoData.gov, did a general Google search and turned up nothing. I tried querying GNIS for feature type post office, but the data is listed as "entered 1993" for most entries, and just looking at some in my general vicinity I can find now-closed post-offices not listed as "historical", currently open post offices listed as "historical", and open post offices with locations listed as unknown. All in all, not a very good approach. While a national listing would be ideal, a source for just New Mexico would suffice (at least for now.)


title: Why does DC belong to Maryland in OpenStreetMap/Nominatim?

text: Don't know much about GIS. Is it common practice to consider DC part of Maryland and not a "state"? http://nominatim.openstreetmap.org/search/washington%20dc http://nominatim.openstreetmap.org/search/washington%20dc?format=json&addressdetails=1


title: Caching for dynamic layers

text: I have over 140 layers that need to appear as overlays on basemaps(Google and OSM). My users can pick and choose which layers they want to see and store them in their preferences. While we have built the solution, the performance is very slow. These layers get served with openlayers making WMS calls to GeoServer and Postgres DB. I tried using GeoWebCache and Tilecache but then realized that they are not all that helpful when I have dynamic layers. The XML definitions of what layers to cache are static. What are my options here? Is there a way to cache such combinations, or do I take a different route and investigate on HTTP caching with tools like Varnish?


title: Can PostGIS functions be written in Java?

text: I am wondering if there is a possibility of programming new functions for PostGIS using Java, so that you can refer them same way as classic PostGIS functions are. Something like this:               CREATE OR REPLACE FUNCTION public.st_line_interpolate_point(geometry, double precision)       RETURNS geometry AS     '$libdir/postgis-2.0', 'LWGEOM_line_interpolate_point'       LANGUAGE c IMMUTABLE STRICT       COST 1;      I know that most of PostGIS functions are written in C however I am not very familiar with that language.


title: How to correctly resize raster GIS images to a given px width?

text: I work on ETOPO1, a 466MB file, and want to move to SRTM (~20GB Earth). My workflow involve several time-consuming processing steps so I strongly want to work on a minimum raster. It usually want to take 10.000 to 100.000px width GIS rasters to scale them down to ~1000px width, like my final map. **How to correctly resize a raster GIS file to a given width via terminal ?** (gdal prefered) It should keep negative and positive z-values with precision. * * * **Note:** I already tried the following...   * **Crop:** to crop my area of insterest using `gdal_translate -projwin $(WEST) $(NORTH) $(EAST) $(SOUTH) ETOPO1_Ice_g_geotiff.tif crop.tmp.tif`, it still give me files 50 times too big for a processing 50 times slower.   * **Early resizing:** early resizing with Imagemagick + reinjecting the GIS metadata for following processings destroys the negative values (altitudes under sea level become 0m).


title: Open source geometry service like ArcGIS?

text: Does anyone know of an open source GIS server that provide similar functionality to ArcGIS' web services server? For example, the service would provide a similar geometry service that buffers feature shapes and returns the buffered shape? Or does joins or reprojections of geometry?


title: Query for all roads and buildings in a province of Belgium_ overpass turbo

text: I am looking for a query to show all roads and buildings in the province Flemisch Brabant in Belgium. Can anyone help me?


title: Dynamically changed url in my Vector layer protocol not taken into account after refresh

text: I have a map which I try to change dynamically its url when the user clicks a radio button. Here is my code :               var refreshLayer = new OpenLayers.Strategy.Refresh({ force: true, active: true });     var fromProjection = new OpenLayers.Projection("EPSG:4326");     var toProjection = new OpenLayers.Projection("EPSG:3857");     var vectorProtocol = new OpenLayers.Protocol.HTTP({             url: '/getmaindata',             format: new OpenLayers.Format.GeoJSON({                 'internalProjection': fromProjection,                 'externalProjection': toProjection             }),             params: {                 "naf": "04"             }         });     var map = new OpenLayers.Map("map_element");     var vectorStrategies = [new OpenLayers.Strategy.Fixed(), refreshLayer];     var osmLayer = new OpenLayers.Layer.OSM();     var vectorLayer = new OpenLayers.Layer.Vector('vector_layer', {        protocol: vectorProtocol,        strategies: vectorStrategies     });          map.addLayers([osmLayer, vectorLayer]);          (...)          // $radio is my radiobutton     $radio.onclick = function() {           vectorProtocol.url = "/getouterdata";           refreshLayer.refresh({force: true});     });      When I debug with Firebug, I notice that the url is correctly changed in my layer's protocol object. However, what is called is the previous url (/getmaindata) instead of the new one (/getouterdata). So I was asking myself if there was something I did wrong. When is the new url called ? Is it by calling the refresh() method of my Strategy.Refresh ? Or somewhere else ? Maybe the old url is cached ?


title: Issues at reprojecting coordinates using gdalwarp and OpenLayers

text: I have an interpolated raster image with EPSG:27700 (British National Grid), after I warp it using gdalwarp into EPSG:3857 (WGS84 Web Mercator (Auxiliary Sphere)):               gdalwarp -s_srs EPSG:27700 -t_srs EPSG:3857 input.tif output.tif      which works fine (GDAL 1.10.1), (including a little bit of twisting (black cells) in the output one which is understandable as I guess there must be a little bit of distortion). Then, if I create a Web Map Service (wms) in Geoserver using the output file as datastore, when I display the wms in a web page, by using OpenLayers and Google Maps as background, the image is not perfectly located, as it is misplaced about 90-100 meters LEFT where it should be in the British National Grid projection. My question is whether gdalwarp does not the right transformation and/or OpenLayers does its best and does not adjust it, or it is definitely impossible to transform 27700 into 3857 accurately.


title: Why does Openlayers plugin crash QGIS 1.7.4?

text: When I open the openlayers plugin my qgis 1.7.4 crashes. I use Win7. I'm using the CRS Google Mercator and QGIS crashes. However, I've install the QGIS 1.9.90 and the plugin works in this version... but... There are always a but... the Google Satellite images don't adjust with my shapefiles. It's a strange behaviour... Any suggestion to solve this?


title: QGIS system architecture

text: I'd like to develop a simple spatial system with database for plotting and managing geographic features.I thought I should install on an ubuntu server:   1. qgis server   2. postgreSQL   3. postGIS and write python qt modules to access the data from android devices and desktop PCs. Could helpful people let me know if I'm on the right track? Thanks Mini


title: How to overlay my interpolation within the boundaries of Quebec?

text: I am trying to create interpolated maps within geographical borders. I have the coordinates and values to the points I am trying to interpolate. I also have a map of the geographical land mass in .shp file, within which I am trying to confine the interpolation. Using GRASS in QGIS, I have managed to interpolate my points with `v.surf.idw`. But I seem unable to confine them to the map of my geographical region (Northern Quebec, bordering James and Hudson Bay), meaning that my gradient goes into the bay! How do overlay my interpolation within the boundaries of Quebec?


title: Unable to access Geoserver on Ubuntu Server

text: I installed the complete opengeo-suite on Ubuntu Server and it displays that it is working fine here,               opengeo-geoserver:       Installed: 2.5       Candidate: 2.5       Version table:      *** 2.5 0             500 http://apt.opengeo.org/ubuntu/ lucid/main amd64 Packages             100 /var/lib/dpkg/status      But when I try to run the url (http://serverurl/geoserver/web) i am not able to get the admin page.


title: How to serve raster mosaic to AutoCad Map 3D?

text: We are looking for a way to serve all the raster datasets we've collected over the years as a mosaic we have built in ArcGIS so that the AutoCAD department can simply import the mosaic and it will show the raster data in the location they are working. We have ArcGIS Server and ArcSDE. Has anyone accomplish this? We would prefer to do this without purchasing the ArcGIS Image Service extension.


title: Why do XLS files cause Error: ".. is not a valid or recognized data source"

text: In QGIS, I am trying to add some non-spatial data (in .xls file) that I want to use to join to some spatial data. Adding the file, either from 'add vector' or dragging file onto project I get the above error. Running QGIS v.1.7.4 on Windows. Reading the documentation, this is supposed to work as of v1.7. Wondering what I am doing wrong. Also, tried to do a simliar thing with an MSSQL to a non-spatial sql table with the same error. Cheers!


title: Unable to reorder after layers from multiple ArcGISDynamicMapServiceLayers

text: I used the ArcGIS Javascript layer reordering sample as template. Initially I have 4 layers added to the map by ArcGISDynamicMapServiceLayer where reordering was working. Then, instead of using add lake from a table, I add 5 other layers using ArcGISDynamicMapServiceLayer again and pushed the layers into the first ArcGISDynamicMapServiceLayer with `DynamicLayerInfos.push(newDynamicLayerInfo)`. The drag and drop list would update to include all the old + new layers. But the new layer wouldn't reorder. I drag the new layers all the way to the top and move it around. What ended up happen was that no matter name in the list was the first four item, it would change the order of the older layers. Example:               old1 => old layer1     old2 => old layer2     new4 => old layer3     new3 => old layer4      so if I move it around this would happen               old1 => old layer1     new3 => old layer4     new4 => old layer3     old2 => old layer2      It doesn't seem to be registering the new layer in the older ArcGISDynamicMapServiceLayer which I push the new layers into. Can anyone tell me what I did wrong? Allen               function addProperty(){         var propertyLayer, propertyDynLayerInfos, dynamicLayerInfo;              // disable the "Add Property" button         dijit.byId("property").set("disabled", true);         dijit.byId("property").destroy();              // show a loading icon         //dojo.style(dojo.byId("loading"), "display", "inline-block");         dojo.style(dojo.byId("loading"), "visibility", "visible");              urlDyn = "http://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer";         propertyLayer = new esri.layers.ArcGISDynamicMapServiceLayer(urlDyn, { "id": "Property2" }); //only work for mapserver not featureserver         app.map.addLayer(propertyLayer);              var addLayerhandler = dojo.connect(             propertyLayer,              "onUpdateEnd",              function() {                 dojo.disconnect(addLayerhandler);                 dojo.style(dojo.byId("loading"), "visibility", "hidden");                      // create a new dynamic layer info object for the property layer                 if ( ! app.hasOwnProperty("dynLyrInfos") ) {                     app.dynLyrInfos = app.map.getLayer("Kings County").createDynamicLayerInfosFromLayerInfos();                 }                       // add new layers                 //propertyDynLayerInfos = propertyLayer.hasOwnProperty("dynamicLayerInfos") ? propertyLayer.dynamicLayerInfos : propertyLayer.layerInfos;                 propertyDynLayerInfos = propertyLayer.createDynamicLayerInfosFromLayerInfos();                 alert(propertyLayer + " " + propertyLayer.hasOwnProperty("dynamicLayerInfos"));                 dojo.forEach(                     propertyDynLayerInfos,                      function(dynamicLayerInfo, i)                     {                         app.dynLyrInfos.push(dynamicLayerInfo);                     }                 );                      app.map.getLayer("County").setDynamicLayerInfos(app.dynLyrInfos);             }         );


title: Layer not aligning after georeferencing using BC Albers

text: I'm currently having trouble with the georeferencer... after what appears to be successful georeferencing, the map image layer does not align to the vector data. I'm trying to use BC Albers projection (as it's the projection of the original map image as well as the vector dataset). On-the-fly transformation is selected. Any ideas?


title: How to write an Advanced Query which gets the same results as the simple query option

text: Working with my data set on Late Woodland Village reanalysis in QGIS, the previous question was somewhat answered by defining the issue as a many to one. As a work-around, I summarized the info into comma separated values within cells. For instance, temper would be SC, LS, H, SF as possible combinations. Likewise I have created a template of decorative attributes numbered from 1-77. When I do a simple query for SC, it gives me all 15. But in Advanced Query, I get different answers. In Dec Attributes, if I set the sample as 3, it gives me all of the strings with 3 in them, rather than just 3. The first question is how do I select one string set out of all the others and the second question is how I select SC from Temper and 35 from Dec Attributes at the same time? Thanks in advance.


title: QGIS: Label every other feature

text: How would I go about labelling every other feature in QGIS (1.8)? For example I have a set of contours every 10meters from 0m to 100m. How would I label only every 20meter contour? e.g. label contours 0, 20, 40, 60, 80 and 100m while showing all the contours. Thanks.


title: OpenLayers With UK Ordnance Survey Maps

text: How do I use UK ordnance survey maps with OpenLayers API without committing myself to using the OpenSpace API. I need to have generic OpenLayers code only.


title: ArcMap_How can i select the text in the parentheses in a field? Please help

text: I've imported cad annotation and changed it to point feature, and i have the "text string" field in table attribute. Now i want to filter any records that contain the text in parentheses. For example: the text is "100PVC (2005)" => i want to get "2005" But the field is more complicated than this example, because some records just like "(05-07)". I've tried the index function with field calculator but it didn't work. And i also couldn't select records which contain the parentheses by using the Select by Attributes. My expression was: [TextString] LIKE '%( ___ _)%' When i verify that it was successfully but no records were returned. Could any body please solve this problem? I really appreciate that. Thank for your concern.


title: SDE FeatureClass Granting and Revoking Privilege with ArcObjects

text: **Q: How can I with ArcObjects GRANT or REVOKE Privileges like SELECT, UPDATE on SDE FeatureClasses to/from Roles?** The equivalent in normal _Oracle_ would be something like this:               GRANT SELECT ON SCHEMA.TABLE TO SOME_ROLE;     REVOKE SELECT ON SCHEMA.TABLE FROM SOME_ROLE;      I cant seem to find the interface to perform this task, and it may not exists? My dream would be to have an Interface like this:               public interface IPrivilegeManager     {         void Grant(string privilegeName, string schemaOwnerName, string featureClassName, string roleName);         void Revoke(string privilegeName, string schemaOwnerName, string featureClassName, string roleName);     }      **Related Q:** For a SDE FeatureClasses list all Roles that have been Granted any Privileges on it, and which Privileges each Role have on it


title: Lossless Polygon Simplification?

text: Is there a standard/recommended algorithm for simplifying a polygon without shrinking any of its original boundaries? Right now I'm using TopologyPreservingSimplifer within JTS and running into problems later on in my application when I encounter "lossy" polygons. Ideally, I'd like to be producing simplified polygons that are smaller than the convex hull but remain a superset of my original polygon. ![simplified](http://i.imgur.com/zf8q79Z.png) **Update:** I eventually came up with an admittedly imperfect algorithm that places a "wrapper" around the input polygon, shrinks it until no excess areas exceed a percentage of the total area of the input, then runs a line simplifier with a much finer threshold to strip out any redundant points along straight lines. 100% data dependent, but I'm seeing about 80% vertex compression with minimal excess areas. All feedback/comments appreciated:               public class LosslessPolygonSimplifier {     protected final static Logger logger = Logger.getLogger(LosslessPolygonSimplifier.class.getName());          public static Polygon simplify(Polygon input) {         final double AREA_THRESHOLD = 0.005; // allow excesses up to half a percent of total original area         final double LINE_THRESHOLD = 0.0001; // fine threshold to strip straight lines         try {             if (!input.isSimple()) {                 logger.warning("Attempting to simplify complex polygon!");             }             Polygon simple = simplifyInternal(input, AREA_THRESHOLD, LINE_THRESHOLD);             return simple;         }         catch (Exception e) {             logger.log(Level.WARNING, "Failed to simplify. Resorting to convex hull.\n " + input.toText(), e);             try {                 // worst case scenario - fall back to convex hull                 // probably a result of a bow-tie LINESTRING that doubles back on itself due to precision loss?                 return (Polygon) input.convexHull();             }             catch (Exception e2) {                 // Is this even possible? Polygons that cross the anti-meridian?                 logger.log(Level.SEVERE, "Failed to simplify to convex hull: " + input.toText(), e2);                 return input; // Garbage In, Garbage Out             }         }     }          // TODO avoid creating triangles on long straight edges     public static Polygon simplifyInternal(Polygon original, double areaThreshold, double lineThreshold) {         GeometryFactory gf = new GeometryFactory();         Geometry excesses, excess, keepTotal, keepA, keepB, chA, chB, keep = null, elim = null;         Polygon simplified = null, wrapper = (Polygon) original.convexHull();         try {             boolean done = false;             while (!done) {                 done = true;                 excesses = wrapper.difference(original);                 for (int i = 0; i < excesses.getNumGeometries(); i++) {                     excess = excesses.getGeometryN(i);                     if (excess.getArea() / original.getArea() > areaThreshold) {                         done = false; // excess too big - try to split then shrink                         keepTotal = excess.intersection(original);                         keepA = gf.createGeometryCollection(null);                         keepB = gf.createGeometryCollection(null);                         for (int j = 0; j < keepTotal.getNumGeometries(); j++) {                             if (j < keepTotal.getNumGeometries() / 2) {                                 keepA = keepA.union(keepTotal.getGeometryN(j));                             }                             else {                                 keepB = keepB.union(keepTotal.getGeometryN(j));                             }                         }                         chA = keepA.convexHull();                         chB = keepB.convexHull();                         keep = gf.createMultiPolygon(null);                         if (chA instanceof Polygon) {                             keep = keep.union(chA);                         }                         if (chB instanceof Polygon) {                             keep = keep.union(chB);                         }                         elim = excess.difference(keep);                         wrapper = (Polygon) wrapper.difference(elim);                     }                 }             }             new Assert(wrapper.getArea() >= original.getArea());             new Assert(wrapper.getArea() <= original.convexHull().getArea());             simplified = (Polygon) com.vividsolutions.jts.simplify.TopologyPreservingSimplifier.simplify(wrapper, lineThreshold);             new Assert(simplified.getNumPoints() <= original.getNumPoints());             new Assert(simplified.getNumInteriorRing() == 0);             new Assert(simplified.isSimple());             return simplified;         }         catch (Exception e) {             if (original.isSimple()) {                 StringBuilder sb = new StringBuilder();                 sb.append("Failed to simplify non-complex polygon!");                 sb.append("\noriginal: " + original.toText());                 sb.append("\nwrapper: " + (null == wrapper ? "" : wrapper.toText()));                 sb.append("\nsimplified: " + (null == simplified ? "" : simplified.toText()));                 sb.append("\nkeep: " + (null == keep ? "" : keep.toText()));                 sb.append("\nelim: " + (null == elim ? "" : elim.toText()));                 logger.log(Level.SEVERE, sb.toString());             }             throw e;         }     }      }


title: Dissolve features in ArcGIS using multiple attributes

text: This may sound simple, apologies if I missed some earlier discussion on same subject.   * I have a big set of road data with road numbers and also zone numbers . The road names can repeat across the zones, ie Road XYZ will be there in Zone A and Zone B. I would like to dissolve the road line features using "Dissolve" command, but see that roads in tow zones are note merged together. Can the dissolve command be tweaked to achieve this ?


title: ArcGIS mobile cache limitations and fake geometries

text: We want to have tables that have no geometries in our mobile cache. Our solution is to create feature class for each table and generate a dummy geometry for each row in those feature classes. First, I tried to create a dummy point which had same coordinates, for each row. What happened was that when I generated the points for one feature class and created mobile cache, it had features. When I added another feature class to the map, generated the points (same coordinates as previously) and created mobile cache, there was no features anymore in the mobile cache... If I removed the another feature class from the map and created the cache again, it worked. Next thing, I had one feature class on the map, and then I added another one, for which I generated points with different coordinates than the first feature class had. It worked! The script I use for creating those points generates now randomized points. Ok, so randomized points are fine because we know which tables contains the dummy geometries. But there is still a problem because there seems to be some kind of a limitation how many rows we can add to each feature class. For example, we have a table which has 14 000 rows, if I add all that data to feature class, generate geometries and create mobile cache, it's empty. I have tested to remove all but first 5 000 rows, and it works. Geometries are fine in ArcMap and all data is shown when I browse that feature class, so it's something that happens in mobile cache creation. Has anyone had similar problems or have any ideas how to start debugging this?


title: Identify the direction of traveling road segment

text: I'm using pgRouting to find the least congested path using time as the cost metric. I am using average speed between two nodes to calculate time taken to travel in a segment. In pgRouting there is a forward cost and reverse cost. I have created tables to each and every edge to maintain reverse and forward speeds. How can I recognize whether a vehicle is travelling in forward direction or the reverse direction in sever side? I'm using postgreSQL as my database


title: google map api v3 large/complex polygons

text: I have quite some large/complex polygons I'd like to overlay on a Google map. I can do this but wondered what the best/fastest way is to load them? I have tried using a KML but understand there are some limitations on size and the number you can load. Also I've looked at fusion tables but again they have limitations. I'm thinking about storing the polygons in JSON files split into region A, B, C, etc... then limit the zoom level so that only certain polygons would be visible at one time then only fetching those. Suggestions welcome. Thanks Andy


title: Dissolving polygons fails on computers with small amount of RAM

text: When I'm trying to dissolve a polygon through an arcpy script the operation fails with the 999999 error on computers with small amount of RAM [~3 GB] (known issue). Unfortunately neither this, that nor that work for me, so I was thinking about dividing the polygon into smaller pieces first, processing them and then merging back? But I have absolutely no idea how to do that. Any ideas? Maybe there's another approach that hasn't come to my mind? An example polygon for testing can be found here, I'm dissolving on the "Godziny" field with the default settings:               arcpy.Dissolve_management(path_to_original_shp, path_to_dissolved_shp, "Godziny")      **ADDED:** Unfortunately when I tested Geog's solution and it worked it was just a fluke. Still 99 out of 100 dissolves fail. However the conditions of failing are quite weird. If I run dissolving as a tool in ArcMap it dissolves just fine (in about 30 seconds). If I run it from python's interpreter (doesn't matter whether in ArcMap or not) it also dissolves fine. However If I run it from my script as one of the functions in a processing chain it fails (it's stuck for about 20-30 min with memory usage growing slowly but constantly over time and then gives 999999 error - "Invalid topology"). The way I run this script is a bit unusual, because I have a GUI built with wxpython that I run in ArcMap, from which the processing chain with dissolving is run from. I run it on a Windows XP SP3 machine with 3 GB of RAM. If I use a machine with more RAM and Windows 7 or 8 (64 bit but without 64 bit background geoprocessing) everything works just fine. In addition to that, if I comment out dissolving and the rest of the chain, run it, then comment out the first part and run it from the dissolve point it also works fine. That gave me an idea that I might be somehow locking the resources, so I've tried doing gc.collect(), but with no success. I've just tried running the script from the command line and it also works fine... So I guess there's something wrong when dissolving from my extension GUI, however I have no idea how my extension could influence the function as I'm not modifying the environment in any way. The processing chain I'm doing looks like this:                   arcpy.CheckOutExtension("spatial")              # getting necessary licences         ccm1_cut = ExtractByMask(project_manager.conf_dict["CCM1"], project_manager.conf_dict["hordist"])         ccm2_cut = ExtractByMask(project_manager.conf_dict["CCM2"], project_manager.conf_dict["hordist"])         ccm3_cut = ExtractByMask(project_manager.conf_dict["CCM3"], project_manager.conf_dict["hordist"])         ccm4_cut = ExtractByMask(project_manager.conf_dict["CCM4"], project_manager.conf_dict["hordist"])         ccm5_cut = ExtractByMask(project_manager.conf_dict["CCM5"], project_manager.conf_dict["hordist"])              # merging ccm layers         ccm_merged = Con(IsNull(ccm1_cut), Con(IsNull(ccm2_cut), Con(IsNull(ccm3_cut), Con(IsNull(ccm4_cut),                         Con(IsNull(ccm5_cut), project_manager.conf_dict["lu_speed"], ccm5_cut), ccm4_cut), ccm3_cut), ccm2_cut), ccm1_cut)              walk_speed_cut = ExtractByMask(project_manager.conf_dict["walkspeed"], project_manager.conf_dict["hordist"])              travel_speed_raster = walk_speed_cut / ((Float(ccm_merged)) / 100)         travel_speed_raster.save(travel_speed)              # creating path distance         ipp = project_manager.get_ipp_path()         path_dist_raster = PathDistance(ipp, travel_speed)              # normalising to hours         path_dist_norm_raster = Divide(path_dist_raster, 3600)         path_dist_norm_raster.save(travel_time_normalised)              # creating hour classes         remap_range = RemapRange(create_remap_range_ccm())         temp_reclass = Reclassify(travel_time_normalised, "VALUE", remap_range, "NODATA")         temp_reclass.save(travel_time_classes)              # converting travel time raster to polygons         arcpy.RasterToPolygon_conversion(travel_time_classes, travel_time_classes_shp, "SIMPLIFY", "VALUE")              # calculating time value         arcpy.AddField_management(travel_time_classes_shp, "Godziny", "SHORT")         arcpy.CalculateField_management(travel_time_classes_shp, "Godziny", "[GRIDCODE]", "VB")              # dissolving polygons         arcpy.Dissolve_management(travel_time_classes_shp, travel_time_classes_dissolved, "Godziny")         ...


title: How do you best deal with data that spreads across UTM Zones?

text: I have data that spreads across two UTM Zones GDA/MGA94 UTM Zone 55 and 56. I have layers such as a cadastre, roads, pipelines etc where I want to store measurements like lengths and areas in metres or some kind of metric notation, not degrees! Whats the best way to manage this in PostGIS (i'm using PostGreSQL 8.4 PostGIS 1.5)? Should I be storing my data as GDA94 Geographic coords and using some sort of work around to calculate the measurements I require? Or is there another way to handle this? I'm keen to hear how other people address this situation. Thanks Ando


title: How to get WMS LegendGraphics using Geoserver and GeoWebCache?

text: I am using GeoServer alongwith the default, build in GeoWebCache. I am using Extjs and GeoExt, as well. Everything is running well, except for the legend graphics request. My code for layers is as follows:               var MyLayer = new OpenLayers.Layer.WMS( "MyLayer",             "http://my-ip-address/geoserver/gwc/service/wms",             {layers: 'MyLayer',transparent: "true",format: "image/png",             tileSize: new OpenLayers.Size(256,256),                     tilesOrigin : map.maxExtent.left + ',' + map.maxExtent.bottom },                     { isBaseLayer: false, visibility:false} );      And for legend panel:               var legend = new GeoExt.LegendPanel({         title: "Map Legend",         iconCls: 'legend',                     autoScroll: true,                     defaults: {                         cls: 'legend-item',             baseParams: {FORMAT: 'image/png'}                     },                     items: []                 });      Whenever I am trying to open this map, I am getting the layer name in my legend panel, but there is no image for layer legend and firebug is giving this error: > "NetworkError: 400 Bad Request - http://my-ip- > address/geoserver/gwc/service/wms?TRANSPARENT=true&TILESIZE=256,256&TILESORIGIN=72.45,24.45&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetLegendGraphic&EXCEPTIONS=application.ogc.se_xml&LAYER=MyLayer&FORMAT=image/gif&SCALE=2500000.0000000005&FORMAT=image/png" I understand I will have to replace part of the URL request for GetLegendGraphic. But I am not able to do the same.Could anybody tell me how to accomplish this?   * I am using GeoServer 2.1.1; GeoWebCache 1.2.6, OpenLayers 2.11, Ext 3.2.1 and GeoExt 1.1.


title: One large polygon or many little ones. What is better regarding performance?

text: I´m designing a geoprocessing service on ArcGIS Server using several nationwide datasets. Currently I´m preparing some of the datasets and I´m wondering if I should dissolve my polygon layers (buffers) to have only one huge polygon with many, many vertices or if I would get better performance if I leave them with many small polygons (approx. 500.000). The geoprocessing service will always be applied only on very small areas at a time. Thanks for your help. Martin


title: Rough edges on tiles in QGIS

text: I'm loading four .ASC files into QGIS, each containing topographical data about a tile of 10 x 10 km. On the map, this data is displayed as black/white and different shades of gray. My problem is that the edges of each tile are very clear where the four tiles meet. Is there any way to get QGIS to polish this up, so as to achieve a smooth transition? ![enter image description here](http://i.stack.imgur.com/PZFTF.jpg)


title: Geocoding matches by Street Address or by Zip Code?

text: I'm trying to learn more about Geocoding in ArcGIS 10.1 for Desktop. I've attempted to geocode two ways, both by Street Address and Zip Code. In the end, the Street Address method yielded more matches, but not by many. Would anyone be able to give me a quick answer on what type of weakness there is by choosing one method over the the other? More specifically why Zip Code is the inferior choice.


title: How to load WMS Layers automatically when using heron MC

text: I'm using **Heron MC** with extJS, GeoExt, and OpenLayers 2.13. At first I try the default configuration of the Heron MC and every layers load automatically when I opened the webpage. However, when I edit the whole webpage design (I need to add some textarea under the whole heron map) the WMS Layer was not automatically loaded. It only loaded when zoomed or panned the map, and checked another WMS layer from the layer tree. How could this happened?


title: Retrieving raster/coverage width and height in pixels from GeoServer

text: Is it possible to retrieve the original width and height in pixels for a coverage in GeoServer using either the Python API or REST? I could not find anything in the documentation regarding how to retrieve height or width of a coverage in GeoServer. Here is my current solution interfacing with GeoServer. It needs GDAL, and it will probably fail if the coverage is not a simple file readable by GDAL (i.e. a PostGIS raster)               import gdal     import os     from geoserver.catalog import Catalog          #...code          #store is a GeoServer store     def get_raster_dimensions(store):                                                    """ Get the size of the raster from the catalog. """                             gdal.UseExceptions()                 #this, of course will fail if the data isn't a regular file                                                     base_url = store.url.replace('file:', '', 1)                                     #what if the GEOSERVER_DATA_DIR is unset?  How to find it then?                  coverage_path = os.path.join(os.environ['GEOSERVER_DATA_DIR'], base_url)         #if the coverage store is a raster readable by GDAL,                             #we can get the dimensions with GDAL                                                               try:                                                                                dataset = gdal.Open(coverage_path)                                               return (dataset.RasterXSize, dataset.RasterYSize)                            except RuntimeError:                                                                 return (None, None)                                                          finally:                                                                             #no close method in GDAL docs, this was referenced as the way                    #to clean up the file after finished                                             dataset = None


title: ARC GIS 10 + Google Maps API

text: **Assalam o Alaikum** I am new ARC GIS, is it possible to create a website that uses Google Map API but imagery from the ARC GIS 10 REST service? Actually, I like the functionalities provided by the Google Map API like camera. Is it possible to perform these operation using Google Map API on the imagery provided by REST service of ARCGIS 10. _Thanks in advance_


title: What are alternatives to ArcGIS for Desktop and Google Earth for these requirements?

text: I currently have a python script that will take in data and output it as a KMZ file, which I then open in Google Earth on my desktop. The data has two views; a 3D polygon tower (clustered data) and in individual semi transparent circles for a heatmap like view. Additionally, the data can be played over time so that the 3D towers grow/shrink and circles appear/disappear. The powers that be have told me that the visualization does not "pop" enough for them, and they would like me to look into some free alternatives. I am afraid that there are no tools besides ArcGIS (which they do not want to buy) that will do what they want, but I figured I would ask anyways. Are there any free tools that meet these requirements? Ordered by importance:   1. Can display data over time.   2. Can read kmz or kml.   3. Can display 3D polygons and overlay pictures on the map.   4. Free (or at least cheaper than ArcGIS). Here are some notes I took while looking at a few free tools:   1. QGIS (could not get a map to load, could import kml as points)   2. Open Jump (I think we need our own map data, did not install)   3. NASA World Wind (Cool, but couldn't get kml to import. Not sure if it has time controls.)   4. Marble (My favorite, but no time control. Couldn't get kml to input. http://marble.kde.org/kml-guide.php)   5. MinervaGIS (Have to build from source. Did not install.)   6. Viking (Worked, no time controls, would not open kmz)


title: PostGIS ST_MapAlgebra Assistance

text: I would like to perform the equivalent of the below ArcGIS raster calculator equation in PostGIS using the ST_MapAlgebra function and return it as a tif using ST_AsTIFF.               Con(("Sol_gain_clipped.tif" >= 1491)  &  ("can_cov_01.tif" <= 70)  & ("imp_sur_10_French_Creek.tif" <= 10),1,0)       The equation uses three single band rasters with pixel value specifications for each one, and returns a single band raster with values of 1 for pixels meeting all three requirements, and 0 for pixels that do not. Any help in how to write the SQL, including PL/pgSQL, would be greatly appreciated.


title: Why does FME Reprojector create coordinate values 0?

text: I'm using the NeighborFinder transformer in FME Desktop 2013, and I need it to use a maximum distance in meters. My input data, however, are points and lines in WGS84, so before sending them into the NeighborFinder, I'm using Reprojector to convert the geometry into FME's dynamic coordinate systems AZMED or AZMEA. The lines reproject okay. The points, however, all reproject to 0,0. So when the points go to NeighborFinder, they create meaningless output. Here's a part of the setup before NeighborFinder: ![enter image description here](http://i.stack.imgur.com/fPBqq.gif) ![enter image description here](http://i.stack.imgur.com/o8x6u.gif) Using Inspection, I can see a point before entering the Reprojector: ![enter image description here](http://i.stack.imgur.com/zazsl.gif) And after leaving the Reprojector: ![enter image description here](http://i.stack.imgur.com/S1QRI.gif) Note the loss of geometry. I've tried leaving the Source Coordinate System as "Read from Feature", but still no gold. The Transformer Description for Reprojector gives an example of reprojecting a point to AZMED or AZMEA. And I can't find any indication online that points aren't supported. I can reproject the points by changing the Destination Coordinate System to the relevant UTM zone (EPSG:32617, UTM Zone 17). But I'd prefer a scalable solution because I have global data to feed into the workbench. Does anyone know why I can't reproject my points into AZMED or AZMEA?


title: Is there an alternative for JTS TestBuilder on Linux?

text: **JTS Testbuilder** , an application for testing JTS functions, is available on Windows and I use it quite regularly. Are there anything like this on Linux? Does GEOS have anything similar to this on linux? ![enter image description here](http://i.stack.imgur.com/99s4C.gif)


title: Is the GIS Repository In Ubuntu in a different stream than the main repository?

text: I was checking out this: https://wiki.ubuntu.com/UbuntuGIS and it outlines how to install PPA for GIS. I performed a basic apt-cache search on a few things and QGis and mapserver are available. Such as:               $ apt-cache search mapserver     cgi-mapserver - CGI executable for MapServer     libmapscript-perl - Perl MapServer module     libmapscript-ruby - Ruby MapServer library     libmapscript-ruby1.8 - Ruby MapServer library     libmapscript-ruby1.9.1 - Ruby MapServer library     mapserver-bin - MapServer utilities     mapserver-doc - documentation for MapServer     php5-mapscript - php5-cgi module for MapServer     python-mapscript - Python library for MapServer     qgis-mapserver - Quantum GIS mapserver      Running linux mint Nadia which works out to be quantal for Ubuntu version (10.10) Is there any difference for adding this package? I notice that there is a testing version as well. Is the package difference similar to stable, testing, and unstable in debian or are the packages the same?


title: Seeking Open Source ISO Metadata Editor?

text: I am looking for a free open source ISO metadata editor for the development of an enterprise database. It will mostly be used for documenting shapefiles and GeoTIFFs. Hoping that it will be an intuitive software since a range of skill levels will be working with it. Any suggestions?


title: hibernate spatial DDL creation with maven hibernate3 plugin

text: This is a very special question, I hope that somebody here already worked in a similar project setup. I am working with Netbeans and started a maven web project based upon the maven HS 4.x tutorial on http://www.hibernatespatial.org/tutorial-hs4.html This compiles fine using maven. Next I want to use the maven hibernate3 plugin from MOJO (http://mojo.codehaus.org/hibernate3-maven-plugin/index.html), so I can create SQL Scripts and the database schema out of my java entitiy classes. So the workflow should be   1. code java entitiy classes with spatial (postgis) fields   2. compile   3. create DDL out of entity classes   4. create/update database schema with DDL   5. run app The problem is, when I run               mvn hibernate3:hbm2ddl      The plugin does not search for hibernate spatial in the remote repo on www.hibernatespatial.org like the compile plugin does, but searches for it in the central repo. Due to the fact, that the hibernate-spatial.jar does not exist there, DDL creation fails. This is what the maven output looks like:               [ERROR] Failed to execute goal org.codehaus.mojo:hibernate3-maven-plugin:2.2:hbm2ddl ... Plugin org.codehaus.mojo:hibernate3-maven-plugin:2.2 or one of its dependencies could not be resolved: Could not find artifact org.hibernate:hibernate-spatial:jar:4.0-M1 in central (http://repo.maven.apache.org/maven2) -> [Help 1]     ...     Caused by: ... Could not find artifact org.hibernate:hibernate-spatial:jar:4.0-M1 in central (http://repo.maven.apache.org/maven2)     [ERROR]      [ERROR] For more information about the errors and possible solutions, please read the following articles:     [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException      As I already mentioned, maven compile goal works and resolves hibernate- spatial correctly. Is there an alternative way to create database schema out of java entity classes without the maven hibernate plugin?