How to apply a new renderer in ArcGIS?

I try to create a new renderer for a geo feature layer in ArcGIS 10. (My project is an asp.net based webservice) There is one solution I got from a tutorial that works, but only for a ISimpleRenderer                   // Create an ArcObjects color object with the color set to blue for use by the layer's renderer         IRgbColor rgbColor = (IRgbColor)serverContext.CreateObject("esriDisplay.RgbColor");         rgbColor.Red = 0;         rgbColor.Green = 0;         rgbColor.Blue = 210;              // Set the symbol of the GeoFeatureLayer's renderer to use the color initialized above         ISimpleRenderer aoSimpleRenderer = (ISimpleRenderer)geoFeatureLayer.Renderer;         ISimpleLineSymbol simpleLineSymbol = (ISimpleLineSymbol)aoSimpleRenderer.Symbol;         simpleLineSymbol.Color = (IColor)rgbColor;      that works fine, but only for the SimpleRenderer. What I need is the ClassBreaksRenderer. Now the problem is, that if I create a new Renderer (SimpleRenderer or ClassBreaksRenderer), set the properties and apply it to the geo feature class (geoFeatureLayer.Renderer = cRenderer as IFeatureRenderer) the map is empty and no features are rendered. Someone has an idea? Regards


Changing the SLD Repeat attribute appears to have no effect for a line label on a WMS layer

I have a WMS layer (within Geoserver) for roads, and a style defined to label these roads. I have the repeat set for the Text Symbolizer as follows               <VendorOption name="repeat">550</VendorOption>      However it appears to be not repeating at all until the lower zoom levels. There seems to be plenty of space for the labels to be placed and the maxDisplacement is set to 10. Lowering the repeat from 550 has no effect either. Am I correctly using the repeat attribute? I can't see any errors coming out in the logs. The tile layer is set to metatile 4x4. The rest of the SLD is shown below -                       <Label>               <ogc:PropertyName>dftnumber</ogc:PropertyName>             </Label>             <Font>               <CssParameter name="font-size">10</CssParameter>               <CssParameter name="font-weight">bold</CssParameter>             </Font>             <LabelPlacement>               <PointPlacement>                 <AnchorPoint>                   <AnchorPointX>0.5</AnchorPointX>                   <AnchorPointY>0.5</AnchorPointY>                 </AnchorPoint>                 <Displacement>                   <DisplacementX>0</DisplacementX>                   <DisplacementY>0</DisplacementY>                 </Displacement>               </PointPlacement>             </LabelPlacement>             <Fill>               <CssParameter name="fill">#FFFFFF</CssParameter>             </Fill>             <Priority>2600</Priority>             <VendorOption name="spaceAround">1</VendorOption>             <VendorOption name="group">yes</VendorOption>             <VendorOption name="maxDisplacement">10</VendorOption>             <VendorOption name="repeat">550</VendorOption>


How to close DOJO layout elements programatically

This applies to ArcGIS Server JavaScript API 2.4. The Build Application Layouts help file shows how to lay out a page with elements held within separate containers. **How can I programatically close a Content Pane when the user presses a button?** For example in this map, how could I close the rightPane div, and have the map expand to fill the vacant space (ie, hide the Table of Contents)? ESRI are doing it on the My Map viewer so it must be possible. The X in the top-right of the Details panel contains this markup:                                   How can I find out what that button is doing, and would that help? Thanks


Conditional formatting of grid cells based on specifict attribute

I'm using QGIS. I have a 29x30km grid. Every cell of the grid has its ID and every cell of the grid has an attribute "Population" ranged from 0 to 30000. What I would like to do, is to get some kind of heat map of the grid, eg. 30000 population cell is dark red, 100 population cell is light yellow. The HeatMap plugin does not work (or I'm using it wrong), because AFAIK to get HeatMap from this plugin I'd have to convert my atrribute to eg. 30000 points in this cell. Best regards, Maciek


how to parse a XML Document file associated with the shapefile into a PostGIS/PostgreSQL table

I have a shapefile, and information on its attributes is stored in a XML Document format. For example, the attribute of COUNTY is stored as follows:               -<attr>            <attrlabl>COUNTY</attrlabl>            <attrdef>County abbreviation</attrdef>            <attrtype>Text</attrtype>            <attwidth>1</attwidth>            <atnumdec>0</atnumdec>           -<attrdomv>               -<edom>                   <edomv>C</edomv>                   <edomvd>Clackamas County</edomvd>                   <edomvds/>                </edom>               -<edom>                   <edomv>M</edomv>                   <edomvd>Multnomah County</edomvd>                   <edomvds/>                </edom>               -<edom>                   <edomv>W</edomv>                   <edomvd>Washington County</edomvd>                   <edomvds/>                </edom>            </attrdomv>        </attr>      When converting the shapefile to a PostGIS/PostgreSQL table, I also want to create a PostgreSQL/PostGIS table that will describe information on the attributes. So, the new table includes these columns: attribute(attrlabl), definition(attrdef), type(attrtype), width(attwidth), and categories(attrdomv). I appreciate any suggestions.


Locate Widget for flexviewer 2.3.1

I want to exclude addresses to the state of Oregon. Pre 2.3.1 code was               <listfield>State</listfield>     <listvalues>OR</listvalues>      for 2.3.1 ESRI says to use               <fields>State</fields>     <fields listvalues="OR">      but no dropdown shows up, and it still searches all of US?


How do you determine a shapefile's charset?

Is there a way to determine the charset used for a given shapefile?


Want to get an SHP file for my coutry Algeria

H everyone , i'm running a clustering test on my country with R, but the problem the clustering doen't look good because of the map i have, i hant to get a bigger map of my country 'ALGERIA' in an SHP format! Can you suggest links or Ideas of how can i get the Map of my coutry in a big format ? Thanks


work with emf files at QGIS?

how to convert EMF files to shapefile at QGIS? Actually I have EMF file that has been generated from Autocad-Civil3d. Thanks Hamid


How can I output an arbitrary number of file urls from a Synchronous Geoprocessing Service?

**Scenario:** Custom Export Service. The service creates zip files with shps in them and return the url to the file. I understand if you intend to to run this in synchronous mode, you must have a tool parameter with output type as "File" or the synchronous service will immediately delete the output zip file. When testing, I noticed if my output parameter was instead set to "String" and the output content was a JSON object, async worked fine, but synchronous would not persist the output file on disk. **Question:** From a synchronous gp service, How can I return an arbitrary number of urls to output files on disk? I'm wondering if this is impossible with current configuration options since output "File" parameters must be defined at publish time and cannot be altered at runtime. I could return a json object with all the paths, but only any paths defined in the tool will remain on disk after the service's response.


how create a specific sub-study area in ArcGIS 10.1 - difficulties with classification

My study area is quite large (sometimes spanning across a few grid squares) and when I am running a viewshed analysis or calculating slope or euclidean distance it calculates for the entire region. But at times I just want to concentrate on a very small area (e.g. within a 10 km radius). In these cases is there anyway to make sure that these analyses just focus on the required area rather than the entire region? because when it calculates for a really large area I am having difficulties with symbology - I can't classify results into anything meaningful! Any advice would be greatly appreciated!


Add objects from one layer to another at QGIS

How can I add some objects from one layer to another one. I mean, I have one layer with specific data(e.gg polyline) at the same time I have another layer with different objects .how can I copy/move object between the layers. Thanks Hamid


Is the QGIS plugin repository broken?

I'm connected to the QGIS plugins repository, using QGIS 1.8.0 on Windows 8.... and although I can see a total of 119 available plugins, I can't see Sextante anywhere in the browser. I tried downloading the .zip file from https://github.com/jj0hns0n/sextante and unzipping it into the plugins directory, but then the browser just reports a "broken plugin".... Does anyone have any ideas?


Does anyone know the proj4 Coordinte Reference System command line for Rectangular Polyconic Gores?

I am a GIS beginner using QGIS 1.8.0 I am trying to transform a world map from the standard WGS84 Coordinate Projection System to a set of rectangular polyconic gores, with a gore count of 12. Please follow this link to see what a set of rectangular polyconic gores looks like: http://www.mapthematics.com/ProjectionsList.php?Projection=130#rectangular Rectangular polyconic gores do not seem to be on the standard menu of Coordinate Projection Systems in QGIS. I have found the Custom Coordinate Reference System dialog box in QGIS. I need to type in a definition of 'rectangular polyconic gores, with a gore count of 12' in the proj4 format into the dialog box to make it work.   * **Does anyone know exactly what it is I need to type?** The reason I am trying to make a world map in the ‘Rectangular Polyconic Gores’ (called RPG from now on) projection so that it can be cut out and pasted onto a sphere to make a world globe. There is a free Photoshop plugin called Flaming Pear available which performs this task, but if vector data such as coastlines are saved as a raster in QGIS and then imported into Photoshop and transformed from WGS84 to RPG, the lines will get progressively narrower towards the poles. Therefore I need to do the projection transformation in QGIS where the data is still in vector format. If QGIS is not a suitable tool, and I need to be using a different GIS program, please let me know. I know that Mapthematics’ Geocart program will perform this task, but it costs a lot of money. As suggested in the QGIS manual, I have started reading 'Cartographic Projection Procedures for the UNIX Environment—A User’s Manual' by Gerald I. Evenden (available here: pubs.usgs.gov/of/1990/0284/report.pdf )   and 'Map projections - a working manual'by J.P. Snyder (available here: http://pubs.er.usgs.gov/publication/pp1395 ) in an effort to come up with the answer myself. However, I do not have proper mathematical or computer language training, so I find them virtually impossible to understand. Below I have included links to all the related information I have found so far:   * Here is a well illustrated page with writing and equations, describing the RPG projection: http://members.shaw.ca/quadibloc/maps/mpo0502.htm   * I found this quote at http://www.maxneupert.de/luc/ It apparently describes the mathematical formula behind the RPG: ‘’Bugayavevskiy and Snyder reference a third Book, by Ginzburg and Salmanova from 1964, pages 171 ff, as the source of the following formula, quote:   x = p sin δ, y = s + p(1 - cos δ)   p = kR cot φ, δ = λ(sin φ)/k   where k is a constant parameter, usually equal to 2 and s is the meridian distance of φ from the equator. If φ = 0, x = kRλ. To allow for the deformation from the curvature of the ball while maps are beeing pasted onto it, projection coordinates are multiplied by a constant coefficient determined from experience. End quote.’   * Here is an assembly language program describing RPG http://www.boehmwanderkarten.de/kartographie/netze/rta/proj_ern1_globussegmente.rta   along with some explanatory photos:   http://www.boehmwanderkarten.de/kartographie/is_netze_globussegmente.html   These pages are both in German.   * Max Neupert also says that a mathematical description of the RPG Projection also turns up on:   page 222 of Map Projections - A Reference Manual by Lev M. Bugayavevskiy and John P. Snyder, 1995 ISBN 0-7484-0304-3   and page 155 of Kartographische Netzentwürfe by Karlheinz Wagner, 1949 (and 1962) ASIN B0000BP33E However, both these books cost money.   * Here ias an illustrated article from 1909 , which includes, amongst other things, a discussion on how to create a set of RPGs   http://www.genekeyes.com/CAHILL-1909/Cahill-1909.html   * Here is the proj4 command line for the ‘SAD69 Brazil Polyconic, ESPG:29101’ projection, which I cut and pasted from QGIS CRS dialog box. Apparantly this projection is a close relative of the RPG projection, even though they visually appear to be completely different: +proj=poly +lat_0=0 +lon_0=-54 +x_0=5000000 +y_0=10000000 +ellps=aust_SA +towgs84=-57,1,-41,0,0,0,0 +units=m +no_defs If I find anything more Ill post it here. Id really love to get this one solved.   Thanks   Martin


Determine distance between two lines at multiple locations

We have a number of features that look something like this: ![Example of polygon feature to be measured](http://i.stack.imgur.com/Nn2aA.png) I need to measure the distance between the edges of a track (two lines) for all the tracks, and flag locations where the track width exceeds a given value (15 ft). Currently, an analyst does the process manually:   * buffer the feature by 7.5 ft, looking for areas where the buffers don't overlap in the middle   * using the measure tool to confirm width   * draw lines across to mark divisions   * draw sub-polygons so feature can be color-coded (green where it doesn't exceed width, red where it does) I want to automate this process, and it doesn't necessarily need to be done in the same fashion if there's a script. (In other words, it's obvious how to script buffer-making, but not how to script the measuring process, so that probably wouldn't be the process if I Pythonize this.) I hope to get suggestions/framework for how (methods/approaches/tools, not code) to proceed with this. We have Arc 10.1, all extensions. EDIT: Buffering to those areas where the original buffers don't meet, as suggested in @radouxju's solution, will not work the way I need because it ends up overestimating the total area of "too-wide" tracks. We want to have linear breaks between the different width class sections (see red, below), and buffering will have rounded breaks (see dashed purple, below) which increases the size of the too-wide segments. Unfortunately, this accuracy matters. (I've argued this issue -- they got the boundary data from GPS points while walking along the track edges, which introduces its own set of inaccuracies, but they still want the results so we'll just do what we can with what we've got...) ![enter image description here](http://i.stack.imgur.com/QDVyg.png)


How should I go about calculating the centroid of several lat long points in python, and perl?

Calculating the centroid several time on a number of geographical points. I was wonder is there a perl or python module that could make my life easier when working with large datasets of lat long points? A coworker recommended using the perl module Math::Polygon, and that the polygon_centroid() function could be of some use, however I would like to know of other options. Thank you for your time,


Attachment Editor in XSL

I'm trying to create a custom HTML Popup using XSL. I can get the attachment JPEG's to show, but cannot seem to integrate the Attachment Manager that you can find when setting the HTML Popup As a table of visible fields. Does anyone know the XSL code to embed the Attachment Editor? or a different approach might be to resize the JPEGS when opened...


Can CartoDB and Mapbox.js talk?

All, Back in December it seemed there was no way to bring in a CartoDB layer into a Mapbox.js or Tilemill project. Has this changed? (http://support.mapbox.com/discussions/mapbox-tiles/763-cartodb-and-mapboxjs- how-do-they-talk) I'd like to implement this on a few local government projects I'll be working on shortly. Thanks! -mb


Creating a GP script to update a table in SDE

I need to create a geoprocessing script to update a table on an SDE server, with some text input from the user. I thougth what I needed to do was create a toolbox with a python script associated with it, but it appears more than that; is there a resource online to help me do this, or have you any suggestions? I thought I'd simply create a python script with the text to input along with 2 other parameters and inside the script, I'd create the link to the database, and simply use the input to update the table. This, however, isn't proving the right way to do it, so please, any ideas? Thanks in advance. **Resolved**


I want to change EPSG:4326 to EPSG:900913 using C# for a set of uploaded shapefiles

I have written some code (using help from these pages) that uploads a directory full of shapefiles to a geoserver using C#. The uploaded shapefiles are set to EPSG:4326 however I would like them to be EPSG:900913. Does anybody know a way that I can modify the projection system of the uploaded shapefiles from the default to EPSG:900913? thanks....


postgis st_geomfromgml error on point

In PostGIS 2.0 I try:               select ST_GeomFromGML(       '<gml:Point srsName="urn:ogc:def:crs:EPSG::28992">            <gml:pos>275466.0 565559.0 0.0</gml:pos>        </gml:Point>');      This gives an error:               ********** Error **********          ERROR: invalid GML representation     SQL state: XX000     Context: SQL function "st_geomfromgml" statement 1      What is wrong with my point?


Is there a way to route different vehicles within OSM2PO? I would like to start the service with a config file and then turn different flags on/off depending on whether the route is for a bike or a car or a pedestrian.


How to reproject a noaa bsb nautical chart?

I have some nautical charts in .BSB format. GDAL can read bsb and I successfully imported them to qgis. But I can't figure out what is the coordinate system they use.   Does anyone has some experience with .bsb ?


Forest Coverage - European free GIS datasets

Where can I find GIS data for the Forest coverage for the entire Europe? Is there such a product available for free? I am looking for raster or vector (polygons) with the information of the % of coverage by raster cell or polygon.


Javascript Api's ArcGISTiledMapServiceLayer won't show map

I am currently trying to show a map that has been tiled. I am using version 10 of the arcgis server, and version 2.5 of the javascript api, the odd thing i am running into is that the map will not show when using the constructor "arcGISTiledMapServiceLayer" but it will show when I'm using the alternate constructor "arcGisDynamicMapServiceLayer". Here Is a very simple code snippet i'm using to test out my functionality               dojo.require("esri.map");     dojo.require("esri.tasks.geometry");     var map = null;     var gsvc = null;     var pt = null;          function initialize() {       map = new esri.Map("map");            var layer = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer");            alert(map.toString());                map.addLayer(layer);          }               dojo.addOnLoad(initialize);      As you all have no doubt realized, this example code is using arcgisonline.com instead of my actual service that I'm running. There is one more very important piece of information, this code above, works it shows the map but the same code with my url doesn't leading me to believe something is wrong with my server setup, but I am fairly new to arcgis so I'm not leaving any stones unturned, thx in advanced yall. If there are any querstions please feel free.


Bulk grant privileges to multiple tables at once in ArcGIS 10.1 Desktop

I am able to grant multiple privileges (SELECT, INSERT, UPDATE, DELETE) to multiple Users/Roles to one single Table each time on an Enterprise Geodatabase from ArcCatalog 10.1. That's done by Manage -> Privileges... for each Table. Now that I have got a large number of Tables/Views, just wondering whether there's a way/tool/PyScript of bulk granting privileges to all the Tables/Views at once. Many thanks in advance. Cheers, Alex


Dynamic Text for coordinate system

I would like to change the dynamic script for a coordinate system from "GDA 1994 MGA Zone 54" (Taken from a cut down version of the dynamic text>coordinate system) to "GDA 94 z54" How would I do this? Really I just want the "z54" part on my template map dynamic (cause we have two zones and I always forget to change the legend to the right one).


Make a Join Permanent

So I've been using a dynamic join (IRelQueryTable to attach a SQL query to a feature layer) but now I want to make a permanent (or semi-permanent) join. How do you go about doing this in ArcEngine code? Do I use IFeatureDataConverter? If I have feature layer is it possible to add the joined data directly to the feature layer? Can I create a new feature layer with the joined data and have it take the place of the original feature layer? Please point me in the correct direction.


Is the 2010 Landsat world map (GLS 2010) available in a GoogleMaps browser?

Is the 2010 Landsat world map, also known as GLS 2010, available to view anywhere on the internet in a GoogleMaps browser? I need to find it so that it can be added as a layer to a GoogleMaps interface on a wiki site Im helping out on. It has much more up-to-date coverage in remote locations than Bing and Google, even though the resolution isnt so good.


scratch files left behind by arcpy.sa.Con

I have a Con() statement that creates two "extra" scratch files during it's processing, but that do not get cleaned up once the operation is over and the output is saved.                   r=arcpy.sa.Con(elv, rCtypeAlpine, rCtype, 'VALUE > 10000')         r.save('covtypeprms_a')      prior to saving `r`, I can see that there is also a scratch file for that object. This gets renamed with `r.save()`. But I'm still left w/two directories (grids?). I've been finding and deleting them using `arcpy.ListRasters('t_t*')`, which works, but this is really just a hack. Lock files seem to get left behind with this approach. I've also tried `del r` to get rid of the handle, but not destroy the copy on disk ('covtypeprms_a'). Why are these appearing and is there more precise way to reference these intermediate objects (so's I can delete them!)? **update on enviroment** product: Desktop 10.1 sp1 OS: Win7 Enterprise sp1 python: Enthought 32-bit in use via Wing IDE `sys.executable` yields 'C:\Users\joeblow\AppData\Local\Enthought\Canopy32\User\Scripts\python.exe'


Is it possible to import/run AML script into GRASS?

I have an AML script that has instructions to import tmp files of (grid, network, basin...) is there any way to run the script in GRASS? I tried to converted to Python but I couldn't do it for the whole script. Thank you for your help


Openlayers: authenticate users to send any wfs requests to geoserver

I can see that this question is asked before but not answered properly. I'm trying to authenticate with geoserver before trying to send any wfs requests. I need to use the geoserver users. I already tried this and the login was succesfull but i can't find a way to check if the login is succesfull or not cause the cookie that geoserver returns is http-only. Any ideas?


GeoServer + dynamic datapath layer

My app based on Mapserver contains dynamic layers and using PHPMapscript I modify MAPFILE->LAYER->DATA value based on a parameter that comes via GET. Or I could even use RegEXP in the LAYER->DATA (http://osdir.com/ml/mapserver- users-gis/2012-02/msg00208.html) I know GeoServer has good REST support and most probably after my analysis this will be one of the reasons why I'm going to change. Is it possible to define a GeoServer layer dynamically? E.G. I will create datastores for specific topics Layers (shp or raster) are stored following the criteria: /data/layers/topic1/2013/201305/Layer1.shp, /data/layers/topic1/2013/201305/Layer2.shp, /data/layers/topic2/2013/201305/Layer3.shp /data/layers/raster/2013/201304/Raster1.{png,geotiff, _}, /data/layers/raster/2013/201304/Raster2.{png,geotiff,_ } The layers change each month and absolutely I don't want to recreate them via GeoServer admin. Using OpenLayers I can pass a parameter mergeNewParams=YYYYMM and get the specific OWS out of the layer (WMS or WFS), but how? Something like this when I define the datastore URL http://docs.geoserver.org/latest/en/user/webadmin/data/stores.html#adding-a- store in the connection URL I would like to specify file:/data//YYYY/YYYYMM/YYYYMMDDUTC Is it possible? Thanks!


Given a collection of IPoints is there a quick way to get the extent that contains them?

I have a bunch of IPoints. I need an extent which contains all of them. Is there a quick way to do it? I had the idea of converting them to screen coordinates and then figuring it out manually but that seems like the wrong way to do it.


How to prevent data scraping in a web map?

I would like to use Leaflet or a Leaflet-like mobile-friendly library to produce a web map of points of interest, but I am concerned with how easy it is to just scrape the data from the javascript. Is there a way to prevent this?


MapInfo 11.5 - Zoom in Legends

Good afternoon ! With MapInfo v 11.5, we can use the zoom feature in a thematic map legend, so that it plays along with the map zoom (Release Notes: "The zoom feature uses a paper-based scale, so that you can zoom out and see an overview of the window contents, or zoom in to see more detail"). How can I use this feature on my web app, with C# code ? Thank you in advance!


Advantage of Digital Elevation Model (DEM) in Agriculture?

I have given the task to create Digital Elevation Model (DEM)'s of an agricultural area. I am programmer with Computer Science background and very new to GIS can anyone explain what is advantage of using Digital Elevation Model (DEM) in agriculture ?


How can I get a KMZ file with image to show in Google My Maps?

Maybe this isn't possible but does anyone know a way I could get a KMZ file that includes a raster image to save into Google My Maps. I can get the KMZ to display fine with image by uploading it to Google Docs and searching for it in Google Maps but when I go to save it in My Maps, the KMZ layer disappears and thus doesn't save it. I would use the KML import in My Maps but it doesn't seem to support uploading the imagery, only the vector data. Any ideas?


Export list of coordinates in a points layer to spreadsheet?

This is similar to my previous question, but I would like to ask it for ArcGIS, instead of QGIS. If I am supposed to somehow merge the questions, please let me know. With an existing point feature class as a layer in an ArcMap 10 document, how do I obtain a list of the points' x y coordinates (ideally in a csv file)? The attribute table for this layer does not have that data. What I would like is to export those points to a spreadsheet, with the existing attribute table, but also with columns representing each point's corresponding x, y coordinates. Thanks.


QGIS - How to add a geometry to an existing feature that has NULL geometry?

I have a PostGIS table with some polygons having NULL geometry. The rows are correctly displayed in the attribute table in QGIS. As expected, there is no geometry draw in QGIS. My question is how can I add a geometry to a row that have a NULL geometry in QGIS. I know I can do some SQL code for that, but I want a end user be able to do this in QGIS. I have tried different things in QGIS. The logical one for me was to use the tool "Add part" in the advanced editing toolbar. Unfortunately this hasn't work. Thanks!


Mapquest in Qgis, why the blur?

I'm trying to do a simple map in Qgis using mapquest has background. I have read that and followed the scale values but even while using those, I get some bad blur on my map. I can't figure out to do take it away. I just wanted a simple base map for my map but it seems it's not so easy to find, i thought mapquest could be the one but ... doesn't work well :/ ![bury text](http://i.stack.imgur.com/RMAmc.jpg)


How to create a raster mosaic from many asc files

I am trying to create a raster mosaic (in ArcGIS 10.1) as I am working with many asc files - I am trying to put all the different tiles together in order to run a view shed analysis. I have been told that the instead of adding one asc file at a time I could combine all into one by creating a raster mosaic, but the problem is when I do create a raster mosaic, it comes up as empty green squares. I have also calculated the statistics and built pyramids but they seem to have no impact. ![enter image description here](http://i.stack.imgur.com/y9JNK.jpg) I was wondering whether anyone could tell me how I can get the terrain to actually become visible as I am using elevation data. As always any information would me immensely appreciated!


PHP-MBTiles Server implementation with Leaflet and Wax

Using PHP tile server from infostreams with Leaflet and Wax Connector for Leaflet to visualize my .mbtiles. I upped the source and the .mbtiles on a free hosting service. I am getting a blank Leaflet container on my site right now. There are the zoom buttons and Leaflet attribution but no map. When I point the browser to domain.com/tiles/tileserver.php it gives the open_basedir restriction error. When I replace the .json URL (in java.js) with another map's .json that is uploaded on MapBox Hosting, that map shows (interactivity doesn't work though). EDIT: Since I'm on a free hosting service, I cannot access the httpd.conf or php.ini file. Therefore I have no way of suppressing the open_basedir error. I could use another free hosting service of your choice. Server directory looks like:               DIR tiles     DIR wax     .htaccess     index.html     java.js     css.css      index.html goes:               <!DOCTYPE html>                              <link href='wax/ext/leaflet.css' rel='stylesheet' type='text/css' />     <link href='css.css' rel='stylesheet' type='text/css' />

                                         java.js goes:               var url = "/tiles/Century.json"     wax.tilejson(url, function(tilejson) {          // Create map and add image tiles     var map = new L.Map('map-div')         .addLayer(new wax.leaf.connector(tilejson))         .setView(new L.LatLng(51, 0), 1);          // Create map legend     wax.leaf.legend(map, tilejson).appendTo(map._container);          // Add map interaction (tooltips)     wax.leaf.interaction()         .map(map)         .tilejson(tilejson)         .on(wax.tooltip().animate(true).parent(map._container).events());          });      "tiles" directory:               .htaccess     Century.mbtiles   //This is just what I downloaded from infostreams' tile server.     tileserver.php


Create new polygon layer based on areas of varying numbers of stacked polygons

I have several species range maps (as polygons) that overlap/stack. From this, I am trying to identify areas of highest biodiversity. Ideally, I'd like to create a new polygon layer, where 1 part is the area where 20 ranges overlap, part 2 is the area where 19 ranges overlap, etc. I am using QGIS and Spatialite as my primary tools. Thanks for any help that might be offered.


Why don't my service area polygons follow my network?

I have found a few similar questions, but no good answers, so here goes another Service area question: I'm working on creating a walking distance layer from Parks, and have a road network set up with park entry points. Many of these small polygons seem reasonable, and others are clearly not exploring the extents of the network. I have played with adjusting generalized/detailed polygons and trim settings, but it's all pretty rough still. Any suggestions? In the shot below, the yellow polygons represent .5 mile walking distance, the blue, .25 - and I've clearly measured a distance along a road that is within .5, and not covered by the yellow polygon. Screenshot illustrating the problem:![enter image description here](http://i.stack.imgur.com/Cjp8a.jpg)


"Find by attribute" plugin error

This is the error message, when launching the plugin. I hope this is the right place, where to report this kind of message. Any help would be appriciated! > An error has occured while executing Python code: > > Traceback (most recent call last): File > "/home/saabrs/.qgis//python/plugins/findbyattr/Findbyattr.py", line 66, in > run tempname = str(name).rstrip('01234567890') UnicodeEncodeError: 'ascii' > codec can't encode character u'\u0161' in position 5: ordinal not in > range(128) > > Python version: 2.7.3 (default, Apr 20 2012, 23:06:40) [GCC 4.6.3] > > QGIS version: 1.8.0-Lisboa Lisboa, exported > > Python path: ['/usr/share/qgis/python', '/home/saabrs/.qgis//python', > '/home/saabrs/.qgis//python/plugins', '/usr/share/qgis/python/plugins', > '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', > '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', > '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', > '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PIL', > '/usr/lib/python2.7/dist-packages/gst-0.10', '/usr/lib/python2.7/dist- > packages/gtk-2.0', '/usr/lib/pymodules/python2.7', '/usr/lib/python2.7/dist- > packages/ubuntu-sso-client', '/usr/lib/python2.7/dist-packages/ubuntuone- > client', '/usr/lib/python2.7/dist-packages/ubuntuone-control-panel', > '/usr/lib/python2.7/dist-packages/ubuntuone-couch', > '/usr/lib/python2.7/dist-packages/ubuntuone-installer', > '/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol', > '/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode', '~/.qgis/python', > '/home/saabrs/.qgis/python/plugins/mmqgis/forms', > '/home/saabrs/.qgis/python/plugins/QuickMultiAttributeEdit/forms', > '/usr/share/qgis/python/plugins/fTools/tools', > '/home/saabrs/Darbvirsma/mag/gis']


Find dangling lines

If I have a network of roads. Each road consist of segments. I need to delete all segments that are starting segments of each road and also delete all side roads (dangling) which are represented with only one segment. I do not have idea how to realize this. Any tips? To delete such lines actually means not to proceed them further.


cache in geowebcache does not update when feature delete or added

I have Layer with geometry point when I added new point or delete feature point tile in geowebcache does not update if I want to saw updated tile I must delete folder layer in geoweb cache? what can I do? I think that geowebCahe automatic update when feature modify and tile is updated .is it true? How can update tile manually in geowebcache?


Does anyone know, what heuristic function is used in a*? May i change that heuristic in a* ? and how i change it? Here some heuristic, Euclidean distance, Manhattan distance, Maximum distance Thanks :)


CREATE Script for Enterprise Geodatabase?

I have an ArcGIS For Desktop license, and we have a PostgreSQL 9.2/PostGIS 2 database server running in our network. We currently use Query Layers to add the PostgreSQL data to ArcMap sessions. We would like to make full use of ESRI's geodatabase functionality, without committing to the (we have heard) somewhat unreliable FGDB format. I see that using the "Create Enterprise Geodatabase" geoprocessing tool one can create a database and have it set-up as a geodatabase, but this requires the input of an authorization key, which it seems is only available with a Server license (true?). My question: Can we not just turn this diagram, or better, this schema into a series of CREATE statements for the PostgreSQL database in order to generate the equivalent database schema ourselves, and then utilize it from ArcCatalog as we would a file geodatabase, without any "authorization key"? My thanks for the clarification.


How to add the attributes of selected features to my new layer in pyqgis

I am trying to create a layer from the selected points coordinates. I am drawing a circle to the coordinate of selected points. I also need to add initial attributes of my selected features to my new layer. I tried some examples but every time I failed. Can anyone help me with this. need to add something before "provider.addFeatures( [feature] )" thanks in advance               def draw_circle_to_selected_coordinates(self):         """         Gets the coordinate of selected features and draws the circles for desired radius in qgis         """              #set active layer as layer         layer = utils.iface.activeLayer()         selected_features = layer.selectedFeatures()                   #creating layer structure using selected layer fields.         fields = layer.pendingFields()         fields_in="Polygon?"         field_counter=1              for field in fields:             fields_in=fields_in+'field='+str(field.name())+ ':'+str(field.typeName())+'&'             field_counter+=field_counter                   fields_in= fields_in+('field=Band:Double')                   #creates new memory layer for radial bands with selected layer attributes         vpoly = QgsVectorLayer(fields_in, "RadialBand", "memory")         feature = QgsFeature()         provider = vpoly.dataProvider()         vpoly.startEditing()              #get band radiuses from the file         list=[]         f=open("radial_band.nodelete", "r")         with open('radial_band.nodelete') as openfileobject:             for line in openfileobject:                 value=float(line.strip())                 list.append(value)         f.close()              #filling radial band table with selected feature coordinates and desired radiuses         for f in selected_features:             geom = f.geometry()             x=float(geom.asPoint().x())             y=float(geom.asPoint().y())             item=0             for item in range(0, len(list)):                 radius=list[item]         #draw circle to the selected coordinates and radius one by one                 feature.setGeometry( QgsGeometry.fromPoint(QgsPoint(x,y)).buffer(radius,100))                      #need to add something here to get the values from selected features and add the radius value to the Band field                 provider.addFeatures( [feature] )                 item+=item                   vpoly.commitChanges()                  QgsMapLayerRegistry.instance().addMapLayer(vpoly)


User-defined toolbars arcmap 10.1

I have seen this ArcGIS Discussion Forum posting from 2003 on how to " **Detect user-defined toolbars programmatically** " and its not giving me what I'm seeking. This subject seems to be like trying to find chicken teeth. Could someone please send me in the right direction. I'm trying to list all my user- defined toolbars through a arcmap10.0 add-in so i can hide the appropriate one, and _vice versa_ when the need arises. I've also ran the code on this **page** and still no luck.


Convert Lat/Lon to Pixel-XY on cropped map

I've got a little problem. I have a GPX-Track containing LatLon coordinates based on WGS84. The track should be drawn on a cropped map, and for this, I need the pixel coordinates. The map tiles are from OSM I'm not quite sure how to do this, but I figured out a way (without implementing it yet, since I don't have the formulars right now). 1.) Convert LatLon to Spherical Mercator which is used by OSM 2.) Linear transformation spherical mercator -> pixel coordinates. For step 2., 2 identical points are needed. I guess I can use the map's corner points. Is there a better way to do this? As this is a homework, I am not allowed to use a library. (Since I am not at home right now, where my formulary is, is there any good site containing ellipsoid parameters and the formulars?)


Toggle editing layers

I search one plugin that alows start an editing session aplied to some layers from postgis connection at the same time as we can in ArcGis?


How to insert a point into postgis from php?

For the following line, I received an error in my php page, but the query is OK when I run it from pgmyadmin. I am trying to insert a point into my postgis from php which contains name, address and a geometric point. Here, p_id is primary key and it is an integer.               $sql = "INSERT INTO app (p_id, p_fname, p_lname, p_saddr, p_caddr, the_geom) VALUES(intval($p_id), $fname, $lname, $street, $city, ST_GeomFromText(POINT($long $lat), 4326))";     $result = pg_query($dbh, $sql);      Error:               Warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or near "," LINE 1: ...me, p_saddr, p_caddr, the_geom) VALUES(intval(5), , , , , ST... ^ in /Applications/XAMPP/xamppfiles/htdocs/HostMobileApp/requestProcessor.php on line 66     Error in SQL query: ERROR: syntax error at or near "," LINE 1: ...me, p_saddr, p_caddr, the_geom) VALUES(intval(5), , , , , ST... ^      Thanks, in advance.


shp2pgsql data appent without gid

I have a shape file, I opened it in QGIS that has columns in attribute table named   * **CITY_NAME, POPULATION** and I have a database table in Posqgresql that has columns named   * **gid (primary key), city_name, population, geom** Database colums are lowercased names, is this is a problem? And I want to load shapefile data in existing postgresql database table via **shp2pgsql**.               shp2pgsql "file.shp" public.cities | -U postgres -a mydb      gives error, Why this error occuring I did not understand. I am giving parameters right. ![enter image description here](http://i.stack.imgur.com/F9QFf.png)


converting data from excel into shapefile help

I am using ArcView 10.0 and this was given to me via excel spreadsheet. The client asked to ID the damaged source points. First time needing to do this with excel. How do you convert this data from excel into a shapefile? I'm thinking the **53056257** is what may be needed? Date -- Time -- Acquisition Name -- **record Number** -- Operator comments 04/11/2012 -- 15:45:5 -- UE-Vibe -- **53056257** -- EG6: BIGRUTS -- Fixed


Adding a FeatureLayer ARCGIS JavaScript API

Hi I am currently exploring ARCGIS Javascript API. I have my own map services and feature services up on my local server. I would want to use the FeatuerLayer to select and highlight feature on the map. But when i add my feature service i get the following error. **TypeError: Unable to draw graphic (geometry:null, symbol:null): _14 is undefined**** I am not able to figure out what this could be. And I am not sure if the feature layer has been added to the map or not. How could I check if it has been added? I tried using a dojo.connect method with the FeatureLayer with an onClick event. But this doesn't seem to work. Have placed the code below Code:               esri.config.defaults.io.proxyUrl = "proxy.ashx";     dojo.require("dijit.layout.BorderContainer");     dojo.require("dijit.layout.ContentPane");     dojo.require("esri.map");     dojo.require("esri.layers.FeatureLayer");     dojo.require("esri.tasks.query");          var map;     var selectionToolbar;     var infoTemplate = new esri.InfoTemplate();     infoTemplate.setTitle("${ROADNAME}");     infoTemplate.setContent("ROAD NAME: ${LINK_ID}
" + "CAT${CAT}");          function init() {       try {         var initExtent = new esri.geometry.Extent({           "xmin": 103.55,           "ymin": 1.13,           "xmax": 104.16,           "ymax": 1.56,           "spatialReference": {             "wkid": 4326           }         });              map = new esri.Map("map", {           extent: esri.geometry.geographicToWebMercator(initExtent)         });              var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer");              //my map service layer         var basemap_sing = new esri.layers.ArcGISTiledMapServiceLayer("http://karthikpc:8399/arcgis/rest/services/Carriage_Mercantor/MapServer", {           displayLevels: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]         });         // my feature layer which i am not able to use                       var featureLayer = new esri.layers.FeatureLayer("http://karthikpc:8399/arcgis/rest/services/Carriage_Mercantor/FeatureServer", {           mode: esri.layers.FeatureLayer.MODE_ONDEMAND,           infoTemplate: infoTemplate,           outFields: ["*"]         });              map.addLayer(basemap);         map.addLayer(base_sing);         map.addLayer(featureLayer);              dojo.connect(map, "onLoad", initSelectToolbar);         dojo.connect(featureLayer."onClick", helloworld);       } catch (e) {         alert('An error has occurred: ' + e.message);       }          }          function helloworld() {       alert("hello world");     }          dojo.addOnLoad(init);


QGIS 2.2.0 Creating all extension of MapInfo from a ArcMap ShapeFile

I have a road centerline shapefile that I would like to create all files associated with a MapInfo file (.tab, .id, .map, .dat). I've looked through the plugins and don't see a tool that helps with this process. I'm very "green" to QGIS and would appreciate any insight users could provide me. Thank you.


slope in model different value than slope in stand alone script

When running slope(analysis) from model I receive a high value of somewhere around 71. After then exporting model as python snippet and changing only the output raster name (using same input raster) I receive a high value of 45 in the output raster. This makes absolutely no sense. Has anybody ever experienced this?


Are there open source alternatives to ArcCatalog?

I'm looking for open source alternatives to ArcCatalog. The software should run on both Win and Linux and support the usual file formats (shp, kml, gml, ...) and databases (especially PostGIS, additional SpatiaLite support would be great). I'd like to browse and search for datasets and probably rename (renaming all parts of a shapefile at once) and delete files.


How to export only one band from an image using GDAL?

I have a multi-band GeoTiff, and I want to extract only the first band and write a new image consisting of only that band. How do I do this using GDAL?


Advantages of a GPS enabled PDA for field asset management

I'm having some trouble trying to convince some people of the advantages of having a entry level GPS enabled PDA for asset management. I've been asked to look into GPS enabled cameras, I've since thought it through and recommended a GPS enabled windows mobile PDA. My thoughts are the device would not only allow us to capture accurate enough location based information about the asset (it should already be entered into the system), but also allow some attribute data to be input about the asset rather than having to write a paper report out each time and enable this information to be reviewed in the field at a later date. I've been hit with some heavy criticsm at work about the advice, I'm wondering if I'm heading in the right direction I would have thought the benefits of the choice would be a no brainer ... So my questions to the community. Is a GPS enabled PDA able to be used to geotag photos out of the box? And is the device functional beyond just geotaging photos?


How to rename field names in a shapefile from the commandline?

I need to rename the field names (attributes) in a shapefile. Is there an easy way to do this from the command line?


Problems displaying joined attribute data through ArcGIS Server

I have an ArcSDE feature class in an ArcMap MXD which I have 'joined' to a view into an external SQL database table, that is connected via an OLE DB connection. In the MXD the join works perfectly; I can see the joined attributes when I open the attribute table of the original ArcSDE feature class. However when I then publish the .mxd to a service on the ArcGIS Server and add it to a new application it only displays the original SDE feature class attributes and not the full 'joined' attribute dataset. Anyone seen this before or have any ideas? Cheers Paul


ArcGIS Server 10.1 - new webserver

Just out of interest: ESRI seems to have a new embedded webserver in AGS 10.1, anyone know what technology they have used to build it? Also, is that the same webserver that the new ArcGIS Runtime api will use?


How to calculate forest area of a bitmap (jpeg) map?

I have a map of 1:50,000 scale map in .jpg format. Can i calculate the land area of forest,lakes etc from arcmap.Anybody can give me the step to do it? And I want to know what is the coordinate system for sri lankan 1:50000 ,80cmx50cm map?


Which Open Source GIS Software is preferable either QGIS, mapWindow or gvSIG?

Which open source GIS software is preferable: QGIS, mapWindow or gvSIG. On the basis of:   1. GIS analysis.   2. Digitization.   3. Quality checking.(Data correction).   4. Store of data(i.e. storage in db as well as folder)   5. Performance.   6. Easy to learn. Which software should I go for depending on these basic conditions?


Issue with 'ESRI.ArcGIS.Client.Geometry.Geometry' in WCF service

I am having this issue with using Geomtry that is returned from a WCF service. As part of the service, I have added a service reference for the map service that I am using in this project. I am trying to return 'ESRI.ArcGIS.Client.Geometry.Geometry as a return type but when I assign the Geomtry to my result, it comes back with this error: 'Geometry' is an ambiguous reference between 'GIS.Services.Data.BoundaryMapService.Geometry' and 'ESRI.ArcGIS.Client.Geometry.Geometry'. I am not sure what needs to be done to resolve this issue. Appreciate any feedback. Thanks Jay ESRI.ArcGIS.Client.Geometry.Geometry resultGeometry = null;                               for (int i = 0; i < attributes.Values.Count(); i++)                         if (attributes.Values[i] is PolygonN)                         {                             PolygonN featureExtent = attributes.Values[i] as PolygonN;                             resultGeometry = featureExtent; // Error here...                              }


How can I preserve date field format when importing to QGIS?

I have a slight learning curve working here, is there a work around to importing spread sheet data without changing the type of data in the fields? i am importing some water test data along the rio grande and everything comes in fine except for the date field. date is formatted xx/xx/xxxx.


Opening .lyr file via rgdal/OGR

According to this answer I can read in a .lyr file via OGR as long as it was made with ArcGIS version 10. I have such a file (from the ArcGIS Maps & Data page) but I can't quite make R's `readOGR` function work with it. Directory contents after decompressing the `.lpk` file: [1] "ESRI_Zip_Codes_Dec2011.lpk" "iteminfo.xml" "item.pkinfo" "thumbnail.png" [5] "USA_Zip_Codes.lyr" "zip_poly.prj" "zip_poly.sdc" "zip_poly.sdc.prj" [9] "zip_poly.sdc.xml" "zip_poly.sdi" And then trying to open the various components: > > ogrInfo( dsn=mypath, layer="zip_poly" ) > > Error in ogrInfo(dsn = file.path(shapedir, "zipcodes", "ESRI_Zipcodes"), : > Cannot open file > >> ogrInfo( dsn=mypath, layer="USA_Zip_Codes" ) > > Error in ogrInfo(dsn = file.path(shapedir, "zipcodes", "ESRI_Zipcodes"), : > Cannot open file How do I open these things? I would normally take the easy way out and convert to Shapefile it via ArcGIS, but my annual license expired and my new one hasn't arrived yet.


I'm running PostGIS 2.0 for PostGreSQL 9.2, and I have a customer who wants to know how close a provided geometry is to the nearest feature in a table. So I'm playing around with the "<->" and "<#>" operators. My problem? The "<#>" operator isn't recognized. This works:               SELECT gid,          the_geom <-> ST_GeomFromEWKT('<my geometry>')         FROM "<my table>"         ;      This does not:               SELECT gid,          the_geom <#> ST_GeomFromEWKT('<my geometry>')         FROM "<my table>"         ;      I get an error:               ERROR:  operator does not exist: geometry <#> geometry      Am I missing something obvious?


Display photos in time slider

I have a shapefile of points with geotagged photos attached through the Photos toolset, they correspond to a line shapefile that documents a trail taken while hiking. I am looking to create a video of the progress through the trail with the photos displaying at the relevant times (both data sets are time- enabled). I have experience with the time slider tool but cannot get the photos to display when the points they are attached to are in the time frame, and am completely unexperienced with ArcScene and the Fly tool. I am going to start fumbling around with the fly tool now, but if anyone has any experience with this I would appreciate tips.   Thanks!


arcpy & TraceGeometricNetwork return ERROR 000584

I am developing a script to automate the creation of a road network following varying criteria. I have created a geometric network and I would like to get the connection between several points with the Trace Geometric Network tool. Using the gui, the processing works perfectly and I get the expected result. But using arcpy, when I paste the line got with "Copy As Python Snippet" in the result window, I get the following error message:               >>>arcpy.TraceGeometricNetwork_management("C:/arcout/gruyere.gdb/roadFeatDat/roadNetwork","roadNetwork","C:/arcout/gruyere.gdb/roadFeatDat/points","FIND_CONNECTED","#","#","#","#","#","NO_TRACE_ENDS","NO_TRACE_INDETERMINATE_FLOW","#","#","AS_IS","#","#","#","AS_IS")     Traceback (most recent call last):       File "<console>", line 1, in <module>       File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\management.py", line 5110, in TraceGeometricNetwork         raise e     ExecuteError: Failed to execute. Parameters are not valid.     ERROR 000584: Implementation of this Tool's Validate is invalid.     ERROR 000584: Implementation of this Tool's Validate is invalid.     [...]16 times     Failed to execute (TraceGeometricNetwork).      The extensions enabled are               arcpy.SetProduct('ArcView')     arcpy.CheckOutExtension('Spatial')     arcpy.CheckOutExtension("3D")      The error 000584 should concern a custom developed tool, which TraceGeometricNetwork is not. Any Idea ?


error running c# code

I'm new in programming . i'd like to write a simple code that can create offset from a polyline . i wrote the below code but when run the code i encounter to the error " Null reference exception was unhandled by user code" in line construct.ConstructOffset(pfeaturelayer as IPolyline, 100.3 , missing,missing); how can i solve the problem ?               public partial class copyparallel : Form         {             IApplication papp;             public IHookHelper phookhelper;              IPolycurve ppolycurve;                  public copyparallel()             {                 InitializeComponent();             }                  private void button1_Click(object sender, EventArgs e)             {                      IFeatureLayer pfeaturelayer;                 IFeatureClass pfc;                      pfeaturelayer = (IFeatureLayer) phookhelper.FocusMap.get_Layer(0);                pfc = pfeaturelayer.FeatureClass;                     IConstructCurve construct = new PolylineClass();                object offset = esriConstructOffsetEnum.esriConstructOffsetMitered;                     object missing = Type.Missing;                construct.ConstructOffset(pfeaturelayer as IPolyline, 100.3 , missing,missing);                     IFeatureClass poutfc;                IFeature newf = pfc.CreateFeature();                newf.Shape = (IGeometry)construct;                newf.Store();                      }                       }         }


Preserving attributes of linejoin through concatenation

I've run into a bit of a problem, I'm working on a layer of connected lines which represent geological faults and contacts. These lines were broken into many small segments so to get rid unnecessary line segments and thus reduce the size of the layer. I joined the lines in FME and I joined based on certain attributes that I wanted to preserve (I couldn't preserve them all or the linejoin would not reduce the number of lines enough). However, now I want to bring back some of the lesser important attributes such as the name's of the geologist who mapped the lines. Each line had a source author name telling me the geologist's name. Now that I've line joined I want to find a way to place these authors name's back into the geolines and have the new single lines that were previously composed of two or more segments to have all the author names. So I want to end up with a concatenated column with the source authors names for each line listed. For example, If I had two connected line segments: gid source_author 1 Pete Philips 2 Frank Urt Now when I combine the two lines I lose this information. So I just have: gid source_author 1 <-blank-> But what I want is to fill this new line with the previous source authors concatenated together gid source_author 1 Pete Philips Frank Urt My brain hurts thinking about it and I haven't really been able to come up with a solution or tried anything that even remotely worked. If anyone has any ideas how I could do this that would be great! Thanks for the help! PS. I'm working in Manifold, FME and pgAdmin.


How to execute sql lines in postgresql using python？

I use postgresql 8.4 to route a river network, the following is my code typed in pgAdmin and the result is fine,               select * from driving_distance     ('select gid as id,      start_id::int4 as source, end_id::int4 as target,      shape_leng::double precision as cost from network',      10, 1000000, false, false);      ![enter image description here](http://i.stack.imgur.com/sOlm5.png) I have installed psycopg2 and it successfully connect python and postgresql,               #set up python and postgresql connection     import psycopg2          try:         conn = psycopg2.connect("dbname = 'routing_template' user = 'postgres' host = 'localhost' password = '****'")     except:         print 'I am unable to connect the database'      Now I need to directly execute my sql code on the top in pyscripter, how should I change these codes to python code？ I am working with postgresql 8.4, python 2.7.6 under Windows 8.1 x64.


Wrong lon and lat

I am using QGIS 2.2.0! I have shape file with wrong coordinates, it's had replaced x coordinate with y coordinate. For example my point feature have coordinates: 4830698,7496859 and right coordinates are 7496859, 4830698 How I can replace this coordinates in all features from shape file? Thanks!


How to Format Description when writing Help for Python script tool?

I try to format the description in script tool but I don't know how it works so i don't manage to add a line break for example. Does it works with HTML tags ? When editing my script the description is : ACTIONS : Pour toutes les images tif dans un dossier   * Converti les image .tif en Polygon et les enregistre dans un autre dossier LES INPUTS :   * Le Dossier ... But when opening the script window to execute, the description is as on the picture : ![http://i.imgur.com/PZ8eHcy.png](http://i.stack.imgur.com/GmdKt.png) (without break lines) Thanks To Edit my script i use this : ![enter image description here](http://i.stack.imgur.com/Xer5Z.png)


How to apply v.transform on a set of vector layers (GRASS 6.4)?

I have 64 vector layers, all of them must be warped using the `v.transform` module; the `pointsfile` is the same for all vectors. How can I apply the transformation recursively to all layers? I'm not bind to use GRASS, but I don't want (for a bunch of reasons) to merge all layers into one and apply the transformation on the single file. Thank you guys


Can Google Geocode returning addresses nearby

I am using google geocoding to bring me addresses according to what a user type on the search box in my iOS app. I would like to know if it is possible, lets say when the user types m google api returns addresses that start with m in my state, country or even near my locality. Is that possible to create a behaviour similar to the apple and google maps. My url is this one:`@"http://maps.googleapis.com/maps/api/geocode/json?address=%@&components=country:AU&sensor=true"` Regards


Reproject CSV file to different projecton using ogr2ogr

I have a CSV file "visivisi.csv" with two columns "x,y" which is in my country local projection. The proj4 line is               +proj=tmerc +lat_0=0 +lon_0=24 +k=0.9996 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs      I am trying to use ogr2ogr to convert this CSV to a new CSV file in wgs84 projection, is this even possible? This doesn't work:               ogr2ogr -f csv -s_srs "+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9996 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs" -t_srs "EPSG:4326" test.csv visivisi.csv      **EDIT: Thanks to below answer, this is the solution (too long for comment section):** if you have a csv file with fields "x,y" called "visivisi.csv", make such visivisi.vrt file:               <OGRVRTDataSource>        <OGRVRTLayer name="visivisi">          <SrcDataSource>visivisi.csv</SrcDataSource>          <GeometryType>wkbPoint</GeometryType>          <LayerSRS>+proj=tmerc +lat_0=0 +lon_0=24 +k=0.9996 +x_0=500000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs</LayerSRS>          <GeometryField encoding="PointFromColumns" x="x" y="y"/>          <Field name="latitude" src="x" />         <Field name="longitude" src="y" />       </OGRVRTLayer>      </OGRVRTDataSource>      Then run this command:               ogr2ogr -overwrite -f CSV -lco GEOMETRY=AS_XY -t_srs EPSG:4326 test.csv visivisi.vrt      test.csv can not exist beforehand. the SRS in the above example is latvian LKS92


Determine web service endpoints of an existing web application

I am new to the world of GIS web services, but am wondering if there is a way to determine the web service endpoints that an existing web application embedded on a web page (silverlight) is using? Cheers


Is there a SVG symbol library for qgis?

Im currently using default simple symbol capabilities or dingbat fonts for point objects. Is there maybe a SVG symbol library for qgis that is a bit more extensive than that which is included? I've found this site http://mapicons.nicolasmollet.com which has some icons but its not what im looking for. These are actually more suitable for google maps.


QGIS 2.2 Attribute Editor Layout "Drag and Drop designer" Field does not exist in datasource

I am experimenting with a new feature available since version 2.2 "Relations" where Foreign Key relations from a database can be documented, so that the QGIS UI can (auto) generate its Attribute Edito Layout in Master-Detail / Parent-Child forms. We are trying to style a layout for:   * one Master/Parent Table (Properties [with geomety]) and a number of Detail/Child Tables:   * Parcels [with geomety]   * Rights   * Actions   * Documents The relationships between these layers can be defined in Project:Project Properties:Relations. Note that all child layers/tables have a single column foreign key (called "bau_guid"), all refering to the single column primary key (also called "bau_guid"). ![Project Relations between layers](http://i.stack.imgur.com/DdMsK.jpg) When we select "Autogenerate" for the Attribute editor layout of the Master Table/Layer Properties, QGIS will automatically generate a UI with information of the Master (Properties) and the detail layers vertical master-detail layout which can be navigated ![QGIS Autogenerated Layout](http://i.stack.imgur.com/CHDaL.jpg) If you want to navigate master-detail-detail relations, space will become an issue in the layout, so you can also revert to Drag-and-Drop Layout, which will create Tab pages for all detail layers. ![Drag and Drop Layout](http://i.stack.imgur.com/mQO2g.jpg) ![Tab Page Parcels](http://i.stack.imgur.com/IjngZ.jpg)![Tab Page Rights](http://i.stack.imgur.com/IHBs5.jpg)![Tab Page Documents](http://i.stack.imgur.com/yekTw.jpg) When a change is made to the layout (even if it concerns an attribute unrelated to relations), there is a problem with the DragAndDrop tabulated layout, an error message "Error: Field does not exist in datasource" appears in the place of the detail layer/relation. ![Error Field does not exist in datasource](http://i.stack.imgur.com/c3mJ9.jpg) Only when I remove all "relations" from the drag and drop definition and "drag and drop" them again and "in one go" it seems to work again, until the next time anything changes in the layout. How can we solve / work around this error? Thanks


How to cluster similar lines in PostGIS?

In PostGIS I have a large database of linestrings which I have obtained using ST_makeline function. I would like to cluster similar lines based on where the lines start and end. Here is an example of what I would like to obtain: ![Clusters of lines](http://i.stack.imgur.com/NhHpO.png) From this post Grouping lines together to form one line after a distance threshold is met: ArcGIS 10 I know that in ArcGis there is a tool that identifies the mean direction, length, and geographic center for a set of lines. Do you know if there is an equivalent tool in Qgis? Do you think it would be easier to cluster start and end coordinates instead of lines? Thank you in advance for any suggestion! **UPDATE1** Basing on this post How to merge connected lines with same direction (PostGis), I wrote the following query that seems to work although it is very slow:               select a.routeid as route1, b.routeid as route2,a.the_geom as geom1, b.the_geom as geom2 from prova a, prova b      WHERE (ST_DWithin(st_startpoint(a.the_geom),st_startpoint(b.the_geom),0.1) and ST_DWithin(st_endpoint(a.the_geom),st_endpoint(b.the_geom),0.1) and (a.routeid <> b.routeid))      **UPDATE2** To prevent a line from being included in more than one separate cluster, I used distinct on as follows where line1 and line2 are the same tables as prova:                SELECT * FROM(      SELECT DISTINCT ON (line2.routeid) line1.routeid as route1, line2.routeid as route2,line1.the_geom, line2.the_geom        FROM line2 INNER JOIN line1 ON      ST_DWithin(st_startpoint(line1.the_geom),st_startpoint(line2.the_geom),0.1)       AND ST_DWithin(st_endpoint(line1.the_geom),  st_endpoint(line2.the_geom),  0.1)      ORDER BY line2.routeid) as clusters      ORDER BY route1;


Trilateration issue

My program isn't making use of any geographical data, but I'm hoping that the users experience in the subject can help me with my current issue. The project I am working is trying to locate a user in an indoor environment using bluetooth low energy beacons (I know the issues surround BLE). My environment could have N number of beacons in it and I'm wanting my program to pick the best (read closest) three and trilaterate the users position based on them. All of this I'm trying to visualise inside Unity. However, my math isn't that great and I did try to transpose the data from the wiki however, I'm not sure if I have done the calculations correctly. For one, in my project, the calculations only work as long as my beacons are above 0 on the Y axis. Likewise, the point at which it determines the player to be is totally different dependant on the order in which the beacons are place. Am I doing something wrong?               public GameObject sphere1, sphere2, sphere3, player;     float rad1, rad2 ,rad3;     float x;     float y;     Vector3 P1, P2, P3, V;     bool yRot = false;     float angle = 0;          // Update is called once per frame     void LateUpdate ()      {            TrilaterationCalc(sphere1,sphere2,sphere3,player);     }          void OnGUI()     {         GUI.Label(new Rect(10, 560, 200, 180), "Sphere1 size: " + sphere1.transform.localScale.ToString());         GUI.Label(new Rect(10, 580, 200, 180), "Sphere2 size: " + sphere2.transform.localScale.ToString());         GUI.Label(new Rect(10, 600, 200, 180), "Sphere3 size: " + sphere3.transform.localScale.ToString());     }               static Vector3 RotateAroundPoint(Vector3 point , Vector3 pivot, Quaternion angle)     {         //Center the point around the origin         Vector3 finalPos = point - pivot;              //Rotate the point.         finalPos = angle * finalPos;              //Move the point back to its original offset.          finalPos += pivot;              return finalPos;     }          void TrilaterationCalc(GameObject sph1, GameObject sph2, GameObject sph3, GameObject user)     {         //Find the offset to set P1 to the origin         V = -sphere1.transform.position;              //Set the 3 points and apply offset         P1 = sph1.transform.position + V;         P2 = sph2.transform.position + V;         P3 = sph3.transform.position + V;              //Apply rotation if P2 doesn't lie on the          if(P2.y != 0 || P2.x < P1.x)         {                //Angle between             if(P2.y > P1.y)             {                 angle  = -Vector3.Angle(Vector3.right,P2);             }             else             {                 angle = Vector3.Angle(Vector3.right,P2);             }             //Rotate P2 to X-axis and apply same rotation to              P2 = RotateAroundPoint(P2,P1,Quaternion.Euler(0, 0, angle));             P3 = RotateAroundPoint(P3,P1,Quaternion.Euler(0, 0, angle));             yRot = true;         }         else         {             yRot = false;         }              //Get the Radius of each sphere          rad1 = sph1.renderer.bounds.extents.x * sph1.renderer.bounds.extents.x;         rad2 = sph2.renderer.bounds.extents.x * sph2.renderer.bounds.extents.x;         rad3 = sph3.renderer.bounds.extents.x * sph3.renderer.bounds.extents.x;              //Get the distance          float d =  Vector3.Distance(P1,P2);              //Get x and y of point 3         float i = P3.x;         float j = P3.y;              //Set the X and Y of P4         x = (rad1 - rad2 + (d*d)) / (d*2);         y = (rad1 - rad3 + (i*i) + (j*j)) / ((j*2) - ((i/j)*P1.x));              //Set Player Pos depend on if rotated         if(!yRot)         {             //Set User Position             user.transform.position = new Vector3(x,y,0) - V;         }         else         {             //Set initial P4             Vector3 P4 = new Vector3(x,y,0);                  //Rotate back and unapply to offset             P4 = (RotateAroundPoint(P4,P1,Quaternion.Euler(0, 0, -angle))) - V;                  //Set User Position             user.transform.position = P4;         }          }


Create Configurable Extension in ArcGIS Desktop

I am creating a configurable extension for ArcGIS desktop 10.1 I am not using Add-on , so please don't suggest add-on. How can I disable some toolbars and commands, when the extension is disabled? I want to disable users from adding toolbars from the "Customize" interface in ArcMap, when the extension is disabled? Is there a way even to hide the toolbar from the "Customize" interface of GIS desktop when the extension is disabled?


How to create a spatial reference file

I am using python, arctoolbox and arcpy 10.0 I am running a script that is tied to an arctoolbox. The toolbox serves to enter in my parameters. I have a feature layer as an input. The feature layer has the .dbf, .prj. shp, etc files. I am trying to create an output shapefile. The output toolbox parameter is a shapefile. It generates a .shp, .xml, .dbf, but NOT a .prj file I tried the following code to get the .prj file from my input file to also be included in the output file.               # Toolbox Parameters     # Gets input file     _in_polyline_m_layer = arcpy.GetParameterAsText(0)     _ResultFile = arcpy.GetParameterAsText(6)          spatial_reference = arcpy.Describe(_in_polyline_m_layer).spatialReference     # Creating my output file     arcpy.CreateFeatureclass_management(out_path, out_name, 'POLYGON', spatial_reference)      I keep getting this error: Error 000623: Invalid value type for parameter template. Not sure if the problem is within my script or in the actual toolbox. Any ideas or suggestions would be greatly appreciated. THanks in advance


Custom c# GP Tool ArcGIS Server 10.1 - build for 'Any CPU', x86, or 64bit? Does it matter?

I think I understand most explanations of these targets, but I get confused in the context of ArcGIS customizations like this because what we are compiling has to work in conjunction with ArcGIS, not just by itself. We are having trouble getting our tool to register on ArcGIS Server 10.1 with esriregasm, though it works on Desktop. Build platform is one variable, so I thought I'd ask which I should build for when the intent is for the tool to be installed on ArcGIS Server 10.1. Thank you!


GeoDjango - Use GDAL python binding in the shell

I would like to use the GDAL python binding in my GeoDjango site. The aim of this is to use ogr2ogr capabilities in a script. I am on windows 7 so I have installed GDAL-1.9.2.win32-py2.7 downloaded here The installation went correctly. I can import GDAL in python with: `from osgeo import GDAL` However, in my geodjango app python shell, I have an error when I try to import osgeo. The error is the following:               >>> import osgeo     Traceback (most recent call last):       File "<console>", line 1, in <module>       File "C:\Python27\lib\site-packages\osgeo\__init__.py", line 21, in     _gdal = swig_import_helper()       File "C:\Python27\lib\site-packages\osgeo\__init__.py", line 17, in     t_helper_mod = imp.load_module('_gdal', fp, pathname, description)      ImportError: DLL load failed: La procÚdure spÚcifiÚe est introuvable.     >>>      Can someone help me with this? Im using GeoDjango v. 1.4.3 | python 2.7.3 | GDAL 1.9.2 win32


Can TimeManager animate a large number of rasters in QGIS?

I understand that as of a year ago, the TimeManager plugin was not intended to handle more than a handfull of rasters. This post is in blind hope that this has changed! I'm trying to create a map with animated rasters and so far I'm having more success with TimeManager in QGIS than with my approach in GRASS (see related threads: 1, 2 on `ps.map` problems). I can create an animation with a few frames by using TimeManager, but the approach won't scale to thousands of frames as needed for two reasons:   1. I have to add the layers one at a time.   2. I have to enter the start time for each frame in the TimeManager panel. I had thought that it could automatically get the start time from the file names, which I created in the format YYYY-MM-DD. I understand that raster support is new and somewhat less developed than vector support, but I'm hopeful that there's a way to automate this, which I have simply missed.


ArcGIS: Assigning values to missing attribute data for line layers

I have a large road network layer with an `AGE` attribute associated per segment. In some occasions, I would have segments `A -> B -> C` with segment `B` with no value for the `AGE` field. In other situations I would have segments `D-> E` with either segments `D` or `E` with no `AGE` value. In the first case, the age of `B` could be assumed as either the average or max of `A` and `C` and in the other case assign `D` or `E` the age of the other segment. Is this possible in ArcGIS? _Note: Thought must be given to the plausible situation, which I haven't seen in the data yet, of the following case`G <-> H <-> ... <-> I <-> K` where `H`, `I`, and values in between have no `AGE` values._


How to crop a vector shapefile according to raster?

I am trying to clip a vector shapefile- points according to a DEM in QGIS. I used GDAL function and polygonized the DEM. Then I ran the Vector- Geoprocessing tools-clip in order to crop the vector data points. The whole QGIS crashed couple of times while doing this and I have never achieved any results. Could you please suggest any alternative steps for me? Many thanks!


Csv to Shp conversion?

I am working on a really big script right now where I have a csv file that I have removed rows and columns from, and edited the headers. I need to create one big shapefile for the entire csv file then create individual shape files for the units under one of the headers. I thougt the best way to do this would be to use arcpy.MakeXyEventLayer(), I saw in an arcgis sample script to then use arcpy.GetCount()for the output file of the xyEveveLayer, then arcpy.SaveToLayerFile_management() and arcpy.FeatureClassToShapefile_ conversion, but when I run the script only my csv file is getting edited and there is no layer in the output file. Is there a step I am missing or should this be making my shape. this is the few lines of code I have used, after all of the csv file editing, to do what is described above:               outLyr = sys.arg[3] # shapefile layer output name         XYLyr.newLyr(csvOut, lyrOutFile, spRef, sys.argv[4], sys.argv[5]) # x coordinate column; y coordinate column         print arcpy.GetCount_management(lyrOutFile)         csv2LYR.saveLYR(lyrOutFile, curDir)


Problem in displaying tile images using openlayers3

I have problem with displaying my TMS layer using OL3. This is my first time working with tile images this way so maybe it doesn't have to do anything with ol3, maybe I just don't understand it right. However, I've downloaded sample .tif image from NaturalEarthData http://www.naturalearthdata.com/downloads/10m-raster-data/10m-natural-earth-1/ and then I generated my map tiles (for zoom levels 0-5 ) using gdal2tiles command. Tile images are placed in nested folders following the zoomLevel/xTile/yTile.png schema. I created simple map using ol3 and added tile layer to it. At first zoom level it's displayed fine. ![Zoom level 0](http://i.stack.imgur.com/axg2S.png) However, when I try to zoom in it doesn't work good because tile images are not merged correctly. ![Zoom level 1](http://i.stack.imgur.com/Cs9va.png) Can you please tell me where I'm going wrong, I tried to follow this example http://tileserver.maptiler.com/#nasa/ol3 but I just cant achieve same thing with my data. You can see my code below               var extent = ol.proj.transform([-180,-85.051129,179.976804,85.051129],       'EPSG:4326', 'EPSG:3857');     var center = ol.proj.transform([-0.011598000000006436, 0],       'EPSG:4326', 'EPSG:3857');               var map = new ol.Map({       layers: [         // new ol.layer.Tile({         //   source: new ol.source.MapQuest({layer: 'osm'})         // }),         new ol.layer.Tile({           source: new ol.source.XYZ({             url: 'static/website/NE1_HR_LC/NE1_HR_LC/{z}/{x}/{y}.png',             extent: extent,             minZoom: 0,             maxZoom: 5,             wrapx: false           })         })       ],       renderer: 'canvas',       target: 'map',       view: new ol.View({         projection: 'EPSG:3857',         center: center,         zoom: 1       })     });     map.getView().fitExtent(extent, map.getSize());


What is the difference between projection and displayprojection for a Map in OpenLayers?

I am familiarizing myself with Openlayers, and am having trouble with understanding the _projection_ and _displayprojection_ properties for a Map. When the map is initialized with the following code:               map = new OpenLayers.Map('map', {                        numZoomLevels: 20,             projection: new OpenLayers.Projection("EPSG:900913"),             displayProjection: new OpenLayers.Projection("EPSG: 4326")             });      What exactly is happening? The documentation of the OpenLayers.Map says that **projection** -Set in the map options to override the default projection string [in] this map - also set maxExtent, maxResolution, and units if appropriate. Default is “EPSG:4326”. while **displayProjection** is the Projection used by several controls to display data to user. If this property is set, it will be set on any control which has a null displayProjection property at the time the control is added to the map. This does not make it clear. Could someone explain what exactly do these two option do?


How to edit using a WFS service, without showing it on the map in OpenLayers?

I have a service with about thousand points. I wish to enable the user to edit the attributes of the features. Since there are so many points, I don't want to display them as a vector layer (using WFS Protocol) on the map. I am using a WMS layer to display it on the map. Using a WMSGetFeatureInfo control, I am getting the attributes of a selected point and showing them in a form to the user. How can I now save the edited attributes to the database? Is there some other way of achieving it?


How to reproject a raster in QGIS?

I wanted to reproject raster file from UTM to decimal degree in QGIS version 1.7.1 or 1.8.0.. I could reproject one raster file before in QGIS Version 1.8.0. I have tried again, but now we cannot getting the the proper result.


Postgres/PostGIS: Dissolve multiple fields with COUNT (Point shape)

I have loaded point .shp feature classes into Postgres 9.3 db, and enabled postgis,plpgsql,postgis_topology extensions. I'm looking to dissolve multiple fields within a single table 'TABLE1' and add a COUNT or similar field to the tabular output. The feature class has more than 12Million points, so Esri understandably chokes, and QGIS only allows me to dissolve based on one field at a time. Start table: ![enter image description here](http://i.stack.imgur.com/MpT28.png) The summary table I am trying to generate: ![note MAP 'italy' has different PROTOCOLS](http://i.stack.imgur.com/qhkIP.png) So, I'm looking to summarize across all 3 fields (ORG, PROTOCOL, MAP) and then also generate the 'Cnt_Map' field (or similar) which denotes the COUNT of each MAP. Is there a specific SQL command or other query I can use to run this type of report? Grazie


QGIS Grass Processing toolbox

I'm trying to use some of the GRASS tools from the processing toolbox in QGIS. I get the following Python error: An error has occured while executing Python code:               Traceback (most recent call last):       File "C:/PROGRA~1/QGISCH~1/apps/qgis/./python/plugins\processing\gui\ProcessingToolbox.py", line 181, in executeAlgorithm         message = alg.checkBeforeOpeningParametersDialog()       File "C:/PROGRA~1/QGISCH~1/apps/qgis/./python/plugins\processing\algs\grass7\Grass7Algorithm.py", line 511, in checkBeforeOpeningParametersDialog         msg = Grass7Utils.checkGrass7IsInstalled()       File "C:/PROGRA~1/QGISCH~1/apps/qgis/./python/plugins\processing\algs\grass7\Grass7Utils.py", line 361, in checkGrass7IsInstalled         cmdpath = os.path.join(path, 'bin', 'r.out.gdal.exe')       File "C:\PROGRA~1\QGISCH~1\apps\Python27\lib\ntpath.py", line 96, in join         assert len(path) > 0     TypeError: object of type 'NoneType' has no len()      Python version: 2.7.4 QGIS version: 2.4.0-Chugiak Any ideas on how I can fix this? I've tried a re-installing but haven't had any luck - same error keeps on reappearing.


Issue with initializing ArcObjects Interface and classes

I was going through ArcObjects example on following linkWalkthrough_Building_custom_UI_elements .I followed same steps but I was getting error while initializing objects for following code.               ESRI.ArcGIS.Display.IRubberBand rubberBand = new ESRI.ArcGIS.Display.RubberLineClass()     ISimpleMarkerSymbol simpleMarkerSymbol = new ESRI.ArcGIS.Display.SimpleMarkerSymbolClass()     IMarkerElement markerElement = new MarkerElementClass()      etc I was not able to find exact reason why I was getting but may be due to version of ArcObjects.I am using .Net 4.0,Visual studio 2010, ArcObjects 10.2. I got following type of error               The type 'ESRI.ArcGIS.Display.RubberLineClass' has no constructors defined.     Interop type 'ESRI.ArcGIS.Display.SimpleMarkerSymbolClass' cannot be embedded. Use the applicable interface instead.


Speed-up the GIS dynamic web application

I don't know if this is the right forum to ask this particular question but I would definitely appreciate any support or clue in this regard. I am have made a dynamic web-GIS application on Eclipse IDE. I am using OpenLayers API and GeoServer wms to bring the maps on the web app. Platform is Ubuntu-v12.04. To publish the web app I am using TomCat 7.0.53. When I am trying to run the app on localhost everything so is perfect. But when I asked one of my friend to open the same app from France, I am in Turkey, it took like 5 minute to open it, after several refreshing. I hardly doubt about the internet speed, it shouldn't be the issue. I don't know why it's taking so long, since it is not a heavy web app, just few basic layers. Can anyone has a clue? Thanks! Zia


printing openlayers map

What i've got is a map served by the `tilecache` and shown by `openlayers` and `geoext`. Now i need to print this map, so what i've done is: made a button which creates (`window.open()`) a new window with my map in it and `window.print()` on body `onload`. This works well exept that i'm getting a **second blank page**. So the question is: how (and where) do i set map size and **proportions** to have it printed correctly? map is created this way:               map = new OpenLayers.Map("map", {         maxExtent : new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34),         maxResolution : 156543.03125 / 64,         numZoomLevels : 11,         units : 'm',         projection : "EPSG:900913",         displayProjection : new OpenLayers.Projection("EPSG:4326"),     });


event for 45 degree view available google maps

I have a control that overlays a small part of my google map v3 that hosts various controls like map type, shapes, etc. I would really like to know if it is possible to put the default "Map" and "Satellite" controls on this div since that would make the main question irrelevant. Since I couldn't figure that out, I added "Map" and "Satellite" buttons to my control. What I can't figure out is how to detect when the 45 degree view and terrain options can be enabled. The default controls for Map and Satellite both disable these options when not available, however I cannot find the event that they are reacting to. Can anyone point me in the right direction? Rick


Openlayers doesn't want to show map throught Mapserver

I have a configured Mapserver with WMS service, I know Its working because I tried in QGIS and I can see the map. The problem is that openlayers doesnt want to show the map via mapserver service. Yes, the projection is same...![enter image description here](http://i.stack.imgur.com/TnLSu.jpg) Index.html               <!doctype html>                  <meta content="text/html; charset=utf-8" http-equiv="Content-Type">       <title>MapServer WMS OpenLayersben</title>
MapServer WMS OpenLayersben

                 mapserv file:               MAP       NAME "MAPSERVER QUICKSTART"       EXTENT 19.64 46.12 20.77 46.80       UNITS dd       SHAPEPATH "/home/"       SIZE 1024 768            IMAGETYPE PNG24            PROJECTION         "init=epsg:4326"       END            WEB         METADATA           ows_enable_request "*"         END       END            LAYER         NAME "Csongradutak"         STATUS ON         TYPE LINE         DATA "csong_utak"         CLASS           STYLE             COLOR 0 0 0             OUTLINECOLOR 0 0 0           END         END       END


What sampling tools are available in QGIS?

I'm looking for a tool to generate a stratified random set of points within the boundaries of a polygon layer. In ftools 0.6.1 there is a tool which almost does what I need, but misses the stratified part. For example, I needed to generate 100 random point inside each polygon, accordingly with the polygon's class (from a given field). I know Hawth's Tools had this... Thanks


No file is created when I choose 'Save style ...' in layer properties

First of all, I create a layer using the Add Delimited Text Layer plugin. The layer contains longitudinal and latitudinal data and a number that is assigned to each data point. When using a graduated color to style my data points, I define classes based on a specific range. I'd like to use the same classes for all of my layers. Therefore, I want to save my style using the 'Save style ...' button, in order to be able to load it into the other layers. However, when saving the .qml file, no file is created in the specified folder (e.g. desktop). Another strategy may be to set the current style as default by using 'Save As Default'. When clicking 'Restore Default Style' in the other layers, a prompt shows up that says 'style not found in database'. Thanks for helping me out!


GDAL: How to build an image pyramid starting from the base

Normally I would create an Image Pyramid using _gdal_retile.py_ on one large image or a set of large images. I want to do the opposite. I have all the zoomed in tiles on the base level and I want to build (mosaic) my tiles into the rest of the levels required to build a pyramid. As _GIS-Jonathan_ assumes I want to have the lower resolution tiles for zooming out.                                     ^      <- I want these                          /_\     <-      :                         /___\    <-      :                        /_____\   <-      :                       /_______\  <- I want these                      /_________\ <- I have this level!      **Can this be done using GDAL or similar?** I guess this would be the same as interupting _gdal_retile.py_ just when the lowest level is finished and telling it to continue from the next level. But I don't know if this is possible?


esri javascript API: Does current extent match initial extent

In using the JS API, I need to detect if the current extent matches the initial extent. If no match, then I need to display a UI element ("Return to Original Extent"). The initial extent is cached in a data store after the map loads (in my own object mapState.initialExtent). This is properly configured as an instance of an esri extent. I can trigger the map to move to this extent successfully. I have created a listener on the map (onExtentChange) which calls a function which compares the current extent to the initial extent. It seems the best way to do this is to compare the x/y min/max which is fine and works _EXCEPT_ that _BOTH_ the return from the call to map.extent _AND_ the extent return by the listener are inaccurate. That is: if I do this:               // SET LISTENER ON MAP LOAD          dojo.connect(map, "onExtentChange", compareExtent)          // AT SOME TIME LATER DO THIS     // this works     map.setExtent(mapState.initialExtent)           function compareExtent(extent, delta, levelChange, lod) {          // FAILS WHEN COMPARING THE FOLLOWING:      var currentExtent = map.extent;      var returnedExtent = extent;      var initialExtent = mapState.initialExtent;          console.log("currentExtent.xmin", currentExtent.xmin, "initialExtent.xmin",        initialExtent.xmin, "extent.xmin", extent.xmin);     console.log("currentExtent.ymin", currentExtent.ymin, "initialExtent.ymin", initialExtent.ymin, "extent.ymin", extent.ymin);          //these do not match     //HERE IS THE CONSOLE READ OUT     currentExtent.xmin -8476373.507203963      initialExtent.xmin -8476287.515547141      extent.xmin -8476373.507203963          currentExtent.ymin 4412584.280379601      initialExtent.ymin 4412589.057693868      extent.ymin 4412584.280379601          }      So, I checked to see if this listener actually returns BEFORE the map is finished but it does not. Anyone have ideas? Thanks to all * * * ## Edit I am sorry this is not clear. I set the map to the initial extent, change the extent in response to a UI event and then return to the initial extent: the values do not match though the map appear to be correct. To be clear, on map init I set the extent to initialExtent - using setExtent(initialExtent) where initialExtent is a cached instance of an extent. I then go to a different cached extent and later return to initialExtent. The console shows the returns. The value currentExtent.xmin -8476373.507203963 is what is returned by the listener. The value initialExtent is what is initially cached (which is passed as the argument in both the first and the final setExtent function - - this value is initialExtent.xmin -8476287.515547141. The following value is what is returned by map.extent after the listener fires after setExtent(initialExtent):extent.xmin -8476373.507203963 I expect these 3 values to be same.