title: Fast Custering Algorithm for Geographic Data

text: I have been browsing through the net in my attempt to find a fast clustering algorithm to cluster geographic points, but lot many of the results found were for clustering algorithm in general and not for geographic data. Some of these algorithm expected me to specify the number of cluster in advance which is something I don't want to do? Any suggestion to explore some algorithm?


title: Reprojecting a raster DEM from meters to feet using QGIS?

text: Is there a tool in QGIS that does the same as reprojecting a raster DEM from meters to feet as in ArcGIS's 3D Analyst > Raster Math > Times ? ![screen shot](http://i.stack.imgur.com/4HvB5.png)


title: How to open files w.r.t relative paths...within the same QGIS window?

text: Is it possible to open a file w.r.t it's relative path within the same QGIS window. Say, if i click the the **D:\My_Demo\1.Tab**.... (Image)the respective 1.Tab file should be opened within the same QGIS window. I have the hyperlinks as a exel file. Will QGIS read an excel file with hyperlinks or do we have to create each & every link in QGIS using Actions ? Or is there any alternative ? I've referred to http://biodiversityinformatics.amnh.org/open_source/evis/documentation.php#d0e390 But through eVis...all the files can be opened in a separate application, not within the same window ![enter image description here](http://i.stack.imgur.com/I9Vqq.jpg)


title: Using JS SDK API Locally

text: I saw the documentation and notice that the SDK download link is live to esri server, can we download the SDK and setup in local environment? Please suggest? If YES, how to change the config so that require loads the file from local.


title: not able to view rendered mbtiles and mapbox base map remotely

text: I was able to display the HTML files locally which displays a base map from mapbox and a layer rendered from tile-stream. I had setup an apache server so that the HTML can be viewed remotely. There is a static domain name, which i was able to access remotely. The port forwarding is given for 80 and tilestream port 8888. On local browser everything is displaying. But on remote system the page loads without base map and layers. I am on ubuntu. The request for the base map base in the HTML file is               var map = L.mapbox.map('map','examples.map-9ijuk24y');      the layer is added with               var stamenLayer = L.tileLayer('http://localhost:8888/v2/sample/{z}/{x}/{y}.png').addTo(map);      Thanks in advance


title: Geoserver WFS - Can I Pass in Filter Parameters via the URL?

text: I'm trying to use PHP's CURL function to fetch geoJSON information from a GeoServer instance. I'm doing this using url variables rather than trying to construct a full xml GetFeature request. However, I would like to be able to get a subset of the results based on some of the property fields' contents. So, while I can get all of the results using this url: http://www.myURL.com/geoserver/namespace/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=layername&outputFormat=json&BBOX=1,2,3,4 can I also limit the results to "Where field LIKE value" or "field = value"? I've spent an hour trawling through the Geoserver/ECQL documentation and none of it clearly states "append the functions to your URL in this format". As a result, I'm not clear if it's possible to use url variables to perform these tasks, but some people seem to suggest that it is. Can anyone help with a clear example of a working filter using GeoServer's WFS with URL parameters?


title: Leaflet: verify when a layer is checked in control layers

text: I'm a newbie in Leaflet, so sorry for the entry level question .... Is there any way to test if a layer in Control Layers is checked or not? I don't find any in API documentation.


title: Selecting maximum Value based on other field using ArcMap?

text: I have problems with a SQL query. The table looks like this, it is a point feature class both in postgres and file geodatabase, I am working in ArcMap.               name: elev_p     HEIGHT AREAid     100    1     200    1     300    2     500    2     100    1      So, what I want is the highest HEIGHT within each AREA_id. If there are 200 points within each polygon, I only want one, and the one with maximum HEIGHT. Is this possible in ArcMap or do I have to use SDE layer and pgAdmin? This AREA_id comes from polygon layer which I joined with elev_p, I tried other way around and I got the maximum HEIGHT but I need to know which exactly point it is, so its selection I need. WHAT I HAVE TRIED: because one copy (sde version) can handle subquery I used HEIGHT in `(SELECT MAX(HEIGHT) FROM elev_p group by AREA_id)`. But that query selected all Height values in entire feature class which had the highest value in AREA_id, not one for each AREA_ID. **SOLUTION: SELECT * FROM elev_p a INNER JOIN (SELECT MAX(HEIGHT) as bheight, AREAid FROM elev_p GROUP BY AREAid) b ON a.AREAid = b.AREAid AND a.HEIGHT = b.HEIGHT;** note: this is for spatial data in database like oracle or postgres, arcmap solution I do not have also, if there is 2 points with same value wich is highest within AREAid then it will choose both of them, in case someone needs only exactly one


title: Extract all raster cells outside a polygon

text: How does one perform the very simple task of extracting all raster cell values outside a polygon? I've been looking through QGIS for hours with no solution to this simple problem.


title: Transfer subtype Descriptions form long integer value into a string at new diffrent field

text: I need to convert entire geodatebase into shp files.One of the layers have 30 subtypes. I want and maintain the subtype data. Is there a way to Automatically populate the name of the subtype (Transfer subtype Descriptions)in to a new string field in order to not do it manually and not lussing the subtype data ?


title: How to use outdated arcscripts

text: I need to use the Vector ruggedness measure (VRM) tool available from http://arcscripts.esri.com/details.asp?dbid=15423. However, I am using the latest version of Arcgis and these tools are made for 9.0, 9.1 and 9.3 only. I have tried to run this tool regardless and get the error: > Traceback (most recent call last): File > "C:\Users\jc221340\Documents\project\Processed > data\My_tools\Downloaded\ruggedness.py", line 20, in > gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Spatial Analyst > Tools.tbx") RuntimeError: Object: Toolbox C:/Program > Files/ArcGIS/ArcToolbox/Toolboxes/Spatial Analyst Tools.tbx does not exist > > Failed to execute (Ruggedness(VRM)). How can I use this tool?


title: one row is discarded while importing shapefile into postgres

text: Please help me in following issue. I need to import a polyline shapefile into Postgres9.1 through shp2pgsql command.When i did like this, i got an error as **"NOTICE: CREATE TABLE will create implicit sequence "new2_gid_seq" for serial column "new2.gid" NOTICE: ALTER TABLE / ADD PRIMARY KEY will create implicit index "new2_pkey" for table "new2" Query result with 1 row discarded. Query returned successfully with no result in 1063 ms.** because of this error, i couldn't able to do further processes.Please madam do needful thing![enter image description here][1]


title: Selecting Part of a Polygon

text: I have a dataset, in shapefile format, for agricultural land grades in England. It is divided into 7 categories in its attribute table. As the file is a large file and I only want a small section I want to select a rectangle out of it. This was done for all other layers with the select rectangle tool. However it seems to select the entire data when i try to select the small area. Is there a way to cut the data down to this small area which is undefined in the attribute table???


title: Applying colormap to grayscale tiff image using java

text: I have a gray scale tiff image.Now i want to add some pseudo colors i.e for pixels whose DN from 0-140, red color;DN from 141-255 ,blue color.Please tell me how to modify the raster table.Otherwise if you have any other solution,please let me know.It is urgently required for my project....


title: File Upload with GeoEXT FormPanel

text: I have a GeoExt form and want to do file upload here. But i never work with GeoEXT. I have this.               buttons: [{     text: 'Загрузить',     handler: function(){     if(fp.getForm().isValid() && Ext.getCmp('opinions').getValue()=="blabla"){     form_action=1;     fp.getForm().submit({              url: '<portlet: actionURL>',              waitMsg: 'WAITING...',      success: function(fp, o) {               DO SOMETHING               }              }             }           }]      This is correct? What arguments use in success: function(fp, o)? First argument is FormPanel but i dont understand what is second. Another question how to do asynchronous file upload in this case?


title: How to change the vertex style for editing?

text: When I use drag feature, then the circles on the polygon edge has the same style. For example, this OpenLayers site. I need to change it, I mean they need to be a different color. What is their (cycles) style attribute?


title: Self-intersecting polygon using extreme values

text: I have this polygon               POLYGON((1.2E-15 1.1E-15,1.31E-15 1.21E-15,-180 -90,180 90,1.2E-15 1.1E-15))       It uses an extreme coordinates like (1.2E-15 1.1E-15) and (180 90) When I call ST_isValidReason, it says that polygon is invalid:               SELECT ST_isValidReason( ST_GeomFromText(         'POLYGON((1.2E-15 1.1E-15,1.31E-15 1.21E-15,-180 -90,180 90,1.2E-15 1.1E-15))') );     st_isvalidreason            Self-intersection[-180 -90]       But when I reduce number precision form E-15 to E-12 it works ok:               SELECT ST_isValidReason( ST_GeomFromText(         'POLYGON((1.2E-12 1.1E-12,1.31E-12 1.21E-12,-180 -90,180 90,1.2E-12 1.1E-12))') );     st_isvalidreason      Valid Geometry      The question is: is it a PostGis bug or I shouldn't use number like 1.1E-15 for coordinates?


title: WMS Request Returns nothing with Geoserver

text: I'm having trouble with a select feature example in Geoserver and open layers. For some reason the request returns nothing. Here's the stripped down version that produces this: I have a small wms layer(~100 parcels) with polygons, and address data that I am overlaying Google Maps with a projection. It displays correctly.               map = map(...); //standard map creation     gmap = ...; // standard street map creation     wmslayer = new OpenLayers.Layer.WMS(                 "Parcels",                 "http://192.168.0.205/geoserver/wms",                  {'layers': 'test:parcel', 'format':'image/png', 'transparent':'true'},                 {'opacity': 0.5, 'isBaseLayer': false, 'visibility' : false, 'zoomMin' : 15}     );      Then I create the click control...               infoControls =                 {                 click: new OpenLayers.Control.WMSGetFeatureInfo                 ({                     url: 'http://192.168.0.205/geoserver/wms',                      title: 'Get parcel data',                     layers: [wmslayer],                     queryVisible: true                 })             };      Added the layers, add the control and activate it               map.addLayers([gmap, wmslayer]);          infoControls[0].events.register("getfeatureinfo", this, showInfo);     map.addControl(infoControls[0]);     infoControls.click.activate();          //show info callback     function showInfo(evt) {             console.log(evt);         alert(evt.text);     }      But when i click on the map inside I parcel, it gives the alert is blank, and so is the features in firebug (from console.log(evt)). The GET request in firebug is red.               BBOX    -10845148.716676,5165071.048543,-10843335.725912,5166002.624825     FEATURE_COUNT   10     FORMAT  image/png     HEIGHT  390     INFO_FORMAT text/html     LAYERS  test:parcel     QUERY_LAYERS    test:parcel     REQUEST GetFeatureInfo     SERVICE WMS     SRS EPSG:900913     STYLES       VERSION 1.1.1     WIDTH   759     X   582     Y   246      Edit: The database is CRS is 4327 and projecting it to Google Mercator... Do I need to project the BBox of the request back to 4327 before I send the WMS request? How can I do this? Here is the Geoserver log of the request               2011-07-22 14:49:01,301 INFO [geoserver.wms] -      Request: getFeatureInfo         GetMapRequest =      GetMap Request      version: 1.1.1      output format: image/png      width height: 759,390      bbox: ReferencedEnvelope[-1.0845637448332E7 : -1.0842011466804E7, 5164278.964868 : 5166142.117432]      layers: test:parcel      styles: polygon         QueryLayers = [org.geoserver.wms.MapLayerInfo@a837896f]         XPixel = 385         YPixel = 144         FeatureCount = 10         InfoFormat = text/html         Exceptions = application/vnd.ogc.se_xml         Version = 1.1.1         Request = GetFeatureInfo         BaseUrl = http://192.168.0.205:8080/geoserver/         Get = false         RawKvp = {INFO_FORMAT=text/html, BBOX=-10845637.448332,5164278.964868,-10842011.466804,5166142.117432, QUERY_LAYERS=test:parcel, SERVICE=WMS, HEIGHT=390, REQUEST=GetFeatureInfo, STYLES=, WIDTH=759, FEATURE_COUNT=10, VERSION=1.1.1, FORMAT=image/png, LAYERS=test:parcel, Y=144, X=385, SRS=EPSG:900913}         RequestCharset = null


title: KML problems on Google Maps

text: If I upload my KML file, which contains polygons and pins, to Google Maps, then most of the polygons are missing (see below). ![enter image description here](http://i.stack.imgur.com/i3j2l.jpg) To try and address this, I pasted the kml url to the Google Maps search bar and all of the polygons are now shown on the map but all the pins are missing (see below). ![enter image description here](http://i.stack.imgur.com/Zscjo.jpg) The KML file can be downloaded from **here**. What should I modify in the KML source to have all polygons and pins in the same map?


title: Show dataframe CRS in Status Bar in ArcMap 10

text: Does anyone know if would it be possible to show the name of the current coordinate reference system being used in the active dataframe in the status bar of ArcMap? I have searched for scripts but have not found anything appropriate. Has anyone done something similar?


title: How to find difference between terrain and groundwater potential map?

text: I want to find the difference between a terrain map and groundwater potential map to show where it is possible to apply SUDS (sustainable drainage systems) but the units makes no sense. First in ArcGIS I made the two maps to raster files by "topo to raster" and afterwards I used the spatial analyst tool raster calculator to subtract the two parts but the units became very high. See the results **here**.


title: which feature of toolboxes will be appropriate for building a groundwater model in Model Builder

text: I am completely new to ArcGIS Model Builder and also Python scripting. However, I want to build a model to automate groundwater recharge.


title: How to check if a point is within bounded rectangle from Java

text: I make an AJAX request to retrieve data from a `mysql` database.I add the data to `google.maps.Data` layer as geojson.I would only like to load the data based on the `viewport`.To obtain the viewport bounds I use:               var bounds = map.getBounds();      With the bounds information I have sent an AJAX request to my server to get the markers that are within those bounds. I query the database table for all the data it has,can I instead query `mysql`only for the data contained within the bounds.If that is not an options how do I check if a point is within the rectangle(on the server)? Thanks in advance for your assistance.


title: Find small polygons inside big polygons

text: I'm trying without success to find a solution for problem in ArcGIS and this is the reason that I'm sending this message. I have one polygon shapefile with postal codes for South Africa (no Gap, no overlap). There are some small polygons that seem to be box codes inside big polygons (Street code) and I would like to identify or select them. The problem: I don’t have any attribute in the table to make a classification (Box code _vs_ street code). I'm looking for a tool or a method in ArcGIS to identify polygons inside polygons using just one shapefile.


title: Determine min and max values in an ASCII raster dataset using Python

text: I have a raster dataset in ASCII format. Using Python, I need to determine the `min` and `max` values inside the dataset. I've been told that the header information is key, which contains things like number of rows/columns, cell size, and etc. My question... can't you simply skip the header information and read the entire dataset to determine the `min` and `max` values? This is what I'm trying to do. I'm skipping the first couple of lines which contain the header information, and trying to determine the values from there on. The following is sort of what I have, but need some guidance as I am new to Python. Please excuse my mistakes.               raster_file = open('data.asc', 'r') # Open the file     data = raster_file.readlines()[4:] # Read the lines in the file, and skip the first six lines          for lines in data:         print max(data) # Find the max value in data         print min(data) # Find hte min value in data      Any suggestions?


title: How can I remove WMS layers from mxds using arcpy?

text: I'm trying to remove WMS layers from an mxd using arcpy. I can successfully remove "MapServer" type services using the below code, but not WMS? Here is an example mxd (zipped) with two different WMS layers that I'm trying to remove: here Also, I've posted on the ArcGIS Resources forum too: here Code:               import arcpy, os          inFName = "wms.mxd"     outFName = "wms_removed.mxd"     pth = r"c:\temp"     inFULLPTH = os.path.join(pth,inFName)     outFULLPTH = os.path.join(pth,outFName)     mxd = arcpy.mapping.MapDocument(inFULLPTH)          for df in arcpy.mapping.ListDataFrames(mxd):         LyrList = arcpy.mapping.ListLayers(mxd, "", df)              for lyr in LyrList:             if lyr.supports("SERVICEPROPERTIES"):                 if lyr.serviceProperties["ServiceType"] == "WMS":                     arcpy.mapping.RemoveLayer(df, lyr)          mxd.saveACopy(outFULLPTH)     del mxd      Any ideas? Is arcpy.mapping.RemoveLayer the best approach ? I have hundreds of mxds to crawl through and want to remove WMS layers from them.


title: Tiling rgba geotiffs using vrt rather than gdal_warp

text: I've carefully cut the collar off a set of USGS geotifs and I'd like to run through them with gdal2tiles but producing a vrt that undersands the alpha layer, or having gdal2tiles overlap two source files into one tile is not working. Some things I have tried have made all black pixels transparent. Other attempts rendered the transparent borders on my source files as if they were solid white, so when one tile is made from two adjoining tifs the transparent border from one covers up the useful content of another. Here is my process, maybe someone can tell me a conversion step I'm missing:   * Download regular USGS geotif from Topoquest   * gdal_translate -expand rgba -co COMPRESS=LZW orginal.tif translated.tif   * Open translated.tif in Photoshop, cut off the collar, save.   * gdalcopyproj.py translated.tif prepared.tif Do that for all of them   * gdalbuildvrt temp.vrt *.tif   * gdal2tiles.py temp.vrt tiles P.S. I can merge them all smoothly with gdal_warp but on this group of 30 it is making a combined geotiff of 51223 x 65163 and on other sets there will be lots of wasted space when the source tifs are in a diagonal line but gdal_warp will create a rectangular output.


title: How to make button with html and mapfile?

text: I have several raster layers defined in mapfile:                  LAYER          NAME "01"          TYPE raster          STATUS off          OPACITY 30          DATA "01.png"       END             LAYER          NAME "02"          TYPE raster          STATUS off          OPACITY 30          DATA "02.png"       END             LAYER          NAME "03"          TYPE raster          STATUS off          OPACITY 30          DATA "03.png"       END      They are in .png format in raster folder on my server (data/www/project4/raster). I need to insert button which will update my map with raster. First button is 01, and when I click on that button, raster should be rendered on my map. Also, I'm interested is there an option where I can click on some button just to open menu with three buttons which will lead rendering those rasters. Thank you.


title: Installing TSP functionality on win7

text: I'm very new to pgRouting! I installed PostgreSQL 8.4, and pgrouting 1.03 on win7. I need to solve a TSP problem so I was trying to install the TSL functionality as showen at: http://www.pgrouting.org/docs/1.x/install.html but when I type psql -U postgres -f /usr/share/postlbs/routing_tsp.sql routing and psql -U postgres -f /usr/share/postlbs/routing_tsp_wrappers.sql routing I get an error, as the .sql files can't be found! How can I solve? Where can I download any maps (openstreetmap) to practice? thanks Laura


title: Integrating shapefile in spatialite DB with spatialite gui

text: For a project, i need a to display datas of a shapefile in an Android app (Geopaparazzi). I'm doing it by integrating the shapefile into a spatialite DB with spatialite gui **1.5** (1.6 having issues with Geopap). It usually works fine, but with my new shapefiles in wgs 84, it gives me an error saying it can't open the shapefile.shx file, while it's in the directory with the .shp . It still works with other files, so i don't really understand and i can't reach the person who created the new shapefiles right now. Any ideas ?


title: ArcMap label font size vs callout font size

text: Within ArcMap 10.1: When converting labels to annotations I have specified a font size of 14. I have also created a number of callout text annotations within the map and specified exactly the same font, size and properties as the converted label annotations. In the data view everything appears to be displaying at the same size. However when I go into layout view I find that despite both entities having a font size of 14 they are displaying at noticeably different sizes! How can I ensure that all of my annotations and callouts display at the same size, without having to experiment with different font sizes? Takk, Andy


title: Repository for GPS tracklog (better gpx format)

text: I've developed some algorithms that work with GPS trajectories. So I need a repository in which I can download GPS trajecotries to run my test. I most need marine and air tajectories, better if fileformat was a .gpx.


title: How to generate an image from WKT?

text: I am looking to programatically generate an image from a WKT string (or any other common format, such as WKB or SQL Spatial geography). Are there any existing libraries that allow for this? I am working in .Net, but I am open to anything. The idea is that I could generate dynamic tile layers with the images instead of having to load up my Silverlight UI with heavy vector layers. Any ideas?


title: Raster layer with unique vector for each raster cell?

text: I have been looking around several hours, even days, but couldn't find a clear answer to my question. I am working on a WebGIS tool that interprets local geology. From more than 70 asc-files, I would like to create one raster layer that contains in each raster cell the local geology, e.g. as a 2 x n vector with a code for the present formations and their thickness. First of all, is this a good idea? Or is it better to query all layers in the WebGIS tool for the specific location? I tried already to create a raster file, where each cell value was linked to a vector in a sort of attribute table. However, I was unable to save this table in Python, unless as a txt-file, and directly link it to the raster file. Is there a specific raster type that does this? Thank you!


title: Openlayers Vector Feature label not Visible in IE 8 but visible in Google Chrome....?

text:
I have created a WEB MAP using Openlayers-Geoserver-Postgis.... The Label of one of the Vector feature layer is not visible in Internet Explorer 8(IE 8) ,but clearly visible in Google Chrome 27.0.1453.94.... As most of my map viewers use IE8 so it is important to have the full map along with label in IE8... part of the code used is as follows... var vectorLayer = new OpenLayers.Layer.Vector("SupplyOff"); map.addLayer(vectorLayer);                   <?php        $qry_xy="select * from ci_master@ltdvlp where x is not null AND GIS_SOURCE_CODE LIKE '01%' AND ROWNUM < 5"; $parsed =oci_parse($db_conn_prod,$qry_xy); oci_execute($parsed); $nrows3=oci_fetch_all($parsed,$results3); echo $nrows3; for($i=0;$i var description_new = ''; var x = ''; var y =''; var cons =''; var type = '';               vectorLayer.addFeatures([new OpenLayers.Feature.Vector(                 new OpenLayers.Geometry.Point(x,y ),                                        {                     //Attributes go here                     description:'cons: '+cons,                     size: 5 + (Math.floor(Math.random() * 20)),                     label: 'F'+cons,                     strokeWidth: (Math.floor(Math.random() * 10))                 }             )]);                        //Create a style object to be used by a StyleMap object         var vector_style = new OpenLayers.Style({             'cursor': 'pointer',             'fillColor': '#2bff05',             'fillOpacity': .8,             'fontColor': '#a52505',             'label': '${label}',             'pointRadius': '${size}',             'strokeColor': '#232323',             'strokeDashstyle': 'solid',             'strokeWidth': '${strokeWidth}',              });              //  style object we just created         var vector_style_map = new OpenLayers.StyleMap({             'default': vector_style         });              //Add the style map to the vector layer         vectorLayer.styleMap = vector_style_map;      map.addLayer(vectorLayer); var controls = { selector: new OpenLayers.Control.SelectFeature(vectorLayer, { onSelect: createPopup, onUnselect: destroyPopup }) };               function createPopup(feature) {       feature.popup = new OpenLayers.Popup.FramedCloud("pop",           feature.geometry.getBounds().getCenterLonLat(),           null,           '
'+feature.attributes.description+'
',           null,           true,           function() { controls['selector'].unselectAll(); }       );            map.addPopup(feature.popup);     }          function destroyPopup(feature) {       feature.popup.destroy();       feature.popup = null;     }          map.addControl(controls['selector']);     controls['selector'].activate();      ![View in Google Chrome](http://i.stack.imgur.com/i8r55.jpg) ![View in IE 8](http://i.stack.imgur.com/WIYHG.jpg) Thanks in advance....


title: What is the best method to publish a large amount of data on ArcGIS Server?

text: I am publishing 2 million records using ArcGIS Server. We are using ArcGIS for Desktop 10.1 and ArcGIS for Server 10.1. We have district wise data for India (like State----District etc) all the data is coming from SQL Server. I know that there are no limitations for ArcGIS Server and it can handle terabyte data and hence I am filtering data according to State and then District wise hierarchy and showing data after certain zoom extent. Because I know Web browsers can not display such data so dividing data by hierarchy. Going through post1, post 2 and researching on Google too but not able to find the recommended methods to handle large data on ArcGIS Server. So is there any recommended way or method to publish large datasets on ArcGIS Server?


title: Select maximum values from list of raster layer : ArcMap10

text: I have 10 raster layers. Each layer has the dimension of 100 columns x 100 rows and actually are temperature values from year 2000 to 2010. I want to ask ArcMap to produce a raster layer that represent the maximum temperature value from 2000 to 2010. Is there any function in ArcMap10 that suite to do that?


title: How to merge connected lines with same direction (PostGis)

text: I am looking for a way to join all lines that are connected, have the same direction, i.e. start point of one is end point of the other, and share some common attributes. In fact, I want to connect oneway streets having an common start/end point and the same oneway direction. I found a way to identify pairs of lines that fulfill these condition:               select a.osm_id, a.name,a.oneway,            b.osm_id, b.name,b.oneway, from planet_osm_line a, planet_osm_line b         WHERE (st_startpoint(a.way)=st_endpoint(b.way) or st_endpoint(a.way)=st_startpoint(b.way))              and a.oneway=b.oneway ;      I am now looking for a way to merge the geometries of these lines.


title: GeoServer with FeatureGrid alpha sorts numeric fields

text: I'm new to GeoServer so if I miss any information please let me know. We're running GeoServer v2.2 with FeatureGrid. When a query is run it returns all the rows correctly, but when we try to sort what should be numeric fields by clicking in the column header it does an alpha sort, i.e. in the sales volume column 985 will appear after 9340. The columns are correctly typed in the DB (postgres). I fired up my trusty javascript console and was able to get a handle to the feature store and when I drill down to an object it looks like this:               data: Object     ABI: "650607021"     ACTUAL_SALES_VOLUME_x1000: "128"     ADDRESS: "PO BOX 105"     CITY: "METAIRIE"     COMPANY_NAME: "OBSCURED FOR PRIVACY"     HEADQUARTERS_OR_BRANCH: "STAND-ALONE"     LATITUDE: "29.975909"     LONGITUDE: "-90.16079"     NAICS: "81112201"     NUMBER_OF_EMPLOYEES: "1-4"     PHONE: "NPA-NXX-NNNN"     SIC: "753602"     STATE: "LA"     ZIP: "70004"     feature: OpenLayers.Feature.Vector.OpenLayers.Class.initialize     fid: "business_data_2012.112788"     state: null     __proto__: Object     id: "OpenLayers_Feature_Vector_348"     store: gxp.data.WFSFeatureStore.Ext.extend.constructor     __proto__: H      So, it appears to me that the feature store is storing the numeric properties as strings. I'm sure there's a simple fix for it, but I can't seem to puzzle it out.


title: How to select a subset of a DEM in ArcScene?

text: I'm using ArcGIS 10.0 and trying to open a digital elevation model in ArcScene. I'm working on a project and got the DEM data from official sources which is quite huge. The resolution of the DEM is 1 meter. The total size is unknown but I think it's about 10km in diameter. The total file size is 1.5 GB. Trying to add the DEM to ArcScene, using rightclick on _Scene layers_ > _Add Data_ and selecting the DEM, gives me the following message: > Could not add the specified data object to the scene. Try using a smaller > subset. > > Failed to open raster dataset. Is the DEM too big? Why is that message? Could it be my total memory is not enough? I'm running ArcScene 10.0 in a VirtualBox machine with Windows 7x86, with 2 processors 3.2 GHz and 4 GB memory allocated. How to select a smaller subset? I neither see any option to do so nor find any subsets.


title: print button disabled in Open Geo Suite 4.02

text: Print button is disabled in Free version of OpenGeo Suite 4.02. In versions 3.x OGS, Community Edition, Print button was always enabled. Does anyone know why?


title: GeoServer WMS Layer not working in OpenLayers

text: Here is my code:               var map;          function init() {      var options = {       maxExtent: new  OpenLayers.Bounds(-135.326858520508,-30.5615100860596,179.357788085938,69.604377746582),       units: 'm',       projection: "EPSG:900913",     };          map = new OpenLayers.Map('map_element', options);                             // setup tiled layer                 var tiled = new OpenLayers.Layer.WMS(                     "ne_10m_railroads", "http://localhost:8080/geoserver/earth/wms",                     {                         LAYERS: 'earth:ne_10m_railroads',                         STYLES: '',                         format: OpenLayers.Format.WMSGetFeatureInfo,                         tiled: true,                         tilesOrigin : map.maxExtent.left + ',' + map.maxExtent.bottom                     },                     {                         buffer: 0,                         displayOutsideMaxExtent: true,                         isBaseLayer: true,                          }                  );                      map.addLayer(tiled);             if(!map.getCenter()){ map.zoomToMaxExtent(); }     }      ![Snapshot of the webpage I created - images are not loading!](http://i.stack.imgur.com/6ERcs.jpg) This is the code for layer preview generated by GeoServer :                var map;             var untiled;             var tiled;             var pureCoverage = false;             // pink tile avoidance             OpenLayers.IMAGE_RELOAD_ATTEMPTS = 5;             // make OL compute scale according to WMS spec             OpenLayers.DOTS_PER_INCH = 25.4 / 0.28;                  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';                 if(pureCoverage) {                     document.getElementById('filterType').disabled = true;                     document.getElementById('filter').disabled = true;                     document.getElementById('antialiasSelector').disabled = true;                     document.getElementById('updateFilterButton').disabled = true;                     document.getElementById('resetFilterButton').disabled = true;                     document.getElementById('jpeg').selected = true;                     format = "image/jpeg";                 }                      var bounds = new OpenLayers.Bounds(                     -135.326858520508, -30.5615100860596,                     179.357788085938, 69.604377746582                 );                 var options = {                     controls: [],                     maxExtent: bounds,                     maxResolution: 1.2292369008064297,                     projection: "EPSG:900913",                     units: 'm'                 };                 map = new OpenLayers.Map('map', options);                      // setup tiled layer                 tiled = new OpenLayers.Layer.WMS(                     "earth:ne_10m_railroads - Tiled", "http://localhost:8080/geoserver/earth/wms",                     {                         LAYERS: 'earth:ne_10m_railroads',                         STYLES: '',                         format: format,                         tiled: true,                         tilesOrigin : map.maxExtent.left + ',' + map.maxExtent.bottom                     },                     {                         buffer: 0,                         displayOutsideMaxExtent: true,                         isBaseLayer: true,                         yx : {'EPSG:900913' : false}                     }                  );                      // setup single tiled layer                 untiled = new OpenLayers.Layer.WMS(                     "earth:ne_10m_railroads - Untiled", "http://localhost:8080/geoserver/earth/wms",                     {                         LAYERS: 'earth:ne_10m_railroads',                         STYLES: '',                         format: format                     },                     {                        singleTile: true,                         ratio: 1,                         isBaseLayer: true,                        yx : {'EPSG:900913' : false}                     }                  );                      map.addLayers([untiled, tiled]);                      // build up all controls                 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')}));                 map.zoomToExtent(bounds);                      // wire up the option button                 var options = document.getElementById("options");                 options.onclick = toggleControlPanel;                      // support GetFeatureInfo                 map.events.register('click', map, function (e) {                     document.getElementById('nodelist').innerHTML = "Loading... please wait...";                     var params = {                         REQUEST: "GetFeatureInfo",                         EXCEPTIONS: "application/vnd.ogc.se_xml",                         BBOX: map.getExtent().toBBOX(),                         SERVICE: "WMS",                         INFO_FORMAT: 'text/html',                         QUERY_LAYERS: map.layers[0].params.LAYERS,                         FEATURE_COUNT: 50,                         Layers: 'earth:ne_10m_railroads',                         WIDTH: map.size.w,                         HEIGHT: map.size.h,                         format: format,                         styles: map.layers[0].params.STYLES,                         srs: map.layers[0].params.SRS};                          // handle the wms 1.3 vs wms 1.1 madness                     if(map.layers[0].params.VERSION == "1.3.0") {                         params.version = "1.3.0";                         params.j = parseInt(e.xy.x);                         params.i = parseInt(e.xy.y);                     } else {                         params.version = "1.1.1";                         params.x = parseInt(e.xy.x);                         params.y = parseInt(e.xy.y);                     }                          // merge filters                     if(map.layers[0].params.CQL_FILTER != null) {                         params.cql_filter = map.layers[0].params.CQL_FILTER;                     }                      if(map.layers[0].params.FILTER != null) {                         params.filter = map.layers[0].params.FILTER;                     }                     if(map.layers[0].params.FEATUREID) {                         params.featureid = map.layers[0].params.FEATUREID;                     }                     OpenLayers.loadURL("http://localhost:8080/geoserver/earth/wms", params, this, setHTML, setHTML);                     OpenLayers.Event.stop(e);                 });             }      and its preivew is below:![enter image description here](http://i.stack.imgur.com/L36ID.jpg) * * * Oh I got it!!! I shouldn't add those extra parameters: But I want to know what it actually means : I changed the Layer code to this and its working:                map = new OpenLayers.Map('map_element', options);                             // setup tiled layer                 var tiled = new OpenLayers.Layer.WMS(                     "ne_10m_railroads", "http://localhost:8080/geoserver/earth/wms",                     {                         LAYERS: 'earth:ne_10m_railroads'},                          {}                  );      What happens when I add these extra parameters..where it is wrong?               {                     LAYERS: 'earth:ne_10m_railroads',                     STYLES: '',                     format: OpenLayers.Format.WMSGetFeatureInfo,                     tiled: true,                     tilesOrigin : map.maxExtent.left + ',' + map.maxExtent.bottom                 },


title: How to create customized side control bar in OpenLayers?

text: I could create a simple map using OpenLayers. But I want to have a customised side control bar. The one I created: ![enter image description here](http://i.stack.imgur.com/V1N3K.jpg) The one I want to create: ![enter image description here](http://i.stack.imgur.com/Hk8I6.jpg)


title: How are the speed limits set in osm2po?

text: Using osm2po I found a problem. In the configuration file "osm2po.config" I can set the various values of speed limits for each road type but for example for this type of street (wtr.tag.highway.motorway = 1, 11, 120) in the output file the speed limit for that type of road is set to 110 instead of 120. Why is that? I also wanted to know if openstreetmap provides data on speed limits for each road and if it is true, is there a way to insert them into the output file osm2po?


title: Iterating polygons on a SpatialPolygonsDataFrame in R with readWKT

text: I have fetched some data (39 objects) from my PostGIS database and converted this data into a matrix:               rs <- dbSendQuery(con, "SELECT ST_AsText(polygon_accumulation) AS ShapeWKT from accumulation;")     obj_wkt_as_m <- as.matrix(fetch(rs))     obj_wkt_m <- matrix(obj_wkt_as_m, ncol=39, nrow=1)     obj_wkt_m_t <- t(obj_wkt_m)      My data is now formatted in this way:                    [1]     [1,] "MULTIPOLYGON(((4459824.3565246 5470840.94935909, ...     [2,] "MULTIPOLYGON(((4458772.75622644 5473352.14772341, ...      ...      For the next steps I followed the instructions in this question Plotting large numbers of objects on a chart using R and WKT format.               obj_id <- 1:39     objects_1 <- data.frame(ShapeWKT=obj_wkt_m_t, OBJECTID=obj_id)     poly.sp <- SpatialPolygonsDataFrame(readWKT(objects_1$ShapeWKT[1]), data=data.frame(OBJECTID=objects_1$OBJECTID[1]))      Up to here it works and I can plot the polygon poly.sp! This procedure works for point data - getting from my database - as well. But when I want to iterate through the remaining (multi)polygon objects with this commands:               for (n in 2:length(objects_1$OBJECTID)) {         poly.sp <- rbind(poly.sp,                      SpatialPolygonsDataFrame(readWKT(objects_1$ShapeWKT[n]),                      data.frame(OBJECTID=objects_1$OBJECTID[n])))                                             }      I get the ERROR:               Error in validObject(res) :      invalid class “SpatialPolygons” object: non-unique Polygons ID slot values      Can I use this iteration for (multi)polygons as well, in some way? **EDIT** Here is some sample data from fetching the results from my db query               rs <- dbSendQuery(con, "SELECT ST_AsText(polygon_accumulation) AS ShapeWKT from accumulation LIMIT 2;")     obj_wkt <- fetch(rs)     dput(obj_wkt)     structure(list(shapewkt = c("MULTIPOLYGON(((4460657.83139692 5472732.9336513,4460660.21687119 5472737.52110183,4460662.60234546 5472740.27357215,4460664.98781974 5472741.92505434,4460668.29078412 5472744.67752465,4460670.85975641 5472746.51250486,4460671.96074454 5472747.24649695,4460675.63070496 5472748.89797914,4460678.93366934 5472750.54946133,4460682.0531357 5472751.83394747,4460688.47556644 5472753.85242571,4460692.14552686 5472755.68740592,4460695.44849124 5472756.78839404,4460699.11845166 5472758.80687227,4460702.05442 5472761.00884853,4460704.99038833 5472762.84382874,4460708.29335271 5472765.22930301,4460711.77981511 5472767.24778124,4460713.98179136 5472768.53226739,4460716.55076366 5472770.00025156,4460719.11973595 5472771.46823573,4460722.23920231 5472772.9362199,4460725.54216669 5472773.67021198,4460728.84513107 5472775.32169417,4460731.59760139 5472776.4226823,4460734.3500717 5472778.07416449,4460736.18505191 5472778.99165459,4460738.75402421 5472779.17515261,4460740.58900442 5472778.25766251,4460740.95600046 5472774.95469813,4460739.85501234 5472771.28473771,4460737.8365341 5472768.89926343,4460736.55204796 5472766.33029114,4460734.90056577 5472763.02732676,4460734.3500717 5472760.45835446,4460734.16657368 5472758.07288019,4460733.24908358 5472755.68740592,4460730.8636093 5472753.11843362,4460728.47813503 5472751.09995539,4460724.44117857 5472749.81546924,4460721.68870825 5472749.4484732,4460718.75273991 5472749.4484732,4460716.18376762 5472749.4484732,4460713.79829334 5472747.61349299,4460712.5138072 5472746.51250486,4460709.39434084 5472744.86102267,4460709.39434084 5472739.72307808,4460709.39434084 5472738.43859194,4460709.57783886 5472736.4201137,4460708.66034875 5472734.58513349,4460706.09137646 5472732.19965922,4460703.33890614 5472730.73167505,4460701.32042791 5472729.63068692,4460700.58643583 5472727.24521265,4460699.11845166 5472725.0432364,4460697.09997343 5472723.39175421,4460696.18248332 5472720.82278191,4460696.73297738 5472718.43730764,4460697.28347145 5472716.05183336,4460698.01746353 5472713.29936305,4460697.09997343 5472710.54689273,4460696.18248332 5472707.42742637,4460694.34750311 5472705.40894814,4460691.77853081 5472703.39046991,4460688.29206841 5472701.73898772,4460684.43860997 5472700.63799959,4460679.4841634 5472699.35351345,4460675.997701 5472699.17001543,4460674.52971683 5472700.08750553,4460672.32774058 5472701.73898772,4460668.29078412 5472705.40894814,4460666.27230589 5472709.44590461,4460664.07032963 5472710.73039075,4460661.86835338 5472711.83137888,4460659.11588306 5472712.56537096,4460656.17991473 5472713.84985711,4460653.61094243 5472715.5013393,4460651.22546816 5472717.15282149,4460649.75748399 5472719.17129972,4460649.75748399 5472721.18977795,4460649.94098201 5472723.39175421,4460651.22546816 5472724.67624035,4460653.97793847 5472727.61220869,4460654.89542858 5472729.81418495,4460656.54691077 5472732.0161612,4460657.83139692 5472732.9336513)))",      "MULTIPOLYGON(((4460668.76954594 5474783.75542964,4460673.87013239 5474788.30460134,4460674.28369345 5474794.64587098,4460671.25091232 5474804.84704388,4460668.63169225 5474811.4640209,4460668.49383856 5474817.80529054,4460670.97520494 5474823.31943806,4460673.7322787 5474829.38500032,4460675.52437664 5474833.52061096,4460676.35149877 5474842.34324698,4460673.04301026 5474852.95798095,4460669.87237544 5474857.78286002,4460665.18535005 5474864.26198335,4460660.91188573 5474869.91398455,4460657.18983616 5474879.70159639,4460649.47002964 5474885.49145128,4460642.02593049 5474890.31633036,4460633.34114816 5474894.17623362,4460617.90153512 5474896.93330737,4460602.59977577 5474898.863259,4460592.95001762 5474899.41467375,4460576.1318677 5474893.76267255,4460568.54991487 5474889.62706192,4460564.55215792 5474886.04286603,4460558.07303459 5474879.15018164,4460553.52386289 5474869.77613087,4460552.69674076 5474865.08910548,4460550.35322807 5474860.2642264,4460546.76903218 5474854.6122252,4460542.63342155 5474850.47661456,4460536.15429822 5474846.75456499,4460531.60512652 5474845.23817443,4460526.090979 5474843.58393017,4460522.36892943 5474840.82685641,4460519.61185568 5474834.76129415,4460517.13048929 5474827.45504869,4460515.33839135 5474824.69797494,4460513.27058603 5474822.90587699,4460510.09995121 5474822.35446224,4460506.24004795 5474823.73299912,4460502.38014469 5474824.97368231,4460499.07165618 5474826.62792657,4460497.00385087 5474827.317195,4460487.21623903 5474825.24938969,4460480.46140832 5474822.49231593,4460474.39584606 5474819.59738848,4460463.50540472 5474811.4640209,4460460.3347699 5474800.02216481,4460456.8884277 5474797.26509105,4460452.61496338 5474796.16226155,4460449.85788962 5474794.23230992,4460448.61720643 5474792.02665091,4460446.13584005 5474789.40743084,4460444.75730317 5474786.09894234,4460443.51661998 5474782.51474645,4460442.55164416 5474779.48196532,4460440.20813147 5474776.44918419,4460436.21037452 5474772.72713461,4460432.90188601 5474771.07289036,4460427.80129956 5474768.72937767,4460426.284909 5474767.62654816,4460423.38998155 5474764.59376703,4460420.63290779 5474761.28527852,4460418.56510248 5474758.1146437,4460416.77300453 5474754.6683015,4460415.67017503 5474750.25698349,4460416.22158978 5474746.94849498,4460414.98090659 5474743.50215279,4460413.05095496 5474740.74507903,4460411.39671071 5474737.43659052,4460411.25885702 5474733.85239464,4460411.81027177 5474730.54390613,4460411.12100333 5474726.54614918,4460410.84529596 5474722.54839223,4460410.56958858 5474719.92917216,4460412.6373939 5474716.34497628,4460415.25661397 5474710.96868245,4460418.01368772 5474707.66019395,4460422.42500574 5474702.28390012,4460425.31993318 5474699.52682636,4460428.490568 5474697.32116736,4460430.8340807 5474694.28838622,4460433.72900814 5474690.84204403,4460435.10754502 5474687.94711658,4460435.65895977 5474683.12223751,4460435.79681346 5474679.67589531,4460436.4860819 5474676.3674068,4460438.41603353 5474672.64535723,4460440.34598516 5474668.78545397,4460443.10305891 5474665.20125809,4460447.51437693 5474661.06564745,4460451.78784125 5474656.93003681,4460458.12911089 5474652.24301143,4460465.57321004 5474648.79666923,4460471.77662599 5474646.45315654,4460478.94501776 5474644.79891228,4460484.45916527 5474643.97179016,4460491.21399598 5474644.52320491,4460495.90102136 5474646.8667176,4460499.89877831 5474648.79666923,4460501.96658363 5474652.65657249,4460507.89429221 5474656.93003681,4460513.95985447 5474663.27130646,4460517.13048929 5474667.95833184,4460521.12824624 5474672.09394248,4460524.29888106 5474675.12672361,4460526.36668638 5474676.91882155,4460533.67293184 5474679.813749,4460541.39273836 5474685.74145758,4460544.70122686 5474690.97989772,4460546.63117849 5474696.63189892,4460548.56113013 5474702.55960749,4460550.07752069 5474705.73024232,4460552.83459445 5474709.86585295,4460555.72952189 5474712.89863408,4460560.83010834 5474716.62068366,4460565.24142636 5474720.06702585,4460570.75557387 5474723.65122174,4460576.54542876 5474727.511125,4460582.05957627 5474729.85463769,4460585.50591847 5474731.78458932,4460598.7398725 5474744.74283598,4460608.25177697 5474749.15415399,4460614.04163186 5474752.32478881,4460620.3829015 5474756.04683838,4460626.44846376 5474759.49318058,4460633.34114816 5474763.62879122,4460639.13100305 5474766.93727972,4460645.19656531 5474770.38362192,4460652.64066446 5474773.41640305,4460658.43051935 5474776.03562312,4460664.49608161 5474778.79269688,4460666.56388693 5474781.54977064,4460668.76954594 5474783.75542964)))"     )), .Names = "shapewkt", row.names = 1:2, class = "data.frame")


title: How do I remove Schema Locks from a File GeoDatabase in Java in ArcGis 9.3?

text: I have an application written in Java which uses ArcObjects 9.3. The application accesses a file GeoDatabase. The application produces output in the GeoDatabase that will be accessed by ArcMap. The problem is that ArcMap can't access the file GeoDatabase because my application still has locks on it. The only workaround I have is to close my application, which removes all the locks. But there's got to be a better way than that. Does anyone have a solution for freeing up these locks?               FileGDBWorkspaceFactory fileGDBWF;     fileGDBWF = new FileGDBWorkspaceFactory();     ws = new Workspace(fileGDBWF.openFromFile(workspacePath, 0));


title: Pass execution control from Context Menu BaseCommand to custom app

text: I got a context menu to work by following this tutorial: http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#//0001000000v9000000 The interesting thing about the tutorial is that the context menu items are COM objects and they are added to the registry via the EsriRegAsm.exe tool at build time. I add them programmatically to my context menu at runtime via their GUIDs. I right click my map, then I display a context menu popup, then I select a menu item which is derived from a BaseCommand (here I can't debug into because it is in the COM world), now, according to the tutorial, I am supposed to do some map operations here since I have a IMapControl4 object. But what I really want to do is to pass the control up to my WPF project. To summarize I would like to call a custom function of mine from the BaseCommand. I am using ArcEngine 10 in VS2010 with C#. * * * I found a dumb hack to do it, in the OnClick method, I set the IMapControl4instance.DocumentFilename = "SomeCommand"; Then in my main app, I have an mouse clicked event handler. From the COM object I simulate a mouse move event from within the OnClick() via the user32.dll. Then in my main app the mouseclick event handler checks if mapControl.DocumentFileName is one of my commands, and then sets DocumentFileName to the original value, and executes some operation. I'm not really proud of this hack, but I'm pleased it works, I'd rather do it the normal way, whatever that is.


title: Running ArcGIS 10 Python script on a unix server - is it possible?

text: I've written some python scrips that use the ArcPy module to do some pretty intensive processing. I'd like to be able to run these on the fast unix server we have in our department so that I don't have to tie up my machine for hours running these. Firstly: is this possible? If it is, then do I need to install some part of ArcGIS on the machine (I can't seem to find ArcGIS Desktop for linux/unix), do I need ArcGIS server on there, or do I just need to put the python modules on there, plus something to let it find the license? I've tried to research this but have ended up getting very confused about the various parts of ArcGIS and what does what!


title: Why does QGIS not show my new geometry columns?

text: I am trying to connect a few PostGIS Tables to Quantum GIS. The problem is that the geometry columns QGIS is showing are not the ones from the PostGIS database. QGIS shows me some columns I used to have before. Newer ones I created later are not shown. So I cant display my actual data. It seems like QGIS is keeping some old information about my tables. Is there any way to refresh PostGIS connections? Even deleting the old connections and building new ones does not work. I checked all the tables on the database level. Everything is alright there. So it seems like a QGIS bug... Thanks


title: How can i save Shape file as sql script with ogr2ogr?

text: I have a some Shape files and i want to convert it into sql scripts.   I know that ogr2ogr can put data into data base itself. But i want to have a sql script which can be executed and put data to DB.   Any advices?   If it impossible with ogr2ogr maybe i can use another tools for this?


title: connection to postgresql; From ArcGIS for Desktop 10.1 OR ArcGIS for Server 10.1

text: As it is mentioned in **ArcGIS Resources** "PostgreSQL client libraries are required on the ArcGIS **client application** from which you will connect to the database". My questions are:   1. by ArcGIS client applications, they mean e.g. **ArcGIS for Desktop version 10.1**?    2. Can **ArcGIS for server 10.1** have a direct connection to e.g. Postgresql? and if **NO** why there is **pg_client_linux64**? Are we supposed to put the client libraries in both bin directories of ArcGIS for Desktop and ArcGIS for server (on Centos)?


title: slow to draw mapservices after access featureLayers within an ESRI Mapservice using Javaascript API

text:
I am working on creating an online map using ESRI mapservices as a basemap and existing mapservices on our arcserver.. The problem I am running into is that the mapservices we have here are really slow to draw.. They do draw however. I have no access the mapservices themselves to change them only to reference them. What might be causing this issue? Below is my unfinished code for the page... I am working on this using the ESRI Javascript API... Any help is greatly appreciated.                 dojo.require("dijit.layout.BorderContainer");       dojo.require("dijit.layout.ContentPane");       dojo.require("dijit.layout.AccordionContainer");       dojo.require("esri.dijit.Legend");        dojo.require("esri.map");       dojo.require("esri.layers.FeatureLayer");       dojo.require("dijit.form.Button");       dojo.require("dijit.Dialog");       dojo.require("esri.arcgis.utils");       dojo.require("esri.toolbars.navigation");       dojo.require("dijit.Toolbar");            var mapLayers = [];       var map;           var legendLayers = [];           var navToolbar;                 function init() {         var extent = new esri.geometry.Extent({"xmin":-78.21364,"ymin":38.9500003,"xmax":-78.31262,               "ymax":39.49891569,"spatialReference":{"wkid":4269}});         map = new esri.Map("map", { extent: esri.geometry.geographicToWebMercator(extent)});         dojo.connect(map, "onLoad", initOperationalLayer);              var imagery = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer");         map.addLayer(imagery);         mapLayers.push(imagery);                  var usaTopo = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer");             map.addLayer(usaTopo);             mapLayers.push(usaTopo);                  var worldStreet = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer");             map.addLayer(worldStreet);             mapLayers.push(worldStreet);                       navToolbar = new esri.toolbars.Navigation(map);         dojo.connect(navToolbar, "onExtentHistoryChange", extentHistoryChangeHandler);                  dojo.connect(map, "onExtentChange", showExtent);       }                 function initOperationalLayer(map) {         var parcelContent = "
Owner: ${CAMRAGIS.MLNAM}" +                       "
Rec#: ${PARCEL.RECNUM}" +                           "
Acres: ${CAMRAGIS.MACRE#}";                       var buildingContent = "${ADDRESS}";             var landuseContent = "${LAND_USE}";             var zoningContent = "${ZONING}" +                                  "
${DESCRIPTIO}";              var parcelInfo = new esri.InfoTemplate("Parcels", parcelContent);             var buildingInfo = new esri.InfoTemplate("ADDRESS", buildingContent);             var landuseInfo = new esri.InfoTemplate("Future Land Use", landuseContent);             var zoningInfo = new esri.InfoTemplate("Zoning", zoningContent);              var parcelLayer = new esri.layers.FeatureLayer("http://gis1.co.frederick.va.us/ArcGIS/rest/services/GeoDoc/MapServer/1",{           mode: esri.layers.FeatureLayer.MODE_ONDEMAND,           displayOnPan:false,outFields: ["*"], opacity:.5, tileWidth:50, tileHeight:50, visible:false, maxScale:0, minScale:0,           infoTemplate: parcelInfo         });                  var streetsLayer = new esri.layers.FeatureLayer("http://gis1.co.frederick.va.us/ArcGIS/rest/services/GeoDoc/MapServer/2",{           mode: esri.layers.FeatureLayer.MODE_ONDEMAND,           displayOnPan:false,outFields: ["*"], opacity:.8, tileWidth:50, tileHeight:50, visible:false, maxScale:0, minScale:0,              });                  var buildingsLayer = new esri.layers.FeatureLayer("http://gis1.co.frederick.va.us/ArcGIS/rest/services/GeoDoc/MapServer/13",{           mode: esri.layers.FeatureLayer.MODE_ONDEMAND,           displayOnPan:false,outFields: ["*"], opacity:.8, tileWidth:50, tileHeight:50, visible:false, maxScale:0, minScale:0,           infoTemplate: buildingInfo         });                  var landuseLayer = new esri.layers.FeatureLayer("http://gis1.co.frederick.va.us/ArcGIS/rest/services/GeoDoc/MapServer/20",{           mode: esri.layers.FeatureLayer.MODE_ONDEMAND,           displayOnPan:false,outFields: ["*"], opacity:.8, tileWidth:50, tileHeight:50, visible:false, maxScale:0, minScale:0,           infoTemplate: landuseInfo         });                  var zoningLayer = new esri.layers.FeatureLayer("http://gis1.co.frederick.va.us/ArcGIS/rest/services/GeoDoc/MapServer/17",{           mode: esri.layers.FeatureLayer.MODE_ONDEMAND,           displayOnPan:false,outFields: ["*"], opacity:.8, tileWidth:50, tileHeight:50, visible:false, minScale:0,           infoTemplate: zoningInfo         });                  map.addLayer(parcelLayer);             map.addLayer(streetsLayer);             map.addLayer(buildingsLayer);             map.addLayer(landuseLayer);             map.addLayer(zoningLayer);                   map.infoWindow.resize(200,150);                  mapLayers.push(parcelLayer);             mapLayers.push(streetsLayer);             mapLayers.push(buildingsLayer);             mapLayers.push(landuseLayer);             mapLayers.push(zoningLayer);                       legendLayers.push({layer:parcelLayer,title:"Parcels"});             legendLayers.push({layer:streetsLayer,title:"Streets"});             legendLayers.push({layer:buildingsLayer,title:"Buildings"});             legendLayers.push({layer:landuseLayer,title:"Future Land Use"});             legendLayers.push({layer:zoningLayer,title:"Zoning"});                       dojo.connect(map,'onLayersAddResult',function(results){           var legend = new esri.dijit.Legend({             map:map,             layerInfos:legendLayers           },"legendDiv");           legend.startup();         });                 }            function layerVisibility(layer) {         (layer.visible) ? layer.hide() : layer.show();       }                function extentHistoryChangeHandler() {         dijit.byId("zoomprev").disabled = navToolbar.isFirstExtent();         dijit.byId("zoomnext").disabled = navToolbar.isLastExtent();       }                function showExtent(ext){          var s = "";             s = "XMin: " + ext.xmin.toFixed(2) +                 " YMin: " + ext.ymin.toFixed(2) +                 " XMax: " + ext.xmax.toFixed(2) +                 " YMax: " + ext.ymax.toFixed(2);         dojo.byId("onExtentChangeInfo").innerHTML = s;           }            dojo.addOnLoad(init);


title: What program(s) can I use to edit a boundary?

text: So i've got some shapefiles imported into my Sql Server 2008 Database. A number of these boundaries need to get 'cleaned up'. As such I need to do the following :-   1. Export them from Sql Server 2008. _sigh_   2. Import them as a layer into some editing program   3. Overlay this layer, over a world maps .. like OpenStreet Maps, etc.   4. Edit the polygon(s). Eg. cut one boundary into two .. while following a road that defines the boundary between the two.   5. Export these new cleaned boundaries to files.   6. Import these boundaries back into Sql Server 2008. I have absolutely no idea how to do this. Are the programs out there that can do this? The only thing I found was using `ogr2ogr` to export my boundary (from Sql Server 2008) to `.shp/.shx/..dbf` files. If we need to purchase a product, then (assuming it's not a HUGE $$$ amount) we can do that do. If i need to export the data into another type of database, I can setup a another database. I've spent all day trying to play with MapWindow 6 and QGIS but I'm having no luck at all :( Can anyone make any suggestions, please? ## Update > Maybe you can describe exactly what does not work for you if you try to > achieve your goals in QGIS Sure :) Firstly, I can add an overlay of the shape file. TICK. Next i can't get a world map to overlay. No idea how to do that :( It's like I would love google maps to be underneath my first layer. Lastly, I have no idea how to cut the shape into two pieces. (and of course, I would be following a road or roads, to define the boundary-split. This is the type of clean ups I need. Oh.. I would also love to CREATE a new boundary, by just dropping lat/long points over a map and the closing the poly. All these things need to be exported to shape files or WKT (that would be better :P) so i can import it back into Sql Server 2008.


title: How to get Polygon Co-ordinates which is at angle X?

text: Let say I have a line, which co-ordinates are (0,0) and (5,0) which is straight. Now I move the line to 45 degree. What will be co-ordinates now? Similar, I have to do this for triangle, polygon. I have only co-ordinates and angle. I need the new co-ordinates.


title: Parsing entire ArcSDE database searching for field for export?

text: I'm wanting to parse through an entire ArcSDE database (feature dataset, features classes, tables, everything...) searching for a field (compkey) and export the numbers to a txt file.


title: Are there any good alternatives to the Maplex (ESRI) labeling engine?

text: I am running ArcGIS 10 (ArcView) with the standard labeling engine. I am very familiar with Maplex and have used it in the past but it still lacked the "feature-linked" functionality given the type of license I use. (Arc Info - Maplex combination was quite good)   Still, I found Maplex to be better than the built-in labeling engine but not stellar. Decent label masking for elevation contours and orienting labels up- slope, etc. are still difficult if not impossible to acheive even with maplex. Area there any good alternatives?


title: Problems in installation of PostGIS

text: I will be installing PostGIS for my project using PostgreSQl (OSM) in Ubuntu 9.04. I had all the requirements prior to the installation (PostgreSQL, Proj4, GEOS). When I unzip the PostGIS tar, then './configure' it, it says that the pg_config.h file is missing. I found out that I need to 'apt-get install libpq-dev' for me to able to have this file and past it as parameter to ./configure --with-pgconfig=PATH. When I executed this, this is what happens:               ...     checking for libiconv_open in -liconv... no     checking for iconv_open in -lc... yes     Using user-specified pg_config file: /usr/include/postgresql/pg_config.h     ./configure: line 16394: /usr/include/postgresql/pg_config.h: Permission denied     ./configure: line 16404: /usr/include/postgresql/pg_config.h: Permission denied     ./configure: line 16405: /usr/include/postgresql/pg_config.h: Permission denied     ./configure: line 16406: /usr/include/postgresql/pg_config.h: Permission denied     checking PostgreSQL version...      ./configure: line 16411: test: : integer expression expected     ./configure: line 16416: test: : integer expression expected     ./configure: line 16426: test: : integer expression expected     ./configure: line 16433: /usr/include/postgresql/pg_config.h: Permission denied     ./configure: line 16434: /usr/include/postgresql/pg_config.h: Permission denied     ./configure: line 16439: /usr/include/postgresql/pg_config.h: Permission denied     ./configure: line 16440: /usr/include/postgresql/pg_config.h: Permission denied     ./configure: line 16445: /usr/include/postgresql/pg_config.h: Permission denied     ./configure: line 16449: /usr/include/postgresql/pg_config.h: Permission denied     checking libpq-fe.h usability... no     checking libpq-fe.h presence... no     checking for libpq-fe.h... no     configure: error: could not find libpq-fe.h                     I checked in the /usr/include/postgresql/ directory and I found the pg_config.h and libpq-fe.h files there. What can I be missing here. Please help me. I can't move on because of this :(


title: How to convert GML to features in ArcObjects?

text: How to convert GML to features and features to GML i ArcObjects? We are building an application where we want to communicate with a service with GML but natively in our stand-alone application we want to use features and shapefiles. Update: I have an ArcGIS Server so I could use that a bridge so I could use thatas a bridge beween the service and the client.


title: Script tool does not create output variable

text: I have the following problem. I have created a python script, which output should be a list of values (`res[i]=*something*`). Now I would like to create a script in my toolbox so i could use it from modelbuilder or arcmap. However, I dont know how to set the Data type of the Output variable in the Script properties and I am also not sure whether there shouldn be something like `arcpy.SetParameterAsText(5,res)` at the end of my script. ![enter image description here](http://i.stack.imgur.com/U9j8v.png) **Here are my questions:**   1. How to force my script to give results in the form of list of values (vector)?   2. Do I need to add some code at the end of my script so it will know what the output is? If yes how?   3. What data type should I use in the parameter properties for the output if I want it to be a list of values (could also be a table)? Thanks


title: panning problems - highlights screen

text: We have developed an online map with a panning function. It works ok but from time time when I click and drag it seems to select the whole screen and colour it blue. I can click out of the map extent and it returns to normal but can anyone suggest a way of making this more user friendly and making it less sensitive to the cursor not panning 'correctly'. Is this just a case of setting the cursor settings being too 'senstive'?? Hope this is clear


title: Raster Calculator Workaround in Arcpy for Suitabiliy Analysis

text: This is my first attempt at a complex stand alone python code. I am self teaching the arcpy module, well at least attempting to. I am having a great deal of difficulty getting my site suitability analysis code to run. It consistently crashes at the raster calculator step. I understand that the raster calculator tool is difficult to manage in arcpy, however I am equally unfamiliar with the method using map algebra. The outputs/inputs are rasters. Everything is converted to rasters in prior steps. I get an error code: 000989 Python Syntax error: parsing error invalid syntax, referencing the line of code for raster calculator. My code is included below. Can someone help me with a workaround for this issue?               # -*- coding: utf-8 -*-     # ---------------------------------------------------------------------------     # Megan E Brown     # ModelCode.py     # Created on: 2014-04-21 23:51:03.00000     #   (generated by ArcGIS/ModelBuilder)     # Usage: ModelCode <Scratch_Workspace> <Trails> <Trail_Proximity> <DEM> <Min_Elevation__m_> <Max_Slope____> <Final_raster>      # ---------------------------------------------------------------------------          # Import arcpy module     import arcpy, arcview     #from arcpy.sa import *     #env.workspace = "C:\\temp"          # Check out any necessary licenses     arcpy.CheckOutExtension("3D")     arcpy.CheckOutExtension("spatial")          # Script arguments     Scratch_Workspace = arcpy.GetParameterAsText(0)     if Scratch_Workspace == '#' or not Scratch_Workspace:         Scratch_Workspace = "C:\\temp" # provide a default value if unspecified          Trails = arcpy.GetParameterAsText(1)     if Trails == '#' or not Trails:         Trails = "Z:\\GIS500\\FinalProject\\FPData\\WELP_trails.shp" # provide a default value if unspecified          Trail_Proximity = arcpy.GetParameterAsText(2)     if Trail_Proximity == '#' or not Trail_Proximity:         Trail_Proximity = "200 Feet" # provide a default value if unspecified          DEM = arcpy.GetParameterAsText(3)     if DEM == '#' or not DEM:         DEM = "Z:\\GIS500\\ned\\ned" # provide a default value if unspecified          Min_Elevation__m_ = arcpy.GetParameterAsText(4)     if Min_Elevation__m_ == '#' or not Min_Elevation__m_:         Min_Elevation__m_ = "170" # provide a default value if unspecified          Max_Slope____ = arcpy.GetParameterAsText(5)     if Max_Slope____ == '#' or not Max_Slope____:         Max_Slope____ = "10" # provide a default value if unspecified          Final_raster = arcpy.GetParameterAsText(6)     if Final_raster == '#' or not Final_raster:         Final_raster = "Z:\\GIS500\\FinalProject\\FPData\\tempdata\\yay" # provide a default value if unspecified          # Local variables:     Percent_Slope = "C:\\temp\\Percent_Slope"            #slope output     Slope_LE = "C:\\temp\\Slope_LE"                      #"output of less than equal"     Calc = "C:\\temp\\Calc"                              #output from raster calculator, input to final step Equal to     Elevation_GE = "C:\\temp\\Elevation_GE"              #"greater than equal output"     Buff = "C:\\temp\\Buff"                              #"output of buffer"     buffer_raster = "C:\\temp\\buffer_raster"            #"output of feature to raster making buffer into polys"     Near_trails = "C:\\temp\\Near_trails"                #"output from not equal reclassing the buffer raster for raster calculation"     Cell_size_30m = 30     Value_0 = "0"     Value3 = "3"          # Process: Slope     arcpy.Slope_3d(DEM, Percent_Slope, "PERCENT_RISE", "9.0021749575298E-06")          # Process: Less Than Equal     arcpy.gp.LessThanEqual_sa(Percent_Slope, Max_Slope____, Slope_LE)          # Process: Greater Than Equal     arcpy.gp.GreaterThanEqual_sa(DEM, Min_Elevation__m_, Elevation_GE)          # Process: Buffer     arcpy.Buffer_analysis(Trails, Buff, Trail_Proximity, "FULL", "ROUND", "NONE", "")          # Process: Feature to Raster     arcpy.FeatureToRaster_conversion(Buff + ".shp", "FID", buffer_raster, Cell_size_30m)          # Process: Not Equal     arcpy.gp.NotEqual_sa(buffer_raster, Value_0, Near_trails)          # Process: Raster Calculator     arcpy.gp.RasterCalculator_sa(((Slope_LE) + (Elevation_GE) + (Near_trails)), Calc)          # Process: Equal To     arcpy.gp.EqualTo_sa(Calc, Value3, Final_raster)


title: Distance matrixes and ports positions

text: I have port positions and need to generate distance matrixes in nautical miles. I am using Proximity tool of ArcGIS for obtaining distances but in this case it doesnt work as I have restrictions i.e. I dont want the linear distance between two ports crossing land....what is the best way to do this.


title: Problem to clip a raster with a shapefile

text: I need to clip a rasterlayer with a vector layer. When I try this, the following error appears:               **ERROR 1: Attempt to create 0x0 dataset is illegal,sizes must be larger than zero.**       What am I doing wrong? I would be very glad, if somebody could help me. Thank you, Lisa


title: GRASS Plugin to QGIS error

text: I am installing QGIS and GRASS as part of an FOSS GIS class I'll be teaching this summer. I used the OsGeo4W installer. This installer has always worked flawlessly for me except on the machines at the college. Initially the install gave me a "The ordinal 3109 could not located in the dynamic link library LIBEAY32.dll" error. I remembered the work around for this from last spring. I copied the libeay32.dll from c:\osgeo4w\bin to c:\osgeo4w\qgis\apps\bin and was able to complete the install and have QGIS operate successfully. However, when I enable the GRASS plugin, open a mapset and then try to add data I get the following and QGIS crashes.               Cannot get projection     Cannot run module     Command: c:/osgeo4w/apps/QGIS/./grass/modules/QGIS.g.info info=project      The layer itself has a defined coordinate system and the QGIS project is set to the same coordinate system. If I create a new Mapset it fails to import an existing dataset, either from a loaded dataset, or via OGR. I get this error:               Cannot start module v.in.ogr          Command: c:/osgeo4w/apps/grass/GRASS--1.2/bin/v.in.ogr.exe --interface-description      GRASS itself will not open via either GUI or commandline. I've gone into the OsGeo4W installer/Advanced and reinstalled both QGIS and GRASS without any change. I need to get this up and running by the end of the week. Any suggestions will be greatly appreciated. All I can think of is that perhaps there are restrictive permissions on some folders. The computer is a Windows 7 64 bit machine. Thanks! Kurt


title: QGIS to support hydraulic engineering projects

text: What is DTM in hydraulic projects? and what is application area of QGIS ?


title: clipping polygons (vector) map with a polygon (vector) layer

text: A frustrated newbie with QGIS Lisboa version in Windows 7. I want to clip a soil map (multiple polygon vectors) with a single polygon (rectangular polygon vector). The project projection is set at NAD27 UTM 12N. The soil map is Lambert Conformal Conic NAD83 and the clipping rectangular polygon is NAD27 UTM 12N. In the project setting I have checked the box "Allow on the fly transformation. The operation: Vector --> Geoprocessing Tools -->Clip --> input vector file (the soils)--> clip layer (the rectangle)--> output shalefile (new name)-->OK. Results: The layers section lists my new file BUT the file does not display and when I click on the file listed and look at the attribute table the FIELDS from the soil map are shown but there are no records in the table.   1. What am I doing wrong?   2. What coordinates will the new map be in? That of the soil map or that of the clipping layer? Thank you. AQJO


title: Printing or Exporting Table on ArcGIS Online

text: I have a table that is filtered on my ArcGIS Online map. The data that is filtered is coming from a layer on my ArcGIS for Server. How would I print or export that filtered table? I thought it would be a simple task, but I cannot locate any information on the subject. Thank you for your help.


title: Why does a geoprocessing service fail every other time it is run?

text: I have a ArcGIS Server 10 geoprocessing service right now that takes in a string and runs a parameterized query to SQL Server 2008R2 through pyodbc. The service works, but only every other time. I can run it on my machine locally every time and also on the machine this runs on (also every time), but I can't run this through ArcGIS Server but every _other_ time, either through the web interface or the ArcGIS JavaScript API. Every other time, I get this error: `Error Executing Task. Error processing message`... along with a 500 error. Is it maybe a problem with pyodbc? Or am I overlooking something small? Here's what I'm working with (snipped SQL and a little extra). There's two input parameters, SearchTerm and SearchType (only can be "standard" in this snippet), and one output parameter. All parameters are strings.               import arcpy     import pyodbc     import sys     import urllib          connection = None     cursor = None          def search(search_term, search_type):         try:             global connection             search_term = urllib.unquote_plus(search_term)             connection = pyodbc.connect(...)             if search_type == "standard":                 return string_search(search_term) # snipped out other use case.             else:                 return "[]"         except:             print_message(sys.exc_info(), True)             return '{"error": "' + str(sys.exc_info()) + '"}'          def string_search(search_term):         global cursor         cursor = connection.cursor()         sql = """SELECT * FROM Resources WHERE ResourceName LIKE ?"""         search_term = "%" + search_term.upper() + "%"         cursor.execute(sql, search_term)         return return_results()          def return_results():         global connection         global cursor         return_ids = ""         for row in cursor:             resource_name = ""             if row.ResourceName is None:                 resource_name = "Not Available"             else:                 resource_name = row.ResourceName             return_ids = return_ids + ',{"ResourceId":' + str(row.ResourceId) + '}'         return_ids = return_ids[1:]         cursor.close()         connection.close()         return "[" + return_ids + "]"          def print_message(message, is_error=False):         message = str(message)         if is_error:             print "ERROR: " + message             arcpy.AddError(message)         else:             print message             arcpy.AddMessage(message)          if __name__ == '__main__':         if arcpy.GetArgumentCount() > 0:             return_text = search(arcpy.GetParameterAsText(0), arcpy.GetParameterAsText(1))             arcpy.SetParameterAsText(2, return_text)         else:             arguments = ["chicken", "standard"]             argv = tuple(arguments)             print search(*argv)


title: How to find out if a file geodatabase was compressed?

text: I work with a bunch of file geodatabases and some of them are compressed. I want to find out quickly which ones are and which aren't. The Compress File Geodatabase Data GP tool doesn't seem to have any check before running. I don't want to run File Geodatabase Data GP tool on uncompressed geodatabases though; I just to know whether they are compressed/uncompressed. I could grab some random feature class / table and try starting editing session to see if it will let me do that (because you can't edit data that is compressed), but am looking for a more elegant solution. Ideally this would be an ArcPy/Python solution which I could use for going over multiple geodatabases.


title: How do I geocode street addresses that have information redacted (e.g. 14XX Main St.)?

text: My city has an open data section listing crimes and accidents amongst other things. They include approximate time, type of crime, etc. The way they formatted the location Looks something like this "42XX street, city, state, zip", how would I geocode an address that doesn't have a a complete street number? If at all possible. I'm looking to incorporate census tract data as well so I need good spatial accuracy.


title: Python: Using re and update cursor over three columns

text: I'm working on this code and got a little to excited...only to find out it wasn't perfect! I'm trying to eliminate the suffix (row1) of roadnames(row0) and parse just the roadname to a new field(row2). I got it to work, however it also eliminates the suffix within the roadname. For instance, in the suffix column I could have "St" and roadname "Bathhurst St" What I want is for the new field to say "Bathhurst" instead, it says "Bathur". I know if you add a '$' it will make it match to just the end of the field, however I can't figure out how to make it work with variables. Here is the code:               import arcpy     import re          fc = r"G:\GIS\Shapes\SeptParcels.shp"     fields = ["STREETNAME", "SUFFIX", "NAME1"]          with arcpy.da.UpdateCursor (fc,fields) as cursor:         for row in cursor:             row0 = str(row[0])             print row0             row1 = str(row[1])             print row1             query = re.sub(row1,"", row0)             row[2] = query             print query                  cursor.updateRow(row)


title: Can I limit the number of features in QGIS 2

text: I have a feature set that is city-wide and has 200,000 features. But I only need to see the features in the current map bounds. When I change the bounds in QGIS 2, it appears that it renders all the features, not just the ones that I need. Is there a way to tell QGIS 2 to only render the features within the map bounds?


title: How to install statist plugin in QGIS / OS X

text: I am stuck with installing a plugin for QGIS namend "Statist". I get the following message when starting QGIS: "Missing matplotlib Python module". So basically this question relates to all plugins for QGIS using the matplotlib python module. I have tried to stick to every advice on stackexchange in order to install the whole QGIS package on OS X correctly. However, I don't have any clue why QGIS cannot find the properly installed matplotlib /Library/Python/2.7/site- packages directory. I installed matplotlib with _sudo pip install matplotlib_. I know that some questions already relate to his problem, but none helped me with solving this problem. I appreciate every hint or workaround for this problem. Thank you. J. * * * **I use**   * OS X 10.7.4 QGIS 1.8.0-Lisboa    * I've installed all necessary QGIS-related stuff from kyngchaos in the latest version.   * QGIS had some problems with recognized rgdal first. I used the following advice – then it worked properly. This is what i get when i check for all versions installed (while "USER" is my userdirectory): > > > import sys;sys.version;sys.path '2.7.1 (r271:86832, Aug 5 2011, > 03:30:24) \n[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build > 2335.15.00)]' ['/Users/USER/.qgis/python/plugins/GeoCoding', > '/Users/USER/.qgis//python/plugins/sextante', > '/Users/USER/.qgis/python/plugins/GeoCoding', > '/Applications/QGIS.app/Contents/MacOS/../Resources/python', > '/Users/USER/.qgis//python', '/Users/USER/.qgis//python/plugins', > '/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins', > '/Library/Frameworks/SQLite3.framework/Versions/3/Python/2.7', > '/Library/Python/2.7/site-packages/numpy-override', > '/Library/Frameworks/GDAL.framework/Versions/1.9/Python/2.7/site-packages', > '/Library/Python/2.7/site-packages/Scrapy-0.14.4-py2.7.egg', > '/Library/Python/2.7/site-packages/lxml-2.3.4-py2.7-macosx-10.7-intel.egg', > '/Library/Python/2.7/site-packages/w3lib-1.2-py2.7.egg', > '/Library/Python/2.7/site- > packages/readline-6.2.4.1-py2.7-macosx-10.7-intel.egg', > '/Library/Python/2.7/site-packages/nose-1.2.1-py2.7.egg', > '/Library/Python/2.7/site-packages/six-1.2.0-py2.7.egg', > '/Library/Python/2.7/site-packages/pytz-2012j-py2.7.egg', > '/Library/Python/2.7/site-packages/tornado-2.4.1-py2.7.egg', > '/Library/Python/2.7/site- > packages/pyzmq-2.2.0.1-py2.7-macosx-10.7-intel.egg', > '/Library/Python/2.7/site-packages/pika-0.9.9-py2.7.egg', > '/Library/Python/2.7/site-packages/Jinja2-2.6-py2.7.egg', > '/Library/Python/2.7/site-packages/patsy-0.1.0-py2.7.egg', > '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', > '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', > '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat- > darwin', > '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat- > mac', > '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat- > mac/lib-scriptpackages', > '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', > '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib- > tk', > '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib- > old', > '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib- > dynload', > '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC', > '/Library/Python/2.7/site-packages', '/Library/Python/2.7/site- > packages/PIL', '/Users/USER/.qgis/python/plugins/mmqgis/forms', > '/Users/USER/.qgis/python/plugins/QuickMultiAttributeEdit/forms', > '/Applications/QGIS.app/Contents/Resources/python/plugins/fTools/tools']


title: Integrate GeoJSON file with openlayers.protocol.http

text: I've got a problem with (the title says it) integrating a geojson file in my openlayers map. I have to use the openlayers.protocol.http way. I examined lots of examples on the web (and on stackexchange) but I cannot figure out what the problem with my exact code is. it shows the layer in the layerswitcher, but it doesn't show the features. I hope someone can find the error. Here's my code (relating geojson): WebMapping - Übung 12               <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />          <script type="text/javascript" src="http://openlayers.org/api/OpenLayers.js"></script>               <script type="text/javascript">              var map;              function initMap() {                  map = new OpenLayers.Map("openlayers");                       var mapnik = new OpenLayers.Layer.OSM();                            map.addLayer(mapnik);                            var mapCenter = new OpenLayers.LonLat(8.692, 49.412);                       mapCenter.transform(                 new OpenLayers.Projection("EPSG:4326"), // transform from WGS 1984                 new OpenLayers.Projection("EPSG:900913") // to Spherical Mercator Projection             )                   ZoomLevel 15 setzen             map.setCenter(mapCenter, 15);                       map.addControl(new OpenLayers.Control.ScaleLine());             map.addControl(new OpenLayers.Control.OverviewMap());             map.addControl(new OpenLayers.Control.MousePosition());             map.addControl(new OpenLayers.Control.LayerSwitcher());         //  map.addControl(new OpenLayers.Control.SelectFeature(cities,{autoActivate:true, hover:true, onSelect:addPopup, onUnselect:removePopup}));                       var geojsonURL = "wikiCities.geojson";                      cities = new OpenLayers.Layer.Vector("Städte", {                              styleMap: new OpenLayers.StyleMap({                             "default": new OpenLayers.Style({                             pointRadius: 5,                             fillColor: "#ffcc66",                             fillOpacity: 0.8,                             strokeColor: "#cc6633",                             strokeWidth: 2,                             strokeOpacity: 0.8 } ),                             "select": { fillColor: "#8aeeef",                             strokeColor: "#32a8a9",                             labelYOffset:13,                             label:"${name}"} //Text entspricht feature.attributes.name                         }),                                        strategies: [new OpenLayers.Strategy.Fixed()],                              protocol: new OpenLayers.Protocol.HTTP({                             url: geojsonURL,                               format: new OpenLayers.Format.GeoJSON({                                                                                externalProjection: new OpenLayers.Projection("EPSG:4326"),                                       internalProjection: new OpenLayers.Projection("EPSG:900913")                                     })                                   })                 });                  map.addLayer(cities);                              }                   window.onload = initMap;     </script>          <style type="text/css">         body {             font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;         }         #header{             height:3em;         }              #wiki {             position: absolute;             right: 10px;             height:91%;             width: 49%;             top:3em;              }              #openlayers {             position: absolute;             width: 49%;             top: 3em;             left: 10;             bottom: 2em;         }              #info {             position: absolute;             height: 1em;             left: 10;             right: 0;             bottom: 0;                  padding: 0.5em;             text-align: right;         }     </style>      Ihr Browser unterstützt keine Inlineframes ### Wikipedia-Integration in OpenLayers               </div>          <div id="info">          </div>


title: Changing field type with arcpy

text: What I need to do is change data type of a field of a table or feature class. If there are some data, then I need to transfer it, if its possible, if not possible then just set null for that data. I need to do it using python script. Problems:   1. Because of before and after changing the data type, field name is same, I can not add new field with same name using `arcpy.AddField_management` method.   2. Because of I need to transfer field values from first field to second one, I need to map both data types.  It will be good for me if I can find any arcpy procedure similar to artwork21's answer. Thanks.


title: Python - read shapefile .dbf for encoding

text: I've written a python script that formats a .shp such that its fields structure matches my office's database view in order to ingest the data of said shapefile. This original shapefile was encoded with the regional Hangul (Wansung) encoding, which required the codecs.decode('949') method to read in the Korean characters. This is consistent with the ESRI table found here. What I'd like to do is enhance the script so that it can read the .dbf header, find the encoding, which according to this and other sites resides at the byte offset of 29, so that our staff does not have to know the ESRI language code for every regionally-encoded shapefile we get. It's a one-byte flag, and I figured '949' would be an integer, so python's struct.unpack method should do the trick, specifically this:               myBinaryFile = angusMcFile.read(30)     dbfHead = struct.unpack('<29xB', myBinaryfile)      The returned values are 'W' when I unpack guessing that this 'flag' is a 1-byte string, and '87' when I unpack guessing it's a 1-byte integer. This is not the '949' or '0x79' that I'm looking for. What am I doing wrong? I'll be happy to provide more code if necessary.


title: QGIS 1.8 crashes when exporting from print composer to image on Windows 7

text: My question is similar to QGIS Crashes when writing to PDF. Today, when I try to export to image, QGIS crashes. I've tried opening a new composer to no avail. This is the problem signature: Problem Event Name: APPCRASH Application Name: qgis.exe Application Version: 0.0.0.0 Application Timestamp: 4fdce845 Fault Module Name: QtGui4.dll Fault Module Version: 4.7.1.0 Fault Module Timestamp: 4d5308cc Exception Code: c0000005 Exception Offset: 00053de0 OS Version: 6.1.7601.2.1.0.768.3 Locale ID: 1033 Additional Information 1: 0a9e Additional Information 2: 0a9e372d3b4ad19135b953a78882e789 Additional Information 3: 0a9e Additional Information 4: 0a9e372d3b4ad19135b953a78882e789 Is there something wrong with my QtGui4.dll? Do I not have enough memory allocated?


title: Adding temporary graphic or vector layer to QGIS to replace the slow select feature method

text: I have a custom QGIS 1.9 dev (so 2.0 I guess) plugin which collects and displays a list of polygons in a QTreeWidget. I would like to select a list item and it immediately display a highlighted polygon to which it corresponds. This is possible by using the QgsVectorLayer.select() method, but the method is very slow and I would like it to display almost instantly. I can simulate the highlighting of a polygon by creating a new in-memory vector layer and adding a feature using the geometry of the selected list item, but I don't want to display that new layer in the Layers window. My code (not 100% usable here) shows the basic implementation so far. My preferred outcome would be a fast 'select' method, or else a way to display a new temporary vector layer without displaying it in the Layer window.               class FindLandParcelDialog(QtGui.QDialog):         def __init__(self, iface):             QtGui.QDialog.__init__(self)             self.ui = Ui_FindLandParcel()             self.ui.setupUi(self)             self.parcel_tw = self.ui.treeWidget                  self.parcel_dict = {CP100: (143, 'shape_wkt'), CP101: (144, 'shape_wkt')}                  self.parcel_tw.itemSelectionChanged.connect(self.selectParcel)  # Very slow select             # self.parcel_tw.itemSelectionChanged.connect(self.highlightParcel)  # displays new layer in Layer window - not wanted              def selectParcel(self):             '''Selects polygons with the ID stored in the dictionary linked to the             QTreeWidget item'''             self.cLayer = self.canvas.currentLayer()             idx = self.getTreeCurrentItem(self.parcel_tw)             parcel_id = self.parcel_dict.items()[idx][1][0]                  self.cLayer.removeSelection()             for feat in self.cLayer.getFeatures():                 if feat.attributes()[0] == parcel_id:                     self.cLayer.select(feat.id())              def getTreeCurrentItem(self, QTreeWidget):             '''Returns index of the selected top level QTreeWidgetItem'''             currentitem = self.parcel_tw.currentItem()             idx = QTreeWidget.indexOfTopLevelItem(currentitem)             return idx              def highlightParcel(self):             self.cLayer = self.canvas.currentLayer()             self.zoomtolayer_btn.setEnabled(True)             idx = self.getTreeCurrentItem(self.parcel_tw)             parcel_wkt = self.parcel_dict.items()[idx][1][-1]             self.createInMemoryFeature(parcel_wkt)              def createInMemoryFeature(self, wkt):             layer = QgsVectorLayer('Polygon?', 'temporary_polygons', 'memory')             pr = layer.dataProvider()             layer.startEditing()             feat = QgsFeature()             feat.setGeometry(QgsGeometry.fromWkt(wkt))             pr.addFeatures([feat])             layer.commitChanges()      **SOLUTION** The working code to display a temporary feature (from Nathan W's answer):               class FindLandParcelDialog(QtGui.QDialog):         def __init__(self, iface):             QtGui.QDialog.__init__(self)             self.ui = Ui_FindLandParcel()             self.ui.setupUi(self)             self.parcel_tw = self.ui.treeWidget                  self.parcel_dict = {CP100: (143, 'shape_wkt'), CP101: (144, 'shape_wkt')}                  self.parcel_tw.itemSelectionChanged.connect(self.highlightParcel)              def highlightParcel(self):             self.cLayer = self.canvas.currentLayer()             idx = self.getTreeCurrentItem(self.parcel_tw)             parcel_wkt = self.parcel_dict.items()[idx][1][-1]             self.createRubberBandFeature(parcel_wkt)              def createRubberBandFeature(self, wkt):             band = QgsRubberBand(self.canvas)             band.setToGeometry(QgsGeometry.fromWkt(wkt), self.cLayer)             band.setColor(QtGui.QColor(255,255,0,255))             band.show()              def getTreeCurrentItem(self, QTreeWidget):             '''Returns index of the selected top level QTreeWidgetItem'''             currentitem = self.parcel_tw.currentItem()             idx = QTreeWidget.indexOfTopLevelItem(currentitem)             return idx


title: ArcGIS 10.0 Network Analyst Creating Service Areas Beyond My Network

text: I am experiencing weird off shoots which are beyond my network when creating service areas using Network Analyst. The red circle in the picture below shows an example. I am currently using ArcGIS 10.0 SP5. This question seems similar, but did not have an answer beyond using detailed polygons instead of generalized polygons. My question is, where might this error come from? Is it due to a dirty/poor network or a peculiarity within the calculation of generalized polygons? ![enter image description here](http://i.stack.imgur.com/CqFBc.png)


title: how to export mdb to dgn file in qgis

text: I am having an (.mdb) file .I want to export this file to (.dgn) format .How can i do this in Qgis ? Is there any plugin available ?


title: Finding Band Count in Rasters using ArcPy

text: I'm having troubles finding the band count for my raster files using ArcPy. I need to first list all the raster files in a directory, and then display the band count for each file. I am able to list the files, but when it gets to the band count, it gives me an error stating that `Method Band Count does not exist.` The following is what I have for my code so far:               import os     import arcpy          arcpy.env.workspace = "C:\\Rasters" # Contains TIFF, IMG, GRID formats     filePath = arcpy.env.workspace          rasterList = arcpy.ListRasters("*", "ALL")     desc = arcpy.Describe(filePath)          for names in rasterList:         print names         print desc.bandCount      Any ideas where I'm going wrong? I was using the Geoprocessor Programming Model as a reference.