title: Create shape file with point

text: I am trying to create a .shp file with Point shapes. I am following this tutorial: http://docs.geotools.org/latest/userguide/tutorial/feature/csv2shp.html I create the project, no syntax error and everything is fine. I choose the .csv file and store the generated .shp file. But when I open the .shp file in QGIS I can not see any Point. I Iterate the generated shape file and wrote it to the console I gave this:               SimpleFeatureImpl:location=[SimpleFeatureImpl.Attribute: the_geom<Point id=location.1>=null]     location     SimpleFeatureImpl:location=[SimpleFeatureImpl.Attribute: the_geom<Point id=location.2>=null]     location     SimpleFeatureImpl:location=[SimpleFeatureImpl.Attribute: the_geom<Point id=location.3>=null]     location     SimpleFeatureImpl:location=[SimpleFeatureImpl.Attribute: the_geom<Point id=location.4>=null]     location     SimpleFeatureImpl:location=[SimpleFeatureImpl.Attribute: the_geom<Point id=location.5>=null]     location     SimpleFeatureImpl:location=[SimpleFeatureImpl.Attribute: the_geom<Point id=location.6>=null]     location     SimpleFeatureImpl:location=[SimpleFeatureImpl.Attribute: the_geom<Point id=location.7>=null]     location     SimpleFeatureImpl:location=[SimpleFeatureImpl.Attribute: the_geom<Point id=location.8>=null]     location     SimpleFeatureImpl:location=[SimpleFeatureImpl.Attribute: the_geom<Point id=location.9>=null]     location      I have got another .shp file with Points (my colleague sent this, he created under Qgis). The output is:               SimpleFeatureImpl:pelda=[SimpleFeatureImpl.Attribute: the_geom<Point id=pelda.1>=POINT (772487.8889999986 307764.30050000176)]     pelda     SimpleFeatureImpl:pelda=[SimpleFeatureImpl.Attribute: the_geom<Point id=pelda.2>=POINT (772196.6739999987 307778.6143000014)]     pelda     SimpleFeatureImpl:pelda=[SimpleFeatureImpl.Attribute: the_geom<Point id=pelda.3>=POINT (771960.1587999985 307897.3903999999)]     pelda      Please help. Thanks!


title: Is it possible to load features into ArcSDE without using ArcObjects?

text: I have a SDE geodatabase in MS SQL Server, where geometries are stored in MS SQL's native geometry types, rather than the ArcSDE Binary. It seems like it would be relatively easy to create new features in C#, without the use of ArcObjects. I could use one of my favorite Micro-ORMS (Dapper or PetaPoco) in conjunction with the `Microsoft.SqlServer.Types` namespace and load features directly into the database without ArcObjects. I am a novice ArcSDE user, but am quite aware of the rat's nest of stored procedures and other db logic that comes along with ArcSDE, so I am sure its not as easy as I am thinking. I am sure I am not the first person who ever thought about this - so the lack of success stories in this area discourage me a bit. Has anyone ever done this? Are than any compelling reasons why I shouldn't do this?


title: Should I start a new project using MapGuide OS?

text: I'm wary of starting a debate based on opinion, so I lifted my title from this question which seems to be doing fine. I'm also worried about offending MapGuide enthusiasts so please understand I am simply trying to avoid unwise strategic decisions. When I try to install, use, develop with, ask questions about, or otherwise entertain MapGuide OS I get the feeling that starting a new project with MapGuide is too risky:   * API documentation has not been updated for years and developers are asked to use 2.0 docs for the 2.2 and 2.4 product   * It took several months from the time 2.2.0 was released for http://mapguide.osgeo.org/ to recognise that 2.1.0 was not the latest stable release, suggesting that no one is actively maintaining the site   * Install documentation is spread wide and thin. I recently spent the best part of a week trying to install on 64-bit linux for use with Oracle and ultimately had to give up (then installed GeoServer in less than one hour)   * Forum threads regularly end unanswered or stumble along with hopeful suggestions only to end with an unanswered question from the OP   * I personally have never managed to get a .NET map viewer up and running due to compile errors that others have reported but had no luck fixing   * It seems like a lot of the effort that goes into MapGuide comes from a very small number of people (especially Jackie Ng) which doesn't bode well should they ever get too busy or lose interest in the project. Someone recently asked a similar question on the MapGuide forum but it took a decidedly ambiguous tone and ended with no clear answer. I appreciate that a lot of work has gone into the project, and also that it provides functionality I can't find elsewhere (this is a big part of the problem I have), as it can provide a complete viewer experience in short order. However in addition to the list above I have other issues:   * Dependency on stateful sessions and associated load balancing considerations   * Requirement for a configuration tool or web service to create opaque configuration files / databases that can't be edited or viewed easily   * PHP web viewer's need for a specific version of PHP which is unlikely to be compatible / ideal for other PHP applications on a shared server   * Distinction between IE and other browsers in the viewers due to ActiveX Yes, I know that this is an Open Source project and so if I think it needs improving I should get involved, but honestly I would much rather donate my time to other projects like GeoServer or OpenLayers as these products have both made my life much easier and have well defined roadmaps.


title: Raster Attribute Table Where Each Pixel = 1 Row

text: In ArcGIS, is it possible to create a raster with an associated attribute table where each pixel is represented by a "row" in that table. I would like to specify unique attributes for each raster pixel, rather than for each "Value" of pixels (the default raster attribute table in ArcGIS seems to be one row per "Value" attribute of pixels).


title: How to publish many MXD files in ArcGIS Server 10.1 automatically?

text: How to publish many mxd files in ArcGIS Server 10.1 automatically? I have about 60 mxd files and I want to publish them automatically. Is there any way to do this?


title: update spatial data from excel to ms-sql server 2008

text: I have 1000's of data with 50's of column. It is point data. The data is in MS-SQL server.Now each day I need to load 100's of data similar in structure. How can I achieve it ? I tried to append table but it was lengthy task. I need to change column type since mapinfo does not properly recognize every field.Also when I change the column it cannot convert some type. **`Is it possible or has anybody done this can of stuff! Is there any solution to this pain?`** I was thinking of doing direct update from excel but before I get started I was wondering advice from experts!!


title: Counting unique occurrences during Spatial Join?

text: I have a point shapefile (points.shp) with fields [owner], [name], etc.. [owner] and [name] are both of type string. The owner contains a single string, the unique owner. Name contains a list of names, seperated by ";".               [owner]     [name]        a     ";wood;grass;"        a     ";grass;house;"        a     "house"        b     ";wood;tree;"        b     ";grass;house;"        c     ";tree;"      Now, what I am currently doing is aggregating all points of each unique name- string in [name] by a distance and Spatial Joining those back to count the amount of points containing this string within the Aggregated Polygon. The following script is running in Model Builder.   1. Select all [name] LIKE '%;wood;%'   2. Aggregate Points by distance z = agg_wood.shp   3. Spatial Join agg_wood.shp with points.shp (selection still alive) = adds a field "Join_Count" to agg_wood.shp   4. Select [name] LIKE '%;house;%' etc. The aggregated Polygon Shapes (about 7000) are merged into a final Shapefile. So, my final, merged shapefile will have all counts of [name] occurrences:               shape_wood.shp:     [FID]  [Join_Count]       1         10               2         11               3         2                4         1                5         13               6         4               Finally, I merge all aggregated polygon shapefiles, which works. The point file has something about 800,000 points, about 5,000 unique name strings, and about 20,000 unique owners. My problem is I would like to add a field to agg_wood.shp during the process that sums the number of unique occurrences for the field [owner] for each aggregated polygon. Lets say there are 5,000 points in an area and 500 of those contain "wood" in the list of strings from the field [name]. These are aggregated into one or more polygons. However, there may be 1 up to 500 different owners who generated "wood". I want to add a field [occ_own] with the number of unique owner-strings who added "wood" in the field [name]. So my intermediate output file (agg_wood.shp) would look like this:               shape_wood.shp:     [FID]  [Join_Count]  [Occ_Own]       1         10        1       2         11        1       3         2         2       4         1         1       5         13        13       6         4         1          shape_house.shp:     [FID]  [Join_Count]  [Occ_Own]       1         23        3       2         10        5       3         3         3       4         1         1       5         150       1       6         2         1      Then I would merge all of those to a single shapefile of all [name] polygons. But I can't imagine how to modify my process so it can calculate the number of unique owners for each polygon area and [name]. Does anyone have an idea?


title: Creating a line from lots of easting/northing co-ordinates

text: I have hundreds of easting northing points which I need to join as a single line to show a route. How do I import them and get QGIS to automatically turn them into a line?


title: How to use ET GeoWizard tools or Xtools Pro in ModelBuilder or Python to automate processing?

text: Is it possible to use ET GeoWizard or XTools Pro tools in automation of mapping in either in ModelBuilder or Python?


title: ESRI Silverlight Cartography - Looking at whats not there

text: I have line data that has been symbolozied in ways that I don't have time to understand and would like to make a map that tells me =). My general question is how to display the lack of data results for queries. I have a bunch of layer files that were built with a bunch of def queries in ArcMap. I will iterate over the line data and for each unique line check for results of applying a def query. If results are returned, a new layer file is created representing that query. I want to highlight the queries that didn't return results in a silverlight app. So I have all the queries that returned zero records in a database. I'll be making this map with silverlight but any solid cartography concepts for getting at what's not there are welcome.


title: GeoJoin with ArcGIS Services

text: Has anyone seen any ways to dynamically join data in services. E.g. I've already exposed County boundaries in a MapService, now I want to let users join their relative data to this service for their own thematic visualizations.


title: How to import a raster into PostGIS?

text: I'm trying to follow the instructions here to load a raster into a PostGIS database:               python raster2pgsql.py -s 4269 -I -r *.tif -F myschema.demelevation -o elev.sql      I understand that I replace `*` with the path to my raster, but I don't understand the part `myschema.demelevation` or `elev.sql`. Should I have my own schema for this file? And what does the `elev.sql` part mean? I also read through the gdal PostGIS raster driver to try and understand this with more examples. Similarly, they suggest loading a raster `katrina`               python raster2pgsql.py -r /path/to/katrina.tif -t katrina -l 1 -k 64x64 -o katrina.sql -s 4326 -I -M      Using my current setup, I tried loading the `katrina` raster in:                   python2.6 ~/src/postgis-2.0.0SVN/raster/scripts/python/raster2pgsql.py -r ~/tmp/katrina.tif -t katrina -l 1 -k 64x64 -o katrina.sql -s 4326 -I -M      However, I got the following errors:               Traceback (most recent call last):       File "/home/src/postgis-2.0.0SVN/raster/scripts/python/raster2pgsql.py", line 34, in <module>         from osgeo import gdal       File "/home/lib/python2.6/GDAL-1.8.1-py2.6-linux-i686.egg/osgeo/__init__.py", line 21, in <module>         _gdal = swig_import_helper()       File "/home/lib/python2.6/GDAL-1.8.1-py2.6-linux-i686.egg/osgeo/__init__.py", line 17, in swig_import_helper         _mod = imp.load_module('_gdal', fp, pathname, description)     ImportError: /home/lib/python2.6/GDAL-1.8.1-py2.6-linux-i686.egg/osgeo/_gdal.so: undefined symbol: GDALSetRasterUnitType      I don't fully understand these errors mean; when I compiled `gdal` should I have specified an argument for `GDALSetRasterUnitType` ? More generally, I'm having difficulty understanding why I am not specifying the database that I am trying to load this data into. * * * After following MerseViking's advice I ran:               python /usr/lib/postgresql/8.4/bin/raster2pgsql.py -r /home/celenius/Downloads/katrina.tif -t katrina -l 1 -k 64x64 -o katrina.sql -s 4326 -I -M      which returned the following output:               ------------------------------------------------------------      Summary of GDAL to PostGIS Raster processing:     ------------------------------------------------------------     Number of processed raster files: 1 (/home/celenius/Downloads/katrina.tif)     List of generated tables (number of tiles):     1   katrina (256)      Then I ran:               psql -d test -f katrina.sql - U postgres -W      which returned the following:                   addrastercolumn                                                                                --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------      public.katrina.rast srid:4326 pixel_types:{8BUI,8BUI,8BUI} out_db:false regular_blocking:true nodata_values:NULL scale_x:'0.029325513196481' scale_y:'-0.029325513196481' blocksize_x:'64' blocksize_y:'64' extent:POLYGON((-100.014662756598 9.98533724340176,-100.014662756598 40.0146627565982,-69.9853372434018 40.0146627565982,-69.9853372434018 9.98533724340176,-100.014662756598 9.98533724340176))     (1 row)          (END)      This message and a blinking cursor appear on screen. I assume that it is loading into the database, but I'm not sure. The `tif` file is just 3MB - I had assumed that it would not take long to load a file of this size but the blinking cursor has already been on the screen for ~1 hour. Has this crashed or do I just need to wait a long time? I have 4GB of RAM and a dual-processor of 2.5 GHz.


title: How to get a Layer as ILayer (ArcObjects)

text: I had asked this question previously which I think will work. But as I am new to this, I can't figure out how to get a Layer as an ILayer object to pass to the method that's in my previous questions answer. I have been playing with the Mark Cederholm's 'Snippets.py' that uses comtypes to drive ArcObjects. That works well, but I don't know enough to venture far from the examples given. It first gets an IMxApplication object, and I can't figure out how to get a Layer file as an ILayer from this object so that I can use the script I was shown in my previous question. In the end I want to be able to change the Display Expression of some Table Views, and be able to grab them by their name in the TOC. Note: If you know how to do this with C# or VBA, I can figure it out in Python Update: Here is the answer in Python which relies on Mark Cederholm's Snippets.py and comtypes:               from Snippets import *     GetDesktopModules()     import comtypes.gen.esriCarto as esriCarto     import comtypes.gen.esriArcMapUI as esriArcMapUI     InitStandalone()     pApp = GetApp()     pMxDoc = CType(pApp.Document, esriArcMapUI.IMxDocument)     pFeatureLayer = CType(pMxDoc.FocusMap.Layer(0), esriCarto.IFeatureLayer)


title: How to send long JSON objects (polygon geometry, table rows) in POST request to Geoprocessing Service?

text: I am seeking to understand my options for sending long JSON objects in a request to a Geoprocessing Service. In particular, I am looking for some example code to illustrate how to include two long JSON objects (one a polygon geometry as a coordinate string, the other a table as rows of ASCII text with the first row being the column headings) into a POST request to my Geoprocessing Service, and then hints as to how best to read them as parameters in the Python script that I've published as my Geoprocessing Service. At http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/gettingstarted.html it says: > When using the REST API, you will normally use an HTML GET method in a form. > When you use GET, the entire request is encoded in the URL. This is the > preferred method to use whenever possible. However, in this mode, a URL is > limited to as few as 1024 characters depending on the browser. Thus, if you > have a long JSON object to include in the request, you will need to use > POST. > > A second option, when using certain Geometry Service and Geoprocessing > Service operations, is to continue to use GET and to specify a URL to the > input JSON object contained in a file on a public server. I'm familiar with using a GET method when the parameters can all fit into a URL that I can paste into a browser. I'm also comfortable with the idea of using GET to specify a URL to input JSON objects that are contained in files on a public server. However, I am prevented from using this method this because my client does not want files placed on a public server. That leaves me with having two long JSON objects to include in the request and having to use POST which is a method beyond my current level of understanding. If no example code is readily available, then any hints on how to do this will be greatly appreciated.


title: Legend Limiter will not install to my ArcView 10 - any suggestions?

text: In an older version of ArcView, I had an add-on called Legend Limiter for my software. It would limit the legend categories to ONLY those shown in your map extent. Say for example, I have a Geology shapefile containing over 100 categories of Geology, but the extent I'm showing on my map only includes 15 categories, this tool will limit my legend to reflect ONLY the categories in my map extent. It is a great little time saver. I installed the version found HERE. When I try to run the .exe file however, I get the prompt shown below: ![Error Message](http://i.stack.imgur.com/KpPah.jpg) I tried googling the error message number, and the information does not resolve my issue. I did find a fix for the newer ArcView HERE. I follow the instructions from the forum to the letter, and when I add the .dll file, it's not recognized (prompt below). ![enter image description here](http://i.stack.imgur.com/VJhmx.jpg) I am officially out of ideas. I just can't get it to work. Any suggestions would be greatly appreciated. Thanks all.


title: GDAL - creating vector from raster

text: [SOLVED] Good day! I'm looking at either gdal_contour or gdal_polygonize.py to create a vector layer file from a raster file. I can create the vector file using either method, but it's upside down when I plot it using QGIS. Another list indicated this has to do with the world file. I use gdal_translate and gdalwarp when transforming the orginal raster in lambert conformal to spherical mercator (for use in OpenLayers) and understand that the world file could be created using one of those utilities (probably when using gdalwarp). However, I'm really unsure after that about the next step using either of the raster to vector utilities where the world file comes into play. Do I have to also use ogr2ogr as well? I'd appreciate a detailed list of steps as the GDAL documentation is a bit fuzzy here. Just to note my current steps are:   1. Use gdal_translate to first geo reference the original raster in lambert conformal   2. Use gdalwarp to reproject the resulting raster image to spherical mercator   3. Use gdal_translate to create a PNG at a reduced size. Becomes an Image Layer in OpenLayers.   4. Use either raster to vector utility on the raster produced in step 3. I see where -co for the world file can be included in gdal_translate or gdalwarp. And like I said, I can create the vector file once the original raster has been warped to spherical mercator. Really just unclear here how the world file comes into play for the resulting vector file in step 4 so the image will be rightside up. Thanks for any help! [ **SOLVED** ] As Matthew asked and then I commented on, I apparently was confused about the world file creation and in which step to do that in. But, addding `-co WORLDFILE=YES` in step 3 above created a .wld file for the resulting PNG image. Then used **gdal_contour** creating a shapefile and also gml, brought both into QGIS to view, and they're now rightside up! Thanks all who viewed and Matthew who commented!


title: arcgis server 10, vb.net add reference problems

text: i am using 'arcgis server 10' and 'visual web developer 2010 express'. now, i opened a 'web mapping application' then wanted to 'add a reference' to 'esri arcmap object library 10.0' it says:                A reference to 'ESRI ArcMap Object Library 10.0' could not be added.      Converting the type library to a .NET assembly failed. No process is      associated with this object.      it said the same for 'esri 3danalyst object library 10.0', 'esri geoanalyst object library 10.0', 'esri geostatisticalanalyst object library 10.0', 'esri spatialanalyst object library 10.0'... but for this one it says:                A reference to 'ESRI Display Object Library 10.0' could not be added.          Converting the type library to a .NET assembly failed. The type library      importer encountered an error during type verification. Try importing      without class members.      i tried this with target .net frameworks 3.5 and 4.0. plz can you explain how can i add these references successfully? thanks!


title: Best way to visualize the PostGIS Raster in OpenLayers

text: I have been stuck by this problem for a long time. Several ways have already been tried, but none of them works as I was expecting. Here are the description of each of these method as well as the problem I am facing. I want to know which is the best option to follow on because I am getting confused now. Thanks.   * Method 1: (GDAL + OpenLayers.Layer.Image); Convert the PostGIS raster to a tif file first using gdal_translate, and then translate this tif file to image (PNG) file. (Because it is faster than convert it directly from PostGIS to PNG). Then, load this image to Openlayers.   * Problems: Don't know how to make it colorful. Because the default iamge is in gray color. Don't know how to add a color table to this. ![Real Result](http://i.stack.imgur.com/AUmdk.png)![Expected Result](http://i.stack.imgur.com/GCaxf.png)   * Method 2: (MapServer + OpenLayers.Layer.WMS): Already get it work in a visual server with 2GB ram. But the problem is the speed. It takes long time to load the data on the map compared with load it as a image file.  Is that the problem with our virtual server or how the way we set up the MapServer?   * Method 3: GeoServer + Openlayers.Layer.WMS:  Cannot get it work yet. Because I don't know how to connect it with PostGIS raster. On the previous Post, it seems we have to connect it to JDBC. But I didn't know someone has ever made it work or not. Waiting for the help. Thanks.


title: How to set layer symbol and layer name side by side in QGIS Composer?

text: When I add a legend in QGIS Composer, the layer symbols are set below each layer name. Is there any way to have them side by side? This is what I get: "LayerName" [layer name] ~ [layer symbol] This is what I need: ~ "LayerName"


title: Shapefile projection issue - layers not lining up

text: See below for screenshot. The purple rectangle should line up with the green rectangle in the top right (OpenLayers Google Physical layer) and the tan points. I was sent this shp and given the projection information in addition to the included prj, but can't seem to get these to line up after exporting to EPSG:3857. I tried entering the original projection information manually as a custom CRS (http://gis.stackexchange.com/a/55197/8987), then exporting as EPSG:3857, but that didn't seem to work either. What am I doing wrong / how can I get these to line up? I need to export to reproject, right? On the fly is enabled, should it be? Here is whats in the original prj file, what information was sent to me, and what I entered in as a custom CRS. PROJCS["NAD_1927_Lambert_Conformal_Conic",GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",2999994.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-89.5],PARAMETER["Standard_Parallel_1",33.0],PARAMETER["Standard_Parallel_2",45.0],PARAMETER["Latitude_Of_Origin",33.0],UNIT["Foot_US",0.3048006096012192]] Datum: NAD 27 Spheroid: Clarke 1866 Central Meridian: -89.5 Reference Latitude: 33 Standard Parallel 1: 33 Standard Parallel 2: 45 False Easting: 2999994.0 False Northing: 0 Units: Feet +proj=lcc +lat_1=33 +lat_2=45 +lat_0=33 +lon_0=-89.5 +x_0=914400 +y_0=0 +datum=NAD27 +units=us-ft +no_defs ![layers do not line up](http://i.stack.imgur.com/dZOLo.png) **EDIT:** The data was resent to me reprojected and it now lines up.               <metadata xml:lang="en">     <Esri>     <CreaDate>20130826</CreaDate>     <CreaTime>11391400</CreaTime>     <ArcGISFormat>1.0</ArcGISFormat>     <SyncOnce>TRUE</SyncOnce>     <DataProperties>     <lineage>     <Process ToolSource="c:\program files\arcgis\desktop10.1\ArcToolbox\Toolboxes\Data Management Tools.tbx\DefineProjection" Date="20130716" Time="150151">     DefineProjection july2013_inpc PROJCS['NAD_1927_Lambert_Conformal_Conic',GEOGCS['GCS_North_American_1927',DATUM['D_North_American_1927',SPHEROID['Clarke_1866',6378206.4,294.9786982]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Lambert_Conformal_Conic'],PARAMETER['False_Easting',2999994.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',-89.5],PARAMETER['Standard_Parallel_1',33.0],PARAMETER['Standard_Parallel_2',45.0],PARAMETER['Latitude_Of_Origin',33.0],UNIT['Foot_US',0.3048006096012192]]     </Process>     <Process ToolSource="c:\program files\arcgis\desktop10.1\ArcToolbox\Toolboxes\Data Management Tools.tbx\Project" Date="20130826" Time="113914">     Project test_inpcdata C:\data\InfoReq2013\test_inpcdata_reproj.shp GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433],METADATA['World',-180.0,-90.0,180.0,90.0,0.0,0.0174532925199433,0.0,1262]] 'NAD_1927_To_NAD_1983_NADCON + WGS_1984_(ITRF00)_To_NAD_1983' PROJCS['NAD_1927_Lambert_Conformal_Conic',GEOGCS['GCS_North_American_1927',DATUM['D_North_American_1927',SPHEROID['Clarke_1866',6378206.4,294.9786982]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Lambert_Conformal_Conic'],PARAMETER['False_Easting',2999994.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',-89.5],PARAMETER['Standard_Parallel_1',33.0],PARAMETER['Standard_Parallel_2',45.0],PARAMETER['Latitude_Of_Origin',33.0],UNIT['Foot_US',0.3048006096012192]]     </Process>     </lineage>     </DataProperties>     </Esri>     </metadata>


title: Need to put points on overlapping boundaries

text: I have two layers: a route (Line) and a county boundary (polygon). I need to intersect them so that the output layer is a point layer. The ArcGIS **Intersect** tool places a point where the route passes the county boundary. But there are some locations where the route goes along the county boundary and then enters the boundary polygon. In such a case, ArcGIS fails to place any intersection point. Is it possible to place two intersection points in such cases, one where the common segment starts and the other where the common section ends? Thanks a lot for your help.


title: What is topojson and how is it different than geojson?

text: This is a conceptual question. What are the differences between these? and what are the pros and cons of these formats?


title: How can I do spatial queries in client side?

text: My current project is **Map visualization**. In this application I am taking the Input as JSONArray/CSV file and the outputs are Heat Map, pin Map, Thematic Map etc.. So, here I am using postGIS for only to store boundaries(like state/county/city..). Also the data from the user will remain in his place, that means I am not storing the user input data in database. How can I do some spatial queries/functions in **client side**? ie, functions like st_buffer, st_intersect, st_contains, st_distance, st_equals, st_ boundary etc.... I am using Openlayers 2.11, Geoserver, postGIS


title: qgis2 - hide a layer (or its labels) when another layer is coincident?

text: I have two road layers - one is a subset of the other, so, there's a lot of overlap. When they are coincident, I see labels from both layers. ![enter image description here](http://i.stack.imgur.com/O8hxy.png) The 'lower' layer is the thin line road in the SW corner; the 'upper' layer is the thicker line road with black edges. One of the 'Ridge Rd' labels is from the upper layer, one is from the lower layer. Ultimately I'd like to get rid of this resulting 'double label' effect. Is there a way to suppress labels from the lower layer when it is coincident with an object from the upper layer? Is the best way to do this by keeping them on the same single layer and just do a rule-based or categorized style, to avoid this whole multi-layer issue? That would have other side-effects though I haven't explored the option yet. Thanks in advance


title: gdal_grid has some problem with reading vrt file

text: I am using gdal_grid module(from gdal 1.10) and it has some problem with reading the vrt file. I checked this link but it does not work. gdal_grid problem reading vrt file The command is > ./gdal_grid -l grid grid.vrt newgrid.tif The Error Message is > Unable to open input datasource "grid.vrt". The vrt file is like following               <ORGVRTDataSource>         <OGRVRTLayer name="grid">             <SrcDataSource>grid.csv</SrcDataSource>             <GeometryType>wkbPoint</GeometryType>             <LayerSRS>WGS84</LayerSRS>             <GeometryField encoding="PointFromColumns" x="x" y="y" z="z"/>         </OGRVRTLayer>     </OGRVRTDataSource>      The csv file is like following               x,y,z     565650,5121960,1048     565680,5121960,1043     565710,5121960,1039     565740,5121960,1038     565770,5121960,1036     565800,5121960,1024      Thanks.


title: Import error when utilizing QGIS's Python Init function

text: Based on the answer to Referencing Qt UIs external to plugin with python. I'm trying to utilize the "Layer Properties / Fields / Python Init function" to execute a file (test_file.py) that is located in the folder of the plugin that I'm making. I've made sure that the path to my plugin folder is in PYTHONPATH via "Settings / Options... / System / Environment" ... and restarted QGIS. When the layer, for which I'm utilizing Init function, is initialized and a feature is selected test.py is executed. However, I get three consecutive error messages saying:               1) An error occured during execution of following code:           import test_file           Traceback (most recent call last):             File "", line 1, in              File "C:/PROGRA~1/QGISVA~1/apps/qgis/./python\qgis\utils.py", line 453, in _import               mod = _builtin_import(name, globals, locals, fromlist, level)           ImportError: No module named test_file          2) An error occured during execution of following code:           if hasattr(test_file,'DEBUGMODE') and test_file.DEBUGMODE:    reload(test_file)           Traceback (most recent call last):             File "", line 1, in            NameError: name 'test_file' is not defined               3) An error occured during execution of following code:           _qgis_feature_form_20140526104937007 = test_file.py(_qgis_featureform_2, _qgis_layer_workgroups20140526104723778, _qgis_feature_20140526104937007)           Traceback (most recent call last):             File "", line 1, in            NameError: name 'test_file' is not defined      Any suggestions how to fix this?


title: QGIS Python API: SAGA difference algorithm does not split parts

text: I am using the QGIS Python API in an external script (platform: ubuntu). Everything works as expected. But when I am using the SAGA difference algorithm within the script, there is an issue. The geometry is calculated perfectly right, but when using the option "split parts" it seems, that this option is ignored. Here the help output:               processing.alghelp('saga:difference')     ALGORITHM: Difference         A <ParameterVector>         B <ParameterVector>         SPLIT <ParameterBoolean>         RESULT <OutputVector>      Here my syntax:               processing.runalg('saga:difference', layer1, layer2, 1, output)      When I do the operation with the same data within QGIS' processing toolbox and the GUI for that algorithm, everything works and the parts are split. Am I missing something here? Does anybody else have that issue?


title: Enabling SQL Server 2008 database to access it as Esri geodatabase via ArcSDE using ArcGIS 10.0?

text: I have 1 SQL Server 2008 and 1 Oracle database (did not check which version it is). I'd like to convert them to geodatabases, first that 'MS SQL Server 2008', then Oracle. So, leave Oracle for a while. My question is about SQL Server. Database has about 200 tables, each under dbo schema. I used sdeupdate, got: SDE Error(-51) Underlying DBMS error -51 was since 2002 so I did not even try to dig more. Let it be underlying. So, **is it possible at all with ArcGIS 10.0 to take a simple database and upgrade to geodatabase?** * * *               c:\somewhere> sdesetup -o upgrade -d sqlserver -s . -u sa -p SA_PASSWORD -D DATABASE_NAME -N -l "arcsdeserver,100,************,31-dec-2012,******************"          ESRI ArcSDE Server Setup Utility Tue Feb 28 17:51:49 2012     ----------------------------------------------------------------     Upgrading ArcSDE schema.....     Successfully upgraded ArcSDE schema.          Upgrading geodatabase schema:     Error: Underlying DBMS error (-51).            Error upgrading GDB schema.     Geodatabase schema object install not completed.      Seems, it's gonna take some while. Will prepare batch scripts to restore DBs, install profiler (seems it doesn't come bundled with MSSQLSRV2008)... [Update] Here I tried to play with empty databases. On a clean, just created SQL database, using sde schema :               sdesetup -o install -d sqlserver -s . -u sde ...      OK On a clean, just created SQL database, using dbo schema :               sdesetup -o install -d sqlserver -s . -u dbo ...      All fine again. Esri systables are named now like dbo.GDB_ITEMRELATIONSHIPS, etc. On a clean, just created SQL database + new empty table dbo.Table_1, using dbo schema :               sdesetup -o install -d sqlserver -s . -u dbo ...      Fine again. Now I Connect from ArcCatalog Add Spatial DB connection with:               service string= sde:sqlserver:.     user=sa     version: dbo.DEFAULT      OK - great success! So it's possible to upgrade existing SQL database to geodatabase. (Seems someone had fk-uped customer DB version, this I'll need to check)... EDIT, **This part is about -51 error.** Found there were **sde** and **arcims** users in DB. This probably was left from older esri software installed long ago. Removed both. In sde_setup.log I see this: In sde_setup.log               Successfully created  GDB_Tables_Last_Modified table...      Error creating  GDB_Items table...      ERROR Creating Geodatabase tables     , Error = -51     ,EXT_Error = 1934     ,EXT_ERROR1 = Microsoft SQL Server Native Client 10.0: CREATE XML INDEX failed because the following SET options have incorrect settings: 'ARITHABORT'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or filtered indexes and/or query notifications and/or XML data type methods and/or spatial index operations.     ,EXT_ERROR2 =      ,      It seems for me it may be that I missed SET BLOBSIZE or something options... UPDATE: Repeated all steps and additionally ran this SQL script:               -- SQLServer2008R2_SetRequiredMagicForXML.sql     SET ANSI_NULLS ON     SET ANSI_PADDING ON     SET ANSI_WARNINGS ON     SET ARITHABORT ON     SET CONCAT_NULL_YIELDS_NULL ON     SET NUMERIC_ROUNDABORT OFF     SET QUOTED_IDENTIFIER ON      Still that ARITHABORT error. Ok there are only 2 options ON and OFF, so will invert that setting and try again. Just too long and useless error message. Update: SET ARITHABORT OFF did not work. Played with empty new database, once set it ON and then OFF. And in both cases result was OK. This means ARITHABORT doesn't matter. That's incorrect error message. Too many if-s in code. Update: Replaced our code with strategy OLEDb using best practices in the world. * * * **IMPORTANT: I'm playing with backup of customer's database on my machine. Never try to do anything like this quickly on production server without trying it in sandbox first.** Use DB backups. UPDATE: finally proved myself with your help that it's possible when playing with small databases. So final answer is YES. Always - NO, sometimes you must fail fast. Later I will check FAQ how to correctly "close a case" here.


title: Options for ArcGIS Server and ArcSDE Hosting

text: I know this was partially address here, but it was not specific to ESRI products. I want to find some place to create and host map services with ArcGIS Server and ArcSDE. ESRI cloud options are bit pricey for the initial startup and testing of my project. Anyone know of lower priced alternative?


title: Token doesn't work when applied to map service - Silverlight

text: I am trying to implement a Silverlight Web Mapping application with ArcGIS server and I'm trying to use the Token authentication with active directory as the user/roles store. I have the service running so that I can successfully obtain tokens but when I try to put them in a map service the map service fails with the 'Unauthorized Access' exception. I have made sure that the account is in the permissions for that service. I've been on the ESRI forms and I've found about 4 other posts with people with the same problem, but no solutions (I hate ESRI's site). Hopefully the stack can help.


title: Selecting the most recent entries from a table in Arc

text: I have a point shape file that has many event occurances stored for ever point. I am trying to select the most recent event for every point. Is there a way to do this through the "Select by Attributes" in Arc?


title: How to alter transparency by spatial location

text: I'm trying to create a map that has a all layers within a subject area having 0% transparency (full opaque), while features outside that area (defined by a polygon shapefile) having a reduced transparency of say 50%. The ideal result is a map that has a focus on a specific area, but also shows the surrounding area. I'm working with ArcMap 10. Similar to this image: ![enter image description here](http://i.stack.imgur.com/jmgwQ.jpg) I tried using the clip feature in the Data Frame properties but its not what I'm looking for. Thanks!


title: Updating (ArcMap 10) layer objects with objects from another layer?

text: I have layer "A" and layer "B". Layer "A" has polygon objects and unique ID for every object in attribute table. Layer "B" has some polygon objects from layer "A", but those polygons have been changed, unique ID is not changed. How can I update layer "A" polygon objects from layer "B". As I say, those objects share same unique ID.


title: What maintenance should I do for PostGres database?

text: I'm getting familiarized with using PostGres for ArcGIS. I've only ever used SQL Server. I was successful in setting up an SDE database within PostGres 9.2, but I'm not sure what type of maintenance I should be doing or what the syntax is. If someone could lead me in the right direction, I'd appreciate it. Thanks.


title: how to open geotiff as base layer on openlayers

text: i want to add a geotiff image as base layer on openlayers :   * copy my image.tiff in a directory and open it with openlayers directly without using a cartography server.


title: How to detect a GDAL/OGR 'Warning'?

text: * When I run a _batch script_ using a _GDAL/OGR_ program, I can detect if an error occured by checking `ERRORLEVEL` for the value 1.   * When using GDAL/OGR in _python_ or _.NET_ , I get an exception when an error occurs. **Question:**   How do I detect if a `Warning` was issued during the execution? * * * _**Why?_**   _Even though a process can execute to the end despite of warnings, the output might be corrupt with respect to the data I expect. You could argue that I ought to check for these corruptions, but since I have control of the entire process, I would like to be able to stop when a warning is issued._


title: What is "n" in calculating tiles?

text: What does **n** mean in this formula: **n = pow(2, zoom)**? I using this when I calculate tiles. Thank you


title: Same field names as given in text file (in a script)

text: I have a raster (ras) and a text file (T, DA, etc). When I join both then field names are like following:               ras.vat:T     ras.vat:DA      I have to access these fields using SearchCursor for further processing. Is there a way to avoid these long combined names and simply obtain "T" and "DA" after joining?


title: How can I web map service published by Dojo in Flex app

text: We want to include a base map layer in hosted Flex app. We requested web map service from the vendor and I got a file (.htm) from client with some dojo code. I can understand the code but I am not sure how can I include this in my flex app configuration:                   // info used to create web tile layers         var mapurl  = "http://bnvnbvnn/${0}/${2}/${1}.png"         var lyr = new esri.layers.WebTileLayer(mapurl);         // clear out the side bar         //dojo.byId("leftPane").innerHTML = "";         // create and add the layers         //var layerDiv = dojo.create("div");         map.addLayer(lyr);            }      If I will replace variables on URL, I can see images but how will I use this for Flex configuration- where it comes like this:                <layer url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"      visible="true" type="tiled" label="ArcGIS Streets"/>      I have never worked with Dojo toolkit, so I have no idea (or may be there is some communication gap) Thanks


title: Reprojection from WGS to Slovenian Gauss Kruger in QGIS

text: I have gpx file (track) in WGS84 (EPSG: 4326) coordinate system from Garmin GPSMAP 62 which is right projected in BaseCamp and MapSource. When I save track as *.GPX and import it to QGIS and use Settings/Project properties/Coordinate Reference System/ and set as EPSG:3787 I get a wrong projected track (cca 300 m western of right position). Thanks!


title: Can Tiff files from ESRI Geodatabase be loaded into QGIS

text: I have been able to load an ESRI geodatabase which contains shape files into QGIS, however when I try to load a geodatabase containing tiff files I get an error message saying ...."is not a valid or recognized data source". I am assuming it is because it is tiff files? Is there a way to get the tiff files loaded into QGIS through a geodatabase or is there a format I can convert the tiff files to before I put them into the geodatabase? Any suggestion welocme Nigel


title: Sketchup importing dxf/dwg

text: How do I import a dxf file into sketchup so that it appears in the vertical plane & not the horizontal plane? I'm trying to import a elevation, not a floor plan so I need it in the vertical plane.


title: How to call ArcPy script from Windows Service?

text: I'd like to call arcpy script from Windows Service. Here (Calling arcpy/python from .NET?) I read that I can load python script. What do I need to load arcpy script?


title: in_memory input to geoprocessor tool not returning expected results

text: When the input to the following method is a feature class on disk the geoprocessor gives the expected results. However, when I pass in a feature class that is created via arcobjects to an in_memory workspace then I get either a result with no features or only a few of the clipped features. The clip_features input has only one polygon and it is in the same spatial reference as the in_features to be clipped.               private void ClipFeatures(string fileNameAndPath, ref IFeatureClass inMemPolyFc)         {             Geoprocessor gp = new Geoprocessor();             Clip clip = new Clip();             clip.clip_features = inMemPolyFc;             clip.in_features = fileNameAndPath;             clip.out_feature_class = @"in_memory\clippedFile";             gp.OverwriteOutput = true;             gp.AddOutputsToMap = true;                  try             {                 gp.Execute(clip, null);             }             catch (Exception)             {                 string gpError = getGPMessages(gp);                 MessageBox.Show(@"A geoprocessing error occurred: " + Environment.NewLine + Environment.NewLine + gpError,                        clsPropSet.AppName);             }         }      The gp executes sucessfully with the in_memory fc but the results are wrong. After creating the in_memory fc via arcobjects I added it the map during debugging and it appears correctly in the map document. Is this a bug in the gp tool?


title: How to CORS enable ArcGIS Server 10.2.1 to Access REST Services without Using proxy.ashx?

text: Form the ENABLE-CORS.ORG I see that editing web.config is enough to CORS enable IIS7               <?xml version="1.0" encoding="utf-8"?>      <configuration>       <system.webServer>        <httpProtocol>          <customHeaders>            <add name="Access-Control-Allow-Origin" value="*" />          </customHeaders>        </httpProtocol>       </system.webServer>      </configuration>      Anything else I need to do, so my ArcGIS REST end points are accessible from ArcGIS JavaScript API web application without using proxy page:               esri.config.defaults.io.alwaysUseProxy = false;     esri.config.defaults.io.corsEnabledServers.push("server.organization.com");


title: python scripts for accessing info from a postgresql database in case of a qgis application?

text: I am beginner and I need to know if I could access a postgresql database from python script made for a qgis application


title: How to identify polygons that have shared boundary?

text: I have hundreds of polygons that represent plants geographical ranges around the globe. For each species I have both a shapefile and collection of findings as points.   I would like to analytically find each pair of species that common range boundary at least at one point. Or, even better, which species has a boundary in certain proximity from another species. Any idea how to do this? I use QGIS and prefer Perl, but solution in any other language would be fine also.


title: Available US State or National business (or employer) database lists?

text: This question dovetails with this post on geomarketing applications. I am familiar with some of larger, paid-for business registry's like InfoUSA and Dunn & Bradstreet. While the detailed information their business listings database include (like # of employees, annual sales, industry code, etc) is fantastic, if you are on a limited budget, sometimes the cost of purchasing the data outweighs the value you can get from it. If you have geocoding capabilities in house, one could potentially create a reasonable surrogate by spatially-enabling (geocoding) a publicly available business listing on your own. If you were looking to take on this type of project, where would you start your research? Do you know of US agencies at a State or National level that maintain this type of information, AND are publicly available for download or minimal purchase?


title: Update rows based on number and position in table

text: I'm trying to update rows using the update cursor, but based on the number of rows in a sequence of three list items. Looking at the list below, it needs to update first four rows to 'B', then the next 9 rows to 'D' and then the next 14 rows to 'A'. I've gotten as far as the code below, but all I'm getting is an update of the first four to 'B' and then I get 5 calculated to 'D' and then another 5 to 'A'. I think it's going back to the start of the table somehow.               RowCount = 1     lenClusters = [4,9,14] # number of rows to update in that sequence.     rows = arcpy.UpdateCursor(fcPhotos, "", "", "CapturedStatus")          for row in rows:         if rowCount > 0 and rowCount <= lenClusters[0]: # See if the current rowCount is from 1 to 4             row.CapturedStatus = "B"         elif rowCount > lenClusters[0] and rowCount <= lenClusters[1]: # See if the current rowCount is from 5 to 9             row.CapturedStatus = "D"         elif rowCount > lenClusters[1] and rowCount <= lenClusters[2]:  # See if the current rowCount is from 10 to 27             row.CapturedStatus = "A"         rows.updateRow(row)         rowCount += 1      I also can't rely on the row ID as it might have missing IDs. Any help will be greatly appreciated.


title: PostGIS2 have automatic BBOX indexing?

text: I need to compare millions of geometries by the `&&` operator (BBOX). When `CREATE TABLE` see `geometry` type on PostGIS2, it do also something like `INDEX ON t USING GIST(g)`? or **I need to express, always, the`CREATE INDEX` in (or after) my `CREATE TABLE`?** If it is automatic, it is for any field name (or only for "geom")? * * * PS: (if no index is automatically crated) when I use `ST_DWithin(A,B)` PostGIS generate a temporary index?


title: How to perform unsupervised classification of LANDSAT time series using Grass?

text: I'm using GRASS to perform an unsupervised classification on a time series of LANDSAT images (monthly temporal res, over 30 years), in order to compare land cover change in a particular area. I'm concerned that if I run `i.cluster` for each map in the time series the signatures used for the classes may be slightly different for each map, affecting the validity of the comparison. Would this be the case? If so, is there a way to ensure that the class signatures used on each map in the time series are identical throughout? My initial idea was to run `i.cluster` on a particular map where all classes are well represented, then use the sigfile generated from this as the input sigfile to `i.maxlik` for all maps. Many thanks.


title: Vector tools missing in QGIS 1.8 (Ubuntu)

text: I installed QGIS 1.8 on an Ubuntu 12.04 Precise Pangolin virtual machine. everything seems to work fine, but I don't get any of the vector or raster tools that (I assume) are part of the standard installation (e.g. analysis, research, geoprocessing tools) anyone ran into same problem? Is there a way to get these without uninstalling and re-installing the program?


title: How to remove shapefile from PostGIS

text: I added a shapefile to the PostGIS using,               ogr2ogr -f PostgreSQL PG:"host=server_ip user=username dbname=dbname password=password" yourshapefile.shp;      Now I want to remove it. What is the command line code for that? The table list is as follows `\d`,               List of relations      Schema |         Name         |   Type   |  Owner       --------+----------------------+----------+---------      public | pimapine             | table    | smaranh      public | pimapine_ogc_fid_seq | sequence | smaranh     (2 rows)      And when I execute `DROP TABLE public.pimapine` there is no change to the output of `\d`.


title: Split line using line/point in PostGIS 1.5

text: I have a layer that contains a master line (one big polyline) and a another layer that contains "break lines". I need to be able to split the master line at the intersection of each of these break lines. I'm looking for a PostGIS 1.5 version of ST_Split. If I could upgrade to 2.0 I would but can't really do that at this point in time. I thought this would be relatively easy but can't seem to find anything; or when I do it's just related to polygons being split with polylines. _Note_ A spatialite answer is OK


title: SDE Topology dirty areas don't go away

text: Just looking for an explanation on SDE Topology dirty areas that don't go away. My workflow involves editing a version of SDE data, then once finished I use the Validate Topology in Current Extent tool. There is now a white box around my extent which looks good. Next when I save, reconcile and post the dirty area boxes all return. Is the picture below the way my data should look, or am I missing some steps? Thanks, Frank ![enter image description here](http://i.stack.imgur.com/m4GBT.jpg) The topo rules look something like this. ![enter image description here](http://i.stack.imgur.com/2Wx45.jpg)


title: Selecting Features in ArcGIS based on their relation other layers

text: I am extremely new to GIS mapping and I'm trying to do what I believe would be relatively simple. I have two layers: one contains data on school locations in Chicago and the other contains data on child abductions; both layers are point shape. What I would like is to only show the schools that are within one mile of a child abduction in order to reduce the number of features shown on the map. I apologize if this is a duplicated question, but the 'Similar Questions' box didn't suggest the type of question I'm looking to have answered. Thanks in advance for your help. Technical details: I'm operating on a Windows 7 OS using ArcEditor Single Use evaluation trial software. I'm somewhat familiar with Python (but not overly familiar) if needed.


title: How can I generate and publish raster images?

text: I have several hundred groups of data points (in lat/lng format). I want to generate heat maps for each group using kriging or similar interpolations and then display the generated raster images on a map server. What will be the best solution? I can't use ESRI products as they're not free. I know a little bit of Python. Thanks!


title: registry Setting for ArcGIS 931 on Windows 7 PC

text: I am having some issues with ArcGIS 9.3.1 instalation on Windows 7 PC. After installation, when I checked the regsitry setting, it shows: ArcInfo as entry (I chose the option of Arcview during install). it doesn't create other entries as well. I have an installer that looks for LOCAL_MACHINE\SOFTWARE\ESRI\ArcGIS\InstallDir and it doesnt find these settings. Is it possible that these entries have been removed and if that is the case, where does it save these settings in Windows 7 environment. Looking for some feedback. Thanks jay


title: Finding Raster Overlap within a Directory

text: Here is the scenario: I have a directory with 100+ map projected, single band, rasters that weighs in a 40GB+. I have used ArcMap's built-in mosaicing tools to create a raster mosaic. I am using a custom built suite of image processing tools to perform some stretching and model out some camera error. The next step is to work on contrast matching the overlapping rasters. I have used the color matching within Arc and am not happy with it. I want to implement my own modified algorithm using either poisson image gradient reconstruction or using a multiresolution spline technique. This will be done in python using GDAL, Numpy, and Scipy. Does anyone have any suggestions on techniques for finding raster overlap within a directory? The rasters are all variable size and orientation. They are all map projected to the same projection. Ideas so far that I have discounted:   1. Manually create a multiband .vrt, perform some array math, and return an array containing just the overlap. This unfortunately, fails to be automated as rasters need to be manually selected.   2. The images are all relatively close in contrast, so I considered performing some image matching to find areas of overlap. I discounted this based upon the size of the directory to be parsed.   3. Convert the image to a binary representation (1=data, 0=nodata), then polygonize, and check for overlap with the polygons.  Item three looks to have the most promise, but I am hoping that someone else will have a novel, fast, method.


title: How to display Google Fusion Table map search result attributes

text: I am creating a map with Google Fusion Tables that will allow me to search for a local food product and display on a map the retailer that carries it. Along with showing on the map the location of the retailer, I would like to list in a text box beside the map, other attributes associated with the food product, such as grower, whether it is organic or not, etc. I have the map and the search function created but have not been able to find example code for displaying the search results in a list beside the map. Does anyone know of a snippet of example code that will do this? Or any other tips? Thanks so much!


title: Looking for a world database with locations of medical centers, schools, kindergartens, etc

text: Is there some database with official information about medical centers, schools, POI's and their geo coordinates for all countries in the world? It doesn't have to be free, but I need the GEO coordinates as well, because I need to connect them to my products!


title: Insert a Mapnik Tile Between Google Base Map and Label Image

text: I'm currently using Mapnik to create choropleth tiles of regions in Brazil via node-mapnik by using the g.connector from Wax as in the code below and it works well.               var map = new google.maps.Map(document.getElementById('map-canvas'), {         center: new google.maps.LatLng(-23.1851, -51.0754),         zoom: 8,         zoomControlOptions: {             style: google.maps.ZoomControlStyle.SMALL         },         mapTypeId: google.maps.MapTypeId.HYBRID     });          var tiles = {     tilejson: '2.0.0',         tiles: ['url/{z}/{x}/{y}.png']     };     map.overlayMapTypes.insertAt(0, new wax.g.connector(tiles));      But I've noticed, using Chrome developer tools, that Google maps is sending two separate pngs per x, y, z tile back (one a 512x512 vt png with roads and labels and the second a 256x256 kh png of the ground). Using Wax or other JavaScript tools, is it possible to insert the PNG I'm getting back from Mapnik between the two Google map pngs? My goal is to get the labels to be on top of the images returned by Mapnik. This can certainly be accomplished by changing the opacity of the Mapnik tiles, but the colors don't stand out nearly as well when opacity is reduced. Any help is greatly appreciated.


title: Openlayers get coordinates of a circle vector after draw

text:
I have made a openlayers map. I have made two features on the map.               Navigate          DRAW POLYGON      I have made 40 sides to my polygon which turns out to be a circle. After I have drawn my circle I want to show the coordinates of the bounding box of the circle. So after I draw a circle i want to be able show the top, left, bottom and right coordinates for that circle in a ALERT BOX?

                         <input type="radio" name="type"                             value="none" id="noneToggle"                             onclick="polygonControl.deactivate()"                             checked="checked" />                         navigate

                         <input type="radio" name="type"                             value="polygon" id="polygonToggle"                             onclick="polygonControl.activate()" />                         draw polygon


title: MapServer SOS (Sensor Observation Service) Configuration

text: I tried to set up MapServer SOS but I faced a problem: the SOS doesn't return anything. You may see the map file I have created below:               MAP         NAME "SOS_DEMO"          STATUS ON          SIZE 400 300          EXTENT -180 -90 180 90          UNITS METERS          SHAPEPATH "C:\ms4w\apps\tutorial\data"          IMAGECOLOR 255 255 255               WEB            IMAGEPATH "C:\ms4w\apps\tutorial\templates"            IMAGEURL "C:\ms4w\apps\tutorial\images"            METADATA              "sos_onlineresource" "http://127.0.0.1:8282/cgi-bin/mapserv.exe?map=c:/ms4w/mysos.map?"              "sos_title"          "My SOS Demo Server"              "sos_srs"            "EPSG:4326"              "sos_enable_request" "*"            END          END               PROJECTION            "init=epsg:4326"          END               LAYER            NAME "sos_point"            METADATA              "sos_procedure"  "ifgi-sensor-1"              "sos_offering_id" "WQ1289"              "sos_observedproperty_id" "Water Quality"              "sos_describesensor_url" "http://127.0.0.1:8181/DescribeSensor.xml"            END                 TYPE POINT            STATUS ON            DATA 'sospoint'            PROJECTION              "init=epsg:4326"            END            CLASS              NAME 'sospoint'              STYLE                COLOR 255 128 128              END            END          END         END         As you see, I tried to retrieve sensor data from a shapefile. The message returned by the SOS is:               <om:ObservationCollection xmlns:gml="http://www.opengis.net/gml" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:swe="http://www.opengis.net/swe/1.0.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sos="http://www.opengis.net/sos/1.0" xmlns:ms="http://mapserver.gis.umn.edu/mapserver" xmlns:om="http://www.opengis.net/om/1.0" gml:id="WQ1289" xsi:schemaLocation="http://www.opengis.net/om/1.0 http://schemas.opengis.net/om/1.0.0/om.xsd http://mapserver.gis.umn.edu/mapserver http://127.0.0.1:8282/cgi-bin/mapserv.exe?map=c:/ms4w/mysos.map?service=WFS&version=1.1.0&request=DescribeFeatureType&typename=urban">       <om:member>     <om:Observation>     <om:procedure xlink:href="urn:ogc:def:procedure:ifgi-sensor-1"/>     <om:observedProperty>     <swe:CompositePhenomenon gml:id="Water Quality" dimension="3">     <swe:component xlink:href="urn:ogc:def:property:OGC-SWE:1:Id"/>     <swe:component xlink:href="urn:ogc:def:property:OGC-SWE:1:sensor_nam"/>     <swe:component xlink:href="urn:ogc:def:property:OGC-SWE:1:sensor_val"/>     </swe:CompositePhenomenon>     </om:observedProperty>     <om:resultDefinition>     <swe:DataBlockDefinition>     <swe:components>     <swe:DataRecord/>     </swe:components>     <swe:encoding>     <swe:TextBlock tokenSeparator="," blockSeparator=" " decimalSeparator="."/>     </swe:encoding>     </swe:DataBlockDefinition>     </om:resultDefinition>     <om:result></om:result>     </om:Observation>     </om:member>     </om:ObservationCollection>      Although I put 6 observations into the shapefile but the SOS doesn't return any. Would you please let me know what I should do to resolve the problem?! Thanks, Ebrahim


title: Shapefile to GeoJson conversion using C#

text: I have some shapefile which I want to convert to GeoJSON and store in MongoDB for querying. Is it possible to take a shapefile and convert it to GeoJSON format in C#? I have been able to convert shapefiles to GeoJSON from the drivers available online and then import the documents in MongoDB, but I wish to get this all done in C# only. Reason being the ability to let me do some changes to the document on the fly. If there is no solution available as such, then pointing me in the right direction would be helpful.


title: Mapinfo, (or other?) Interpolation of lat/long and finding minimum in a region

text: I have a series of lat/long coordinates, each with a corresponding Z value. Each coordinate is spaced roughly 40km apart (this is stored as a MapInfo table of points). What I'd like to do is to "refine" this bunch of coordinates so that I have interpolated values of Z every (say) 4km apart. I have a separate table of regions, and I'd like to get the minimum value of my (refined) Z in each region. I hope this makes sense! I have tried to:   * create a thematic grid using my lat/long, but then what I want to do is find the minimum in each region _using the thematic grid_ , and that doesn't work.   * I cannot browse my thematic grid either (I assume because Mapinfo stores this as a raster?) Am I going about this the right way? Can I do this in Mapinfo Prof.? Unfortunately, all my experience with MapInfo is doing a series of very repetitive tasks, and I'm a little outside my comfort zone here. If I can't do this in MapInfo, what tool should I use? Thanks, JD


title: Have I created a valid Spatialite database?

text: I didn't manage to find the better way to populate the exisiting Spatialite database with new computed data than just creating new columns and filling them in the Python script. You can see that the script is very straightforward:               #!/usr/bin/env python3          import json     import sqlite3     import shutil     import pprint          dbase = "./states.sqlite"     input_data = "./Real_GDP.trends"          #Add to the attribute table 'states' numerous columns with a FLOAT numbers     alterate_db = """\         ALTER TABLE states\         ADD COLUMN '{0}' REAL DEFAULT 0.0;\         """     #Fill the cells in new columns with a new data     update_db = """\         UPDATE states SET '{0}'={1} WHERE state_name='{2}';         """          #Function used for adding the new columns in a loop     def add_columns(data):         industries = []         for state, d in data.items():             for code, _ in d.items():                 if code not in industries:                     industries.append(code)         pprint.pprint(industries)         con = sqlite3.connect(dbase)         cur = con.cursor()         #Every new column will match the industry code         for i in industries:             try:                 cur.execute(alterate_db.format(i))                 con.commit()             except Exception as e:                 print("Exception: {0}".format(e))             else:                 pass         cur.close()         con.close()          #Function used for filling the DB with a new data     def update_table(data):         con = sqlite3.connect(dbase)         cur = con.cursor()         counter = 0         for state, d in data.items():             for code, values in d.items():                 if (values["p_value"] >= float(0.05)):                     trend = values["slope"]                 else:                     trend = 0.0                 try:                     cur.execute(update_db.format(code, trend, state))                     con.commit()                 except Exception as e:                     print("Exception: {0}".format(e))                 else:                     counter += 1                     if (counter % 100 == 0):                         print(counter)         cur.close()         con.close()               def main():         #Getting the working copy of database         shutil.copy2(dbase + ".backup", dbase)         #Loading the raw data that should be placed into the database         with open(input_data, "r") as f:             data = json.load(f)         add_columns(data)         update_table(data)               if __name__ == "__main__":         main()      The file that I finally get seem to be a valid Spatialite database. It can be viewed and accessed with a various tools ( _sqliteman_ , _spatialite-gui_ , _qgis_ and _qbrowser_ ). It's attribute table seems to be OK too. The only problem is that **the data from new columns cannot be rendered** (in QGis 2.2). This map was rendered from data extracted from the one of the old columns: ![enter image description here](http://i.stack.imgur.com/lz4wa.png) But I can see nothing but empty layout when I try to render map from any of newly added columns: ![enter image description here](http://i.stack.imgur.com/QHFvd.png) Since the QGis 2.2 is working fine, I guess that my problem was caused by the wrong methods of Spatialite DB editing (from my Python script). I would be glad if someone could point at the mistakes in the code above. P.S. It is unlikely, but still possible that someone can check the files that I work with:   * Real_GDP.trends - JSON file, the source of new data;   * states.sqlite.backup - the initial Spatialite DB (fully operational);   * states.sqlite - the resulting Spatialite DB populated with new data (partly inoperative: new columns are cannot be drawn);


title: Defining custom projection using baseline survey coordinates

text: I have CAD data that I need to incorporate into a GIS analysis. The CAD data does not have a defined projection, but the drawings include a table of survey baseline points. I need to know if I can build a custom projection based on this table: ![Survey baseline coordinates](http://i.stack.imgur.com/0A2RP.png) Is this enough information to construct a custom projection string, or do I need more data? The documentation references a "Borough of Queens Coordinate System", which turns up nothing in Google. My hope was that it's some obscure projection only used in New York City but that it could be recreated using the above table.


title: Administrative level and coordinates from Yahoo GeoPlanet WOEID

text: The Yahoo GeoPlanet data can be freely downloaded from: http://developer.yahoo.com/geo/geoplanet/data/. If I understand it correctly, each WOEID corresponds to a unique location on earth, with associated hierarchy indicators (continent, country, state, etc.). The complementary GeoPlanet Explorer site allows you to search by location name, and provides a nice hierarchy of parent, siblings and children. For example, this link provides an overview for the "Boudh" district in the state of Orissa in India, this link lists all its siblings, and this all the towns in the district. For every location (parent, siblings, children), the site queries and returns hierarchy (country, state, district, town) and coordinates (lat/long). My question is that **is possible to get the same information by running bulk queries on the WOEIDs in the GeoPlanet data, rather than using the explorer website and querying by name and then drilling down**?


title: Arc 10.0 dynamic chart titles?

text: Is it possible to dynamically generate a chart title based on a source feature class attribute value? Specifically, I am generating a series of cross-sections using an existing polyline f.c. ("XS_2009BEBrklnTerr_interpZ") and the "Create Profile Tool" from 3D analyst. Sample below: ![Example of Cross Section](http://i.stack.imgur.com/X80tY.jpg) I would like:   1. the Profile Graph Title to populate automatically from the [SegID] field (data type = double)   2. the Profile Graph Subtitle to populate automatically from the [Station] field (data type = double).  Note: line geometry and attributes are contained in the same f.c. in a file geodatabase (Arc 10.0, SP4). I have tried the following (unsuccessfully) by typing into the text portion of the chart's "Advanced Properties":   - writing as if a label expression (e.g."Segment " & [SegID])   - writing as dynamic text for Data Driven Pages: `Segment:<dyn type="title" property="SegID"/>` Thank-you,   Will EDIT - 6/17/14 I was unable to figure out within Arc, so I dived into Python. It's alot more complicated than I'd anticipated, but I think I'm on the right track. I believe my problem now is in using the 3D feature geometry as the input data axes...I will post in a separate question.


title: OL+Geoserver+PostGIS(postgreSQL)

text: My task is to store the values in the database(postgreSQL) when the user inputs the lat-lon values in the form. and after submitting the form, the map should be displayed with markers at corresponding lat-lon values stored in DB. I have achieved this task using PHP,ajax & storing values in a text file. Now I have to do the same task using Geoserver+PostGis for which I am totally new. I have just installed Geoserver,postGIS,PostgreSQL in my system. I want your help to how to carry this task step by step. How to store these values in DB, how to retrieve them using geoserver. Thanks in advance


title: Openlayers get coordinates from polygon

text: please could someone help me and bless me with an example of how to get coordinates from a polygon in OpenLayers?


title: Difference between registering with ArcSDE and registering with Geodatabase?

text: As I understand it :   * Registering with ArcSDE: gives the possibility to ArcGIS to recognize spatial data stored in a database   * Registering with Geodatabase: makes it possible for data to participate in Topology, NA, ... datasets Is there any other differences? Does one of those registrations include the other one? Are they different from one another?


title: How to calculate an Illumination raster for fire ignition danger analysis?

text: I am doing a fire ignition danger analysis using this equation that I found in Millington (2012) http://www.jmecology.com/wp- content/uploads/2014/03/33-42-MILLINGTON.pdf `IR = 4H + 3V + 2I – E` Where:               H = human presence (i.e. within 30m of a road/trails)     V = vegetation     I = Illumination     E = Elevation      It is based in another paper by Salas and Chuvieco (1994) that I couldn't find. My problem is the illumination raster. I found another link where they give some guidelines in how to create it, but I have not found any other reference. http://ibis.geog.ubc.ca/courses/geob370/students/class06/fire/mce.html Do you know where can I find information related to how to create this raster?


title: Qgis 1.9 issues with python

text: I already installed the version 1.9 of Qgis and when i runned e Script python on i could this error 'NoneType' object has no attribute 'children' however it works fine on qgis 1.8 could someone help me please !!


title: Is QGIS suitable to create maps with image popups?

text: I am a new user of QGIS and was wondering if I came across the right software to achieve my goal. Long story short, I am trying to create a map with markups of various buildings. Once I click on a mark, I would like to see details of that property and possibly a photo. Further more I would like to integrate this map on my website. Can you please advise me if QGIS can help me achieve this? Or would you have a better recommendation? I can see that the software capabilities are far more advanced than the purpose of my goal, but thought of asking for your advice. Many thanks. George


title: ST_Touches for more than just one geometry

text: I'd like to select some neighbor polygons with ST_Touches. Therefore I found the following statement:               SELECT b.name     FROM layera as a     JOIN layera as b       ON ST_Touches((SELECT a.geom FROM layera as a WHERE a.id = 5124),b.geom)     GROUP BY b.name      With this I get all the neighbor polygons of the polygon with the id '5124'. But now I want to call this function with a list of arguments. See the example statment below:               SELECT b.name     FROM layera as a     JOIN layera as b       ON ST_Touches((SELECT a.geom FROM layera as a WHERE a.id > 5000),b.geom)     GROUP BY b.name      (SELECT a.geom FROM layera as a WHERE a.id > 5000 returns lets say 100 results) I know that this won't work because ST_Touches works for only two arguments. But this should show what I'd like to do. How is it possible to insert all the results of a SELECT-statement into this ST_Touches function? Thanks for any suggestions. =) EDIT: Ok, I just found out that I get the same result set with this statement:               SELECT layera.name     FROM layera     WHERE ST_Touches(layera.geom,(SELECT layera.geom FROM layera WHERE layera.nr = 5134))       Anyway, the problem isn't solved. =(


title: Read Elevation from 1/3 Arc-Second NED .tif or .img

text: I'm trying to read multiple elevations from a USGS 1/3 arc-second IMG / GeoTIFF file. A sample of the files is available here (5 MB): http://tdds3.cr.usgs.gov/Ortho9/ned/ned_13/img/n43w108.zip I can query the .img file and get the elevation using GDAL: gdallocationinfo -wgs84 imgn60w145_13.img -144.267361111152354 59.9981944444444082 This returns: Report: Location: (7918P,25L) Band 1: Value: 1.2593731880188 Because a GeoTIFF can be read quite a bit faster than an IMG file (in my benchmarks) I convert the IMG to a WGS84 GeoTIFF: gdal_translate -a_srs WGS84 -of GTiff imgn60w145_13.img imgn60w145_13.tif gdallocationinfo only supports querying one point at a time. I need to get the elevation every 10 meters between 2 points (along a straight path), so I'm trying to read the file directly, with the following PHP code (but the approach is the same in C or Python): > ` $STRIPOFFSETS = 230; // 0xe6 $LEN_OFFSET = 4; $DATA_VOID = 0x8000; // data > void ( = signed int -32768) $LEN_DATA = 4; // the number of bytes containing > each item of elevation data // ( = BitsPerSample tag value / 8) $fp = > fopen("imgn60w145_13.tif", 'rb'); if ($fp === false) { echo "Could not open > the file\n"; } // first data offset fseek($fp, $STRIPOFFSETS); // find the > location of the required data row in the StripOffsets data $dataOffset = > $STRIPOFFSETS + ($row * $LEN_OFFSET); fseek($fp, $dataOffset); $dataBytes = > fread($fp, $LEN_OFFSET); $data = unpack('VdataOffset', $dataBytes); echo > print_r($data, true); // this is the offset of the 1st column in the > required data row $firstColOffset = $data['dataOffset']; // now work out the > required column offset relative to the 1st column $requiredColOffset = $col > * $LEN_DATA; // combine the two and read the elevation data at that address > fseek($fp, $firstColOffset + $requiredColOffset); $dataBytes = fread($fp, > $LEN_DATA); echo "1: " . $firstColOffset . " + " . $requiredColOffset . > "\n"; echo "2: " . $LEN_DATA . "\n"; echo "3: " . $dataBytes . "\n"; $data = > unpack('velevation', $dataBytes); $elevation = $data['elevation']; if > ($elevation == $DATA_VOID) { $elevation = 0; } echo $elevation . "\n"; ` I don't know that I have the right values for `$STRIPOFFSETS`, `$LEN_OFFSET`, or `$LEN_DATA`. The code above is a limited snippet from SRTMGeoTIFFReader (http://www.osola.org.uk/elevations/index.htm), which I'm not able to get to work either. I'd really prefer to be able to do this using a direct approach similar to the above (no external libraries, etc), but I can live with a Python / GDAL approach as well. Thanks!


title: How to reach a field value of a record in field calculator in ArcGIS 10.1

text: I have two fields showing number of people in two age groups "young" and "old". these people also live in a cell (point) whose distance to a specific facility is calculated. then I categorized these distances to two groups of "far" and "close". Now, I want to create four new fields that the values of "Old_far" and "young_far" will the exact values of aforementioned population groups if the cell is located in the group of far, otherwise they will be zero and the values go to the field of "Old_close" and "Young_close". the code for a field I tried follows: -for old_far:               def func(X):         if X==2:             return !old!         else:             return 0      Old_Far =               func(!distance_group!)      the code above returns an error of "exceptions.SyntaxError: Invalid syntax(Line 3)" I want to reach the value of the "old" field of the same record. Should I some how reach the value of that field?


title: insert cursor and arcpy.da.editor

text: I am trying to insert geometries and attributes to a featurclass the has attachments enabled. The featureclass is in an sqlserver SDE 10 database with service pack 2 installed and the featureclass is versioned. There are no problems manually editing the featureclass but I need to be able to add features, attributes and attachments via arcpy. My plan is to add geometries and attributes and using an insert cursor and then call arcpy.AddAttachments_management() to add the attachments. There is the code that is supposed to start the edit session and insert the geometries and path attribute.               edit = arcpy.da.Editor(edit_workspace)          edit.startEditing(True,False)     edit.startOperation()          sear = [[row[0],row[1]] for row in  arcpy.da.SearchCursor(outname, ('SHAPE@',"Path"))]     #arcpy.AddMessage(str(len(sear)))     insert = arcpy.da.InsertCursor(appedto,('SHAPE@',"Path"))     for row in sear:         #arcpy.AddMessage(str(row))         insert.insertRow(row)          edit.stopOperation()     edit.stopEditing(True)      I get an error at the insert.insertRow() statement which says that an edit session is already started. Any help with this would be great.


title: Replace point with polygon

text: I have a table of point, with a bunch of data attached. I need to replace them with polygons. Drawing a polygon creates a new record. Deleting the point deletes the record. How can I replace the point with a polygon without creating a new record and copy and pasting the data over?


title: Can Spatial Joins be used to perform One-to-Many Closest joins?

text: My situation appears rather simple, but it has given me headaches more than once already. I have a set of points and a set of polylines. I would like to use a spatial join to join the attributes of the closest line to the point data. However, there are many lines that have spatially coincident counterparts. That is to say, duplicate geometry exists that allows more than one line to occupy the _exact_ (emphasis) space as another line. However, when performing a One-to-Many join for Closest feature in a Spatial Join, only one line is chosen. This does not seem to be proper behavior, but perhaps I am mistaking the terminology? If so, is there a better method to create an output table that creates duplicate point features with the attributes of _all_ lines that are "closest?" Pictures for clarity: ![ArcGIS y u no count good](http://i.stack.imgur.com/01n7U.png) As you can see, there are 5 line features that are coincident at this location, but a one-to-many spatial join for closest feature only picks one. Coincidentally (that word never gets old), it is the first feature identified when the link is clicked with the Identify tool. They appear to list in order of ObjectID, but this may just be a... well, you know. Any ideas?


title: How to tell "Publish Service Definition"-Task to publish into a folder?

text: I'm currently working on publishing a SD-File using C#. Through another Question (Is it possible to publish a map service from an SD File purely over REST (no arcpy)?) I had a look on the source code of this example. This is a very helpful example, but I'm missing one information since this project does not consider to publish .sd files into a specific service folder. Now I'm wondering how the input parameters have to be set so the "Publish Service Definition"-Task (located in `<server>/arcgis/rest/services/System/PublishingTools/GPServer/Publish%20Service%20Definition`) would publish the service in an already existing service-folder. I could not find any documentation about this tool. I only found informations about the equivalent in the arcgis manager interface that I already knew, but I can't use since the publishing should happen in programmatic way. Edit: I tried to pass the foldername via the both input parameters beside the file- id without success. I tried passing `{ "folderName": "name" }` and `"folderName": "name"` as value for the parameters. I got the "best" result with the first version. Using this value with `in_config_overwrite` resulted in Error 001363 : Failed to update service definition with configuration overwrite.. Using this value with `in_publish_options` published the service in the root folder. When looking via firebug ect. at the called adress from the publish dialog in the arcgis-manager, I see that all parameters changed by user in the dialog and other parameters from the sd-file get merged to a huge json string which is set as value of `in_config_overwrite`. From there I also got the idea to try it as described. Anyway I still don't have success and got no new idea how which parameter I should use and how the value should look like to get the service published into a specific, already existing service folder.


title: Change Circle Size According to Value using R

text: How do I change circle size in a population map according to the population density of the location?               library(maptools)     library(RColorBrewer)     library(classInt)     library(maps)          ## load the file ##     pop <- read.table("[pop.txt][1]", header=TRUE, row.names=1, sep=",")          ## select color palette and the number colors to represent on the map ##     colors <- brewer.pal(9, "YlOrRd")          #set breaks for the 9 colors      brks<<-classIntervals(pop$POP10, n=9, style="quantile")     brks<- brks$brks          map(database='state',regions=c("California"),col="black", lwd=.3, resolution=.1)     points(pop$LONG, pop$LAT, pch=21, bg=colors, cex=0.7, lwd=.4)      This way I obtain a map like this. ![Messy California population map](http://i.stack.imgur.com/9TKOZ.jpg) I would like to create a map that shows very small dots for little population density (lighter points in the example) and bigger dots as the population density increases.


title: Opening New mxd into existing mxd from command button on form in VBA

text: > **Possible Duplicate:**   >  How to define Subroutines and functions? I am programming a dialog box in VBA because Python does not have one yet!! The action that needs to occur is for an mxd to open in existing mxd. Explained: The user opens an mxd a dialog box pops up right away, they make selections in combo boxes and then hit the MAP button which then will go grab the mxd that they have asked for from the combo boxes. The ThisDocument code is listed below:               Option Explicit          Private Function MxDocument_OpenDocument() As Boolean                Dim frm As frmMapSetUp           Set frm = New frmMapSetUp           frmMapSetUp.Show          End Function               Private Function MxDocument_NewDocument() As Boolean     'First Try     Dim pMxDoc As IMxDocument     Dim pMap As IMap          Set pMxDoc = IApplication.OpenDocument()               'Second Try     Dim mapDocument As New mapDocument          If mapDocument.IsPresent("K:\TASS\4_MAPPING_DATA_SUPPORT\Traffic_Mapping\District_Maps\2012\Abilene\Abilene_Base_Map.mxd") Then     mapDocument.Open ("K:\TASS\4_MAPPING_DATA_SUPPORT\Traffic_Mapping\District_Maps\2012\Abilene\Abilene_Base_Map.mxd")     End If               End Function      And then the code for my buttons is below:                       Private Sub cmdCancel_Click()                   frmMapSetUp.Hide                  End Sub              Private Sub cmdMap_Click()              Dim cboDistricts As String              If cboDistricts = "Abilene" Then GetMap ("K:\TASS\4_MAPPING_DATA_SUPPORT\Traffic_Mapping\District_Maps\2012\Abilene\Abilene_Base_Map.mxd")         Elif             If cboDistricts = "Amarillo" Then GetMap ("K:\TASS\4_MAPPING_DATA_SUPPORT\Traffic_Mapping\District_Maps\2012\Amarillo\Amarillo_Base_Map.mxd")             Elif                 If cboDistricts = "Atlanta"         End Sub      I hope this is thorough enough!!!


title: Setting a path to a Variable to be able to open a new mxd?

text: > **Possible Duplicate:**   >  How to define Subroutines and functions? I know its strange but I need to be able to open a new mxd into an existing one. Yes, it can be done. All I need to do is set a path to a variable(most likely iApplication). From dialog box, user selects a district name to open that districts mxd. I believe the code would be Application.iApplication.OPenDocument(Path to folder). But I am having trouble with the sub and function declaration. It keeps giving me an error of sub and function not declared. Sample is below : Private Sub cmdMap_Click()               Dim District As String     Dim map As mapDocument     Set map = New mapDocument          map.District = ComboBox("Abilene")          Call DrawTasks.RenderMap("Abilene")          Application.IApplication.OpenDocument ("K:TASS......")      End Sub


title: GeoServer timestamp format

text: In my app, I use GeoServer to serve my features and OpenLayers as a client. My data contains dates info in this format: `'yyy-mm-dd hh-mm-ss'` but when it comes from GeoServer, it appears like: `2013-01-08T06:17:37+03:00` !! How can I change its format?


title: Geoserver animator request using OpenLayers

text: I have question on how to use the Geoserver WMS animator. When I make a request with my layer using WMS animator, paste it in the url tab it works well. I have this viewer in the client side and I made a request using the same url. here is my code:               var flooding = new OpenLayers.Layer.WMS("Flooding Sample",     "http://localhost:8001/geoserver/wms/animate?layers=workspace:layer&format=image/gif;subtype=animated&aparam=elevation&avalues=10,20,30&format_options=gif_loop_continuosly:true;&width=640",     {     layers: "workspace:layer", format: 'image/gif',         transparent: 'true'},         { ratio: 1,         //maxExtent: extent,         singleTile: false,         isBaseLayer: false,         visibility: false         }     );      I make my request the same as I request other layers from geoserver. Do you have any idea on what is the proper way to configure this?


title: Coordinate system in aerial imagery

text: I am calculating WGS84 coordinates of points in an aerial image, given the WGS84 coordinates of the center of the image and the ground distance width and height (calculated from altitude and lens field of view). Images cover a ground area of no more than 150x100m. Thus far, I have neglected the effects of any coordinate system, and linearly calculated coordinates from the center coordinate. Some inaccuracy in the coordinates has been noticed, particularly near the edges of images, and I am wondering if my neglect of coordinate system and projection is at fault. If I were to take it into account, what "projection" would my images be in? Could I simply convert to UTM Zone X for the computation, and convert the final result back to WGS84, or is UTM not an accurate representation of an image either?


title: GDAL tiling with a lot of MrSID files

text: I'm trying to generate tiles for a region with a surface of 85k km2. The data source are MrSID files (2734 files). I'm using gdal to achieve this task. It works fine with a small subset of MrSID, but with all the source files it would take more years than I could live :). My process for generating tiles is the following:               # create the mosaic     gdalwarp -of GTiff -dstalpha -r cubic [MrSID Files] mosaic.tiff`          # generate tiles from mosaic     gdal2tiles.py -r cubic -s EPSG:23030 -z 3-17 -v mosaic.tiff      At first I've chosen a subset of 30 MrSID and it takes 10 hours and it works. Check here. After that, I've tried with all the MrSID files and I can't reach to create the mosaic, after two days gdalwarp is at 1% processing the first MrSID. As a workaround, I've tried to avoid the creation of the big mosaic, I've called gdal2tiles for each MrSID, and merging the shared tiles with imagemagic. The issue with this method is that I need a huge quantity of temporal files (30 MrSID files (90MB) give me around 30GB of temporal files). Any ideas how can achieve this? Is it possible create such a big mosaic? Do you suggest me another strategy? MrSID files are like this:               Driver: MrSID/Multi-resolution Seamless Image Database (MrSID)     Files: test/807-1-3.sid     Size is 7355, 4796     Coordinate System is `'     Origin = (309892.000000000000000,4291525.000000000000000)     Pixel Size = (1.000000000000000,-1.000000000000000)     Metadata:       ICC__Profile=0,0,1,148,65,68,66,69,2,16,0,0,109,110,116,114,71,82,65,89,88,89,90,32,0,8,7,212,0,19,0,2,0,29,0,23,97,99,115,112,77,83,70,84,0,0,0,0,110,111,110,101,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,246,214,0,1,0,0,0,0,211,45,65,68,66,69,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,99,112,114,116,0,0,0,192,0,0,0,36,100,101,115,99,0,0,0,228,0,0,0,119,119,116,112,116,0,0,1,92,0,0,0,20,98,107,112,116,0,0,1,112,0,0,0,20,107,84,82,67,0,0,1,132,0,0,0,14,116,101,120,116,0,0,0,0,40,99,41,32,50,48,48,52,32,65,100,111,98,101,32,83,121,115,116,101,109,115,32,73,110,99,46,0,100,101,115,99,0,0,0,0,0,0,0,28,69,115,99,97,108,97,32,100,101,32,103,114,105,115,101,115,32,45,32,71,97,109,97,32,50,46,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,88,89,90,32,0,0,0,0,0,0,243,81,0,1,0,0,0,1,22,204,88,89,90,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,99,117,114,118,0,0,0,0,0,0,0,1,2,51,0,0       IMAGE__COMPRESSION_BLOCK_SIZE=512       IMAGE__COMPRESSION_GAMMA=2.000000       IMAGE__COMPRESSION_NLEV=8       IMAGE__COMPRESSION_VERSION=2,0,0       IMAGE__COMPRESSION_WEIGHT=4.000000       IMAGE__CREATION_DATE=Sat Jan 12 13:20:09 2002            IMAGE__INPUT_FILE_SIZE=35277072.000000       IMAGE__INPUT_FORMAT=TIFF w/ World File       IMAGE__INPUT_NAME=H:\Imagenes\MrSid\Vuelo_Americano\comp\807_1_3.TIF       IMAGE__STATISTICS_MAX=255       IMAGE__STATISTICS_MEAN=231.585752       IMAGE__STATISTICS_MIN=1       IMAGE__STATISTICS_STANDARD_DEVIATION=58.039863       IMAGE__TARGET_COMPRESSION_RATIO=10.000000       PShop__ImageResources=       VERSION=MG2     Corner Coordinates:     Upper Left  (  309892.000, 4291525.000)      Lower Left  (  309892.000, 4286729.000)      Upper Right (  317247.000, 4291525.000)      Lower Right (  317247.000, 4286729.000)      Center      (  313569.500, 4289127.000)      Band 1 Block=1024x128 Type=Byte, ColorInterp=Gray       Minimum=3.000, Maximum=255.000, Mean=232.406, StdDev=53.985       Overviews: 3678x2398, 1839x1199, 920x600, 460x300, 230x150, 115x75, 58x38, 29x19


title: How to insert a list of parameters from a parametric view in OpenLayers?

text: After successfully (with the precious help of members from stackexchange) creating a Geoserver parametric view that works as it should, now i'm facing another problem: How to pass a list of parameters from a given view in a **new OpenLayers.Layer.WMS** call. From the geoserver user manual it is stated that The viewparams argument is a list of key:value pairs, separated by semicolons:               viewparams=p1:v1;p2:v2;...      But since i'm calling the viewparams in an openlayers new wms layer, as soon as i put the semicolon on the script:                var x = new OpenLayers.Layer.WMS(             "y",                 "http://10.194.32.103:8080/geoserver/wms",                 {'layers': 'vista', 'format':'image/png', 'transparent':'true', viewparams:'parameter:data';'parameter1:data1'},                 {'opacity': 1, 'isBaseLayer': false, 'visibility': false}                 );      i get an error: ![enter image description here](http://i.stack.imgur.com/gpUno.png) Any ideas on how to overcome this situation? Thanks!


title: Calculating distances between boundaries of polygons with Python

text: I have two sets of shape-files which have to be worked on within a Python Script. Those two Shape Files _might_ differ from each other (same thematic content, but 2 different epochs). If there occurred a change in geometry over the years within an object I am supposed to detect it, but only if the boundary changed more than x m in at least 1 place. I am working completely with open source libraries within my scripts. Does anyone have an idea how to solve that problem?


title: Converting ascii windspeed files to rasters

text: I have been trying to convert windspeed files to rasters without success. It was discussed in an Arcgis forum which I followed. This involved replacing semi-colons with spaces and adding a header. I was hoping to include one of the original .asc files together with a .csv version I 'cleaned up'. Unfortunately I cannot see how to do this without copying and pasting the text. The first line of the original .asc file is:               Conversion of speed45i.dat   Wind m/s  Wind Speed @ 45m N. Ire      (100,  499); 0.0; 0.0; 0.0; 0.0; 0.0; 0.0; 0.0; 0.0; 0.0; 0.0; 0.0; 0.0; 0.0; 0.0; 0.0; 0.0; 0.0; 0.0; 0.0; 0.0; 0.0; 0.0; 0.0;       I changed this to:               ncols 700     nrows 1300     x||corner 0     y||corner 0     cellsize 1000                                                                                "     "( 0 1299) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ;"      When I usen the raster translate convert format plug-in I got the error message: > The process failed to start. Either the invoked program is missing, or you > may have insufficient permissions to invoke the program. Any suggestions gratefully received.


title: TIFF/Raster to Point shapefile question

text: Apologies in advance if this question is incredibly basic, but I've been googling around and I just don't know where to start. I've downloaded some nighttime luminosity data from NASA, and the data comes in TIF format. I've managed to add the TIF in as a layer in ArcGIS 10, and I've cropped it to be focused just on Africa, but it's a pretty detailed dataset. I think each pixel has an associated value of luminosity, from 0-63. So, basically I'm trying to get some kind of attribute table out of this that lists each individual pixel and the associated luminosity, along with latitude and longitude of each pixel. I thought the easiest way to go about doing this was to do Raster to Point (so I get a shapefile, something I'm more used to working with), but I tried doing this and received the error that the output was over 2 GB and the process couldn't be finished. Does anyone have any tips? I also have QGIS if working in that might be easier.


title: How to resample a raster in QGIS?

text: I've got a boundary file that I would like to resample the raster file from a 30m grid to a 10m grid inside the boundary file. When I try and do it in Qgis or Grass all I get is one big raster cube that doesn't have any data in it. Can someone help me figure out what I'm doing wrong? Thank you! * * * NDVI File: http://www.filedropper.com/clippedndviespg43262011aug18thndvi DBF: http://www.filedropper.com/e1aborder_2 SHP: http://www.filedropper.com/e1aborder_3 SHX: http://www.filedropper.com/e1aborder_4