title: is it possible to project a shapefile to a raster's custom projection with command line gdal/ogr?

text: I have a raster with a user defined sinusoidal projection and a shapefile in lat/lng coordinates (I believe this is called 'unprojected'?). I'd like to use ogr/gdal's command line utilities to project the shapefile into the raster's custom projection. I see that `ogr2ogr` has a `t_srs` flag that if I had an EPSG code, I could use to project the shapefile into that local projection. However, I am unsure what to do with my custom raster projection. Per a comment below, this is the projection info from `gdalinfo`               Coordinate System is:     LOCAL_CS["SINUSOIDAL",         UNIT["METERS",1]]     Origin = (-8895140.844619400799274,1111950.484813591465354)     Pixel Size = (463.312713623046989,-463.312713623046989)     Corner Coordinates:     Upper Left  (-8895140.845, 1111950.485)      Lower Left  (-8895140.845,-4448265.391)      Upper Right (-2222974.456, 1111950.485)      Lower Right (-2222974.456,-4448265.391)      Center      (-5559057.650,-1668157.453)


title: How long should it take to load a point layer with readOGR?

text: I am afraid I am quite new to spatial analysis at anything beyond a superficial level, and I have only recently transitioned to utilizing R. I have been quite pleased with the versatility of areal analysis, but I have just attempted to load my first point layer. In a nutshell, it's taking much, much longer than anticipated. I first tried to use readShapeSpatial (from maptools I believe), but I read somewhere that readOGR (from rgdal) was faster. I let readShapeSpatial run for over an hour before killing it, and now readOGR has been running for at least 20 minutes. Here is the line:               c<-readOGR('/home/.../DCSpatialAnalysis','CamaRes.shp')      The data attribute houses a frame containing character and numeric data. There are 106,046 records and 46 columns. The file size is only ~75MB (including the all elements of the shapefile). I do not believe my hardware is underpowered for this task (though I am always happy with more horsepower): > OS: Ubuntu 13.04 (VMWare) on Windows 7 > > Make/Model: Dell/OptiPlex 790 > > Processor: i3 (3.3 GHz) > > RAM: 16 GB installed I should mention that I have been able to successfully parse and display an XML document from within my IPython Notebook session that resides in the same directory. That suggests, to me, that reading from a mounted directory is not an issue. Have I done something incorrectly here? R seems to just hang in the "Busy" status, both in RStudio and IPython Notebook (via %rmagic). How long should such a read in take?


title: Where can I find a list of states, districts and tehsil names in India?

text: I need only names for making a chained dropdown list for users to select location correctly and submit the data. Please provide any resources. I emailed censusindia.gov.in but no reply from them.


title: Three table postgres sql join query

text: I'm having trouble getting my SQL query to work with three tables. I'm new to SQL to I've already spent considerable time trying to understand the documentation and making some sense of it. I'm using Postgres 8.3 with POSTGIS. I have three tables:   1. A table holding polygon geometry called subshed2   2. A table holding point geometry called withdrawalsites with a primary key ic_site_id    3. A table holding values I want to summarize on a monthly basis, both within a single specific year as well as the average over all years of each month. Table name is withdrawals. This table has a record with the same ic_site_id as found in the second table above, but there are many records for each ic_site_id. This table has my dates in timestamp form. Here's a few records: ![withdrawal table example](http://i.stack.imgur.com/RzCiq.jpg) I need my final output to look like this: ![output table](http://i.stack.imgur.com/LOdYg.jpg) The shed_id parameter has already been supplied from another function, so it's being supplied to this query as ${param.shed_id}. I'll be letting my user select a specific year to summarize to get the first table (and likely suppling it using another ${param.requested_year} ), but then I also want to average the values by month over all the years in the dataset. I might have to run a separate slightly altered query to get the second table, but I was hoping I could do it in one query. My query looks like this:               SELECT         to_char(withdrawals.begintime, 'YYYY') AS year,         to_char(withdrawals.begintime, 'MONTH') AS month,         sum(withdrawals.withdrawalvalue_mgd) AS mgdsum,         withdrawals.begintime AS date     FROM         withdrawalsites         INNER JOIN subshed2         on (st_contains(subshed2.the_geom, withdrawalsites.the_geom))         INNER JOIN withdrawals         on withdrawals.ic_site_id = withdrawalsites.ic_site_id     where         subshed2.id = '${param.shed_id}',         withdrawals.intervalcodes_id = '2'     GROUP BY to_char(withdrawals.begintime, 'YYYY MONTH')     ORDER BY YYYY MONTH      When I run the query, it gives a syntax error on a comma, but it doesn't tell me which one, but I suppose there's a lot more wrong with this query. Any ideas on how to query these three tables correctly, or at least point me in a direction to investigate? It's also unclear to me if I should instead be using the date_part function. Final Solution: I solved this problem using some of the thoughts Mike provided. I couldn't get the first function to work, but realized I was getting years with decimals (i.e. 2008.0) and was getting the month number, not the month name. I then wanted to sort those month names correctly. Here's what my worked in the end:               SELECT         (EXTRACT(YEAR FROM withdrawals.begintime))::int AS year,         to_char(date_trunc('month', withdrawals.begintime), 'MON') AS month,         sum(withdrawals.withdrawalvalue_mgd) AS mgdsum     FROM         medford.withdrawalsites         JOIN medford.subshed2 ON         ST_Contains(medford.subshed2.the_geom,medford.withdrawalsites.the_geom)         JOIN medford.withdrawals ON medford.withdrawals.ic_site_id =             medford.withdrawalsites.ic_site_id     where         subshed2.id = '${param.shed_id}'     AND         withdrawals.intervalcodes_id = '2'     GROUP BY (EXTRACT(YEAR FROM withdrawals.begintime))::int, date_trunc('month',          withdrawals.begintime)     ORDER BY (EXTRACT(YEAR FROM withdrawals.begintime))::int, date_trunc('month',          withdrawals.begintime)


title: How to write code for page setup in Mapbasic

text: I am very new to mapbasic scripting. i am creating thematic map using mapbaic code. For that i am searching code for Page setup to set my map as landscape with A4 size. But i didn't found any code for it. does anyone knows it. if any link and resource material is there please reply me. Thanks and Regards


title: Which software converts TIFF to TJP (Tiled Jpeg)?

text: I have Tiff images and I need to export it to Tiled Jpeg. I don't know which software converts TIFF to TJP. Can anyone kindly tell me the name of the software which converts? Thanks


title: Designing ArcPad Quickforms to Collect Biological Data?

text: I am trying to design a Quickform in ArcPad 10.2 to enable efficient capture of biological survey information in the field on a Trimble Juno 3D. I am currently investigating using the Form Creation Wizard applet guidance used. I need to be able to pick a large number of plant species within a 'Species' field in the Quickform for each shapefile (each shapefile representing different habitats that I may encounter on a site survey i.e. grassland, woodland, wetland etc.), however, it would appear that only a single Pick List value can be ascribed to each field, in this case my 'Species' field, for each shapefile. Is there a way that a number of species can be entered into my 'Species' field for each shapefile? There are situations where the habitat may include up to 60 species (i.e. grassland or wetland), although this is quite rare in the type of survey work I currently undertake. Ideally, I would like to have a pick list containing all 7,800 or so plant species in the checklist of British and Irish flora so that I can select from this exhasitive list of all the plant species I could potentially record in each habitat during a site survey. However, I could make do with a much abbreviated list if this would be too onerous and impractical, as the vast majority of these species would be superfluous in most situations. Also, do you need to be a computer programmer and familar with VBScript to use ArcPad Studio or does it have a WYSIWYG user interface so than non-programmers can use it? Is there a better way of doing any of this? I would be very grateful for any help with the above as I have been trying to develop the required 'front end' user interface to run on a Trimble Juno 3D in the field and enable collection of spatially accurate biological data in the field for integration with QGIS back in the office. You would think that there would be an off the shelf solution, but alas it has taken many weeks of research and trial and error to try to develop this with many blind alleys experienced along the way.


title: Why is the Button code on the ArcGIS.com sample viewers so complicated?

text: I'm trying to modify one of the ArcGIS.com sample maps to add my own buttons, and I'm surprised at how complicated the HTML page is. Here is the code for the simple "Details" button at the top left of the header:                                                       ?             Details                   <input type="button" dojoattachpoint="valueNode" tabindex="-1" class="dijitOffScreen" value="">      The image itself is specified in the CSS. **Is all that code really necessary, and is there an easier way to add a button (with tooltip) to the interface of an ArcGIS Server JavaScript API map?** I noted that the Toolbar sample doesn't show tooltips, hence my investigation of the ArcGIS.com samples.


title: Issue with WebADF Application on Windows Server 2008

text: I am trying to resolve this issue with a custom WebADF application that I have migrated from 931 to 10. The appl works fine in Development environment but when deployed on the server, it is throwing an IndexOutOfRangeException. I have traced this error on the server but still don’t see what may be causing this. At this point I am sure that this is an issue with Deafult.aspx. I am not sure if this is related to 32/64 bit in anyway. Since appl is working fine in development environment, I may be still missing something on the server side. Appreciate any feedback. Thanks jay Test Environment Windows XP Visual Studio 2008 Server environment: ArcGIS Server 10 Windows Server 2008 R2 Standard IIS 7 * * * Session State Session Key Type Value /default.aspx_RefreshUpdatePanel ESRI.ArcGIS.ADF.Web.UI.WebControls.RefreshUpdatePanel ESRI.ArcGIS.ADF.Web.UI.WebControls.RefreshUpdatePanel /default.aspx_RefreshUpdatePanel_ID System.String Toolbar1 /default.aspxResults$TaskResults1_nodes ESRI.ArcGIS.ADF.Web.UI.WebControls.TreeViewPlusNodeCollection ESRI.ArcGIS.ADF.Web.UI.WebControls.TreeViewPlusNodeCollection /default.aspxToc_Panel$Toc1_nodes ESRI.ArcGIS.ADF.Web.UI.WebControls.TreeViewPlusNodeCollection ESRI.ArcGIS.ADF.Web.UI.WebControls.TreeViewPlusNodeCollection /default.aspxMapResourceManager1_ValidationTimeOut System.Int32 6000 /default.aspxMagnifier1_MagMap System.String Map1 /default.aspxTaskManager1$PrintTask_VBNet1_title System.String Print /default.aspxTaskManager1$FeatureSearchTask2_title System.String Feature Search /default.aspxTaskManager1$SpatialSearchTask1_title System.String Spatial Search /default.aspxTaskManager1$OpenAttributeTableTask1_title System.String Open Attribute Table /default.aspxTaskManager1$PostPoints1_title System.String Post User Points /default.aspxTaskManager1$GeoprocessingTask1_navigationPath System.String   /default.aspxTaskManager1$GeoprocessingTask1_title System.String Buffer Points /default.aspxTaskManager1$GeoprocessingTask2_navigationPath System.String   /default.aspxTaskManager1$GeoprocessingTask2_title System.String Buffer Lines **ErrorMessage System.String Page_Error Error System.IndexOutOfRangeException System.IndexOutOfRangeException: Index was outside the bounds of the array. at WebMapApplication.Page_Load(Object sender, EventArgs e) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)** ![enter image description here](http://i.stack.imgur.com/ZQP7o.png)


title: ArcMap - ODBC connection to SDE table shows an old version?

text: I use an ODBC connection to an SDE table to return a current list of features for reporting purposes. The connection is pointed at a Microsoft SQL SDE server and the connection info matches what I see in ArcCatalog. The problem is that the ODBC connection returns a version of the table that is several months old - it shows some features that have been removed and doesn't show some new features. Using the same connection information in ArcMap, I see a current version of the table and the current set of features. I have created a new ODBC connection, tried refreshing the connection, and tried using the connection in Microsoft Access and R. Any suggestions? UPDATE: this question referred to a versioned table. As it turns out, an editor had checked out a parent version of the SDE some time ago and never checked it back in. This was preventing subsequent child versions from being compressed back to the DEFAULT table. Child edits were being kept in a delta table but still showing in ArcMap; the ODBC connection wasn't aware of the delta table and was showing DEFAULT as it existed when the rogue parent version was checked out. Thanks for the suggestions.


Are there any tools / plugins to develop mapbooks using QGIS?


title: Loading Tiger 2010 Edge Shape File w/ ogr2ogr Produces Reversed Latitude and Longitude

text: I'm attempting to build a MySQL database that will allow me to reverse geo- code addresses using the MBR functions within MySQL. I've downloaded the latest set (2010) of TIGER edge shape files from the US Census website and am trying to load them into MySQL using the GDAL ogr2ogr utility. A new table (geotest) does get created with a SHAPE column that has the geometry defined as a LINESTRING. However, I am seeing reversed latitude and longitude values that get reversed when running the following command:               ogr2ogr -f "MySQL" MySQL:"geodb,user=myuser,host=localhost,password=mypwd" -nln geotest -nlt LINESTRING -append -a_srs "EPSG:4326" -lco engine=MYISAM tl_2010_01021_edges.shp      What I get when I look at the data are latitudes and longitudes (although correct when verified on Google Maps) are in fact reversed as seen below:               LINESTRING(-86.69863 32.973164,-86.69853 32.97302,-86.69856 32.97287,-86.698613 32.972825,-86.6988 32.972825,-86.6989 32.972892,-86.6989 32.973002,-86.69874 32.97316,-86.69864 32.97318,-86.69863 32.973164)      I've tried this for other shape files as well (to include those w/ polygons/etc.) and in all cases the latitude and longitudes appear to be reversed when loaded into the geometry column. I'm hoping it is something as simple as a flag I am missing w/ ogr2ogr that will load them in the proper order. For what I am doing (building a complete database of roads for the purpose of reverse geo-coding in the US) am I even using the correct set of census shape files (i.e., edges) and if so, what am I doing wrong when loading? If there is not a way to correct with ogr2ogr, is there an easy update I could run after loaded to reverse all of the coordinates in the LINESTRING geometry column?


title: Conversion of any projection to latlong using proj4 string

text: I am using a tool which uses proj4 lib to project maps. I have a set of xy coordinates to be converted to latlongs with that tool. as I have the source projection string say +proj=aea +datum=NAD83 +ellps=GRS80 +lon_0=-96d +lat_1=45d30 +lat_2=29d30 +lat_0=37d30 +x_0=000000 +y_0=00000 if I pass +proj= **longlat** +datum=NAD83 +ellps=GRS80 +lon_0=-96d +lat_1=45d30 +lat_2=29d30 +lat_0=37d30 +x_0=000000 +y_0=00000 as the destination projection Will it give me a LAT LONG from the x,y supplied? I know there are ways to write code and do inverse projection to get latlong, but I wanted to bypass that and use x,y as the input to the tool I have and get latlong from it by just using the proj4 string.


title: ArcMap Geoprocessing vba code/tool - smooth polygon

text: I would like to execute the smoothpolygon tool within ArcMap vba and I'm having some trouble defining the parameters syntax for the tool. I'm getting this error below:               ERROR 000622: Failed to execute (mooth Polygon). Parameters are not valid.     ERROR 000628: Cannot set input into parameter tolerance.      Here is my code, thanks for your help!               Private Sub SmoothGeo_Click()              Dim filePath As String         filePath = "C:\Projects\OSU_Well_Buffer_Tool\USDE\USDE.mdb"         Dim inputName As String         Dim clipName As String         inputName = "buffer9_smu"              Dim pGP As Object         Set pGP = CreateObject("esriGeoprocessing.GPDispatch.1")              On Error GoTo EH         pGP.Workspace = filePath         ' note: the inputs can also be objects; however the output must be a string.         pGP.smoothpolygon_management filePath + "\" + inputName, "C:\Projects\OSU_Well_Buffer_Tool\USDE\USDE.mdb\smooth", "1", "PAEK", "150"              Exit Sub     EH:         MsgBox pGP.GetMessages(), vbOKOnly, "Test"     End Sub


title: select remove layers not working second time

text:
http://www.youtube.com/watch?v=qxVO0tFdiuA&feature i captured video. You can watch. Now i explain my problem. Firstly, when i create popup and in popup menu when i call function and select feature,it's working, second time open popup menu, it is again work. Problem is that when i change page and and show listview and call function,it is working but second time change page and call function and select again feature, first selection is kepping not deleted. my codes : # mappage

          Geri
                    Adres Ara

      # search

          Geri

            Kapat

            if open browser on mobile phone               //if(device.mobile()==true){             if (1 == 1){                      $("#adresBul").attr("href", "#search");                 mobile = 1;                       }      when search page open run;               $(document).delegate("#adresBul", "click", function () {                                   select.removeAllFeatures();                              $.mobile.showPageLoadingMsg();                              function handler(request) {                                  var geojson_format = new OpenLayers.Format.GeoJSON({});                             featuresilce = geojson_format.read(request.responseText);                                  if (mobile == 0) {                                           $('#doldur').empty();                                 $('#baslik').empty();                                 $("#baslik").append('
  İlçe
');                                      for (var f = 0; f < featuresilce.length; f++) {                                     $("#doldur").append("
 " + featuresilce[f].attributes.ADI + "

");                                 }                                 $.mobile.hidePageLoadingMsg();                                 $(".scroll_adres").iscrollview("refresh");                             } else if (mobile == 1) {                                      $.mobile.changePage('#search');                                 $('#mobile_search').empty();                                 $('#mobile_search_baslik').empty();                                 $("#mobile_search_baslik").append('İlçe');                                      for (var f = 0; f < featuresilce.length; f++) {                                     $("#mobile_search").append("
 " + featuresilce[f].attributes.ADI + "

");                                 }                                 $.mobile.hidePageLoadingMsg();                                 $(".mobile_scroll_adres").iscrollview("refresh");                             }                         }                              var request = OpenLayers.Request.GET({                             url: rootURL + "ows?service=WFS&version=1.0.0&request=GetFeature&typeName=Kaski:ADRES_ILCEALANI&maxFeatures=50&outputFormat=json&sortBy=ADI",                                  callback: handler                              });                          });      problem function                function findilce(f) {                      select.destroyFeatures();                      select.addFeatures(featuresilce[f]);                      var dataExtent = select.getDataExtent();                      map.zoomToExtent(dataExtent);                      $.mobile.changePage('#mappage');                  }


title: arcpy FieldMappings for Spatial Join

text: I'm trying to create a python script tool to use within ArcMap 10.1. I created a Model and exported it as a python script and added custom field mappings for the first Spatial Join by reading through others' example scripts, however, the resulting fields when the script is run don't join using the "; " delimiter, and the output fields are the same as the input. I currently run the script as a python tool in ArcMap 10.1. I'm stumped at this point even after reading all articles from ESRI on the FieldMappings object and its methods. The script is as follows if anyone would like to take a look:               import arcpy          # Script arguments     Waterbodies_UTM13_20130228 = arcpy.GetParameterAsText(0)          MT_ESA_20131023 = arcpy.GetParameterAsText(1)          wbdhu8_a_mt = arcpy.GetParameterAsText(2)          Montana_Soils__2_ = arcpy.GetParameterAsText(3)          WB_HUC_Intersect_ESA_UTM13_M1 = arcpy.GetParameterAsText(4)               # Local variables:     Waterbodies_UTM13_20130228__2_ = Waterbodies_UTM13_20130228     Waterbodies_or_Wetlands_on_ESA = Waterbodies_UTM13_20130228__2_     WL_WB_Joined_with_HUC_Basins_Data = Waterbodies_or_Wetlands_on_ESA     Biological_ESA_MT_Intersect = WL_WB_Joined_with_HUC_Basins_Data     Biological_ESA_MT_Intersect_ = Biological_ESA_MT_Intersect               # Process: Select Layer By Attribute: Selects all USACE = "Yes" features     arcpy.SelectLayerByAttribute_management(Waterbodies_UTM13_20130228, "NEW_SELECTION", "\"USACE\" = 'Yes'")          # Process: Select Layer By Location: Selects all features from the USACE = "Yes" features that intersect the ESA     arcpy.SelectLayerByLocation_management(Waterbodies_UTM13_20130228__2_, "INTERSECT", MT_ESA_20131023, "", "SUBSET_SELECTION")               # FieldMappings for Spatial Join process: Create a new "fieldmappings" and add the join features' attribute table     fieldmappings = arcpy.FieldMappings()     fieldmappings.addTable(Waterbodies_UTM13_20130228)     fieldmappings.addTable(wbdhu8_a_mt)          # FieldMappings for Spatial Join process: Get the fields maps for the fields: REGION, SUBREGION, BASIN, and SUBBASIN     RegionFieldIndex = fieldmappings.findFieldMapIndex("REGION")     fieldmap1 = fieldmappings.getFieldMap(RegionFieldIndex)          SubRegionFieldIndex = fieldmappings.findFieldMapIndex("SUBREGION")     fieldmap2 = fieldmappings.getFieldMap(SubRegionFieldIndex)          BasinFieldIndex = fieldmappings.findFieldMapIndex("BASIN")     fieldmap3 = fieldmappings.getFieldMap(BasinFieldIndex)          SubBasinFieldIndex = fieldmappings.findFieldMapIndex("SUBBASIN")     fieldmap4 = fieldmappings.getFieldMap(SubBasinFieldIndex)          # FieldMappings for Spatial Join process: Set output fields and allowed field length to max (255)     field1 = fieldmap1.outputField     field2 = fieldmap2.outputField     field3 = fieldmap3.outputField     field4 = fieldmap4.outputField          field1.length = "255"     field2.length = "255"     field3.length = "255"     field4.length = "255"          fieldmap1.outputField = field1     fieldmap2.outputField = field2     fieldmap3.outputField = field3     fieldmap4.outputField = field4          # FieldMappings for Spatial Join process: Set the merge rule to join using the "; " delimiter and replace the old fieldmaps for each of the fields in the mappings object with updated one     fieldmap1.mergeRule = "Join"     fieldmap1.joinDelimiter = "; "     fieldmappings.replaceFieldMap(RegionFieldIndex, fieldmap1)          fieldmap2.mergeRule = "Join"     fieldmap2.joinDelimiter = "; "     fieldmappings.replaceFieldMap(SubRegionFieldIndex, fieldmap2)          fieldmap3.mergeRule = "Join"     fieldmap3.joinDelimiter = "; "     fieldmappings.replaceFieldMap(BasinFieldIndex, fieldmap3)          fieldmap4.mergeRule = "Join"     fieldmap4.joinDelimiter = "; "     fieldmappings.replaceFieldMap(SubBasinFieldIndex, fieldmap4)               # Process: Spatial Join: Spatially joins the HUC Basins data to the target WL or WB features (attributes are not "joined"; if a WB or WL falls on more than one basin,     # fieldmappings will concatenate attributes from select fields using "; " as a delimiter     arcpy.SpatialJoin_analysis(Waterbodies_or_Wetlands_on_ESA, wbdhu8_a_mt, WL_WB_Joined_with_HUC_Basins_Data, "JOIN_ONE_TO_ONE", "KEEP_ALL", fieldmappings, "INTERSECT")          # Process: Intersect: Intersects the temp output file from Spatial Join containing the joined WB or WL with the ESA, to create WL or WB pieces within the ESA     arcpy.Intersect_analysis([WL_WB_Joined_with_HUC_Basins_Data, MT_ESA_20131023], Biological_ESA_MT_Intersect, "ALL", "", "INPUT")          # Process: Multipart To Singlepart: Explodes all WL or WB pieces into singlepart features     arcpy.MultipartToSinglepart_management(Biological_ESA_MT_Intersect, Biological_ESA_MT_Intersect_)          # Process: Spatial Join (2): Spatially joins the exploded WL or WB features containing the HUC basins data with the Soils Data; attributes ARE "joined" and     # use "; " to deliminate all attributes from features that intersect the WL or WB features     arcpy.SpatialJoin_analysis(Biological_ESA_MT_Intersect_, Montana_Soils__2_, WB_HUC_Intersect_ESA_UTM13_M1, "JOIN_ONE_TO_ONE", "KEEP_ALL", "", "INTERSECT", "", "")      Screenshot of the error window in ArcMap: ![error message](http://i.stack.imgur.com/rXfP3.png) Line 95:               arcpy.SpatialJoin_analysis(Waterbodies_or_Wetlands_on_ESA, wbdhu8_a_mt, WL_WB_Joined_with_HUC_Basins_Data, "JOIN_ONE_TO_ONE", "KEEP_ALL", fieldmappings, "INTERSECT")


title: Writing the where clause in IQueryFilter

text: Building a desktop application using C#.net and arcobjects. I'm trying to retrieve records from a shape file using IQueryFilter. Having trouble writing the where clause in my scenario. The scenario is as follows. I want to only retrieve records that are invalid and fall out side the below condition . The category field in the sample data should be matched with the category field in the "condition" and check the Limits in the "condition" with either "Limit-From" or "Limit-To" field. Either one of the "Limit-From" or "Limit-To" fields should match the limit in the condition. Also both the "Limit-From" and "Limit-To" fields can match the limits in the "Condition ".( when both match also that is not an error). I have inserted a comments field for each record stating the reason for validity/invalidity. According to the sample data, as I want only invalid records, I want just record 6 and 7 as the output from the query. Any help in writing the where clause in the query will be greatly appreciated. (I need only the invalid records. So in this case it should be just 6 and 7) ![alt text](http://i.stack.imgur.com/2Zn4f.jpg) ![alt text](http://i.stack.imgur.com/NgOsw.jpg)


title: Cache tiles doesn't seems to work in GeoServer

text: I've grouped some vector layers (from SHP files) in GeoServer (they are EPSG:2039) and created cache for them (GeoWebCache lets you choose EPSG:4326 OR EPSG:900913) Once I've fired my App it didn't seem to read the cached tiles from the WMS (although they were created in the hard drive folder) Could it be that because of the map projection the tiles are not being read ? (In the hard drive they are stored under EPSG_4326 folder) This is how I init my map :               function init() {             // if this is just a coverage or a group of them, disable a few items,             // and default to jpeg format             format = 'image/png';                  var bounds = new OpenLayers.Bounds(                 155000, 600000,                 246000, 745000             );             var options = {                                 maxExtent: bounds,                 maxResolution: 566.40625,                 projection: "EPSG:2039",                 units: 'm'             };             map = new OpenLayers.Map('map', options);                  // setup tiled layer             tiled = new OpenLayers.Layer.WMS(                 "background", "http://localhost:8080/geoserver/MyWorkspace/wms",                 {                     LAYERS: 'background',                                         format: format,                     tiled: true,                     tilesOrigin: map.maxExtent.left + ',' + map.maxExtent.bottom                 },                 {                     buffer: 0,                     displayOutsideMaxExtent: true,                     isBaseLayer: true,                     yx: { 'EPSG:2039': false }                 }             );                  map.addLayer(tiled);                  // build up all controls             map.addControl(new OpenLayers.Control.LayerSwitcher());             map.addControl(new OpenLayers.Control.PanZoomBar());             map.addControl(new OpenLayers.Control.Navigation());             map.addControl(new OpenLayers.Control.Scale());             map.addControl(new OpenLayers.Control.MousePosition());             map.setCenter(new OpenLayers.LonLat(200300,745000),7);                     }


title: What are the most common functions a GIS web app should have?

text: I'm a programmer making his first steps in the GIS world. In order to get to know this world I wrote some map based apps using WMS / OSM , OpenLayers and MS-SQL (non spatial). Now I want to put it all together and do some more advanced coding (adding caching capabilities for example , thematic map...) What are the most common functions in your opinion a GIS app should have ? I get the obvious are measuring (line and area) probably something related to features info ... But beside that I have no idea what else. I would like to use your experience for making a base app that will answer most basic GIS requirements (and will put together all the technologies I chose to practice with) Thank you.


title: What are the guidelines for the use of non-contiguous cartograms?

text: The non-contiguous cartogram seems to solve a lot of the area distortions seen with traditional cartograms, while preserving the ability to identify areas by their shape lost with Dorling or Demers cartograms. However, I can see how there might be problems related to the size of objects. Are there any practical guidelines on when the ability to comprehend these cartograms breaks down, either by:   * The ratio of the smallest to the largest value, or   * The ratio of the smallest original area to the largest (e.g. in a map of US states, the viewer might have difficulty figuring out whether the values were encoded in the object size or rather in the object's size relative to its original size) Or both? Example cartogram with small states having large values: ![example with small states having large values](http://i.stack.imgur.com/N1iUW.jpg) Example cartogram with not much variation between values represented: ![Example cartogram with not much variation between values represented](http://i.stack.imgur.com/M0fS6.jpg)


title: How to use fanout to accomplish batch clip in FME?

text: Following up on this question. I am trying to implement the fanout method to implement a batch clip that was mentioned as an option. I am having issues with trying to batch clip in FME. This is my workspace: ![enter image description here](http://i.stack.imgur.com/bPqtc.jpg) I feed the Clipper 3 shapefiles (each has only one part) to clip the larger clippee shapefile (that has 59 parts). How do I set up the fanout in the writer so that I write 3 separate shp files? Currently, it writes one shapefile with 15 parts. What I tried was to expose the fme_basename of "All" ( the 3 shapefiles read in as a single merged feature type), and then fanout by fme_basename name in the writer.


title: Where did the texture fill option go in QGIS 1.9 Master?

text: In the previous version (1.8) of QGIS you could select to fill a polygon using a PNG or JPG image. This option seems to have gone from QGIS 1.9 Master. I can get it by selecting the "Old Symbology" button on the Style tab. That's OK but surely this option has not been deprecated (or has it)? Can anybody tell me where the fill by image option has disappeared to because the only other option I appear to have is SVG fill (SVG is very nice, but I also want the flexibility of using a PNG or JPG is that is what I have to hand) - or perhaps the option only exists as the 'old symbology'. Also, does anybody know if it is intended to only allow filling polygons with SVG as opposed to PNG/JPG in the future? Thanks


title: geoserver wfs access denied

text: I've created a role in GeoServer called WFS_ACCESS. I've assigned it to a user called wfs_viewser and have the following rules setup: ![enter image description here](http://i.stack.imgur.com/tGCBe.png) Though when i hit my wfs service and login with wfs_viewer credentials i get an access denied error. As soon as i grant wfs_viewer "ROLE_ADMINISTRATOR" it works fine. What is wrong with my rules? > Build Information Version 2.1.0 Subversion Revision 15809 Build Date > 11-May-2011 20:09 GeoTools Version 2.7.1 (rev -1)


title: Cripplingly Slow Performance While Georeferencing in ArcMap 10.1

text: Just last night I started having an extremely frustrating problem with georeferencing, something that has been integral to my job for a few years now, and something I've never really had a problem with before. Basically, when I try to add control points, the cursor just starts "thinking" forever, and it's nigh unusable. I've read forum posts that say this is an issue with GDI object leaks, and the advice is to reduce the number of rasters in the TOC. I only have one and it's a real small .jpg, so I just don't understand what's going wrong. What could have changed on my system to cause such a drastic performance slump? I am using 10.1 right now, though it was rather recently that I upgraded from 10.0. I'm fairly certain that I've georeferenced images since the upgrade, but maybe I haven't had to yet. Is there a significant difference in how georeferencing works in 10.0 compared to 10.1? Any advice would be appreciated. The .jpg is stored natively (on the C drive), and actually, I think I did only try one raster. It was just such a normal little jpeg I didn't think anything of it. I should try another. I think Snapping may be the answer, actually. I was trying to snap to a huge point layer, and even though it didn't take long to draw (a misguided proxy for overall performance I realize), I think you're probably right about the issue. I'll be able to fix this up tonight and give an update. EDIT: Yes, it was snapping, the point layer I was hoping to snap to was huge. Easy fix. I appreciate the help!


title: How to Reduce Decimal Precision of Image Value in ArcGIS?

text: I'd like to ask about the value on following image. This is an interpolated precipitation layer using IDW method in Arcgis. On this layer, the values is like this: ![precipitation layer](http://i.stack.imgur.com/BoWeT.jpg) This is a raster image. After exporting the above layer into raster image, the value of the raster image has quite long decimals, specially the minimum value looks like this 4.43193612012e007. ![Raster image](http://i.stack.imgur.com/ewRWP.png) I have not only this image but also several images with similar value. When I calculate any equation on those images, output value from that calculation cannot be accepted, they were totally wrong. So how can I reduce the decimal precision before or after exporting to raster? Thank you all.


title: gdal.py as part of bat script in windows 7

text: I need to run the following bat file from a MS4W shell which has gdal_retile.py as the final option. I have added C:\ms4w\python\gdal to my pythonpath but within a pyscripter shell I can not import gdal or gdal_retile.py **Without a linux box is there a way to get the final step to work?** **CODE of P.bat File**               mkdir -p %2\%3     gdal_translate -expand rgba -of GTiff -a_srs EPSG:3857 -co TILED=YES -co BIGTIFF=YES %1 %2\%3\%3_translated.tif     gdalwarp -multi --config GDAL_CACHEMAX 500 -wm 500 -r near -co "COMPRESS=DEFLATE" -co "TILED=YES" -co "BIGTIFF=YES" -srcnodata 255 -dstnodata 255 -overwrite %2\%3\%3_translated.tif %2\%3\%3_rebuilt.tif     mkdir -p %2\%3\pyramids     gdal_retile.py -v -r bilinear -levels 4 -ps 2048 2048 -co "TILED=YES" -co "COMPRESS=DEFLATE" -targetDir %2\pyramids %2\%3\%3_rebuilt.tif          Pause      **OUTPUT of process** > GDAL, mapserv, mapcache, PROJ, and shapelib dll paths set GDAL_DATA path set > GDAL_DRIVER_PATH set PROJ_LIB set CURL_CA_BUNDLE set > C:\Users\georgec\Desktop>P:\2012\183_TownPlanning_Symbology\Working\Raster_Layer > _Creation\4Band_translated_pyramid\p.bat > P:\2012\183_TownPlanning_Symbology\Outp > ut\8_Bit_TIF_Colourmap_RS\TRC_WC_WaterResource_Catchment\TRC_WC_WaterResourceCat > chment.tif > P:\2012\183_TownPlanning_Symbology\Working\Raster_Layer_Creation\4Ban > d_translated_pyramid wc > > C:\Users\georgec\Desktop>mkdir -p > P:\2012\183_TownPlanning_Symbology\Working\Ras > ter_Layer_Creation\4Band_translated_pyramid\wc > > C:\Users\georgec\Desktop>gdal_translate -expand rgba -of GTiff -a_srs > EPSG:3857 -co TILED=YES -co BIGTIFF=YES > P:\2012\183_TownPlanning_Symbology\Output\8_Bit_TI > F_Colourmap_RS\TRC_WC_WaterResource_Catchment\TRC_WC_WaterResourceCatchment.tif > P:\2012\183_TownPlanning_Symbology\Working\Raster_Layer_Creation\4Band_translate > d_pyramid\wc\wc_translated.tif Input file size is 19844, 26300 > 0...10...20...30...40...50...60...70...80...90...100 - done. > > C:\Users\georgec\Desktop>gdalwarp -multi --config GDAL_CACHEMAX 500 -wm 500 > -r n ear -co "COMPRESS=DEFLATE" -co "TILED=YES" -co "BIGTIFF=YES" -srcnodata > 255 -dst nodata 255 -overwrite > P:\2012\183_TownPlanning_Symbology\Working\Raster_Layer_Cr > eation\4Band_translated_pyramid\wc\wc_translated.tif > P:\2012\183_TownPlanning_Sy > mbology\Working\Raster_Layer_Creation\4Band_translated_pyramid\wc\wc_rebuilt.tif > > Creating output file that is 19844P x 26300L. Processing input file > P:\2012\183_TownPlanning_Symbology\Working\Raster_Layer_Cr > eation\4Band_translated_pyramid\wc\wc_translated.tif. Using band 4 of source > image as alpha. Using band 4 of destination image as alpha. > 0...10...20...30...40. **ERROR 2: Out of memory allocating 130520448 bytes > for Unif iedSrcDensity mask**. ..50.. C:\Users\georgec\Desktop>mkdir -p > P:\2012\183_TownPlanning_Symbology\Working\Ras > ter_Layer_Creation\4Band_translated_pyramid\wc\pyramids A subdirectory or > file -p already exists. Error occurred while processing: -p. > > C:\Users\georgec\Desktop>gdal_retile.py -v -r bilinear -levels 4 -ps 2048 > 2048 - co "TILED=YES" -co "COMPRESS=DEFLATE" -targetDir > P:\2012\183_TownPlanning_Symbol > ogy\Working\Raster_Layer_Creation\4Band_translated_pyramid\pyramids > P:\2012\183_ > TownPlanning_Symbology\Working\Raster_Layer_Creation\4Band_translated_pyramid\wc > \wc_rebuilt.tif Traceback (most recent call last): File > "C:\ms4w\python\gdal\gdal_retile.py", line 38, in import gdal ImportError: > No module named gdal > > C:\Users\georgec\Desktop>Pause Press any key to continue . . . I also get the following Error > ERROR 2: Out of memory allocating 130520448 bytes for Unif iedSrcDensity > mask


title: Compare attribute columns of a feature class in ArcGIS

text: Is there a solution in ArcGIS 10x? Thanks. I used GME (newer Hawth's Tools) and was able to count the number of pixels of any raster class within a vector polygon. I am trying to map crops within a field, so sometimes there can be different classes (crops) within a field polygon. GME spits out class counts as different columns. So if I have 3 raster classes, three count columns. I am looking for a solution to compare the counts of these 3 columns and identify the highest count and attribute that to a new column. I.e. I want to identify the dominant crop within the field. I can look at the column count numbers and identify the dominant class, but this isn't very efficient when you have 100's of fields. Sothing similar is what I am looking for: http://www.get-digital- help.com/2009/07/17/extract-largest-values-from-two-columns-using-array- formula-in-excel/ * * * This still doesn't work and Python gives error. I edited the V#V1 as Canola, V#V2 as Barley, V#V3 as Wheat by adding three new text fields, ![enter image description here][1]and then ran:               GetMaxFieldName({"Canola": !Canola!,"Barley": !Barley!,"Wheat": !Wheat!})      A friend helped me solve it in Excel. 1) Run MAX formula in a new column ("Max"; column O) on the four classes (rows K1:N1) to identify the highest count. 2) Add new column ("Crop", column P) after Max and run: `=INDEX($K$1:$N$1,1,MATCH(O2,K2:N2,0))` See image links: http://postimage.org/image/68ham84uv/ http://postimage.org/image/r1sz7e21l/ Let me know if you solve this with Python. Thank you.


title: GIS data for Singapore

text: Are there any free, publicly available datasets for Singapore? I've examined Openstreetmap, Global Admin Boundaries, GRUMP and the Natural Earth datasets, but I'm interested in vector data of higher resolution and or any type of census information. Singapore seems to be a bit of a black hole when it comes to searching for GIS data; I would appreciate any suggestions.


title: How to transform Lambert to WGS84 in SQL Server?

text: Need to create a SQL view of calculated Lat/Lon values from an existing SQL view of County Coords. Loaded up SQL Server Spatial Tools and registerd CLR types. Lambert generated a resource error.               -- Project point and linestring using Lambert Conformal Conic projection      declare @lambert Projection set @lambert = Projection::LambertConformalConic(0, 0, 0, 0) select @lambert.Project('POINT (45 30)').ToString() select @lambert.Unproject(@lambert.Project('LINESTRING (10 0, 10 10)')).ToString() select @lambert.ToString() -- XY going in=(521387.001,204215.954) Need LatLon coming out. Any ideas welcome.


title: Build and export PDF maps using ArcObjects?

text: I have a series of featureclasses and rasters generated using ArcObjects and calls to the Geoprocessor. I have the paths to the output, which are located in a file geodatabase. How can I use ArcObjects to build a map using a combination of these outputs and then save the final map as a PDF (or JPEG/PNG if PDF is not possible)? If this is possible, can I also add a legend/north arrow, etc? The purpose of these maps is quick quality control and the output are all in the same projection and cover the same area. I'm unfamiliar with building visual outputs "behind the scenes" in ArcObjects, so any information that points me in the right direction would be appreciated!


title: Is there a good way to get a diff between an old and a new version of an SDE database?

text: Is there a tool or a process that can reveal changes made to the schema of an SDE database when comparing two versions of the same database hosted on different servers? I have an old database that has been running a site, and a newer version, and I'd like to be able to get a heads up about what has changed in terms of schema and contents.


title: sql server spatial index performance

text: I have a table with around 2 million records in it. I create a spatial index, using the defaults other than the bounding box. I've been noticing that some queries are extremely fast, and some are extremely slow. The determining factor appears to the size of the polygon used in the query. On larger search areas, using `WITH(INDEX(SIX_FT5))` slows down the query considerably (from 0 seconds, to 15+ seconds). On smaller search areas, the exact opposite it true. Here's some of the queries I'm testing with: Fast:               SELECT TOP(1000) * FROM [FT5] WHERE (shape.STIntersects(geometry::STGeomFromText('POLYGON ((-133462.805381701 -668610.241000959, 2934415.68824241 -668610.241000959, 2934415.68824241 2200521.65831815, -133462.805381701 2200521.65831815, -133462.805381701 -668610.241000959))', 2264)) = 1)       Slow:               SELECT TOP(1000) * FROM [FT5] WITH(INDEX(SIX_FT5)) WHERE (shape.STIntersects(geometry::STGeomFromText('POLYGON ((-133462.805381701 -668610.241000959, 2934415.68824241 -668610.241000959, 2934415.68824241 2200521.65831815, -133462.805381701 2200521.65831815, -133462.805381701 -668610.241000959))', 2264)) = 1)       Anyone know what's going on here?


title: Open Layers button event

text: I'm using OpenLayers 2:10 Beginers Guide ebook. This code is APRA create a button click event in an opacity and zoom the map. But already rewritten several times and does not work. Nothing appears. Where is the error?                   <!DOCTYPE html>     <html lang='en'>     <head>      <meta charset='utf-8' />      <title>My OpenLayers Map</title>      <script type='text/javascript' src='OpenLayers.js'></script>           <style type='text/css'>         /*Custom Button*/         .olControlCustomButtonItemInactive {             background:#22dd22;             border:5px solid #202020;             cursor: pointer;             height: 28px;             width: 28px;         }      </style>           <script type='text/javascript'>           //Variável map      var map;           //Função a ser chamada para criar o mapa na leitura da página      function init() {     //Cria o objeto map          map = new OpenLayers.Map('map_element', {});               //Cria a primeira camada usando o serviço WMS, explicitamnete definida como base         var wms_layer_map = new OpenLayers.Layer.WMS(             'Base layer',             'http://vmap0.tiles.osgeo.org/wms/vmap0',             {layers: 'basic'},             {isBaseLayer: true}             );          //Adiciona as camadas ao mapa em uma martriz de objetos de camada         map.addLayers([wms_layer_map);      }           //Função do botão para mudar opacidade e zoom ao evento do click     var custom_button_func = function(){     //Get a random coordinate from -90 to 90     var random_lon = Math.floor(Math.random() * 360) - 180;     var random_lat = Math.floor(Math.random() * 180) - 90;     if(map.layers[0].opacity === 1){     //If the layer opacity is 1 (fully opaque), then change it     and zoom     map.layers[0].setOpacity(.5);     map.setCenter(new OpenLayers.LonLat(random_lon,     random_lat), 3);     }     else{     //If the layer opacity is anything but 1, change it and     zoom     map.layers[0].setOpacity(1);     map.setCenter(new OpenLayers.LonLat(random_lon,     random_lat), 3);     }     };               //Cria o botão com a chamada para a função     var my_button = new OpenLayers.Control.Button({         displayClass: 'olControlCustomButton',         trigger: custom_button_func     });          //Painel onde será exibido o botão     var control_panel = new OpenLayers.Control.Panel({});          //Chama o addControl     control_panel.addControls([         custom_button         ]);          //Adiciona o painel ao mapa     map.addControl(control_panel);          //Move o mapa     control_panel.moveTo(new OpenLayers.Pixel(450,0));           //Informações do centro do mapa      if(!map.getCenter()){         map.zoomToMaxExtent();      }           </script>     </head>          <body onload='init();'> <!-- Chama a função js init() -->           <!--Elemento HTML onde o mapa é exibido -->      <div id='map_element' style='width: 500px; height: 500px;'>      </div>          </body>     </html>


title: unable to copy all rows from xml file to file geodatabase

text: i tried purging a file geodatabase and copying values from an xml file via the load xml document The file has over 400,000 records but only 98000 records copy. I keep getting loading xml recordset document failed. Fatal error parsing xml.Line 2369184, char= 0. Invalid byte 'A' at position 1 of a 1 byte sequence. I tried looking at the mxd table and reviewing the last row added and checking the xml file to remove the row information directly after to see if it would skip this one. It doesn't. It remains at 98000 records


title: Transformation of OGR style data

text: I have been using GDAL/OGR in a project and it is going quite well. I have been re-projecting data from various source formats into a single CRS (using the C# bindings), but one issue I have come across is with the associated OGR style information. Most of the font sizes in the source documents are stored in "map ground units", so if I just copy the OGR style directly the text size will be scaled up or down depending on the differences in the map units. So my question is, what is the best way of converting the map ground units in the style specification from one CRS to another, or in pixel units? Many thanks for any help you can provide,


title: How to have custom symbols show up in Symbol Selector of ArcGIS for Desktop?

text: How do you get Petroleum symbols into the Map legend box (not the content table) instead of the standard "circle or square"? I am looking to use the Unkown (black symbol) and Active / Producing symbols (Red symbol). However when I click on the sybol to open up the property layer box, it only shows the basic symbols, even when you click to add Petroleum. Please see the inserted image. Any help, ideas? ![enter image description here](http://i.stack.imgur.com/FjsPh.jpg)


title: How to use expression to modify feature class name in ModelBuilder output?

text: I am using ModeBuilder to project many raster files from one coordinate system to another. I'd like the output file names to be different than the input. The file names currently end in "utm83" but I want to remove that and add "NAD83". I know how to use the %name% variable to keep the same name, but I'm not sure how to alter that for my desired effect. It seems like I should be able to use the "Calculate Value" with an expression like LEFT(%name%, -5) to get this result but I can't figure it out. Here is what my model looks like: ![enter image description here](http://i.stack.imgur.com/DEtES.jpg)


title: How to maintain scale dependencies when exporting map document to SVG file?

text: I have a big probem to convert map document file to SVG . I want to use SVG file in mobile.I use ArcGIS desktop 10.2 and I want to convert the MXD file to SVG. I surf in internet and found a few tools to convert the shapefile to SVG file but they not useful for me. I think Mappetizer is the best option but it's not open source, while another option is Export to SVG but it's not respecting the scale dependencies of layers. My Map Document has multiple layers and each layer has minimum and maximum scale. Is there any open source tools or any solution to convert my map document with minimum and maximum scales to SVG file authomatically?


title: Is it possible to copy and paste features in an online Edit function?

text: Using the ESRI JS API, is it possible to select a feature and then create buttons to copy and paste that feature? This would be done using the Editor Widget. If its possible to do this, but only retain the shape (loosing the attributes) I could live with that. If its not possible using the ESRI JS API, can it be done simply with Dojo?


title: How do I use WMS in mapinfo 10.0?

text: Is there any way that I could use google maps or bing map or other free map provider as WMS?


title: How to translate (reposition) a raster in Python?

text: I tried to use QGIS GeoReferencer to translate a raster layer, but somehow failed. It just goes to somewhere unexpected. Now I decide to do it myself, with python. I think some libraries like GDAL must have done it. I only want to do an x-offset and y-offset with the tif, with no scale and rotation. Do you know what module I could use?


title: How to bring all "tourism:attraction" from points table and polygon table together?

text: Im using OSM data as osm2pgsql-import (from extract.bbbike.org). And I want to draw all attractions ("tourism" = 'attraction'). The most of the attractions I found in the planet_osm_point table. But some are missing. I found them in the planet_osm_polygon table. For example: A very important church and attraction is a building-shape in the polygon-table and is missing in the points table. But I will draw ALL attractions as a point in a point-layer in my qgis. I’m sure that there is a elegant solution with postgis - but I’m very new to postgis and have no idea where to start. To draw the points layer AND the polygon-centroids together is no solution for me.


title: How to calculate highway lengths using QGIS?

text: I need to create a network of highways in 8 states of the USA. Eventually, I need their length, the speed and if possible average daily traffic volume, I don't know how to extract this information. I am using QGIS (for the first time today), to create my map. I already have the map, so my question is how to calculate length of roads?


title: Geocortex Viewer: Running a Workflow with Arguments

text: I have a webpage with the Silverlight Geocortex Viewer embedded in it. Through the browser's developer console, I can run commands through it such as               silverlightPlugin.Content.essentialsViewer.RunCommand("RunWorkflow", "demo1");      However, I can't figure out how to run a workflow that has arguments. There's another command called "RunWorkflowWithArguments". Doing the following doesn't produce any results:               silverlightPlugin.Content.essentialsViewer.RunCommand("RunWorkflowWithArguments", {"workflowId":"demo2", "my_string":"test", "my_int":3} );      The developer manual said: Parameter: An object with the following properties: workflowId, and a named property for each workflow argument.


title: How to process multiple images in Grass GIS

text: first of all, I have to mention that I'm almost new working with Grass and I'm using Grass 6.4.3 on Linuxmint 16. I need to process a large number (~300) of Landsat images. I have downloaded the images from the USGS, I have all of them unzipped, and one folder for each scene containing one file for each band and the metadata file. I need to read/import all the bands of each scene, apply them the radiometric conversion and the atmospheric correction (i.landsat.toar), then do some calculations (r.mapcalc) and finally write a new raster file with the results of these calculations (r.out.gdal?). I can do it manually, importing all bands for each image and doing all the process one by one. That could take me a long time. Much better would be to run a batch job. Could you help me to do it? I've been searching and reading a lot on the web, but I didn't find a solution. So, my problem is: how can I do to read one file, process it, save it, and then read the following file, etc. I have a background programming (R and other languages, not in Python) but I couldn't understand how to perform a batch job inside Grass. Is there a step-by-step tutorial explaining how to do it? Is it possible to read external files and folders in Grass? or I have to import all the raster files to the mapset first and then run the batch job? Thanks a lot! **EDIT:** I think I have reached to something useful, now I have this code:               #!/bin/bash     # Directory where the images are stored     ImgDir="/home/lbianchi/Images/"          for Dir in $(find $ImgDir* -maxdepth 0 -type d ); do     cd $Dir          # Import all files(bands) in de directory          for files in $(find . -iname '*.tif'); do        thefile=$(basename $files)       importedname=${thefile:0:24}       fullpath=$PWD"/"$(basename $files)             r.in.gdal input=$fullpath output=$importedname     done          # once the bands are imported, apply i.landsat.toar     inputname=${thefile:0:23}     correctedname=${thefile:0:22}"toar_DOS4_"     metadata=${fullpath:0:97}"MTL.txt"     i.landsat.toar input_prefix=$inputname output_prefix=$correctedname metfile=$metadata sensor=tm5 method=dos4     echo $inputname"--"$correctedname     cd ..     done          echo "the end"     exit 0      It does almost what I need, can you help me to improve it? And more important, is there a way to do the same process but without importing ALL files to the Mapset. Otherwise I'm thinking in deleting the imported files once the process is finished. Thanks again.


title: Where can I find a histogram of the grade of the Earth's surface?

text: I've found a histogram of the elevation of the Earth's surface on Wikipedia: ![Elevation histogram](http://i.stack.imgur.com/bZrb0.png) However this doesn't give any information about the distribution of grade. For example, the entire surface could be made entirely of little hills and have a high grade everywhere, or the surface could be composed entirely of perfect plateaus, putting the average grade at 0°. Obviously both these scenarios are untrue, but it illustrates how this information cannot be determined from the elevation histogram alone. Does anyone know where I can find a similar histogram for grade?


title: How to convert drawn vector feature from EPSG:900913 to EPSG:4326

text: My script allows you to drawn shapes on an openlayers map, and then to get the WKT information from that shape, except the returned coordinates are in 900913 and i need them to be in lat/lon. thanks


title: Using jquery to reset layer in OpenLayers

text: I've used a combination html, jquery and cql to redraw layers in Openlayers using specified parameters. This worked fine as seen here: http://www.dartmoor-npa.gov.uk/index/test-map3 I also want to reset the layer to show all features. I've added a reset button to the top of my page and another jquery finction at the bottom. Unfortunately this doesn't work. Not sure where I'm going wrong here. Do I need to combine both the jquery functions into one? Here is my code in full.               <form id="form">     <select id="camping" name="camping">     <option value="All" selected="selected">All Types</option>     <option name="camping" value="Yes"> Permitted</option>     <option name="camping" value="No"> Not Permitted</option>     </select>     <input id="reset" type="reset" value="reset" />     </form>          <script type="text/javascript" src="http://maps.nationalparks.gov.uk/resources/openlayers/OpenLayers.js"></script>      <script type="text/javascript">                (function () {      var map, DNPA_camping;           function initilize() {              var options = {              controls : [new OpenLayers.Control.Navigation(),             new OpenLayers.Control.Attribution(),             new OpenLayers.Control.PanZoomBar({id: "anpa"})],                maxExtent : new OpenLayers.Bounds(0, 0, 800000, 1300000),                   projection : "EPSG:27700",              units : "m",             id: "anpa",             theme: null,             resolutions: [ 200,50,25,10,5,2.5,1.25,0.635,0.156 ]          };               //Create the map object         map = new OpenLayers.Map( 'npmb-map', options );               var DNPA_camping = new OpenLayers.Layer.WMS('Camping allowed',                 {                   layers : 'DNPA-camping',                                      format : 'image/png',                            transparent: true,                                   tiled : true                              }, {                   buffer : 0,                   visibility : true,                           tileOrigin: new OpenLayers.LonLat(0,0),                      isBaseLayer: false,                                  transitionEffect: 'resize',                              attribution:''                 });          map.addLayers([DNPA_camping]);           var mapContext = OpenLayers.Util.getParameters();     var zoom = mapContext.zoom ? mapContext.zoom : 0;     var centre = mapContext.centre ? mapContext.centre : [280590, 78574];     map.setCenter(new OpenLayers.LonLat(centre[0], centre[1]), zoom);          //Jquery needed to call input     $("#camping").change(function () {         DNPA_camping.setVisibility(true);     filterval = "use like '%" + $(this).val() + "%'";         DNPA_camping.params.CQL_FILTER = filterval;         DNPA_camping.redraw();     });              //Jquery needed to reset layer           $("form").bind("reset",function(){             $('#camping').change(function(){              DNPA_camping.setVisibility(true);             DNPA_camping.redraw();         })       });


title: Creating line transects for sampling across raster and vector data (stack profile)

text: I am working on a project that requires sampling across both raster and vector datasets using Arc 10. I have been created polylines as transects over the study area and applied the "stack profile" however it is not reading any data in the xy graph it should produce. Does anyone have experience with this tool? Best wishes, Kerr


title: gdal_merge_raster.py ; Names of huge number of input images

text: gdal_merge_raster.py I am trying to make a stack including huge number of images. I am just wondering whether there is a way to avoid writing all the input images names !!!!!! Thanks


title: How to turn a moving agent to the specific coordinate

text: I have a moving agent in gis map that is going to the special coordinate. With assumption that maximum angle of rotation is predefined, I want the agent turn into specified coordinate (in moving) and then go to that location. What do I do for this work? please help me. ![enter image description here](http://i.stack.imgur.com/7XdIX.jpg)


title: Serving multiple styles from tile server

text: I installed an OSM Mapnik tile server (according to the switch2osm documentation). Now, i'd like to serve tiles in different styles from the same server. Is this somehow possible?


title: How to add or remove layers using esri javascript api

text: I want to use javascript and dojo to add and remove layers.


title: Is there a SDE command to export/import feature class schema only without data?

text: I'm using ArcGIS Server 10.0, ArcSDE 10.0 and Oracle 11g. I'd like to create a sde export of my layers' schema. The export would be used to create easily those layer in a new database instance. Do you know of an export/import SDE command that allows that? Or at least, is it possible to import an XML schema file using a SDE command or Python script?


title: Any example for Google like the bing OpenLayers/examples/bing-tiles-restrictedzoom.html?

text: I would like to restrict zoom levels in Open Layers for a Google Map. A bing example shows how to limit the extent of the bing tiles:               var road3 = new OpenLayers.Layer.Bing({         name: "Road tiles with 3 zoom levels",         type: "Road",         key: apiKey,         maxResolution: 76.43702827453613,         numZoomLevels: 3     });      But I cannot find a google example which does this same thing in open layers. Found OpenLayersAndGoogleMapOverlays but didn't work. I used it to build this fiddle which also doesn't work.


I have an arcmap project using an arcims service from NOAA ENC (http://ocs- spatial.ncd.noaa.gov) but maybe the service is unavailable right now and I can't access to imagery... Is there an image service from GOES available for ArcGIS?


title: ogr2ogr kml to shp conversion created 184 shapefiles?! What am I missing?

text: I'm trying to convert this KML dataset of ice arenas to a shapefile using ogr2ogr (GDAL 1.8). After some initial troubleshooting to get the script running, it's creating 184 different shapefiles (736 unique files including required siblings)! My ogr2ogr script is essentially this, with some extra flags. The `-append` and `-skipfailures` flags are necessary (not sure if precision or geometry are doing anything, but I'm pretty sure they don't hurt). I'd prefer not to use `-skipfailures`, as clearly it means losing data, but without it the script won't finish:               ogr2ogr -f "ESRI Shapefile" "E:\4_GIS\HockeyArenas\shp\ice_rinks.shp" "E:\4_GIS\HockeyArenas\doc.kml" -lco PRECISION=false -nlt "geometry" -append -skipfailures      Ultimately I want to move this data into PostgreSQL/PostGIS, but if it's making 184 shapefiles, I don't want to litter my PostGIS db with 184 tables.. Anyone know how to get one shapefile, preferably without using `-skipfailures`? Thanks, community.


title: Creating polygons using offsets from other polygons

text: Wondering if you I might get some advice on how to best create a polygon within a polygon based on an offset in ArcGIS. I have one layer that is a cadastral layer and another that is a building footprint layer (both polygons). The cadastral layer is plotted using coordinates but the building layer is based on offsets from the cadastral layer. What is the best way draw the building footprints in arcgis using an offset? ![enter image description here](http://i.stack.imgur.com/KDuEr.jpg)


title: Read negative elevation data from NASA png tiles

text: I query NASA JPL service using query string. Response is a unsigned 16 bit per pixel png image and the values are elevation values in meters. Same is described in the capabilty xml of the layer as can be seen below:               <Layer queryable="0">           <Name>worldwind_dem</Name>           <Title>SRTM derived global elevation, 3 arc-second</Title>           <Abstract>         A global elevation model, prepared from the 3 arc-second SRTM dataset by filling some of the problem areas. Prepared by the NASA Learning Technologies.         The default style is scaled to 8 bit, non-linear.         It is possible to request the elevation data in meters by the short_int tyle and requesting PNG format. The resulting PNG file will be a unsigned 16 bit per pixel image. The values are then the elevation in meters.         Values are signed 16 bit integers, but PNG will present them as unsigned, leading to a few areas with very large values (65000+)         For elevation values in feet, request PNG format with the style feet_short_int.           </Abstract>      When I read the elevation using following code               var pixel = bmp.GetPixel(rowIndex,                              colIndex);     var value1 = BitConverter.ToInt16(new byte[] { 0, pixel.B },                                       0);      I read the positive elevation value correctly but unable to read negative value. The query string tile mentioned above covers all the case, it has data for +ve, zero and -ve values.


title: Loading Postgis Layers in a desktop application using C#

text: I have layers in a postgis database that I can load in a MapWindows Control (ocx) using a npgsql connection and creating a shapefile using the geometry field in a Visual Studio .Net 2010 (C#) application, but this is really slow when the layer contains too many features. I have seen that QGIS loads postgis layers very fast and I want to know if is possible to use the QGIS functionality in any way in a Forms Application using C#, like a DLL or an ocx control. I need to load postgis layers in a display control with legend and be able to change colors, symbology, labels, etc. Also, I need to save any changes in the layer to the postgis database. Any help will be appreciated. Thanks. * * * Update: Unicoletti, thanks for your reply. I don't see the way to use swig to open a postgis layer and show it in a windows forms. I was wondering if there is any way to encapsullate qgis functionality to do that. I want to have a control in a form and programatically open a postgis layer on it and, later, manage the properties of that layer, line color, fill color, legends,... Right now I'm using MapWindows ocx but loading postgis layers is really slow, as it's made creating a shapefile and adding shapes to it one by one (using feature data objects). If you know where to find a complete application example that loads a postgis layer using QGis functionality in c# or even in c++, it would be very appreciated. Thanks, and sorry for my bad english.


title: Can't compute area of shapefile in field calculator

text: This shapefile represents the counties of NM. I am trying to compute the area of each polygon (yes, I know there is an area field, but this is a simpler example of a problem I'm having which doesn't have the areas). I load the shapefile into qgis and set the projection to UTM 13 NAD 83. I open the attribute table, enable editing, open the field calculator, select new field, real number, 20 digits, 4 digits precision, and set the expression to $area. Of the 33 counties, all but 3 show an area of 0. The 3 with non-zero values have values that bear no relationship to the actual area. I also tried reprojecting the shapefile to Conus Albers, open that in a project with the Conus Albers CRS, and get the same result. Obviously I'm doing something very wrong, but I'm not seeing it. qgis 2.02 64 bit Windows 7 Pro, 64 bit


title: Select all vector features underneath the mouse cursor (clientside)

text: I have a number of polygons that are exactly equal **covering each other** and shown on one layer. When using OpenLayers.Control.SelectFeature - only the topmost feature is selected. How to get info on other features, which are under the topmost polygon?


title: How to change icon symbols in QGIS? Can icons have JavaScript animations?

text: There are a lot of SVG files located in the "QGIS Dufour" Program Files folder on my PC. I was thinking that I could find the symbol that I want to change in the GUI in this listing in InkScape so I can actually have my own custom data points. However, when I transfer the edited .svg file back to the folder it's contained in I get an error: "Error 0x80070570" * * * I don't know what these data are, but this is the data associated with the symbol I want to replace:               <!DOCTYPE qgis_style (View Source for full doctype...)>     - <qgis_stle version="1">      - <symbols>       - <symbol alpha="1" type="marker" name="star3">     .     .     .      It goes on. I'm not sure what this is. * * * I just want a biohazard symbol and a school symbol. * * * Just as an aside, can these images have JavaScript animations?


title: Changing list-item css class using ng-class when mousing over Leaflet Map Markers

text:
I've got a doozy of an ng-class problem. So I have an app with a map/markers on the right and a list-item menu on the left with info about the markers (like Yelp or Foursquare). With some of my beginner hacking, I got the hover events to sort of work: ![Map examp](http://i.stack.imgur.com/RHZmo.png) But it's odd, the list-item (pink background on hover) only works when I mouseout of the marker. I'm trying to set it up so that when you mouse over the marker, the appropriate list-item's background changes and when you mouseout, it goes back to white. Most of the other ng-class examples/questions I read through seem to work quite differently (they're going for a different functionality). Ok, to the code: **HTML**

         The key part there is the `ng-class="{hover: $index == hoveritem}"` Now I'll show you where hoveritem comes from **Controller**               $scope.hoveritem = {};              function pointMouseover(leafletEvent) {             var layer = leafletEvent.target;             //console.log(layer.feature.properties.id);             layer.setIcon(mouseoverMarker);             $scope.hoveritem = layer.feature.properties.id;             console.log($scope.hoveritem);         }              function pointMouseout(leafletEvent) {             var layer = leafletEvent.target;             layer.setIcon(defaultMarker);         }              $scope.menuMouse = function(show){             var layer = layers[show.properties.id];             //console.log(layer);             layer.setIcon(mouseoverMarker);         }              $scope.menuMouseout = function(show){             var layer = layers[show.properties.id];             layer.setIcon(defaultMarker);         }                             // Get the countries geojson data from a JSON         $http.get('/json/shows.geojson').success(function (data, status) {                  angular.extend($scope, {                 geojson: {                     data: data,                     onEachFeature: function (feature, layer) {                         layer.bindPopup(feature.properties.artist);                         layer.setIcon(defaultMarker);                         layer.on({                             mouseover: pointMouseover,                             mouseout: pointMouseout                         });                         layers[feature.properties.id] = layer;                         //console.log(layers);                     }                 }                  });         });          }]);      So mousing over a marker (`layer.on({ mouseover: pointMouseover, mouseout: pointMouseout });`) fires the appropriate functions which then changes the icon colors. I connected the `layer.feature.properties.id;` to `$scope.hoveritem` so that my HTML can then use that as the index (for ng-class). When you mouseover a marker, it then feeds the marker id through to $scope.hoveritem which then it turn goes into the `$index` part of the HTML, thus changing it's CSS class. But something is awry. It only changes to the correct list item on mouseout instead of mouseover. Furthermore, I can't figure out to get it to return to the default white state. None of the list items should look active if the mouse is not on a marker. Any ideas or hints on this would be very appreciated.


title: How to increase the width and height of an image using gdalwarp?

text: I had a input tif file of size 936x736, pixel size <30.000,-30.000> and Block=936x10. When I increase the width and height to 1872x1572 using               gdalwarp -ts 1872 1572 input.tif output.tif      then the output.tif size is 1872x1572, pixel size is <15.00,-15.00> and Block=1872x4 Is this the correct way to increase the size? I had to upscale this image so I can use it in pansharpening.


title: How to create contour lines from point data?

text: I'm using QGIS 2.4.0 and I have a shapefile of points with elevation data and X and Y coordinates. I'm using windows 7 OS. The idea is to create a contour line SHP using my point data. My question is: How do I start working on that issue? Is there a function? Is there a step by step process?


title: Are there any Open Source (Also Free) GeoBI solution?

text: I am searching for a BI suite with Geo capability.   1. It should have basic function like showing spatial data from spatial database like postgres/sqlserver etc (Qgis like feature)    2. It should have dashboard functionality (also in real time).   3. It Should be able to create thematic map of different kinds (point,region ranges etc) I want to know this before I start coding on my own? Solution I have gone throught:   1. Petaho   2. Jasper


title: Where to obtain LiDAR Data for Romania?

text: I need LIDAR Data for realizing a urban hydrology study (Romania areas), whence I can get this data? There is a chance to obtain data for this area (Cluj-Napoca city)? I'm PhD student are chances to get free data?


title: How to remove vertices or lines within a polygon?

text: I have transformed a *.dxf-file into a polygon shape-file. In many of the polygons i have lines whicht do not belong there but i can not delete them as i normally delete vertices on polygons by selecting it and pressing the delete key. Here an Image (the lines which i want to delete are circled in red). ![enter image description here](http://i.stack.imgur.com/3Z3xN.png) https://www.dropbox.com/s/62hapho1ip7vgij/screenshot.PNG Thx for helping!


title: openlayers gets all features

text: I need to get all features' names, and for that I did a listview to put all features' names on it. So when i click one feature, not on the map but on the listview, the feature must be selected. Here it is my code:               for(var f=0;f<select.features.length;f++) {                  if(select.features[f].attributes.ADI == "TALAS") {             alert(select.features[0].attributes.ADI);                  break;             }     }      When I click a feature on a map, the select.features.length will be 1. But I don't need to select the feature on the map, I must have the array of features and then I search attributes on this array and select that feature. That's what I would like to get. I appreciate for any hint to get this working, thanks in advance. i try to write some codes about that.               select.removeAllFeatures();                          filter = new OpenLayers.Filter.Comparison({                     type: OpenLayers.Filter.Comparison.EQUAL_TO,                     property: "ADI",                     value: "TALAS"                   });                        filterStrategy = new OpenLayers.Strategy.Filter({filter: filter});                 groups = new OpenLayers.Control.GetFeature({                  strategies: [new OpenLayers.Strategy.Fixed(),filterStrategy],                 protocol: OpenLayers.Protocol.WFS.fromWMSLayer(ilce)                  });                      select.addFeatures(groups.feature);      i got this error message : Uncaught TypeError: Cannot set property 'layer' of undefined


title: Getting Error while exporting

text: I am making an addin to create subsets and export them to a new workspace. I have stepped through my program and getting error at this particular line while running the addin:               pExportOp.ExportFeatureClass((IDatasetName)pFeatureClassName,              pQueryFilter, pSelSet, pGeometryDef, (IFeatureClassName)pOutDatasetName, 0);      Can someone help that what the error could be.


title: Generate 3D grid in ArcGIS

text: I have DEM layer which I am vieving in ArcScene and project the z index to view actual 3D view of the DEM surface.Now i want the grid surrounding this DEM something like Fish net but a 3D having grid in all three axis.


title: Creating markers(vectors) in openlayers

text:
I'm new to OpenLayers,currently in existing project they have created markers in openlayers map by using following code,               // vector layer creation     vLayer = new OpenLayers.Layer.Vector(layerName, {             projection: map.displayProjection,             extractAttributes: true,             styleMap: new OpenLayers.StyleMap({'default' : MarkerStyle}),             strategies: [new OpenLayers.Strategy.Fixed()],             protocol: new OpenLayers.Protocol.HTTP({                 url: listurl,                 format: new OpenLayers.Format.GeoJSON()             })         });          map.addLayer(vLayer); // Adding the vector layer to the map      To display markers,coordinates are fetching from the url, but now we are having coordinates information in a hidden block of HTML like as follows
         <input type="hidden" id="latitude_1" value="17.43189">         <input type="hidden" id="longitude_1" value="78.447167">

         <input type="hidden" id="latitude_2" value="15.43189">         <input type="hidden" id="longitude_2" value="76.447167">
      Now instead of fetching coordinate information from url,I want to use above information(which is in hidden block of HTML) to show markers,how can we modify existing code ? I've chance to modify HTML code according our convenience.


title: R gridding and contouring options

text: I want to make an interactive web mapping application, which will grid and contour user data. My plan is to implement R scripts with Shiny, but the only R package I can find to do this is gstat. And with gstat, the only option for gridding that I can see is Kriging. Is Minimum Curvature available in some CRAN package, or is my plan completely unrealistic and I should use something like GRASS? Thanks for your help


title: What is the relation between geotools and hibernate-spatial ( differences and similarities)

text: I know that hibernate-sapatial is supposed to be an abstraction for the db . And from what i understand there is some kind of possibillity to do that with geotools? ( to what extent i do not know). Someone please clarify this.


title: Looking for Raster Renderer statistics in ArcObjects

text: I've got a plug-in for ArcMap that I have been working on. I have my own renderer seperate from ArcMap that I am using to display imagery. My goal is to sync up the display of this imagery with that produced by the renderer that ArcMap is using. My ideal solution would be to get a copy of the lookup table that Arc is using in displaying the image. I thought this might be buried somewhere in the IRasterStretch interface, particularly in the IRasterStretch2.StretchStats method described here: IRasterStretch2.StretchStats Description Unfortunately, I cannot figure out what the method is returning. Basically, I am looking for what "ISomething" should be in the code snippet below:               IRasterStretch2 irs = irrgbr as IRasterStretch2; //irrgbr is of type IRasterRGBRenderer.     IArray ia = irs.StretchStats;     ISomething value = ia.get_Element(0) as ISomething; // What should "ISomething" be?      If anyone has any other ideas on how to go about getting the lookup table and/or statistics that the renderer is using to draw the raster layer, please let me know. Many thanks!


title: Can you use Google Maps offline, with OpenLayers?

text: I use OpenLayers, GeoServer and PostGIS in my application. Is it possible to have Google maps offline? No need to connect to internet to get it. I'm working to make my app working offline only for security matters. If not, then what do you recommend me to replace it with?


title: converting UTM - Decimal Degrees with javaScript or using a web service

text: I am creating a wildlife survey form that has a field where users enter location. Users will be able to enter location using a map (i.e. draggable pushpin) or by manually entering lat/lng. My clients are also requesting an option for entering UTM coordinates. If a user does enter UTM coords I would like to convert these before pushing to the database. I've seen a couple websites that have utilities for converting UTM to decimal degrees. Does anyone know of a javaScript lib that will make these conversion given zone and easting-northing? I also saw this thread Convert geographic coordinates to UTM zone 29N with Javascript Does ESRI have a web service that I could pass UTM coords to and get lat/lng back?


title: can the Identify Features button in QGIS list data in natural order

text: Is there anyway to get the Identify Features button in QGIS to list my attribute data in their natural order, NOT in alphabetical order?


title: Field's name with numbers: why not?

text: I have tried to create field in TOC called with numbers with python. But, it has a problem: it couldn't do it because name's of fields are numbers. It is strange for me. When I do new field in shape file with mouse and put name field with number I haven't had problem.


title: Is it possible to alter raster values without Arcpy?

text: I'd like to be able to alter raster values, through fairly simple equations, without using the module Arcpy. Is that possible? It seems like gdal, numpy, and rasterlang might make this possible but I'm having trouble figuring out exactly how. Any help would be appreciated.


title: Free good quality small scale (1:70,000) global coastline datasets?

text: I've been searching for a few days for the most accurate world coastline datasets.. Does anyone know where l can get coastlines at scales of 1:250 000, 1:2 000 000 and 1: 70 000. I've tried using the NOAA NGDC extractor but my 1:70 000 medium resolution coastlines only cover the US and the rest of the world is omitted. I already have 1: 1 000 000(VMap0). Please point me in the right direction of where l can easily download good quality large-scale global coastline datasets. Any help will be greatly appreciated


title: Query task issue with Arabic input

text: I am using ArcGIS Java Script API version 2.8 & using query layer in ArcGIS server. The data is coming from sql server and most of the data is in Arabic. I am sorting the data according to the particular map is displaying. I have created the query task and the result will be displayed in a combo-box but when I select Arabic record, the map is displaying blank. If I select English record then its displaying correctly. For details please check the screenshot. The column type is `nvarchar` in sql server and in query task, I am using the `where` condition as follows but still getting an error:               query.where = "STATE <> N''"  (In sql server query works if I use N'<Arabic text>')       What I tried:   1. Changed the query parameter.    2. It works perfectly for English names.   3. Added UTF 8 encoding.    4. Upgraded API to 3.2 (latest one)   5. In Sql server where query works successfully.  Still getting an error. Any help will be great!!! thanks in advance : ) @All I confirmed through REST API and through API that I was able to query to the database. Please check the new screenshots So as far as the logic, the information is coming but its not displaying on the map (its interesting), also I have checked parameters in the map service and still researching. ![enter image description here](http://i.stack.imgur.com/hYMZD.png)![enter image description here](http://i.stack.imgur.com/ehPiw.png)![enter image description here](http://i.stack.imgur.com/crjYW.png)![enter image description here](http://i.stack.imgur.com/wdjhm.png)![enter image description here](http://i.stack.imgur.com/eN5CD.png)![enter image description here](http://i.stack.imgur.com/ymYNH.png)


title: how can i render geojson format and gml format?

text: I can show wms png format my map but i didnt render jeojson and gml format by the way my url is correct service. İn additonal i used same code in my local and i can render local geoserver . plz show some way ??? some code in comment line . Why firebug say openlayers protocols undefined .But when i use my local geoserver and i can edit options and url i can show map gml and geojson format in my local .But when i add service url i didnt render .But again i can render wms format . İ didnt use proxy when i work in servcice url dont remember.Thanks for advice ???? My enviroment Openlayers , Geoserver                      <!DOCTYPE html>                         <html>                    <head>                  <script src="http://myurl.com/geoserver/openlayers/OpenLayers.js"       type="text/javascript">            </script>                <!--<script src="http://svn.osgeo.org/metacrs/proj4js/trunk/lib/proj4js-combined.js">   </script>-->        <style type="text/css">                /* General settings */                  body {                 font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;                 font-size: small;             }             /* Toolbar styles */                      #toolbar {                 position: relative;                 padding-bottom: 0.5em;                 display: none;             }                     #toolbar ul {                 list-style: none;                 padding: 0;                 margin: 0;             }                  #toolbar ul li {                 float: left;                 padding-right: 1em;                 padding-bottom: 0.5em;             }                  #toolbar ul li a {                 font-weight: bold;                 font-size: smaller;                 vertical-align: middle;                 color: black;                 text-decoration: none;             }                  #toolbar ul li a:hover {                 text-decoration: underline;             }                  #toolbar ul li * {                 vertical-align: middle;             }                  /* The map and the location bar */             #map {                 clear: both;                 position: relative;                 width: 778px;                 height: 330px;                 border: 1px solid black;             }                  #wrapper {                 width: 778px;             }                  #location {                 float: right;             }                  #options {                 position: absolute;                 left: 13px;                 top: 7px;                 z-index: 3000;             }                  /* Styles used by the default GetFeatureInfo output, added to make IE happy */             table.featureInfo, table.featureInfo td, table.featureInfo th {                 border: 1px solid #ddd;                 border-collapse: collapse;                 margin: 0;                 padding: 0;                 font-size: 90%;                 padding: .2em .1em;             }                  table.featureInfo th {                 padding: .2em .2em;                 text-transform: uppercase;                 font-weight: bold;                 background: #eee;             }                  table.featureInfo td {                 background: #fff;             }                  table.featureInfo tr.odd td {                 background: #eee;             }                  table.featureInfo caption {                 text-align: left;                 font-size: 100%;                 font-weight: bold;                 text-transform: uppercase;                 padding: .2em .2em;             }         </style>                      <script defer="defer" type="text/javascript">          OpenLayers.ProxyHost = "/gt/proxy.cgi?url=";          var lon = 5;         var lat = 44;         var zoom = 5;         var map, layer;              function init(){             var bounds = new OpenLayers.Bounds(                     25.663514785385082,35.80899164217125,44.82543228354381,42.10495847294918                 );                       var options = {                     controls: [],                     maxExtent: bounds,                     maxResolution:6541.59135,                     projection: "EPSG:4326",                     units: 'm'                 };                       map = new OpenLayers.Map('map', options);                      map.addControl(new OpenLayers.Control.PanZoomBar({                     position: new OpenLayers.Pixel(2, 15)                 }));                 map.addControl(new OpenLayers.Control.Navigation());                 map.addControl(new OpenLayers.Control.Scale($('scale')));                 map.addControl(new OpenLayers.Control.MousePosition({element: $('location')}));                                             //Gml geliyor kardes                  map.addLayer(new OpenLayers.Layer.Vector("GML", {                 isBaseLayer: true ,                  //styleMap: myStyles,                      protocol: new OpenLayers.Protocol.HTTP({                     url: "http://myurl.com/geoserver/Tarim/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=Tarim:Iller&maxFeatures=50",                     format: new OpenLayers.Format.GML()                      }),                 strategies: [new OpenLayers.Strategy.Fixed()]             }));                             /*var geojson_format = new OpenLayers.Format.GeoJSON();             var vl2 = new OpenLayers.Layer.Vector("",{isBaseLayer: true});             map.addLayer(vl2);                  var selectCtrl = new OpenLayers.Control.SelectFeature(vl2,                 {                 clickout: true, onSelect:onFeatureSelect }             );             var hoverCtrl = new OpenLayers.Control.SelectFeature(vl2,                 {highlightOnly: true}             );             //map.addControl(hoverCtrl);                  //hoverCtrl.activate();                  map.addControl(selectCtrl);             selectCtrl.activate();                  function onFeatureSelect(evt) {                 map.zoomToExtent(evt.geometry.bounds, closest=true);             }                  //v12.events.register("featureselected", v12, selected);                  //var controlu = new OpenLayers.Control.SelectFeature(v12);                  //map.addControl(controlu);             //controlu.activate();             //var bounds = new OpenLayers.Control.Navigation({             //defaultDblClick: function(event) { return; }             //});                  //map.addControl(Navigation);                       var report = function(e) {                 OpenLayers.Console.log(e.type, e.feature.id);             };                 function handler(request) {               vl2.addFeatures(geojson_format.read(request.responseText))      map.zoomToExtent(bounds);     }                var request = OpenLayers.Request.GET({       url:"http://my url.com/geoserver/Tarim/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=Tarim:IcmeSuyuHatti&maxFeatures=50&outputFormat=json",                 callback: handler       });*/                   }        </script>       </body>       </html>


title: affine transformation on geotiff

text: I have a bunch of geotiffs stored in a PostGIS DB that i am mounting on my OpenLayers map. ![enter image description here](http://i.stack.imgur.com/ow5eI.png) They all have the geoTransform information in them. I just want to know how i can mount them on my OpenLayers map with the correct affine transformation without running a gdalwarp on all the images. Though i wouldn't mind calling gdalwarp on the fly if possible. I just don't want to store those warped images in the DB (they take up 8x more space). **Can OpenLayers rotate my image based on the GeoTransform info in the GeoTiff? If so how?** : ![enter image description here](http://i.stack.imgur.com/axS8q.png) This is the code i'm using to overlay my tiff:               var bounds = MyOrg.UI.Map.Results.Layer.features[array_index].geometry.bounds;          var options = {         numZoomLevels: 15,         isBaseLayer: false,         resolutions: MyOrg.UI.Map.getMap().layers[0].resolutions,         maxResolution: "auto",         projection: MyOrg.UI.Map.Projections.Mercator,         strategies: [new OpenLayers.Strategy.Fixed()]     };          var graphic = new OpenLayers.Layer.Image(         'test',         'GranuleImage.ashx?granuleID=' + MyOrg.UI.Map.Results.Data.arrGranules[array_index].id + '&thumb=0',         bounds,         bounds.getSize(),         options     );          MyOrg.UI.Map.getMap().addLayer(graphic);


title: Tilemill + metro.teczno.com

text: I downloaded the Milan shape files from metro.teczno.com and I imported these into tilemill. Exist any cartocss file to define all layers created by shape file? Or need to be created from scratch ?


title: What software to use as an all-around solution for mining GIS?

text: My employer wants me to look into constructing geology maps, modeling 3D subsurface geological formations, producing geological cross sections and other mining related products from various drill hole and survey data. I am looking for recomendations for a software package or an ArcGIS plug-in. I am currently looking at "Target for ArcGIS by Geosoft" and "Surpack by Gemcom." It seems that Target is great for the back-end data organization and the generation of cross sections but although it can visualize data in 3D it seems that it lacks there. On the other hand the Geocom software seems to focus on 3D modeling and editing. We already have ArcGIS 10 (Editor) with 3D Analyst and Spatial Analyst so I'd prefer a recommendation for a plug-in (Add-in) that extends ArcGIS functionality to the above mentioned areas.


title: QGIS 1.8.0 Mac can't create ring

text: Can anyone spot what is wrong here? I've selected single feature, the existing rings are obvious, it's not intersecting anything (even a feature in another layer... ![](http://johnsankey.ca/ringerror.jpg)


title: Sql syntax in Model builder

text: In ModelBuilder I am trying to perform the following query, using the select by attribute tool. I am having great difficulty with the sql syntax. What I am trying to do is Select Top 3 (Avg) Price, GasID Group by GASID order by GASID The help indicates that aggregrate functions need to be performed in subqueries only? Is this true. I don't want a subquery. Only this works but returns no rows and it is not what I am looking for: "RegGasPrice" = (SELECT MAX( "RegGasPrice") FROM gasprices). There is no "in" so I must use equal. Any assistance would by greatly appreciated. Jane


title: Splitting a TAB file by attribute?

text: I have TAB file with LOADS of points. Each point as a unique ID and group assigned to it (ranging from 1-154). I'm wondering if there is an easy way to split this up into a TAB file for each group, rather than having to query each one and Save Copy As. Thanks, Alan


title: Spatial query in ArcGIS Javascript Api 3.1

text: I have scenario in which I have to select features drawing a polygon and and get the attribute values in to a tables or lists.The features on the map consist of polygon, line,point at the same time so when he selects the features according to layer name I have to bind to separate tables.Is there any example tackling this scenario.


title: Is it possible to run an R script on a layer in QGIS?

text: I'd like to run an R script on a layer loaded in QGIS (to rotate a set of points created there using the Vector:Research Tools:Regular Points tool). I thought ManageR might work but cannot get it working on OSX ... Of course, I could do it manually (create layer -> run script from within R -> find output and reload into QGIS) but surely there is a more elegant solution?


title: Problem merging two rasters in Qgis

text: I have two rasters in Geotiff, same CRS. I tried to merge them and I have this error code               ERROR 4: `C:/Anita_Tepoztln/Rasters/e142.tif' does not exist in the file system,      and is not recognised as a supported dataset name.           ERROR 4: `C:/Anita_Tepoztln/Rasters/e145.tif' does not exist in the file system,      and is not recognised as a supported dataset name.       Traceback (most recent call last):               File "C:\PROGRA~2\Quantum GIS Lisboa\bin\gdal_merge.py", line 509, in      sys.exit(main())      File "C:\PROGRA~2\Quantum GIS Lisboa\bin\gdal_merge.py", line 392, in main      ulx = file_infos[0].ulx      IndexError: list index out of range       I wonder what I am doing wrong. I am able to load the rasters and see them, not merging them I am using Qgis Lisboa standallone installation, on Win7 64 16gb of RAM