Openlayers 2.12 + Firefox 15 = OSM Layer not showing

I know it's due to the new Access-Control-Allow-Origin in OL 2.12, but it is still not functional to me. I've followed instructions on here on stackoverflow. ## Firefox version 15.0.1 ## Apache2 config In `/etc/apache2/sites-enabled/000-default` I've set:               <Directory /home/fradeve/public_html/ark-oia/*>                     Header set Access-Control-Allow-Origin *     </Directory>      ## OL OSM layer config               var osm_layer = new OpenLayers.Layer.OSM('OSM Layer', null, {         transitionEffect: 'resize',         tileOptions: {crossOriginKeyword: null},         resolutions: [...],         serverResolutions: [...]     })      But OSM layer is fine on Safari, Chromium 20.0.1132.47, but not in Firefox. What am I missing?


QGIS custom CRS for map of manufacturing shop floor

I'm working on a web app that shows a map of a manufacturing plant's shop floor. I've built it in Inkscape and QGIS, **but when I try to load it into Tilemill, I get a CRS error**. Specifically, it says: `Detected out of bounds geographic extent (14.944551, 93.956594, 180, 85.051) for layer 'aisles'. Please ensure that the SRS for this layer is correct. It's native extent is '14.944551, 93.956594, 195.298512, 254.314634'` How do I set a custom CRS in QGIS, OR, how do I specify the map's location within the current CRS so that it will work in tilemill? **Background:** The webapp will be for a map of a factory shop floor. Different zoom levels will have different information/ have different actions. I'm planning on styling the map in Tilemill, then using Leaflet to show the map. This will run on the company's internal intranet. **Research:** I've read this question on stackexchange. It's helpful, but I'm not sure it fits my needs, and I don't know what the proj4 parameters are. Also, I've looked at this documentation, but haven't been able to understand it and apply it to my situation. **Construction details:** I created the map first as SVG in Inkscape. Then I put each layer (one at a time) into QGIS. After that, I'm planning on loading each layer (one at a time) into Tilemill. Obviously, the geographic scope of this is much smaller than most map projects. This map does NOT need to correspond to real-world lat/long, but I do need to be able to show where machines are (and their status) on the map. Finally, if I'm thinking about this wrong, and need to go another direction or use different tools, don't hesitate to let me know that, too. Thanks. **EDIT: SOLVED.** Ended up going with the answer below. I used the qgsAffine plugin to move/scale everything to fit between the 0 and 180 coordinates, on both the x and y axes. One hiccup was that QGIS/qgsAffine can only edit vectors that are in the shapefile format (in my experience. There might be some other format out there it can do). QGIS easily converted my dxf files to shp, though, so it was an easy fix.


Add TMS layer in Tilemill

is it possible to add a TMS layer to TileMill to compose a map? If yes, how is it possible to do it? Thank you very much, Andrea


Import Shapefile into Existing Spatialite Table

I am working with a Spatialite database and a series of shapefiles. I have an empty spatialite table that has geometry and columns. What I would like to do is to load the shapefiles into the spatialite table (Append) but I am unsure if this is possible with Spatialite. I do not see an option with the Spatialite-GUI, or the QGIS plugin. Does anyone have any ideas or tricks the a SQL query? Thanks... EDIT I would like to add a SELECT statement so that I only get selected rows


Certain points cause Trace Geometric Network tool to crash

Using ArcGIS Desktop 10.2.1. I have a set of about 600 points that I’m using as the flag input on the trace geometric network tool. Every time I ran the tool with these points, it crashes, along with ArcMap or ArcCatalog, whichever its being run from. I began isolating the points/flags and found that it was crashing only on certain points. Since the crash doesn’t provide any information on the cause, I have no way of knowing what’s causing it or whats different about these points that's causing it to crash. Has anyone experienced an issue like this? The crash occurs on any trace task type. The points are in NAD83 State Plane and stored in a file gdb. I have been able to isolate a few points that cause the crash and yes, when I run it on one of those points, it crashes. It works fine on the rest of the points. I have not been able to figure out the difference between the points that cause the crash and the ones that don't. The issue occurs on the trace tool in modelbuilder. When I run the trace tool outside of modelbuilder, I experience similar results where the good point(s) run fine, however, the bad point(s) generate error 999999 "Invalid network element id". I have not found any google information on this. All the "invalid network element id" search results refer to reconciling data, which I'm not doing.


How to remove pixel values below 0 in Digital Elevation Model in ArcGIS?

I made a DEM layer from LAS file (LiDAR).Now for showing a map I have a map like the image below! I wonder how can I remove black area? They have the value -2 to 16! How is possible to set the value of classes from zero? ![enter image description here](http://i.stack.imgur.com/FvCm3.jpg)


Error: .asc is not a supported raster data source

I am new using QGIS and struggling with this error "...... .asc is not a supported raster data source" when trying to add a ."asc" file as a raster. I downloaded the files from http://www.geog.mcgill.ca/landuse/pub/Data/175crops2000/ArcASCII-Zip/ I tried Layer: Add Raster Layer, and also Raster: Conversion: Translate (convert format) but neither recognized the .asc I would appreciate any help!


What is the coordinate system of this maritime natural gas field map?

The Israeli Ministry of Natural Infrastructure, Energy and Water Resources published a maritime map of the borders of a new natural gas field. The map is a part of a full license (PDF), a legal document written in Hebrew. This map has enormous importance to several environmental and social NGOs. Some of their activists have tried to georeference it, but could not figure out the coordinate system and asked for my assistance. The coordinates are indeed odd - the first number has 5 digits, while the second has 6 (e.g. `65395/776428`). It resembles UTM, but I could not figure how to find the exact zone or why is there a difference in the number of digits. **Could you please help me identify the coordinate system in this map? The location is in the Mediterranean sea, a few dozens kilometers off the Isreali coast.** ![enter image description here](http://i.stack.imgur.com/sH0uk.png)


How to split single lines to represent two-way streets?

I am working on a project using city road data. The data has every road in the city visualized as lines and with directional data stored in the attribute table (one-way to-from, one-way from-to, and all). I'm wondering if there is a way to split the two-way lines into two separate one-way lines offset from one another but ending in the same point. Any help would be tremendously appreciated! ![enter image description here](http://i.stack.imgur.com/AviPM.png) Thank you!


How does WiFiSLAM work?

Apple recently acquired WifiSlam. How does their technology work? Their website doesn't go into much detail. > Allow your smartphone to pinpoint its location (and the location of your > friends) in real-time to 2.5m accuracy using only ambient WiFi signals that > are already present in buildings. > > We are building the next generation of location-based mobile apps that, for > the first time, engage with users at the scale that personal interaction > actually takes place. Applications range from step-by-step indoor > navigation, to product-level retail customer engagement, to proximity-based > social networking.


How to calculate proportional data for a polygon by taking attributes from other polygon

I have a features class which has polygons in it. I also have a Block group level data for demographic variables like population. Now when I overlay the polygon on the block group level data to find out the population of that polygon.Now it would happen that the polygon boundary may not overlap exactly with the Block group boundary.It would intersect at different places with the block group data. In such case how can you calculate the proportional population value to be considered for that polygon. Thank You.


Pseudo Mercator error?

I'm mapping on QGIS, I have a vector layer and his CRS is on EPSG:4326 - WGS 84, but also I wanted to put a satellite image, so when I do it, the image use WGS 84 / Pseudo Mercator. The problem is, this CRS shows me differents degrees. And If I set project CRS from the vector layer, that will cut the image. Thus, I want the map with the coordinates of the vector layer.   Can I do it? How?


How do I style lines to show gradient colors for two attributes?

I have a layer with the city streets. I have a database with traffic values, including traffic going into the city and traffic going out from the city. I need to show the street links with different colours based on the number of vehicle going into the city (red at the right of the link) and the number of vehicles going out from the city (blue at the left of the link). I also need for the colours to be proportional based on value. Can you help me?


How to load more than the standard tools to the grass toolbox?

I need to know how I get all the grass tools into the grass toolbox of QGIS. Is there an easy way to do this? I tried the sextante toolbox. After an update sextante doesnt work (python errors). For instance: I need the r.series tool. mfg


How to find out what projection my data is using?

I have a set of data that I created from gps locations of images. The locations are in decimal. I don't know what projection was used when the data was captured. I used QGIS to display the data with a forced projection (EPSG:28355 - GDA94 / MGA zone 55) but the data looks wrong. The resulting map is off by nearly 90 degrees and the circular streets are skewed. So I am assuming that the projection is wrong and I can't work out how to change it. Can someone help?


Open Source Address Correction / Parser with Fuzzy Matching

Here is a a little bit of a detailed question related to address parsing/geocoding which I feel should be interesting to many users. So, essentially I am curious to know if anyone has had any experience installing, building or extending a opensource geocoding and/or address correction tool. I am aware of geocoder:US 2.0 initiatives which I think are maintained by geocommons but I am unsure if there are better alternatives, other opensource tools, if their system can be effectively extended or if there are any developments I might not be aware of. My goals are as follows:   1. I need a highly accurate tool which is capable of automatically parsing out and/or standardizing location data inputted by users from a single input field all in real-time and with the highest volume possible.    2. Input data would be one or more of the following address components: zipcode, county, city, street, address, state.   3. Input data also needs to be able to lookup from our custom geonames database. For example he may enter the name of a neighborhood or non USPS location name which naturally are not standard address variables. Given these goals I am well aware of the fact that when given a single form field to conduct such a lookup each user will enter his data in different formats while the other factor generally fall into misspellings. Besides utilizing the census database as the core for the valid addresses/ranges (all which I believe Geocoder:US does, I believe some type of ability to define known "aliases" would be ideal for known misspellings of street names. The same goes for things such as a user entering Ave compared to Ave. compared to Avenue. Don't think such alias capabilities are fully possible with the Geocoder:US tool. While the above elements may indeed solve the majority of issues I think some type of effective fuzzy matching needs to exist when the input can't be matches to high enough %age. If input data can effectively be parsed out into individual elements based off some assumed rules and then utilizing a type of "match score" component to fuzzy match any unmatched elements would have to be based on those elements which were already "matched" with a high degree. For example: I am going to assume for geocoding to be as effective as possible we need to extract individual data elements from the input field first in an attempt to narrow down the "area" the user is trying to find results for. In my view this means that a 5 digit number could be assumed to be a zipcode, if there is another element such as a city name that matches the zipcode the assumption that we have the "area" correct... Next we use the remaining data to try to find a full, partial or fuzzy match, score and list possible results. In any case - I would greatly appreciate if anyone could provide some advise here along with any advise, performance stats or upcoming developments they are aware of which might adjust my direction (such as the use of postgis 2.0 as a means for enhanced matching capabilities)


Looking for soil shapefiles for India

Is there any place where we can get soil Shapefiles of India (if not detailed information, can we get region wise/state wise)? I have seen this data base for few regions like USA. To compute "Q" in a basin or at a point, I am looking for soil shapefiles to use in Arcgis.


Open Network Dataset with ArcObjects SDK 10.0 .NET

I develop desktop standalone application and use this code to open Network Dataset, but it fails with HRESULT on **datasetContainer3.get_DatasetByName()**.               public static ESRI.ArcGIS.Geodatabase.INetworkDataset OpenNetworkDataset1(ESRI.ArcGIS.Geodatabase.IWorkspace networkDatasetWorkspace, System.String networkDatasetName, System.String featureDatasetName)         {             if (networkDatasetWorkspace == null || networkDatasetName == "" || featureDatasetName == null)             {                 return null;             }                  ESRI.ArcGIS.Geodatabase.IDatasetContainer3 datasetContainer3 = null;             switch (networkDatasetWorkspace.Type)             {                 case ESRI.ArcGIS.Geodatabase.esriWorkspaceType.esriFileSystemWorkspace:                          // Shapefile or SDC network dataset workspace                     ESRI.ArcGIS.Geodatabase.IWorkspaceExtensionManager workspaceExtensionManager = networkDatasetWorkspace as ESRI.ArcGIS.Geodatabase.IWorkspaceExtensionManager; // Dynamic Cast                     ESRI.ArcGIS.esriSystem.UID networkID = new ESRI.ArcGIS.esriSystem.UIDClass();                          networkID.Value = "esriGeoDatabase.NetworkDatasetWorkspaceExtension";                     ESRI.ArcGIS.Geodatabase.IWorkspaceExtension workspaceExtension = workspaceExtensionManager.FindExtension(networkID);                     datasetContainer3 = workspaceExtension as ESRI.ArcGIS.Geodatabase.IDatasetContainer3; // Dynamic Cast                     break;                      case ESRI.ArcGIS.Geodatabase.esriWorkspaceType.esriLocalDatabaseWorkspace:                      // Personal Geodatabase or File Geodatabase network dataset workspace                      case ESRI.ArcGIS.Geodatabase.esriWorkspaceType.esriRemoteDatabaseWorkspace:                          // SDE Geodatabase network dataset workspace                     ESRI.ArcGIS.Geodatabase.IFeatureWorkspace featureWorkspace = networkDatasetWorkspace as ESRI.ArcGIS.Geodatabase.IFeatureWorkspace; // Dynamic Cast                     ESRI.ArcGIS.Geodatabase.IFeatureDataset featureDataset = featureWorkspace.OpenFeatureDataset(featureDatasetName);                     ESRI.ArcGIS.Geodatabase.IFeatureDatasetExtensionContainer featureDatasetExtensionContainer = featureDataset as ESRI.ArcGIS.Geodatabase.IFeatureDatasetExtensionContainer; // Dynamic Cast                     ESRI.ArcGIS.Geodatabase.IFeatureDatasetExtension featureDatasetExtension = featureDatasetExtensionContainer.FindExtension(ESRI.ArcGIS.Geodatabase.esriDatasetType.esriDTNetworkDataset);                     datasetContainer3 = featureDatasetExtension as ESRI.ArcGIS.Geodatabase.IDatasetContainer3; // Dynamic Cast                     break;             }                  if (datasetContainer3 == null)                 return null;                  ESRI.ArcGIS.Geodatabase.IDataset dataset = datasetContainer3.get_DatasetByName(ESRI.ArcGIS.Geodatabase.esriDatasetType.esriDTNetworkDataset, networkDatasetName);                  return dataset as ESRI.ArcGIS.Geodatabase.INetworkDataset; // Dynamic Cast         }      What am I doing wrong?


What is a typical GIS configuration?

In a typical GIS setup what are the different components that need to be there? For example:   * there needs to be a client program that can show the tiles and layers   * there needs to be some GIS server that can query that layer database and return results that can be overlayed on MAP on client   * Do we need a tile server for serving tiles or is it also job of GIS server?   * There needs to be a database that saves all the GIS data   * We can have shape files locally on the client machine What other components can be there?


How do I get statistics out of a table using Python in Arc 10?

I am very new to programming (I started learning this semester) and would very much appreciate helop with one piece of a project. I have the following table, and I need to write a script compatible with Arc10 that will extract some statistics from it. Specifically, I need to obtain a total of all the areas, and then a percentage describing how much of the total area each class of land takes up. If someone knows of a tool or command I should use, that would be a lot of help, even without a script. Thank you in advance to anyone who wants to help an extremely raw beginner.               Id_1    LandClass   F_AREA              0   Mixed Forest    15612315.78         0   Softwood Forest 2161121.455         0   Wetland         2255656.822         0   Grassy          27009516.24         0   Hardwood Forest 10345393.4


Opening File GDB in Samba throws exception - but only in VS2010 debug mode

I'm accessing a file geodatabase through a mapped network drive pointing to a unix machine running Samba. When I start the app from within VS2010, I get a COM exception when I attempt to open the file Gdb. No exception is thrown when not running in the debugger. I'm using the recommended method of opening the gdb (via Activator.CreateInstance):               public static IWorkspace FileGdbWorkspaceFromPropertySet(String database)     {        IPropertySet propertySet = new PropertySetClass();        propertySet.SetProperty("DATABASE", database);       Type factoryType = Type.GetTypeFromProgID(         "esriDataSourcesGDB.FileGDBWorkspaceFactory");       IWorkspaceFactory workspaceFactory = (IWorkspaceFactory)         Activator.CreateInstance(factoryType);       return workspaceFactory.Open(propertySet, 0);     }      If I copy the same file gdb to the local windows machine, I can access it without any exception. Has anyone ever run into this issue? I know very little about Samba - is there something that needs to be configured to make it more file gdb friendly?


Viewing Tables in the AxTOControl using ArcObjects

SE, I was wondering if anyone out there has written a Table filter for the AxTOCControl in the ArcObjets Library. I've rolled my own Table view for now in C#, but would like to try and keep things consistent. If you could point me to any resources I would be very appreciative. Cheers, Optimize


How to zoom map after CQL_Filter?

I have WMS map, after applying CQL filter to layer how can I zoom map to see filter result? **UPDATE:** Here is my code what I'm trying to do               var layerArray = map.layers;     var someLayer;          for (var i = 0; i < layerArray.length; i++) {         if (layerArray[i].name == "myLayer"){             someLayer = layerArray[i];             break;             }     }          someLayer.mergeNewParams({         "CQL_FILTER": celIDCondition /* (CID =1351 and LAC = 401) */     });          // instead of somelayer.maxExtend I want to extent map acording to CQL_FILTER result     map.zoomToExtent(someLayer.maxExtent);


QGIS 2 Installation on MAC OSX - couldn't load plugin 'processing'

New installation of QGIS running on Macbook Pro OSX 10.8.4 - this comes up on startup. I urgently need this fixed!!! I have a project due in 10 days that I desperately need QGIS for. Thanks for the help.               Couldn't load plugin 'processing' from ['/Applications/QGIS.app/Contents/MacOS/../Resources/python', '/Users/caitlinsommer/.qgis2/python', '/Users/caitlinsommer/.qgis2/python/plugins', '/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins', '/Library/Frameworks/SQLite3.framework/Versions/B/Python/2.7', '/Library/Python/2.7/site-packages/numpy-override', '/Library/Frameworks/GDAL.framework/Versions/1.10/Python/2.7/site-packages', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC', '/Library/Python/2.7/site-packages', '/Applications/QGIS.app/Contents/Resources/python/plugins/fTools/tools']          Traceback (most recent call last):       File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 182, in loadPlugin         __import__(packageName)       File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 453, in _import         mod = _builtin_import(name, globals, locals, fromlist, level)       File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/__init__.py", line 20, in          from processing.tools.general import runalg, runandload, alghelp, alglist, algoptions, load, extent, getobject       File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 453, in _import         mod = _builtin_import(name, globals, locals, fromlist, level)       File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/tools/general.py", line 29, in          from processing.core.Processing import Processing       File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 453, in _import         mod = _builtin_import(name, globals, locals, fromlist, level)       File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/core/Processing.py", line 52, in          from processing.admintools.AdminToolsAlgorithmProvider import AdminToolsAlgorithmProvider       File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 453, in _import         mod = _builtin_import(name, globals, locals, fromlist, level)       File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/admintools/AdminToolsAlgorithmProvider.py", line 19, in          from processing.admintools.PostGISExecuteSQL import PostGISExecuteSQL       File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 453, in _import         mod = _builtin_import(name, globals, locals, fromlist, level)       File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/admintools/PostGISExecuteSQL.py", line 32, in          from processing.admintools import postgis_utils       File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 453, in _import         mod = _builtin_import(name, globals, locals, fromlist, level)       File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/admintools/postgis_utils.py", line 39, in          import psycopg2       File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 453, in _import         mod = _builtin_import(name, globals, locals, fromlist, level)     ImportError: No module named psycopg2          Python version:     2.7.2 (default, Oct 11 2012, 20:14:37)      [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)]               QGIS version:     2.0.1-Dufour Dufour, f738351          Python path: ['/Applications/QGIS.app/Contents/MacOS/../Resources/python', '/Users/caitlinsommer/.qgis2/python', '/Users/caitlinsommer/.qgis2/python/plugins', '/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins', '/Library/Frameworks/SQLite3.framework/Versions/B/Python/2.7', '/Library/Python/2.7/site-packages/numpy-override', '/Library/Frameworks/GDAL.framework/Versions/1.10/Python/2.7/site-packages', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC', '/Library/Python/2.7/site-packages', '/Applications/QGIS.app/Contents/Resources/python/plugins/fTools/tools']


Searching many feature datasets for ArcSDE feature classes using field filters in ArcCatalog?

I have ~30 feature datasets and ~100 feature classes spread throughout the feature datasets. I would like to search for a feature class by name among the feature datasets. Also, I would like to query out of all the feature classes those records that have "Date_Mod" from someDate to someOtherDate. This is all in ArcGIS SDE 10.0 on sql server 2008.


Selecting a rectangle box from a raster tiled table in PostGis 2.1

I am new to PostGIS as well as SQL queries for rasters. I have imported a raster .tif file into PostGIS with tiles. I would need to select a bounded rectangle from within this raster using SQL statements but i have no clue on how to begin. Can i ask what are the possible/better ways to do that? Do i need to have the top left and bottom right coordinates/lat long to get the rectangle? I had search and read many other related posts about using ST_Intersects, BBOX and ST_MakeEnvelope but i don't really quite get them. Thank you!


How can I parse hundreds of *.lyr files for their Definition Queries?

I have ~600 lyr files that reference a table on an SDE database that has about 20,000,000 records. Some of these *lyr files have an incorrect definition query applied or is missing the query entirely. I think I'm looking for a way to create a table with the Lyr file name and it's definition query, but I'm not sure if that's something I can do in python or model builder. Can anyone pt me in the right direction?


PyShp 1.2 creating Polyline from GML

I have a problem in creating some polylines in one Shapefile with PyShape. The plan is to read a GML file containing LineStrings and create a shapefile. The theory is clear, but the realworld is different. As I understand the syntax is as follows: > > > w.line(parts=[[[1,5],[5,5],[5,1],[3,3],[1,1]]]) This one is a fixed line, but my lines are flexible. My thoughts were, to extract the Coordinates from the GML file and concatenate it to a String which meets the PyShape Syntax. My results are therefore: [[[-94,-49.1152],[-94.45451,-49], .... ,[-93,-49.30391],[-94,-49.1152]]] <\-- named "coords" The idea in using s.line(parts=coords) failed due to needed float values. The question here is, how to meet the syntax and stay flexible in the same way. Maybe my Python skills are still too basic, but the following links did not help: Using the python shape library: pyshp - how to convert .csv file to .shp <\-- used points Unable to create shapefile using shapefile.py <\-- used also points Using the python shape library: pyshp - how to convert polygons in .csv file to .shp <\-- comes close, but is fixed due to rectangles **Long story short** : How can i create a polyline shape with lines of different length, based on coordinates available in variables. Thank you folks. regards Matthias! PS: i know that there are additional lines nessecary, but those are not the problem.


how to create the Layer Properties button as geoexplorer?

I was in the debug mode.And I create a Layer Properties button ,but it is only show the title. the code for it,                * @require plugins/LayerProperties.js     --------------------     {       ptype: "gxp_layerproperties",       actionTarget: ["tree.tbar"]     }     -----------------------      How can I do to get a button as Layer Properties on geoexplorer tree panel that has 3 tags,like about,display and available styles? Especially the display tag is more important to move opacity slidebar.


basic question about mapnik

I am new in mapnik, and I found mapnik at OSM wiki page. And I am interested in it, but I have some question. **1 the mapnik work scope** It seems that it is a library for map rendering(creation), however I wonder if the mapnik is bind to OSM data only? I mean can mapnik work on data procesed by ArcGIS or something else? In our production environment, we use ESRI arcgis to create,edit,render our map. **2 use mapnik to generate raster tiles based on Arcgis data source.** And we use arcgis server to generate the raster tiles, but it often cost a long time, can it only work on windows. So I wonder if we can use mapnik to generate our raster tiles according to our ESRI based data(`.gdb` database)? If it is possible, I wonder how about the style rules of the layer? Do you edit the style rules manually? Is it possible to translate the rules from `Arcgis` `.mxd` file? 3 vector tiles BTW,we are doing some research work on the vector tiles( we tried to use it to replace the raster tile some day). And I wonder if mapnik support to create vector tiles based on our `Arcgis` `.gdb` data source? And in the wiki page I found this:               TileStache       Providers           VecTiles - MVT (Mapnik Vector Tiles) and GeoJSON from PostGIS           Vector - GeoJSON (and others) from OGR drivers           PostGeoJSON - GeoJSON from PostGIS       Hand-Rolled Vector Tiles – TileStache (blog)      What does the `MVT (Mapnik Vector Tiles)` mean?


PostGIS Spatial query taking a very long time

I'm trying to return a count of crimes (points) that occur in each police grid (polygons), as well as the geometry data, but the query takes ~22 seconds. This seems oddly high and will be problematic for using it to draw vectors in OpenLayers. I have 28000 crime points, and 56 grid polygons in my dataset. This is the query I'm using: `SELECT ST_AsText(ST_Collect(public.cspd_patrol_grid.geom)) AS geo, count(*) AS total_crimes, public.cspd_patrol_grid.command FROM public.crimes, public.cspd_patrol_grid WHERE ST_Contains(public.cspd_patrol_grid.geom, public.crimes.geo) GROUP BY public.cspd_patrol_grid.command;` I thought that it was possibly the size of the geometries that was slowing it down, so I removed that from the SELECT statement, and the query took a more appropriate 2 seconds to return only the total number of crimes in each polygon: `SELECT count(*) AS total_crimes, public.cspd_patrol_grid.command FROM public.crimes, public.cspd_patrol_grid WHERE ST_Contains(public.cspd_patrol_grid.geom, public.crimes.geo) GROUP BY public.cspd_patrol_grid.command;` However, where I'm getting confused is when I do return the geometry, but limit the crimes being queried from all of them to just 'Assault', which makes up about 3% of my crime points. This query only takes 600 ms, even though it still returns 100% of my grid geometries. This makes me think that it has nothing to do with the geometry data, and that there's something wrong with my query. `SELECT ST_AsText(ST_Collect(public.cspd_patrol_grid.geom)) AS geo, count(*) AS total_crimes, public.cspd_patrol_grid.command FROM public.crimes, public.cspd_patrol_grid WHERE ST_Contains(public.cspd_patrol_grid.geom, public.crimes.geo) AND public.crimes.crimetype = 'Assault' GROUP BY public.cspd_patrol_grid.command;` Is there anything noticeably wrong with the original query, or is there something else going on that results in the latter 2 queries being more efficient?


Saving part of OSM shapefile in QGIS as GeoJSON strips 'name' field to 25 characters long

I want to copy part of OSM data in ESRI Shapefile (downloaded from http://download.geofabrik.de/europe/ukraine.html ) and save in in GeoJSON to style later in Tilemill. After saving, I see that string values in 'name' column get truncated to be 25 letters long. Any ideas how to overcome mentioned problem? Thanks in advance! P.S. I've seen answers related to letters truncation (like here: How to overcome field truncation when converting OSM to shapefile with QGIS?), but I am not sure if I can use that advice.


ArcGIS Can't get ResultImageLayer

I am unable to get a ResultImageLayer. I can get a GPFeatureRecordSetLayer using ResultData and add the feature geometries individually. I am using ArcServer 10.1 so it is not a pre-release problem. I can see the map service that accompanies the geoprocessing service and the legend / symbology in this map service. I am doing this with the JavaScriptAPI. Using Firefox I see a “500 Internal Server Error” but there is no other messages. Could be as simple as my call: gp2.getResultImageLayer(jobInfo.jobId, "Test01", imageParameters, addGPServiceResult2, errorProcessing) function addGPServiceResult2(gpImageLayer) { map.addLayer(gpImageLayer); } I’m not sure what the ParameterName “Test01” should refer to although I’ve tried ever possibility that seemed reasonable. Or could be an ArcServer setting? Any help will be greatly appreciated. Thanks, Charles


How to print high resolution poster sized maps from online map (arcgis server)?

I want to create a PDF document that can be printed at large poster size containing user created data and base map data. Based on a rough calculation, if the poster was 24 inches by 34 inches and I wanted a 200 dpi map, I would need a 4800x6800 pixel image of each service. Unfortunately the max size exposed by the REST API is 2048x2048. So how do I get large images to embed into a PDF document for poster sized output maps? I would also like to include arcgis online base map services.


New Snapping while editing vertex's in ArcEngine 10

Is it possible to use the new (not classic) snapping functionality when editing the vertices of a polygon feature in ArcEngine 10. I would like editing vertices to behave exactly the same as editing vertices in ArcMap. I know that with ArcEngine you pretty much have to control everything. So when we are creating the polygon we use the following function to capture the new snapped point using the snapping feedback object. Is there some events I can tap into that'll allow me to tap into the editing vertices and update the mouse pointer to a snapped location?                   /// <summary>         /// Updates a point to a snapped point         /// </summary>         /// <param name="currentPoint"></param>         /// <returns></returns>         private IPoint UpdateSnappedPoint(IPoint currentPoint)         {             ISnappingResult snapResult = null;             IPoint point = currentPoint;                  if (_snapEnabled && _snappingFeedBack != null)             {                 snapResult = _snappingEnvironment.PointSnapper.Snap(point);                 _snappingFeedBack.Update(snapResult, 0);             }                  if (snapResult != null)                 point = snapResult.Location;                  return point;         }      Niroshan


List attribute values of selected points in the layer

I need to grab the fields in the layer of the selected points in the order they were selected by the user. My code: Connection to the database and display the map on the screen, everything ok: > >     uri = QgsDataSourceURI() >     uri.setConnection("localhost","5432","SpatialTeste","postgres","130999") >     uri.setDataSource("public","Paradas","geom") >     vlayer = QgsVectorLayer(uri.uri(),"Paradas","postgres") >     QgsMapLayerRegistry.instance().addMapLayer(vlayer) >   Then the user selects some points in the layer and the code should show me the fields and these points on the island, but did not work well:               import processing     features = processing.getfeatures(vlayer)     for feature in features:         attrs = features.attributes()         print attrs      I need to capture the fields selected in the layer points to send for a postgis table. I have no experience in qgis development, however I believe it is something simple to do, can you help me?


How do I peform a true GIS Clip of polygons layer using a polygon layer in R

I would like to do a true GIS Clip in R of soils polygons using a series of single boundary polygons, but I cannot find an R function to properly do it. It should work just like the CLIP function in ESRI's ArcMap. I've tried the Over method in SP package but it doesn't seem to work for polys over polys. One suggestion was to use the gIntersection in rgeos package as a Clip using following code:               #------------------------------------     library(rgeos)     library(maptools)          #Read layers as SpatialPolygonsDataFrame (both the same Albers projection)     Soils_poly = readShapePoly("Soils_polygons")  #Note - Has 400 polygons     clipper_poly = readShapePoly("clipper_polygon")  #Note - Has 1 polygon          #Try gintersection as clip      Clipped_polys = gIntersection(Clipper_Tile_poly, Soils_poly)          #-----------------------------------      This takes 5 minutes to run (way too slow) and errors with this: > Error in RGEOSBinTopoFunc(spgeom1, spgeom2, byid, id, drop_not_poly, > "rgeos_intersection") : TopologyException: no outgoing dirEdge found at > -721459.77681285271 2009506.5980877089 I also tried this code to check for overlap:               gIntersects(Clipper_Tile_poly, Soils_poly)      and result was TRUE. CLIP function in ESRI ArcMap works fine for this data. Anyone know of an R function to properly do a Clip on spatial polygons using spatial polygons?


Help needed with query task results to show in dojo Grid?

I am trying to create a search widget where the HTML tempalte of the search is as follows:

                                              <input id="searchText" type="text" data-dojo-type="dijit.form.ValidationTextBox" data-dojo-props="name:'searchText',trim:true,required:true,style:'width:100%;'"                         />

                     Search

               Id	               ASTName

      The Search.js code where the actual query task functions is called is as below:               define([     'dojo/_base/declare',     'dijit/_WidgetBase',     'dijit/_TemplatedMixin',     'dijit/_WidgetsInTemplateMixin',     "dijit/registry",     'dijit/form/Form',     'dijit/form/FilteringSelect',     'dijit/form/ValidationTextBox',     'dijit/form/Button',        "dijit/layout/ContentPane",     "dojo/data/ItemFileReadStore",     'dojox/grid/DataGrid',     'dijit/TooltipDialog',     'esri/tasks/query',     'esri/tasks/QueryTask',     'esri/config',     'dojo/store/Memory',     'dojo/_base/lang',     'dojo/_base/array',     'dojo/text!./Search/templates/Search.html',          "dojo/domReady!"          ], function (declare, _WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, registry, Form, FilteringSelect, ValidationTextBox, Button, ContentPane, ItemFileReadStore, DataGrid, TooltipDialog, query, QueryTask, esriConfig, Memory, lang, array, searchTemplate,dom) {          //anonymous function to load CSS files required for this module     (function () {         var css = [require.toUrl("gis/dijit/Search/css/Search.css")];         var head = document.getElementsByTagName("head").item(0),             link;         for (var i = 0, il = css.length; i < il; i++) {             link = document.createElement("link");             link.type = "text/css";             link.rel = "stylesheet";             link.href = css[i].toString();             head.appendChild(link);         }     } ());          // Main search dijit     var Search = declare([_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin],      {         widgetsInTemplate: true,         templateString: searchTemplate,         map: null,         defaultTitle: null,         queryTask: null,         query: null,         _store1: null,        _selectorOne: null,         postCreate: function () {             this.inherited(arguments);             this.queryTask = new esri.tasks.QueryTask(this.queryTaskURL);             this.query = new esri.tasks.Query();             this.query.outSpatialReference = this.map.spatialReference;             this.query.returnGeometry = true;             this.query.outFields = ["id", "ASTName"];         },         search: function() {                  //this.query.where = "APP_ID like '%" +    dom.byId("searchText").value + "%' OR PAMS_PIN LIKE '%" + dom.byId("searchText").value + "%'";             this.query.where = " id like '%" + registry.byId("searchText").value + "%'";             this.queryTask.execute(this.query, lang.hitch(this, function (results) {                  //alert(registry.byId("searchText").value);                        var grid = this.grid;                  this._selectorOne = this.grid;                  this._selectorOne.id = "grid";                      var resultItems = [];                 var resultCount = results.features.length;                                   for (var i = 0; i < resultCount; i++) {                     var featureAttributes = results.features[i].attributes;                          for (var attr in featureAttributes) {                                   resultItems.push("" + attr + ":  " + featureAttributes[attr] + "
");                     }                     resultItems.push("
");                 }                                        //create array of attributes                                                              var dataItems = {                                   identifier: "id", //This field needs to have unique values                                   label: "id",                                   'items': resultItems                                          };                                             store = new ItemFileReadStore({ data : dataItems });                                         grid = registry.byId("grid");                                         grid.setStore(store);                                                     }),                      function (err) {                     console.log(err);                 });         },     });     return Search;     });      I would like some expert advice on what i may be doing wrong here as i am not not able to show the query task results in the grid. Thank You


3D functions with SFCGAL in PostGIS

I have this setup: `"POSTGIS="2.1.2 r12389" GEOS="3.3.8-CAPI-1.7.8" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.9.2, released 2012/10/08" LIBXML="2.7.8" LIBJSON="UNKNOWN" TOPOLOGY RASTER"` on PostgreSQL-9.3 I installed CGAL 4.4 and SFCGAL               ~# sfcgal-config --version     1.0.4      I would like to use 3D functions (ST_Extrude....etc) in my exiting databases, is it possible? I cant find proper information about this topic.


PostGIS - area-weighted calculation on an intersection

I'm trying to learn postgis sql by performing some familiar operations from ArcGIS. Here, I want to perform an area-weighted calculation of certain populations on the intersection of a set of parcels with census blocks. I have parcels `parcels`, parcel attributes `parcelinfo`, census blocks `census`, and census attributes `tgr39035sf1blk`. This calculation would entail   1. Calculating the area of each census block   2. Intersecting census blocks and parcels   3. Calculating the area of each polygon in the intersection of census blocks and parcels   4. Calculating the area weighted value of each attribute (attribute value * (area of polygon / area of census block) In order to test ST_Intersection, I tried the following, but phppgadmin craps out (no error message, a proxy error):               SELECT ST_Intersection(p.the_geom, c.the_geom) as inter from parcels p, census c;      I could sum the attributes from each block that intersects with a parcel, but that is, obviously, a seriously flawed approach. E.g.,               SELECT   sum(DISTINCT t.pop2000), sum(DISTINCT t.males)     FROM     parcels p, census c, tgr39035sf1blk t     WHERE ST_Intersects(p.the_geom, c.the_geom) AND c.stfid = t.stfid;      I'm sorry if I'm missing any essential, additional information. I'm a novice at this. Thanks in advance for any help you can provide.


Worldwide places reachable by sea/ocean

I'm looking for a list of all populated places(not just big cities/ports) on the world that reside on sea/ocean. The list should contain the place name, latitude and longitude. Does something like that exist somewhere? UPDATE:   A bit more details: The reason I'm asking for this is because of my project requirement. I need to build a web service which can let people select a place in a list of all possible places in the world(Listed for example in GeoNames DB) but which are on the sea or ocean. The user then gets meteorological data that is related only to places which are on the sea. Like tides, sea temperatures and other more specific info related to the project. Allowing the user to select a place which is not on the sea would simply make no sense.


How to compile GDAL with HDF4?  (for dummies)

I need GDAL with both Shapefile and HDF4-Support, if possible in 64 bit. Since the normal GDAL-versions from http://www.gisinternals.com/sdk/ have Shapefile, but no HDF4 and the version from FWTools has HDF4, but no Shapefiles (EDIT: see below), Im afraid I have to compile a GDAL-version by myself. The problem is that Im 'just' a geographer with programming skills, but no real IT-expert, and Ive never compiled open source by myself, so maybe my question is quite simple for you. :) First Ive downloaded the source code from http://trac.osgeo.org/gdal/wiki/DownloadSource. The I opened makegdal90.vcproj with Visual Studio 2010. It needed to do some updates, then it opened. If I compile it without changes, I get a GDAL-folder with a new GDAL19.dll. If I try to use this whole folder in my C#-project that works with normal GDAL- versions, I get a error. But if I only copy the new GDAL19.dll over the old one in the existing GDAL(32 bit)-folder it works. Is this how it should be or is something going wrong here already ? The second step is to switch to 64bit, in nmake.opt I changed the following entry: Uncomment the following if you are building for 64-bit windows (x64). You'll need to have PATH, INCLUDE and LIB set up for 64-bit compiles. WIN64=YES Then I changed the setting of the VS-project to X64 and compiled again. It still works as before: I get a new GDAL19.dll that works fine in my old GDAL(64 bit)-folder. But then I cant do the third step, including HDF4. I found and changed the following section in nmake.opt: Uncomment the following and update to enable NCSA HDF Release 4 support. HDF4_PLUGIN = NO HDF4_DIR = C:\HDF HDF4_LIB = /LIBPATH:$(HDF4_DIR)\lib Ws2_32.lib I tried it maybe 100 times, but it never worked. Sometimes I get a corrupt GDAL19.dll, sometimes I get >100 errors when compiling and sometimes I get a working GDAL19.dll without HDF4-support. I've read almost every Google-hit in English and German I found, but it never worked. One problem is that the files mentioned there do not exist in the HDF- versions Ive downloaded. I guess, this tips were for much older versions of GDAL and HDF4. So can anybody give a step by step tutorial "How to compile GDAL with HDF4 for dummies" ? ;) I need to know which HDF4-files I need, where to get them, and what exactly I have to write in nmake.opt. Or is there a ready to use GDAL- download with HDF4 and Shapefiles somewhere ? (32 bit would be OK to, that isnt that important) EDIT PS.: I found out that FW-Tools-GDAL has Shapefile-support, its just my C#-project that cant use the vector-part of this old GDAL-version. In newer GDAL-versions Im able to use vector- and rasterfiles with the same code, but unfortunately they dont have HDF4.. Maybe I need an older version of the C#-GDAL-bindings ? Has anybody used FW- Tools-GDAL in a C#-project with Shapefiles ?


UK Postcode boundaries

Before I go and pay is there a free source for UK Postcode Boundaries, ideally down to Postcode Sector level ("AA00 0" or even better "AA00 0A")? Failing that can I generate them in QGIS if I have the postcodes?


Counting distinct values in a field of a table stored in pgdb

I need to calculate total count of distinct values of a field . That field contains many duplicate values also. The table which contains that field is stored in pgdb. I want things done in vb .net. Any help is appreciated.


How to use Python modules as data providers in QGIS?

I don't know if it has been discussed in the past. Qgis data providers can only load native compiled libraries (.so, .dll, etc) that offer the required interface. Is there anything blocking to the possibility of having python data providers? Would it be possible to have them loaded along the native ones, or dynamically through some API method?


Cannot Overlay PNG onto Map with OpenLayers

I am trying to create an `OpenLayers.Layer.Image` and incorporate it into my map. I have this block of code:               map = new OpenLayers.Map ({                 div: "dvMap",                 theme: null,                 projection: new OpenLayers.Projection ("EPSG:4326"),                 maxResolution: 360 / 512,                 center: new OpenLayers.LonLat (-80.92, 40.51),                 zoom: 6,                 layers: [                      new OpenLayers.Layer.TMS ("TarigmaOSM",                                                "http://" + maphost + "/cgi-bin/tilecache/tilecache.cgi/",                                                {                                                     serviceVersion: "1.0.0",                                                     layername: "osm",                                                     type: "png",                                                     attribution: "Data CC-by-SA OpenStreetMap"                                                }),                     new OpenLayers.Layer.Image ("WeatherImage",                                                 "http://localhost:8080/data/get/weather/radar?stationID=2&productID=2&anticache=" + (new Date ()).getTime (),                                                 new OpenLayers.Bounds (-78.977468899814, 38.770277779319, -84.7329398692738, 41.9763540510698),                                                 new OpenLayers.Size (600, 550),                                                 {                                                      })                 ]             });      When I run this, I get my `TarigmaOSM` layer (base map) just fine, but I don't even see the request for the image layer file in Firebug, nor do I get any problems. Does anyone have any idea what's going on here and/or what I'm doing wrong?


OpenLayers - a GeoJSON layer

OpenLayers can parse GeoJSON in order to create an array of features. So, it is possible to create a layer from GeoJSON input by simply parsing it and then adding the features to a new vector layer. So, my current solution sends an AJAX request with the current map extent as a parameter and when the server returns the GeoJSON data, it parses them, then clears the layer and puts the newly received features into the layer. However, I wonder if OpenLayers can do this automatically. Is it possible to create a layer that requests new GeoJSON data after being moved (e.g. using the BBOX strategy), parses the data and then adds them to the layer? The same way it is done with WFS, for example. I tried this code:               vectorLayer = new OpenLayers.Layer.Vector("Address points", {         projection: MAP_PROJECTION,                 strategies: [new OpenLayers.Strategy.BBOX()],         protocol: new OpenLayers.Protocol.HTTP({           url: "my-webserver-that-gets-map-extent-and-returns-GeoJSON-encoded-features",           format: new OpenLayers.Format.GeoJSON(),           callback: function() { alert('Did at least something happen?'); }         })     });      Firebug shows that the AJAX request is really being sent every time when I move the map and the server really replies with the GeoJSON data. I used the OpenLayers GeoJSON parser to verify if those data form a correctly structured FeatureCollection, and they do. However, the features do not appear on the map. I tried the `OpenLayers.Control.DrawFeature` to draw some points to the map manually and it works ok, so the layer is definitely added and set to visible. The callback function apparently isn't invoked at all (as there is no alert message). Any hints as to what could be wrong, please?


Creating a bounding box to pull from cache

I have a simple python script that is pulling in lat,longs from company's db and we are trying to create several bounding boxes around these points to simulate zoom-levels. The script will pull tiles from the geoserver, but will not pull from cache. In the geoserver url, I have tiling enabled, but I have been told that the BB's I created do not line up with the "grid" for tiling, so it won't pull from geoservers cach? The documentation makes it seem like i should be able to pull from cache anyway.....any ideas?


how to compare multiple time series of raster files

I am looking for the best way to compare the spatial patterns of multiple time series composed of many raster files, in **R**. The cell values of each raster is continuous, and I am comparing time series created using 3 different methods. > Some details concerning the data: > > The time period is the same for the 3 methods: 01.Jan.2000 - 31.12.2013 > > TSMethod1: rm1_01012000,rm1_02012000,rm1_03012000,...,rm1_31122013 > > TSMethod2: rm2_01012000,rm2_02012000,rm2_03012000,...,rm2_31122013 > > TSMethod3: rm3_01012000,rm3_02012000,rm3_03012000,...,rm3_31122013 I am looking for spatial patterns of high values. For each day in each method I want to check were they are located and how much they change between the three methods (if they are all close, or how much their distance is). Is there any available spatial-temporal method in R I can use to do this type of analysis? I can use the data in raster, matrix or point format.


Problem with Geometry SRID in PostGIS

I ceated my table (borne) in PostGIS               id_borne serial NOT NULL,       num_borne character varying,       shape_borne geometry      I successfully changed the SRID of my table using               select UpdateGeometrySRID('public', 'borne', 'shape_borne', 26191) ;      The old SRID was 0. The problem is that when I try to add a new element to my table `borne` I have this message error:               geometry srid (0) does not match column srid (26191)      * * * ![enter image description here](http://i.stack.imgur.com/iRulw.png) That is my problem! The SRID is updated but when I try to add a new point, I get this message.


Opening Spot 5 DIMAP imagery in GDAL

Would like to know if someone is familiar of opening SPOT 5 DIMAP imagery using GDAL. Though the GDAL provides DIMAP driver, when I tried to open, it can not show the geotransform and geoprojection.


How to calculate the area of rasters in QGIS?

I have been working with some rasters and would like to know how to calculate the area occupied by one element of a raster in Qgis.


GeoServer cascading WMS, FeatureInfo is lost

I'm trying to cascade a WMS service in GeoServer (http://grb.agiv.be/geodiensten/raadpleegdiensten/GRB/wms?REQUEST=GetCapabilities&SERVICE=WMS). I can view the cascaded layers just fine, but whenever I try to get FeatureInfo from a cascaded layer I get an error message saying that the layer isn't queryable. I can get the FeatureInfo from the original service, so I know that there is actual FeatureInfo on the original layers. I've combed through every available WMS setting in GeoServer but only found the 'Queryable' option in the 'WMS Settings' panel in the Publishing tab of the cascaded layers, which is obviously enabled. Is there anything I'm missing, or is it just not possible to get FeatureInfo from a cascaded WMS service?


Is it possible to change a Geotiffs CRS?

Hi I have created a Geotiff from the Bing Aerial photography. As it is automatically in WGS 84 it inserts perfectly into QGIS, however this image is of no use to me outside of QGIS. I need to convert this referencing system from WGS84 to OSGB 1936. Is this possible at all? I am using QGIS 1.8.0 on windows 7 and i am not great with Grass, and need to import the image into AutoCAD at some stage.


Is it necessary to use cachewrite control to use cacheread in openlayers?

the question is very simple. i want to use the OpenLayers.Control.CacheRead control to load and store tiles when the connection is fast e.g. with wifi network. then use the same device in other places where there is slow or no connection e.g. gprs network. the examples i have found are not clear on implementation? For my mobile application, i would like to locally cache the tiles. This i think can be done by CacheRead, my question is do i need to use CacheWrite to use CacheRead Control or it will be handled by the browser's cache? and in case i use cachewrite, how can i clear the cache so that new changes in server are visible? i am trying to cache OpenStreetMap tiles.


Showing menu based on right click on Point Geometry in Javascript

I have implemented a vector layer(using javascript) in open layers which is having point geometry. Now my requirement is to show menu just besides with the point whenever we do right-click on point. Can we do this in Open Layers? Thanks, Gajendra


OSGB36 to WGS84 reprojection 'error'

First off, I am a recent convert to QGIS and am greatly impressed with its ease of use and speed compared with the ESRI products with which I am more familiar - my congratulations and thanks to its developers (including the plug-ins). I have surveyed (and corrected) DGPS (vector point) data collected to OSGB36 (British National Grid); these positions match acceptably well with the OSGB36 map layers to which I have access when imported as CSV and converted to SHP in QGIS, projected using EPSG:27700 (~1m error, although error could be in map layer which is suspect). I'm attempting a four-stage export from QGISv1.7.4 to Google SketchUp (SU) via Google Earth (GE), as follows: stage 1: In QGIS, Save as../KML with CRS set to WGS84 EPSG:4326 (or ETRS89);   stage 2: Open KML in GE;   stage 3: Save as KMZ;   stage 4: Open in SU. Unfortunately, the exported WGS84 positions in the KML file are in error by ~8m - I've checked them against OSTN02 conversion using tool on OS website , I've also checked GE projection (by eye: converting GE lat/long to OSGB36 and comparing with OSGB36 vector map layer). (SU fails to open the KMZ file as well, but that's not a QGIS issue, I imagine - any hints welcome...). So the evidence seems to point towards an error in the transformation from OSGB36 to WGS84 in stage 1, i.e. with QGISv1.7.4. Any suggestions as to where the fault in my process might lie, or to an alternative approach, gratefully received... thanks - JS


Looking for a Wind WMS for Europe and Africa

I was looking for a wind WMS but couldn't find. I wanted a wind WMS for europe and africa . Does anyone know about one? thank you


What is the significance of the SDE lineage length?

ORA-55378 left a great answer to my question: Does a high number of SDE_state_lineages slow performance? But, I realized I don't really understand what lineage length means and how it affects performance? Using the example on this ESRI technical article:               VERSION NAME              LINEAGE LENGTH     ------------------------- --------------     TOM.WORKORDER_I0C6531     21     TOM.EDITOR_TB             25     ERIK.WORKORDER_I910313    78     BRENT.DESIGN_F831         92     BRENT.DESIGN_F831_ALT_1   94     BRENT.DESIGN_F831_ALT_2   95     SDE.MAPPING_DEFAULT       138     SDE.LANDBASE              169     SDE.DEFAULT               249     ERIK.EDITOR_EH            275     STEVE.EDITOR_SM           289      What do these lineage lengths actually mean? What is the significance of a length of 289?


Weighted heatmap analysis- density of points, vs density of weight variable

Was just wondering if anyone could help me with a problem. I'm trying to map wellbeing scores (out of 10), using locations from a survey of 15,000 households, using the HEatmap command in QGIS. It's an unclustered sample, but obviously the density of points is dependent on the population density of the area. I'm using wellbeing score as a weight in the heatmap, but unfortunately every map I produce is effectively a map of population density. I have tried multiple ways of weighting the wellbeing score to factor in the differing densities of points (so scores in areas with only a few data points are weighted, up and scores in dense areas are weighted down), but the heatmap looks effectively the same every time. Is there any sensible way of doing this? Thanks.


ArcGIS License question: Any restrictions on calling arcpy from non-esri web service?

I recently saw some success calling a python geoprocessing script from Node.js. I was also thinking of using flask instead of an arcgis server geoprocessing service. Does anybody know if there are restrictions on calling arcpy from non-esri web service from a license perspective? _**Disclaimer:** No advice will be interpreted as legal counsel, just looking for general knowledge._


Samples of US Residential or business addresses without zip+4?

I'm looking for a few deliverable residential or business addresses without a zip+4. By "residential or business", I mean, not a PO box and not military addresses. According to this answer on Ask.com, such addresses do exist, but I'd like to see some samples.


Creating a mosaic dataset from pre-existing mosaic datasets

I wanted to see if anyone has tried this, or knows of any issues that may arise from performing such a procedure: I have about 20 mosaic datasets already created in separate file geodatabases. I want to create a new mosaic, containing all 20 previously created mosaic datasets. I am not trying to create a referenced mosaic dataset, and when I have tried to being in all the raw data, like the original mosaic datasets, there were overlapping issues in regards to the DEM tiles aligning with the ESRI GRID mosaic. I wanted to get some input before running this long process. All the data is 32 bit-floating point and I was planning to build new overviews once the process completes. Are there going to be data quality issues when using multiple mosaic datasets as my data inputs compared to using raw DEM data?


Is it possible to give 2d contours a Z-height from their attribute table in QGIS? (Or ArcGIS?)

I have a contour data file downloaded from UK Ordnance Survey, which gives 2d contours of an area in gml format (also supplied in .shp format) with the heights of each contour attached to the attributes of each line. I want to give the contours a Z value of the height attribute attached to it, so that I have a 3d contour file I can then use in QGIS to create hillside shading etc, and potentially export to dxf/dwg. Is there a way to do this without manually moving each line? I was hoping for an actual tool I can use, as I have no script experience - I am willing to learn this if necessary, but would appreciate it if any answers that might refer to scripting please be as patient as possible, as I am clueless with where to even start to run a script! I'm using QGIS at the minute but also have access to ArcGIS 9.2 (though none of the add-on program packages, just basic ArcMap.) Thanks - Lisa


How to loop through all columns in a table/layer getting all data for a row/feature in MapBasic?

I'm trying to extend this GNU-licensed plugin MI2SVG, which converts MapInfo maps to SVG, so that it writes associated table data into the SVG it creates, so that browser based JS web applications can read map data from MapInfo- created interactive maps. It's going well except **I can't find the MapBasic way to loop through all columns for one row in a layer** , in a way that gives the index (column name or name) in each iteration alongside the data. The only MapBasic loop examples I can find are for looping through table rows using the very specific `Do While Not EOT()`, which seems to be always used for rows and doesn't appear to give each iteration's index (or if it does, I can't see where). * * * So for example, here's code that loops through rows in a layer table i.e. features in a map and prints the contents of column 1 into a string:               sLayer = LayerInfo (nMap, nLayer, LAYER_INFO_NAME)          'Initialize alias variables     aObj = sLayer + ".obj"     aRow = sLayer + ".rowid"     aCol = sLayer + ".col1"             'Convert each feature in the layer to SVG     Fetch First From sLayer     Do While Not EOT(sLayer)         objA = aObj         nRow = aRow         sCol = aCol         'some code that prints SVG like "<path name="""&sCol&...etc      How would you loop through all the columns, getting index and values for each? My ideal output would be, instead of `name="""&sCol&"""` a string like this: `data-col1="[col1data]" data-col2="[col2data]" data-col3="[col3data]"` for tables with any number of columns, printing the index (name or number) and value concatenated with some other text for each column. * * * I'm guessing it would be something like this (but with `???`s replaced with actual things I can't find in the MapBasic reference and User Guide):               Fetch First From sLayer     Do While Not EOT(sLayer)         objRow = aObj         sOutput = ""              Fetch First From objRow         Do While Not ???(objRow)            sColumnName = ????Info ( someArgs?, ????_????_NAME )            nColumnIndex = ?increment???                 'Not sure what type for this variable since data could be string or numeric?            ?ColumnData =  objRow.col(nColumnIndex)                 outputString = outputString & " data-"&sColumnName&"="""&?ColumnData&"""      ...or maybe instead of `Do While Not ???(objRow)` a for..next loop :               nColumnCount = objRow.???NumberOfColumns??? 'or' TableInfo( nLayer??, TAB_INFO_NCOLS )      for nCounter 1 To nColumnCount        sColumnName = ????Info ( someArgs?, ????_????_NAME )        ?ColumnData = objRow.col(nColumnIndex)        'some code that prints SVG like "<path name="""&sCol&...etc     next      ...but despite wading through the MapBasic reference, user guide and trying to fill in the gaps with http://testdrive.mapinfo.com/ I can't find what to use to fill those blanks.


SDE Feature Class - Coded Values and Existing Data

I have a SDE Feature class with ~2500 features. Of course all of these have several attributes. I want to use this feature class for a Feature Service, so users are able to add new feature the the existing feature class via a WebGIS. To keep the database ADJ homogenous, I've added some domains to the SDE Feature class with coded values. The values are covering all possible values of each attribute. So....Now I can use the Feature Service with predefined values. I can use a list of the coded values and choose the one, which is the right one. But my problem: The ~2500 existing data have a problem with the coded value domain. One exmaple: http://imgur.com/JzclX4p The coded values are defined for the village attribute. As you can see, the existing value is cleared and I have to add one of the coded value list. Is there any way to solve this? Thanks! P.S.: I work with ArcGIS Desktop 10.2, ArcGIS Server 10.2 and a Enterprise Geodatabase based on postgreSQL.


How do you pass parameters for Proj4js implementation with OpenLayers

I am using Proj4js along with OpenLayers for the transformation of x,y (projection type is Transverse Mercator) to long, lat. While executing "inverse()" method what I noticed that in tmerc.js some "this.ep2" parameter is used with in the formula and the value of this parameter is "NaN". Because of this the transformation is not working. I am guessing that this is happening because perhaps I am not initializing required parameter with in the definition file of the source coordinate system. So, could anyone help me in knowing which parameter for "this.ep2" has to be passed in definition file? Thanks in advance


How do I change the polygon fill color and border color for SpatialPolygons objects?

I have SpatialPolygons or SpatialPolygonsDataFrames which I'd like to plot. How do I change the color using the three plotting systems in R (base graphics, lattice graphics, and ggplot2)? Example data:               library(sp)     Srs1 = Polygons(list(Polygon(cbind(c(2,4,4,1,2),c(2,3,5,4,2)))), "s1")     Srs2 = Polygons(list(Polygon(cbind(c(5,4,2,5),c(2,3,2,2)))), "s2")          SpDF <- SpatialPolygonsDataFrame( SpatialPolygons(list(Srs1,Srs2)),                  data.frame( z=1:2, row.names=c("s1","s2") ) )     spplot(SpDF, zcol="z")      ![test map](http://i.stack.imgur.com/DIIle.png)


3D Analyst Line of Sight: what am I doing wrong?

As a relatively new user to GIS trying out 3D Analyst tools, I'm trying to run a Line of Sight which is not working the way I'd expect. Note I'm running the tool straight from the toolbox, no python or modelbuilder at the moment. I have an observer point shapefile, which I want to be 2m above the terrain I've set up in the arcmap file (I have set up an attribute field called 'OFFSETA' containing '2' in this point shapefile,) and I have about 8 target points in a seperate point shapefile, which should be 130m above the terrain (I've set up an attribute field here called 'OFFSETB' containing '130'.) I've used the 'Construct Sight Lines' tool, (specifying the OffsetA and OffsetB fields for respective heights,) and then run the 'Line of Sight' analysis on the resulting lines using the terrain in the file, and I'm getting 8 completely red polylines running from my observer point to my 8 target points, showing no visibility. However, I **KNOW** from a viewshed analysis from another program, and also a 3D model from another program, that at least one of the my target points is visible at these heights and with this terrain data. So my question is, what am I doing wrong here? I'm running this whole process in ArcMap, should I be doing it in ArcGlobe? Do I need to specify somewhere that the OFFSETA and OFFSETB values are on top of the Z values of the terrain at those specific points? (I'd assumed, possibly wrongly, it would automatically allow for this, but maybe it's all running underground?!) Is there a simple way to specify this or do I need to query the terrain elevation at these points and add manually to my height above ground? I also found this question [ Using line of sight or something similar to identify where lines go through hills ] which seems to suggest the tool is generally quite unreliable / inconsistent? So I'm not sure if I'm missing something in the process or if it is generally just not a good tool to use. Any help or advice much appreciated. EDIT: Note, it seems to work if I just use the shortcut button on the toolbar and point and click on the map - it looks completely different doing it like this and much more like what I'd expect, with parts of the line green and parts red. But I want to be able to use the shapefiles I have as exact inputs!


how to differentiate between common parts of the triangle and extract linestring from it

Can you help me break down shape A to different linestrings: lines _2 & 3_ AND line _1_? The shape contains three different polygons (A, B, C). I wish to determine the start/end point of each part with the common points of the other polygons. I'm using Postgis 1.5 / Python Shapely ![A1](http://i.stack.imgur.com/NNOL7.jpg)


Adding "SelectByRectangle" tool to ArcMap custom toolbar Add-In

I am able to show the other esriArcMapUI selection tools in my custom toolbar, but "Select By Rectangle" does not appear. What is the correct Tool refID of it?               <ESRI.Configuration xmlns="http://schemas.esri.com/Desktop/AddIns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">          <AddInID>{6fa0df73-57ab-491e-a73d-e58ce07af414}</AddInID>       <Description>Test custom toolbar.</Description>       <Version>1.0</Version>       <Image>Images\SelectionSample.png</Image>       <Author>test</Author>       <Company>ESRI</Company>       <Date>6/6/2013</Date>       <Targets>         <Target name="Desktop" version="10.1" />       </Targets>       <AddIn language="CLR" library="SelectionSample.dll" namespace="SelectionSample">         <ArcMap>           <Commands>                     <ToolPalette id="ESRI_SelectionSample_ToolPalette" caption="Selection Palette" isMenuStyle="false" category="Framework AddIn Samples" >               <Items>                 <Tool refID="esriArcMapUI.SelectByRectangleTool" />                   <Tool refID="esriArcMapUI.SelectByPolygonTool" />                 <Tool refID="esriArcMapUI.SelectByLassoTool" />                 <Tool refID="esriArcMapUI.SelectByCircleTool" />                               </Items>             </ToolPalette>         </ArcMap>       </AddIn>     </ESRI.Configuration>


Custom Coordinate System

We have a number of custom local coordinate systems at work. I'm trying to create a well known text coordinate system for each of them however I'm stuck on how to define these systems they . Some variables i'm aware of. centre of latitude longitdue **-27 22 27.1954, 153 10 46.5722** (lat,long) GDA94 Zone56 centre **517760.037, 6972102.441** (E,N). We set this coordinate to **3800.192,3129.572** then rotate the file about it by **-57.975833** and scale it by **1.000400336** (this is a cad **move rotate scale** operation not a **re-projection** as such) The only thing I've come close to getting a similar result has been a stereographic coordinate system ... but this scales in all directions? We require a cylinder type operation as our area of work is more rectangular and it will give greater accuracy along the centre of work. Can anyone help me define a WKT coordinate system for my proect? updated wkt code ... im not sure on how to define the rest of the coordinate system help?               FITTED_CS["FIG",           PARAM_MT["Affine",                     PARAMETER["elt_0_0", 3800.192],                                      PARAMETER["elt_0_1", 3129.572],                                      PARAMETER["elt_1_0", -0.53027691844514246],                                      PARAMETER["elt_1_1", 0.84782450410702548],                                      PARAMETER["elt_2_0", 0.84782450410702548],                                      PARAMETER["elt_2_1", 0.53027691844514246]                                      <need long lat of swing point somewhere?>                   ],      what is exported from my software ...               PROJCS["FIG",      GEOGCS["FIG",       DATUM["D_EPSG:6283",          SPHEROID["EPSG_7019",6378137,298.257222096042]         ],         PRIMEM["Greenwich",0],         UNIT["Degree",0.017453292519943295]      ],      PROJECTION["CSMAP:54"],      PARAMETER["Central_Meridian",0],      PARAMETER["Latitude_Of_Origin",-27.3742209444444],      PARAMETER["Scale_Factor",1.000400336],      PARAMETER["False_Easting",0],      PARAMETER["False_Northing",0],      PARAMETER["A0",3800.192],      PARAMETER["A1",-0.53027691844514246],      PARAMETER["A2",0.84782450410702548],      PARAMETER["B0",3129.572],      PARAMETER["B1",0.84782450410702548],      PARAMETER["B2",0.53027691844514246],      UNIT["Meter",1]     ]


How to export decision tree in ENVI to word document

I'd like to include Decision tree in ENVI which I used to classification of land cover types in my paper. Is there any direct way to export this tree into JPEG, TIFF format or word document instead of doing it again in another program. Thanks in advance


Selecting a polygon within polygon where part of its boundary is the same. PostGIS

I would like to know how can I select a A_polygon within B_polygon, but part of the boundary of the A_polygon touch the B_polygon boundary. In Postgis 2.0, I tried few options but they didn´t work (st_contains, st_containsproperly, st_intersect, etc.). ![enter image description here](http://i.stack.imgur.com/5Rdy3.jpg) Thanks!!


Is QGIS compatible with PostgreSQL 8.4 Advanced enterprise DB with Oracle compatibility?

Sorry for such a long question. We are trialling EnterpriseDB Postgres Plus Advanced Server 8.4 with Oracle compatibility and PostGIS 1.5.1. I can create a connection to the database in qgis and the test connection is successful. However when I actually connect to the database to view the available tables i get the error below. I understand that the utl_smtp is a schema related to the oracle compatibility portion of the install, so I assumed that opting for the value "Only look in the geometry_colums table" would have solved the problem. Unfortunaley not! Has anyone else encountered this? Or more importantly solved this? ![alt text](http://i.stack.imgur.com/DeobJ.png) Thanks Andrew


Creating multiple folders named by a list in python

I am trying to make a python code to create folders named by a list of int and strings, the code below is returning an error, it works when the list is made of strings only, can anybody help ?               import os     root_path = 'C:\Users\AHemeda\Desktop'     folders = [123, 34, 'Oslo', 'Berlin']     gh = folders     print gh     for folder in gh:         os.mkdir(os.path.join(root_path,folder))


How do I display latitude longitude data on a UTM map?

I'm relatively new to GIS, so I may use incorrect terms, but I'll try my best. I'm using ArcView 10. My current coordinate system information is as follows. ![Data Frame Properties](http://i.stack.imgur.com/szzUF.png) I believe this is correct, as it is the default coordinate system in our environment. I have a CSV file that includes information I'd like to display on a map alongside all the other GIS layers I have available. The problem I'm having is that the information in the CSV file is in latitude and longitude. I was able to "Add Data" to import the CSV file. The problem I'm having is displaying the data visually. Using the "Display XY Data" tool, I have the following settings. ![Display XY Data](http://i.stack.imgur.com/8utMs.png) When I click "OK", the data is plotted visually, but not where it should be. I think it's treating the relatively small latitude and longitude values as whatever projection the map is using. I can see the layer is displayed if I zoom out to 1:30,000,000, so I am successfully displaying the data, however it should be shown on top of the existing layers. Is there a way to convert the latitude and longitude data from a CSV file on import to display correctly? **Update:** Here's a sample ofthe CSV data I'm working with.               WorkOrder  Lat           Lng     00001      46.51169347  -84.32934394     00002      46.51232708  -84.33508238     00003      46.50809868  -84.32696865     00004      46.50980299  -84.33103097     00005      46.51359957  -84.33543261


Create data table in geodatabase

Using vb.net, my custom tool needs to create a data table in my geodatabase to store some information for later use. The user will be in ArcMap 9.3.1 with the geodatabase up and layers displayed. I want to create the table at the same level as the dataset. I can accomplish this with the following:                   gp = CreateObject("esriGeoprocessing.GPDispatch.1")         gp.AddToolbox("C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Data Management Tools.tbx")         gp.createtable_management("C:\Dan\Data\geodatabase.mdb", TableName, "", "")      However, the problem is I cannot figure out how to have the geodatabase be something other than hardcoded. How do I get the current geodatabase name and use a variable populated with that name in the createtable_management line? I've searched high and low for two days now with no luck. Thanks, Dan


Alternative repository for QGIS 2.0 plugins

Is there any alternative to the official repository for plugins of Qgis 2.0. I prefer to be a tested and trusted. EDIT: I found a source which refers to OpenGeo Explorer For more info: http://qgis.boundlessgeo.com/static/docs/intro.html


Downloading SRTM data

Is there an easy way to mass download SRTM data? The data is published for download here, but it's sliced into thousands of small files, and I don't see an FTP option for more efficient downloading... Another issue is that the server seems to die (or run out of bandwidth) when I use a download manager like the "DownThemAll" Firefox extension to get them. Is there a better resource for getting this data?


Alter validation in ArcGIS script tool

I have a script tool in ArcGIS 10.1. Some of the parameters are optional and if they are left blank, will not be processed. They are numerical parameters and I want to enforce this in the tool, so an error is raised if entering any letters in the parameter for example. I have achieved this in updateMessages() setErrorMessage(...) and I get the correct error raised (see graphic) ![enter image description here](http://i.stack.imgur.com/vJL0F.png) Validation code is as follows:                @staticmethod      def is_string(s):      try:        float(s)        return False      except ValueError:        return True      except TypeError:        return True          def updateParameters(self):     """Modify the values and properties of parameters before internal     validation is performed.  This method is called whenever a parameter     has been changed."""     return          def updateMessages(self):     """Modify the messages created by internal validation for each tool     parameter.  This method is called after internal validation."""          self.params[1].clearMessage()          string_error = 'Please input a number, not text'     if ToolValidator.is_string(self.params[1].value):       self.params[1].setErrorMessage(string_error)     if ToolValidator.is_string(self.params[2].value):       self.params[2].setErrorMessage(string_error)     if ToolValidator.is_string(self.params[4].value):       self.params[4].setErrorMessage(string_error)     if ToolValidator.is_string(self.params[5].value):       self.params[5].setErrorMessage(string_error)          return      However, the "internal" ArcGIS validation seems to clear the field. If the tool is run the same error message will come up. However since I want to be able to have a blank field, this is not optimal as there is now no way of entering a blank value because the error keeps coming up. Is there any way of preventing ArcGIS validation from blanking out the field so that it retains the original value entered, which is more intuitive? Also, I thought error messages were supposed to be red, not green - documentation for setErrorMessage() here.


error in overlapping layers in QGIS

I created two tables with PostGIS, within which I have inserted a shapefile of an Italian region (Apulia) in the first, and the coordinates in the second table. In both tables are set with the geometry srid 4326, but by importing layers into QGIS, layers are not properly overlapped. The procedure I followed is the following : I downloaded the following shapefile (link), and I created the sql script with command               $ shp2pgsql -a -c -D -s 4326 -I R16_01 public.puglia > puglia.sql      within the script, the geometry is added to the table in this way:               ALTER TABLE "public"."puglia" ADD PRIMARY KEY (gid);     SELECT AddGeometryColumn('public','puglia','geom','4326','MULTIPOLYGON',2);      similarly, for the table coordinates               SELECT AddGeometryColumn('public','coord','geom','4326','POINT',2);      then I insert into the table coord some coordinates, also occurred via google maps ...               INSERT INTO mapp (gid, cod_istat, geom)     VALUES (2,3, ST_SetSRID (ST_MakePoint (41.8976987992015, 16.121389858102294), 4326));      When I import the layers in QGIS , the overlap is not what I expect . The coordinates that I post are far away from where they should be.   what's wrong ?


lookup forms in QGIS

Bit of an open question but.... Is it possible to design a form in qt designer that will be used as a form against a qgis layer but interacts with a different table in postgres/postgis as a lookup table. For example, I have a postgis layer that i'm editing in qgis to capture the locations of shops. Some of the fields to capture are address, postcode and parish. Could I do a lookup to another postgres/postgis table to enable these fields to auto-populated my shops form field? Si


How display many layers from Geoserver in one map?

1) I publish 4 layers in Geoserver (planet_osm_line, planet_osm_point, planet_osm_polygon, planet_osm_roads). 2) Then I add styles (from sld styles) to the Geoserver. 3) Then I set this styles in my layers. 4) Now I want to see this 4 layers in browser. But i can't. Please, help me. Also do I need to create workspace before this 4 steps?


Data entry and manipulation using web pages

I am working on a project where we want to move a database from Microsoft Access to PostGIS, and we want the data entry forms to be web page based rather than forms within the Access database. I am in the process of migrating the database from Access to PostGIS and I have started to use Geoserver, OpenLayers and GeoExt to create maps on pages to look at the data. All this is working fine. My question is what are the best approaches to allow users to query/edit/enter the attribute and spatial data on the web page? Does anyone have any good links to any tutorials? Any help would be much appreciated. Many thanks, James


How to get the nearest point on a linestring to a given point?

I've been using PostGIS in a long time now but never had to use the LINESTRING geometry ... yet! :) Here's what I would like to do : I have a table of linestrings (representing streets of a given city, SRID 3395) and I would like to find the nearest linestrings to a given point (GPS position, SRID 4326). The solution I found is to select all the linestrings within my point using the `expand()` method and determine the distance between each linestring and my point using the `ST_Distance()` method. Here's the SQL :               SELECT myLineId, myLineName, ST_Distance(ST_Transform(GeomFromText('POINT(LON LAT)',4326),3395),myLineGeom) AS myLineDistance     FROM myLines     WHERE myLineGeom && expand(ST_Transform(GeomFromText('POINT(LON LAT)',4326),3395), 100)     ORDER BY myLineDistance;      The results I get looks pretty OK but I have the feeling something is wrong in my implementation. 1) Do you guys thinks the `expand()` can get all the concerned linestrings? 2) Do you guys thinks the `ST_Distance()` is the right method to use? I guess I'm doing it wrong since the distance I would like to get is the smallest distance between the point and my line and not the distance between the point and one point of the linestring. Thanks for any tips! Illustration: ![alt text](http://i.stack.imgur.com/UZvIL.jpg)


Leaflet WMS Layer from arcgis server (extreme noob question)

I am very new to GIS, and find things a bit overwhelming. Please be kind and excuse my ignorance. I am trying to display a map on a website using leaflet. The map I want to display is hosted from an arcGIS server here: http://ags.gis.iastate.edu/ArcGISServer/rest/services/Ortho/andreas/ImageServer This page lists a number of different interfaces, including WMS. The link to WMS info on the site has an error in it, but can be retrieved here: http://ags.gis.iastate.edu/ArcGISServer/services/Ortho/andreas/ImageServer/WMSServer?request=GetCapabilities&service=WMS I have a web page set up on the model of the leaflet quickstart guide (leafletjs.com/examples/quick-start.html) And that was displaying the map of London as expected. So I then found documentation on the leaflet L.tileLayer.wms function which gave this example               var nexrad = L.tileLayer.wms("http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi", {         layers: 'nexrad-n0r-900913',         format: 'image/png',         transparent: true,         attribution: "Weather data © 2012 IEM Nexrad"     });      based on this, I substituted information from the ags.gis.iastate.edu wms capabilities sheet (linked above) and added the addTo(map) as below               var andreas = L.tileLayer.wms("http://ags.gis.iastate.edu/arcgisserver/services/Ortho/andreas/ImageServer/WMSServer", {         layers: '0',         format: 'image/png',         transparent: true,         attribution: "Andreas atlas © Iowa DNR"     }).addTo(map);      [note I also tried transparent: false] Result: nothing. Can anyone point out what is probably a very obvious error, or lack of understanding on my part? Thanks!


Projection parameters for Gauss Kruger 7 zone Serbia

I can not set parameters for Gauss Kruger 7 zone Serbia


Is it possible to install the PostGIS to the PostgreSQL (binary version)?

I'm using the PostgreSQL 9.2.4 which is the no installation version.I run this by using the command "Program Files/PostgreSQL/9.0/bin/pg_ctl" -D "Program Files/PostgreSQL/9.0/data" -l "Program Files/PostgreSQL/9.0/log/pgsql.log" start"! And I tried to install the PostGIS 1.5.5 into the PostgreSQL server. It is not work! The template_postgis is created, but no tables was generated in the table folder! Would like to confirm, does the PostGIS need to be installed to installion version instead of binary version? Please advise. Thanks.


Google Earth Super Overlay to TIFF

is there a way to convert a raster Google Earth Super Overlay to TIFF? My GE source contains raster tiles. Thank you, a


How to use ArcObjects to choose GeoTransformation?

I’m currently building a Desktop add-in tool with ArcObjects that:   1. Asks a user to select a feature class   2. Reprojects the feature class to Web Mercator   3. Executes some geoprocessing The initial coordinate system of the feature class could be one of many different geographic or projected systems. As a result I need to also have the user select a GeoTransformation if necessary. Obviously, I could present the user with the huge list of transformation provided in the enumerations of esriSRGeoTransformationType, esriSRGeoTransformation2Type, esriSRGeoTransformation3Type. But that would be a huge list. What I’d like to do is narrow that list based on the input and output Coordinate Systems – but I have not been able to figure out how to do that narrowing. Anyone have experience doing this? I know there must be some way to do, because the Project Tool UI does exactly this narrowing operation. But I can’t find the method, despite an exhaustive internet search.


qspatialite error compiling Qgis 1.8 (linux debian squeeze)

I tried to compile Qgis 1.8 in linux debian squeeze (following the instructions in INSTALL.txt). During 'make' I get the following error: [ 40%] Building CXX object src/providers/spatialite/CMakeFiles/spatialiteprovider.dir/qgsspatialiteprovider.cpp.o /usr/local/qgis-1.8.0/src/providers/spatialite/qgsspatialiteprovider.cpp: In function ‘bool initializeSpatialMetadata(sqlite3*, QString&)’: /usr/local/qgis-1.8.0/src/providers/spatialite/qgsspatialiteprovider.cpp:4972: error: ‘spatial_ref_sys_init’ was not declared in this scope make[2]: *** [src/providers/spatialite/CMakeFiles/spatialiteprovider.dir/qgsspatialiteprovider.cpp.o] Error 1 make[1]: _**[src/providers/spatialite/CMakeFiles/spatialiteprovider.dir/all] Error 2 make: *_ * [all] Error 2 Any help to solve this? Oscar


How to calculate field as cursor name?

First time dealing with cursor. I have lines intersecting polygons, I want to get a table with all attributes of the lines, add a field and calculate the field as the name of the polygon. I was able to get a table for each polygon but I can't get to calculate the field and add the polygon name. How do I do? here is my code:               import arcpy     arcpy.env.overwriteOutput = True          arcpy.env.workspace = 'C:\\Users\\a391665\\Documents\\ArcGIS\\Default.gdb'     ws = 'C:\\Users\\a391665\\Documents\\ArcGIS\\Default.gdb'     Comuni = 'C:\\Users\\a391665\\Documents\\ArcGIS\\Sardegna3.gdb\\Comuni'     Linee = 'C:\\Users\\a391665\\Documents\\ArcGIS\\Sardegna3.gdb\\Linee'           rows = arcpy.SearchCursor(Comuni)          for row in rows:         print row.NOME         feat = row.Shape         arcpy.SelectLayerByLocation_management("Linee", "INTERSECT", feat, selection_type="NEW_SELECTION");         out_feature_class = arcpy.ValidateTableName("Linee_Clip_" + row.NOME);         table = arcpy.TableToTable_conversion("Linee", ws, out_feature_class);         arcpy.AddField_management(out_feature_class, 'Clip', 'TEXT', '', '', '60');         expression = arcpy.ValidateTableName(row.NOME);         arcpy.CalculateField_management(table, "Clip", expression);      here is the error I get: > Empty value for ObjectID = 1 The calculated value is invalid for the row > with ObjectID = 1. For example, the calculated value may be too large for > the field or you may be trying to add a string to a number field. This row > will not be updated.


How to add wms layer in OpenLayers from a geoserver?

How to overlay a wms layer from geoserver (localhost)in Open layers? What is the basic syntax of Geoserver WMS Layer? Details are as follow ! workspace name: india   layer name:hospitals.                <script defer="defer" type="text/javascript">      var map = new OpenLayers.Map('map');       var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", "labs.metacarta.com/wms/vmap0";, {layers: 'basic'} );      var twms = new OpenLayers.Layer.WMS( "World Map", "localhost:8080/geoserver/wms? service=wms& version=1.1.1& request=GetCapabilities",       {           map: 'hospitals',           transparent: 'true',           layers: 'hospitals'      } );       map.addLayers([wms, twms]);      map.zoomToMaxExtent();       </script>       plz solve this!! =====   satya


Looking for (free) WMS of surface waters of Europe

Do you know any WMS with hydrographic map of Europe? Especially I am looking for map with surface waters of Europe


Map projection lat, lon to pixel?

I'm trying to find the concave hull of a lat, lon pointset but when I project my points on my map it doesn't look like expected. I've tried a lineare projection and a spherical projection. My data is about 10000-70000 lat lon pairs. How is this possible?               $mapWidth    = 2000;     $mapHeight   = 2000;     $mapLonDelta = $mapLonRight - $mapLonLeft;     $mapLatDelta = $mapLatTop - $mapLatBottom;          $worldMapWidth=(($mapWidth/$mapLonDelta)*360)/(2*M_PI);     $f=min(max(sin($mapLatBottom*(M_PI/180)),-0.9999),0.9999);     $mapOffsetY=$worldMapWidth/2 * log((1+$f)/(1-$f));     $f=min(max(sin($mapLatTop*(M_PI/180)),-0.9999),0.9999);     $mapOffsetTopY=$worldMapWidth/2 * log((1+$f)/(1-$f));     $mapHeightNew=$mapOffsetTopY-$mapOffsetY;     $mapRatioH=$mapHeight/$mapHeightNew;     $newWidth=$mapWidth*($mapHeightNew/$mapHeight);     $mapRatioW=$mapWidth/$newWidth;          $tx = ($lon - $mapLonLeft) * ($newWidth/$mapLonDelta)*$mapRatioW;     $f = sin($lat*M_PI/180);     $ty = ($mapHeightNew-(($worldMapWidth/2 * log((1+$f)/(1-$f)))-$mapOffsetY));      This should look like Germany. What's wrong?: ![Map](http://i.stack.imgur.com/6hqMW.png) Update: It seems to work. This is a map of Bonn(Germany): ![enter image description here](http://i.stack.imgur.com/HIEVW.png)


JS API - onDrawEnd firing twice

I have a simple editing application with the following code:               startEditing : function(template) {              var drawingTool = template.template.drawingTool;              switch(drawingTool) {             case FeatureTemplate.TOOL_POINT:                 drawingTool = Draw.POINT;                 break;             }              on(this.drawingToolbar, "draw-end", lang.hitch(this, this.createFeature, template));              this.drawingToolbar.activate(drawingTool);     }      and               createFeature : function(template, evt) {              var featureLayer = template.featureLayer;         template = template.template;              var prototype = template.prototype;              var geometry = evt.geometry;              var graphic = new Graphic(prototype.toJson());         graphic.setGeometry(geometry);              this.initAttributes(graphic, featureLayer).then(function() {                  var features = [graphic];                  featureLayer.applyEdits(features).then(function(addResults) {                 var objectIds = array.map(addResults, function(addResult) {                     return addResult.objectId;                 });                      var q = new Query();                 q.objectIds = objectIds;                      featureLayer.selectFeatures(q).then(function(features) {                     main.openForm(features);                 });             });              });          }      Using a point tool with the drawing toolbar, I am finding that when I click a point on the map, the createFeature function is called twice resulting in 2 features being created with the same geometry. How can I stop the draw toolbar from creating 2 features?


How to generate pgrouting source and target with OSM?

Is there anyone here can explain me more details for pgrouting's source and target? I'm wondering how to generate with the given lonlat in OSM PostGIS entities. In pgrouting's website, they are telling that source and target are identifier of the vertex but not telling if this an `osm_id` for OSM database or any. My only given to generate is lonlat of the potential source/target. I'm using osm2po to create routable database. Anyone can give me a clue, so I can make my map more dynamic? Thank you in advance,