title: Copy an attribute in ArcPad EXCLUDING the unique Identifier

text: I'd like to use the toggle button to 'copy attributes' when creating points in ArcPad. Currently, I can't because I'm using the date (+ time) field as my unique identifier to link to related tables. Is there any way to exclude an attribute (in my case the unique id) from the copy attributes toggle action?


title: PostGIS 2.0 and Postgres 9.1: ST_Transform => failed to load NAD27-83 correction file (Windowsx 64)

text: after making a clean install with the latest stable release of postgis (2.0) i can't perform any transformations:               SELECT ST_Transform(ST_SetSRID('BOX3D(2644033.2454124987 4580030.29781942,2645409.1119216317 4581406.1643285528)'::box3d,3785), 4326)      The above raises the error:                NOTICE:  PostGIS was unable to transform the point because either no grid shift files were found, or the point does not lie within the range for which the grid shift is defined. Refer to the ST_Transform() section of the PostGIS manual for details on how to configure PostGIS to alter this behaviour.                ERROR:  transform: couldn't project point (2.64403e+006 4.58003e+006 0): failed to load NAD27-83 correction file (-38)                ********** Error **********           ERROR: transform: couldn't project point (2.64403e+006 4.58003e+006 0): failed to load NAD27-83 correction file (-38)      SQL state: XX000      Tried the other suggestions of copying proj in contrib folder, restarting pg service with no luck. Any ideas? UPDATE: Something really weird is going on here. When executing the statement right after a PG restart it works! Any following statements after that fail! -- Executing query: SELECT ST_AsText(ST_Transform(ST_GeomFromText('POINT(2649262.94974021 4579345.79221865)', 3785), 4326)) Total query runtime: 20 ms. 1 row retrieved. -- Executing query: SELECT ST_AsText(ST_Transform(ST_GeomFromText('POINT(2649262.94974021 4579345.79221865)', 3785), 4326)) NOTICE: PostGIS was unable to transform the point because either no grid shift files were found, or the point does not lie within the range for which the grid shift is defined. Refer to the ST_Transform() section of the PostGIS manual for details on how to configure PostGIS to alter this behaviour. ERROR: transform: couldn't project point (2.64926e+006 4.57935e+006 0): failed to load NAD27-83 correction file (-38) _**_*** _**Error **_** _*_** George


title: ArcObjects DeleteLayer leaving layer artifacts

text: I'm working on some code for a button in ArcGIS 9.2 using Visual Studio 2005. The process adds a point layer, performs a select by location, exports the attributes of the selected points, then removes the point layer. The code I'm using to remove the point layer at the end of the process is:               Dim pDL As IDataLayer2 = pPtLayer 'QI     pDL.Disconnect()     pMxDoc.FocusMap.DeleteLayer(pPtLayer)     pMxDoc.UpdateContents()     pMxDoc.ActiveView.Refresh()      But there are remnants of the point layer remaining after the process has completed. In the command window, a list of the layers indicates it is still being referenced. This is causing to button to perform incorrectly if it is used multiple times in a session. How can I remove the layer without leaving these 'artifact' references? (Also posted at http://forums.arcgis.com/threads/54771-Data-References-Remain- After-Calling-DeleteLayer)


title: Integrating DSLAM attainable bitrates

text: This is a really specific question, but anyone with experience trying to pull in outside information into a map (live or static) can probably add something to the question. A long winded post is here http://www.thadwester.com/1/post/2012/04/mapping- attainable-bitrates-for-rural-telcommunication.html Does anyone have experience mapping attainable bitrates? OR how were you successful in pulling data from a non GIS source and integrating it into your map.


title: How does ESRI, and how should anyone, transform a coordinate that lies outside a grid transform (e.g. NADCON)?

text: As I understand it, a datum transform (e.g. `urn:ogc:def:coordinateOperation:EPSG::1241`) based on a grid interpolation method, e.g. NADCON, is undefined outside of the grid of points. Therefore the lat/long of Mexico city as expressed in NAD 1927 cannot be converted to WGS 1984 by way of this NADCON conversion -- it's not in the United States. If you call the ESRI projection engine directly (`pe.dll#pe_geog1_to_geog2`), it simply doesn't transform the coordinates outside of the NADCON grid, though does return a code reminding you that this has happened. (The return code is the # of points transformed, which if less than the # of points you passed in is a sign of trouble.) My guess is that (most?) everywhere else in the ESRI stack, this return code is ignored, and the transform is simply left as effectively zero outside of the grid area. This might be as good an answer as any. What should we be doing instead? In our code at the moment we throw an exception, but this is a contagious and awful thing as it means people looking at studies using this transform can't zoom out past a certain extent.


title: Generate non-overlapping shapes from a buffer

text: I have a collection of points, and I need to generate shapes around these points. Let's assume that these points are locations of offices and that the shapes are the 'area of responsibility' around the offices. The area of responsibility is defined by airline distance. This can be easily solved by a buffer function. But now: It is possible that offices are very close to each other and that the areas of responsibility of two or more offices overlap. In this case, only one (the closest) office is responsible. Is it possible to generate such shapes without iterating over the positions in the overlapped area?


title: ArcGIS GeoProcessing Model - Store List of Altered Features in Database

text: I am trying to build a GeoProcessing model which will find any parcels that have had their geometry values changed and store the corresponding parcel numbers in a separate non-spatial table. I am using ArcGIS 10. Does anyone know of any python scripts that would accomplish these tasks? One potential solution I found is the Compare Layer to Snapshot tool. Even though this is listed in the ArcGIS Resource Center, I can not find it in my version of ArcMap. Any advice would be greatly appreciated.


title: How to speed up OpenLayers with WFS in IE?

text: I'm using Openlayers, Geoserver and noticed that IE is very very slow to display WFS layers. I haven't so many WFS features, about 300. Google base layer appears after 1 sec. but my two WFS layers need each from 10 to 20 seconds to display. With Chrome, it requires only 2 seconds. I tried to disable style rules, events, no change. It's really a client issue, my cpu goes up to 50% for iexplore during features loading. I tried with IE8 and 9, with two differents pc, same results. It seems that I'm not the only one. I can keep using Chrome but would be interested to share ideas Olivier


title: ArcMap changing toolbars

text: I have a set of Arcmap map templates, the toolbars within them at one time where fixed in position. Now for whatever reason, every time I or another open the template the ordering of the toolbars has changed. Any Idea how to fix this? * ** _Research_ *** May be related to this bug. Is ArcGIS Desktop-ArcMap 10 affected by the stacked toolbars bug (NIM003161) when opening an MXD on multi-monitor configurations?


title: How to locate a house on the 3D Map correctly?

text: I've done my 3D map generation in WebGL/THREE.JS project and have an issue with the building locations. I have the data about building position ( its polygon ) from DB server, but first of all I want just to locate not the polygon data, but a simple cube. The aim is clear is as a crystal: `to set a building to the correct position by putting a cube on the 3D map.` Now it does look like: ![enter image description here](http://i.stack.imgur.com/DNocy.png) I have demonstrated it, because I want to admit, that to create a building and place it on the map - isn't a problem. The problem is to set building into the correct position/location on the map. What I have done before? Because the building record has two fields in DB:               position on map ( lat | long ) | polygon data of building ( points collection )      I thought that I must convert the geospatial coordinates of each building: latitude, longitude to its cartesian values, because WebGL/THREE.JS don't work with the shperical/geographic coordinates system. So I have built also a JSON web-service which helps in data transformations and similar aims. For e.g. the conversion of the point { 38.23, 55.89 } to its cartesian representation: ![enter image description here](http://i.stack.imgur.com/MCwxe.png) Now... I'm really confused how to use it for locating the building correctly on the map. If you would like see, I'm prinring the position of each building in console: ![enter image description here](http://i.stack.imgur.com/7CEd5.png) Spherical coordinates and converting at web-service side by such formula in my C# code:               internal Models.PointCartesian ConvertFromSphericalToCartesian(double angleTheta, double anglePhi)     {         var radTheta = ConvertDegreesToRadians(angleTheta);         var radPhi = ConvertDegreesToRadians(anglePhi);              var model = new Models.PointCartesian()         {             X = earthRadius * Math.Cos(radTheta) * Math.Cos(radPhi),             Y = earthRadius * Math.Cos(radTheta) * Math.Sin(radPhi),             Z = earthRadius * Math.Sin(radTheta)         };              return model;     }      So... Right now I'm thinking about some proportions to use... But this way can be incorrect... So what's your suggestion how to set a cube into the correct position on the 3D map just for showing the real position of some buildings. PS: The records lat | long of each building in DB is 100% correct. Thanks!


title: Changes in digitised features according to scale

text: I have a forest boundary from surveyed toposheet digitised on 20,000 scale. When I see the same on 6,000 scale, there are certain changes like smoothing at the edges, slight shift etc. Why does this happen. If the scale of mapping changes, are the features going to be same or can we expect changes in shape and size?


title: Update PG table setting an area_id

text: I have a table with lots of points which I'd like to update and set a consecutive area_id to every point "group". I define a point "group" as points that are within a 500 meters radius. The raw table is something like:               point_id    desc_string       lat            lon          gid        geom     A           Glion           25.057939     55.187833       1     B           Glion           25.061244     55.185937       2       C           Springs         46.433853     6.926215        3     D           Springs         46.431851     6.923763        4     E           Hobby Center    24.221813     55.780285       5     F           Ponte           -12.643624    14.864234       6     G           Ponte           -12.644966    14.866923       7     H           Ponte           -9.093045     17.658906       8      You can now see that there are different pairs or groups of points. With the following SQL I can identify the points which by definition belong to these groups:               SELECT distinct on (point_id) t1.*      FROM ciss_poi AS t1 JOIN ciss_poi AS t2 ON St_dwithin(t1.geom, t2.geom, ( 0.5 / 111.111 ))      WHERE t1.desc_string = t2.desc_string AND t1.gid != t2.gid      What I want is to group these pairs and add an area_ or group_id:               point_id    desc_string       lat            lon          gid        geom     group_id     A           Glion           25.057939     55.187833       1                   1     B           Glion           25.061244     55.185937       2                   1     C           Springs         46.433853     6.926215        3                   2     D           Springs         46.431851     6.923763        4                   2     F           Ponte           -12.643624    14.864234       6                   3     G           Ponte           -12.644966    14.866923       7                   3      I have no idea how to write the query. I can identify the groups but I don't know how to add the area_id. Can someone please help me? Thank you very much!


title: How to refer KML style inside TileMill

text: The following KML file contains paths with style and name tags: example.               <Folder>               <name>Pedestrian</name>               <Style id="style-Pedestrian">                 <LineStyle>                   <color>#ff808080</color>                   <width>3</width>                 </LineStyle>               </Style>               <Placemark id="">                 <styleUrl>#style-Pedestrian</styleUrl>                 <LineString>                   <altitudeMode>relativeToGround</altitudeMode>                   <coordinates>8.5950278,46.6329618,1 8.5951371,46.6329856,1 8.595266,46.6327811,1 8.5951712,46.6327501,1 8.5950278,46.6329618,1</coordinates>                 </LineString>               </Placemark>     ....      I tried to refer to the styles, but the TileMill does not recognize it. After I import the files and apply the style using "Carto styling language" the path just disappears. Example:               #imported_id {       [Name="Pedestrian"] {         line-width:2;         line-color:#000000;       }     }          #imported_id {       [Name="style-Pedestrian"] {         line-width:2;         line-color:#000000;       }     }          #imported_id  #style-Pedestrian {              line-width:2;           line-color:#000000;            }      Why I can't refer to the styles inside the TileMill? Is it possible or I am doing something wrong?


title: Differences between SQL dialects in QGIS vs ArcView vs Oracle

text: I'm kinda new with SQL queries and there is something I don't get: A SQL query in QGIS is written differently than the same query in ArcView and will probably also be written differently if I want to query an Oracle db using an Oracle tool. So is it like SQL is a language and each software uses its own slang of the same language ? EDIT: Thanks for those answers! Now do you guys know of a documentation somewhere that would teach me how to make a query in QGIS field calculator. I can make a simple one using the implemented functions, but what about something more complex (using case when, where, and so on) ?


title: Needed a free high resolution imagery for Las Cruces, New Mexico area

text: I'm Looking for a free download Imagery that is a very high resolution and the most recently like the past 3 months. I'm doing to produce a map where our new building being move into next year ? Is that possible for me to find one online ? Any suggestion ? Thank you.


title: Help with field calculator in Python script

text: I am getting a syntax error in my script but I know from testing it in ArcMap attribute table, the syntax is fine. Anyone have any idea why this code doesn't work? I see that a search cursor has been used in this situation but (a) I'm not familiar with them and (b) why wont the way I'm doing it work? Thanks for any help, time and consideration. EDIT* - I have added an alternate working codeblock to the script below. Seems both ways work just fine!               import arcpy, os     from arcpy import env          #Path of the workspace     in_workspace = r"C:\folder"          fieldName = "Symbology"          expression = "Class(!City!)"      This is also another way that it works. So both work just fine. Thanks again for all the help!               code ='''     def Class(City):         if 'Milwaukee' in City:             return 2         elif 'Kenosha' in City:             return 4         elif 'Madison' in City:             return 9         else:             return 0     '''          for dirpath, dirnames, filenames in arcpy.da.Walk(in_workspace, datatype="FeatureClass",type="All"):         if "skipFolder" in dirnames:             dirnames.remove('skipFolder')            for filename in filenames:             if "City" in [f.name for f in arcpy.ListFields(os.path.join(dirpath, filename))]:                 arcpy.AddField_management(os.path.join(dirpath,filename), fieldName, "SHORT", "", "", "", "", "NULLABLE")                 arcpy.CalculateField_management(os.path.join(dirpath,filename), "Symbology", expression, "PYTHON", code)             else:                 print "no City field for dataset ", filename          #Prints text that shows script has finished running     print "message that reflected field calc use"     print "Finished script"


title: How to retrieve all subtype codes from ISubtypes interface

text: I'm trying to retrieve all subtypes for a given feature class. ISubtypes.Subtypes give you an enumeration of all subtypes in the class. However the IEnumSubtype.Next method requires the subtype code to retrieve the associated subtype. But this obviously requires prior knowledge of all subtype codes. There are no methods on ISubtypes that retrieve all subtype codes. So, how do I obtain a list of both the subtype codes and subtype names associated with a feature class? I must be missing something obvious here.


title: Any source code for converting an infix filter to a WFS filter?

text: A WFS GetFeature query looks _something_ like this: http://hname/arcgis/services/sname/MapServer/WFSServer?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.0.0&MAXFEATURES=1001&FILTER=%3CFilter%3E%3CPropertyIsEqualTo%3E%3CPropertyName%3EADDRKEY%3C/PropertyName%3E%3CLiteral%3E1001%3C/Literal%3E%3C/PropertyIsEqualTo%3E%3C/Filter%3E&TYPENAME=Addresses But users would want to enter something like "ADDRKEY = 1001" so it becomes necessary to convert the infix expression to a AST and then into a WFS filter. Are there any reusable solutions for converting an CQL filter into a OGC filter?   * "A=b" is converted into   * "<PropertyIsEqualTo><PropertyName>A</PropertyName><Literal>b</Literal></PropertyIsEqualTo>"


title: Metadata -auto build using python

text: We have a large (10,000 plus) repository of spatial data (shp/gdb/tab vectors and ecw/tif rasters and also las, xyz and DEM data) where some have metadata records in xml using anzlic metadata editor. I want to check if each spatial dataset has an associated xml record and check the projections, spatial extent, source and size against the associated spatial file. I have created a arcpy based script to extract this info from ESRI readable formats but am unsure on how to handle tab files and more importantly how to check it against the anzlic metaeditor based xml record. So if we have citypoints.shp/.tab then we should have citypoints_metadata.shp/.tab.xml as the metadata record -this is separate from the citypoints.shp.xml that some software autocreate. Another similar forum question is ANZLIC Metadata in ArcGIS 10 but it doesn't cover the requirement to check for the existence of a valid record and dealing with .tab (other non-esri) formats in an opensource/creative commons workspace as per my question (http://gis.stackexchange.com/questions/13676/how-to-read- mapinfo-tab-files-in-arcpy). I also looked through the software mentioned in Looking for a Metadata Editor but none of them autogenerate the base metadata file or allow comparing of existing records against the source.


title: Reprojecting sources with MapProxy yields distortion

text: I have configured MapProxy to aggregate imagery from a number of Internet sources so that I can dynamically overlay them by adjusting the `layers=<x>` query that I pass to MapProxy's WMS service. This all seems to be working properly. Here's the problem: some of the sources are TMS servers, which use the spherical Mercator (EPSG:900913) projection. Some of the others are WMS servers that only serve data in the EPSG:4326 (WGS84) projection. MapProxy is nice enough to handle this for me, caching the images in their native projection and then reprojecting them to the target projection when I request them. However, there is a great deal of distortion in the resulting images near the -180/+180 degree longitude line. Here's an example: ![enter image description here](http://i.stack.imgur.com/wtcI0.jpg) The source image is from MapQuest's Open Aerial service, which is in global Mercator. The above is MapProxy's reprojection of the source to EPSG:4326. For most of the globe, it looks great, but the rightmost part of the image is obviously way off. If I request it in its native projection, then I get a nice image: ![enter image description here](http://i.stack.imgur.com/YZHQ4.jpg) I see very similar results if I take an EPSG:4326 source (Landsat images from this WMS source) and request it from MapProxy using EPSG:900913: ![enter image description here](http://i.stack.imgur.com/agJRm.jpg) Am I missing something fundamental here? Is this to be expected?


title: How to obtain statistics within a Buffer/Catchment in MapInfo?

text: I need to calculate the population statistics within a 10 minute drivetime catchment from a point and within 1 Km Buffer from a point in MapInfo, how can I do that can someone please elaborate? I have a population thematic map and I have made a buffer on one location and I need to find the total population living within that area? I am also using a Drivetime addon with MapInfo for drive time catchments and Mapinfo to make Buffers. Many thanks


title: postgresql pgrouting define C function function with int* arguments

text: I want to create a psql-C function with an undefined length list of integers (GIDs for example). An erratic example using V0 function definition that works is like:               int mytest4(int *x, int i){       int *a  = &(x[6]);       int j;       for (j = 0; j < i; j++)          printf("Passed on %d", a[j]); // sent to logfile       return a[i];     }      My question concerns the V1 functions to read an int array. I don't understand how to do               PG_FUNCTION_INFO_V1(mytest5);     Datum mytest5(PG_FUNCTION_ARGS){     int *x = PG_GETARG_???(0);     int i = PG_GETARG_INT32(1);     ...      Does anyone know how to write the same function, please??


title: Using Google Tiles on LeaftLet

text: I would like to use the Google tiles on LeafLet (RoadMap, Satellite,...). I've tried this https://github.com/shramov/leaflet-plugins and it works fine, but I'm worried about the possible legal issues of this solution. The following text is an extract of LeafLet FAQ. > The problem with Google is that its Terms of Use forbid any means of tile > access other than through the Google Maps API. > > You can add the Google Maps API as a Leaflet layer with a plugin. But note > that the map experience will not be perfect, because Leaflet will just act > as a proxy to the Google Maps JS engine, so you won't get all the > performance and usability benefits of using Leaflet when the Google layer is > on. I think that's right but it depends on the point of view and the differences in interpretation of the Google Maps Terms of Use. For example Google says: > (a) No Access to Maps API(s) except through the Service. You must not access > or use the Maps API(s) or any Content through any technology or means other > than those provided in the Service, or through other explicitly authorized > means Google may designate. For example, you must not access map tiles or > imagery through interfaces or channels (including undocumented Google > interfaces) other than the Maps API(s). Here, LeafLet and this plugin could be consider as other technology. Also Google says: > (g) No Use of Content without a Google Map. You must not use or display the > Content without a corresponding Google map, unless you are explicitly > permitted to do so in the Maps APIs Documentation, or through written > permission from Google. In any event, you must not use or display the > Content on or in conjunction with a non-Google map. For example, you must > not use geocodes obtained through the Service in conjunction with a non- > Google map. As another example, you must not display Street View imagery > alongside a non-Google map, but you may display Street View imagery without > a corresponding Google map because the Maps APIs Documentation explicitly > permits you to do so. At this point it could be interpreted as if we're not using a Google Map, but in a different point of view we could say we're using a Google Map under a LeafLet Map so strictly we're using it. What do you think? Could I have some troubles with Google if I use this plugin?


title: Summarize values per row using field calculator via Model Builder

text: I think my problem is easy to solve, but so far I couldn't find a solution. I have a Feature Dataset created with the Union tool in Model Builder and now try to sum up all values of one specific field (VSG_EINZEL->up to 150 fields) into a new field (VSG_ALL) automatically in Model Builder. My problem is, that the number of VSG_EINZEL-fields is rather high and varies so I can’t use a static field calculaion like: VSG_ALL = VSG_EINZEL + VSG_EINZEL_1 + VSG_EINZEL_12 and so on. I am very new in using Python and I really appreciate any help and suggestions. Thank you very much in advance! Michaela


title: Can I use a blob defined field to store more than 255 Text characters?

text: As the title states, i´m not sure whether I should/can use a blob field to store text. I need to increase the amount of text in a field to over 255. Is the blob the way to go?


title: Changing null value to specific numbers in ArcGIS for Desktop?

text: I have a Excel file showing annual precipitation and I add it on arcmap. When I tried to check it's attribute table the field calculator is passive. I want to change all the Null value to specific number for analysis. How can I solve it please?


title: openlayers how to get feature info on form submit?

text:
I have an OpenLayers pop-up with a form on selectFeature (WFS-T). Can I recover the feature.attributes in the form's onSubmit? e.g: the form in the popup               var content = '<form onSubmit="processForm(this.form)">' +         'Träd-Id
<input type="text" name="trädnummer" value="' +         feature.attributes.trädnummer + '">' +         '
Art
<input type="text" name="art" value="' +         feature.attributes.art + '">' +         '
Anmärk.
<textarea name="anmärkningar" rows="4" cols="40">' +         feature.attributes.anmärkningar + '"</textarea>' +         '
Åtgärd
<textarea name="anmärkningar" rows="4" cols="40">' +         feature.attributes.rekommendationer + '"</textarea>' +         '
<input type="submit" value="Spara""></form>'      and the onSubmit callback:               function processForm(oForm) {       var feature = **recover currently selected feature here?**       feature.attributes.trädnummer =          oForm.elements["trädnummer"],value;       feature.attributes.art =          oForm.elements["art"],value;       feature.attributes.anmärkningar =          oForm.elements["anmärkningar"],value;       feature.attributes.rekommendationer =          oForm.elements["rekommendationer"],value;       return false;     }      If so, I thought I could use WFS-T to update the attribute info? (instead of e.g. a post to php) Any help appreciated   Thanks Mini


title: GeoServer REST API Timeout Error

text: I'm trying to upload a 20MB shapefile using the REST API, but gets a `timeout error`. I can upload smaller files without problems. I'd like to be able to upload a shapefile of any size without restriction. If there's a way of specifying timeout, I guess it might be problematic as I wouldn't want to restrict file size; I do validation on the shapefile, and it should be uploaded provided it's valid. Part of my code is shown below:                   private string getDbXml(string dsName)         {             string exposePKsParameter = "<entry key=\"Expose primary keys\">true</entry>";                  string xml = "<dataStore>" +                             "<name>" + dsName + "</name>" +                              "<enabled>true</enabled>" +                              "<connectionParameters>" +                                  "<host>" + DB_HOST + "</host>" +                                  "<port>" + DB_PORT + "</port>" +                                  "<database>" + DB_NAME + "</database>" +                                  "<user>" + DB_USER + "</user>" +                                  "<password>" + DB_PASSWD + "</password>" +                                 "<dbtype>" + DB_TYPE + "</dbtype>" +                                  "<namespace>" + dsName + "_NS</namespace>" +                                  exposePKsParameter +                               "</connectionParameters>" +                            "</dataStore>";                  return xml;              }      My environment setup: GeoServer 2.1.3, PostGIS 1.5, and C#.


title: OpenLayers OSM layer

text: I need to define an layer in OpenLayers just showing world map. The most simpliest variant is to create OSM layer. When I do like this:               var layer = new OpenLayers.Layer.OSM("OSM");     map.addLayer(layer);      How can I define restrictions/bounds to show the world map?


title: Ordnance Survey data to WGS-84

text: Recently I have reprojected Ordnance Survey data from British National Grid (ORD SURV GB) to WGS-84 using ArcGIS 9.2. After re-projecting I have found some shift in the data. Can any body guide me what i am doing wrong? Thanks for you reply. Here is my observations. I have download the boundary files from here: http://parlvid.mysociety.org:81/os/ When I re-project boundaries there no shift. But when i used any layer from the tile, it is shifted. After this I have just compare the projection information of both layers. Boundary file have this projection info: Projection: Transverse_Mercator false_easting: 400000,000000 false_northing: -100000,000000 central_meridian: -2,000000 scale_factor: 0,999601 latitude_of_origin: 49,000000 Linear Unit: METER (1,000000) **Geographic Coordinate System: unnamed** Angular Unit: degree (0,017453292519943299) Prime Meridian: Greenwich (0,000000000000000000) Datum: D_OSGB_1936 Spheroid: Airy - 1848 **Semimajor Axis: 6377563,000000000000000000 Semiminor Axis: 6356256,161000000300000000 Inverse Flattening: 299,319997677743000000** and in tile layer for example NaturalFeature_Area have following projection info: Projection: Transverse_Mercator False_Easting: 400000,000000 False_Northing: -100000,000000 Central_Meridian: -2,000000 Scale_Factor: 0,999601 Latitude_Of_Origin: 49,000000 Linear Unit: Meter (1,000000) **Geographic Coordinate System: GCS_OSGB_1936** Angular Unit: Degree (0,017453292519943299) Prime Meridian: Greenwich (0,000000000000000000) Datum: D_OSGB_1936 Spheroid: Airy_1830 **Semimajor Axis: 6377563,395999999700000000 Semiminor Axis: 6356256,909237285100000000 Inverse Flattening: 299,324964599999990000** The bold lines are changed in both layers. Any idea which one is correct?


title: python qgis 2.4 : display a view with symbology

text: I have managed to display a view created using postgresql from qgis using python code:               uri = QgsDataSourceURI()     uri.setConnection("localhost", "5432", "stat", "postgres", "admin")     uri.setDataSource("public", "view2", "the_geom", ' ', "gid")     uri.uri()     qgis.utils.iface.addVectorLayer(uri.uri(), "allcountries", "postgres")      Now I want to display this view with symbology (classes), I searched a lot but it was not clear. For example: I tried to do it with:               myVectorLayer = QgsVectorLayer("polygon", "mypoly", 'ogr')     myTargetField = 'code'     myRangeList = []     myOpacity = 1     # Make our first symbol and range...     myMin = 0.0     myMax = 50.0     myLabel = 'Group 1'     myColour = QtGui.QColor('#ffee00')     mySymbol1 = QgsSymbolV2.defaultSymbol(myVectorLayer.geometryType())     mySymbol1.setColor(myColour)     mySymbol1.setAlpha(myOpacity)     myRange1 = QgsRendererRangeV2(myMin, myMax, mySymbol1, myLabel)     myRangeList.append(myRange1)     #now make another symbol and range...     myMin = 50.1     myMax = 100     myLabel = 'Group 2'     myColour = QtGui.QColor('#00eeff')     mySymbol2 = QgsSymbolV2.defaultSymbol(myVectorLayer.geometryType())     mySymbol2.setColor(myColour)     mySymbol2.setAlpha(myOpacity)     myRange2 = QgsRendererRangeV2(myMin, myMax, mySymbol2, myLabel)     myRangeList.append(myRange2)     myRenderer = QgsGraduatedSymbolRendererV2('', myRangeList)     myRenderer.setMode(QgsGraduatedSymbolRendererV2.EqualInterval)     myRenderer.setClassAttribute(myTargetField)          myVectorLayer.setRendererV2(myRenderer)     QgsMapLayerRegistry.instance().addMapLayer(myVectorLayer)      This gives me an error: > mySymbol1.setColor(myColour) AttributeError: 'NoneType' object has no > attribute 'setColor'


title: Multiple metadata within a single mosaic dataset

text: I am creating a mosaic dataset consisting of thousands of different DEMs. These will make up a single State, however I need the Counties to be able to hold their own metadata. Each raster contains its own metadata, however when mosaicked together the mosaic dataset contains no metadata. I can import an .xml to the description and to the overviews, but this limits me to a single description for each raster within the dataset. Does anyone know how to make multiple metadata select-able within a single mosaic dataset. Note: I am using ArcGis 10.1 and sharing these to a ArcGis 10.2 server through an image service. Each county mosaic works seamlessly, holding its own metadata. I just cannot figure out how to get different metadata to display when identifying a particular county. Thanks in advance!


title: Add a new polygon to an existing shapefile from wkt in QGIS

text: I have a layer of polygons in QGIS; I want to add programatically (pyqgis) a new polygon to this layer using WKT. Example:                  mywkt = POLYGON ((522762 376413 0,530635 368671 0,522237 353713 0,522762 376413 0))      I want to add this polygon to my layer. I try this :               layer.startEditing()     geom = QgsGeometry()     geom = QgsGeometry.fromWkt(mywkt)     feat = QgsFeature()     feat.setGeometry(geom)     layer.dataProvider().addFeatures([feat])     layer.updateExtents()     layer.reload()


title: Possible workflows for shaded relief representation as vector

text: I am looking for a good workflow on how to represent relief on a map as vector (e.g. for further processing in Adobe Illustrator or Inkscape). My inspiration is the present google maps at zoom level 12, since this looks like it is based on vector graphics: ![Map data ©2013 Google](http://i.stack.imgur.com/AsJce.jpg) https://maps.google.de/?ll=47.27853,10.686607&spn=0.179816,0.41851&t=m&z=12 Starting with some free SRTM elevation data, what would be the best way to achieve such a result?


title: ArcMap - proportion of polygon in lon/lat grid cells

text: I have a polygon representing a river basin on a 1 X 1 degree lat/lon grid. I need to create a boundary using the grid cells as the boundary to best represent the outline of the basin. I would like to make a condition telling ArcMap to include the 1 X 1 cells for which the polygon accounts for more than 10% of the area of that cell. I've added an image to better explain what I am aiming to do with a rough outline in blue. Any help/advice would be great. If the above is not possible, creating a matrix of % accounted for in the polygon would still be useful and I will manually draw![Example GIS](http://i.stack.imgur.com/svgwi.jpg) EDIT: I realise the example I have drawn is 0.5 X 0.5 cells, but I need to do this for 1 X 1 grids. With the data I have the each grid starts at half degree so one cell e.g. 2.5 to 3.5N and 31.5 to 32.5E. Hopefully this makes sense


title: Field Filter and Value Pick List for an Arcpy Toolbox ValueTable Parameter

text: In an ArcGIS Python Toolbox (pyt file), how do I specify a filter for a Value Table parameter? In my value table I have two columns. The first is a a field name derived from a selected table view and the second is a argument that should pass through with the field name. I would like to filter the list of available fields by data type, and then define a pick list of values for the second field. I've searched high and low, but setting a filter for a value table is not obvious, or it may not be possible. When I attempt to specify a filter list for the field datatype in the usual way the toolbox fails to load with an error message of "line 118, in getParameterInfoAttributeError: 'NoneType' object has no attribute 'list'". Where line 118 is where I try to specify the filter as in the code below. I can specify list of values to populate the table, but I really need this to be user selected.               field_map = arcpy.Parameter(             displayName='Output Field Map'             , name='out_field_map'             , datatype='GPValueTable'             , parameterType='Required'             , direction='Input')     field_map.columns = [['Field', 'Field Name'], ['GPString', 'NVEL Attribute']]     field_map.parameterDependencies = [trees_table.name]     #specifying a filter list fails     #field_map.filter.list = ['Short', 'Long', 'Float', 'Double']


title: Missing class org.geotools.util.Version

text: Full story below, but essentially I'm trying to use Geoserver and it needs the class `org.geotools.util.Version`, but it can't find it even though I can see it's in the appropriate jar file. Something is fundamentally wrong and I can't understand how anything has worked so far for anyone when things appear so broken or how to fix this. Background (probably inessential): I'm trying to use the SLDSelect control in OpenLayers (note that the example http://openlayers.org/dev/examples/SLDSelect.html is also using GeoServer according to the source, which makes this story weirder). I had installed the GeoServer app for Mac via some dmg (can't remember exactly but it doesn't matter) and I was getting an error. I diagnosed wrong and installed Tomcat and the latest `geoserver.war` (2.5.1) straight from the website - so now it's platform independent. I got GeoServer working but still got the same error for SLDSelect. I looked closer and eventually delved into the source of Openlayers. I found that in the function OpenLayers.Control.SLDSelect.parseDescribeLayer the variable url was null from which I saw that describeLayer wasn't being formed properly. This lead me to look at the activate function. **Here's where it gets really weird:** When OpenLayers calls activate, it GETs the following URL, as seen in Firebug:               http://localhost:8080/geoserver/cite/wms?SERVICE=WMS&VERSION=1.1.1&LAYERS=cite%3Aveg_rsa&REQUEST=DescribeLayer      The response to this from GeoServer is:               <?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE ServiceExceptionReport SYSTEM "http://localhost:8080/geoserver/schemas/wms/1.1.1/WMS_exception_1_1_1.dtd"> <ServiceExceptionReport version="1.1.1" >   <ServiceException>           org.apache.commons.lang.SerializationException: java.lang.ClassNotFoundException: org.geotools.util.Version     java.lang.ClassNotFoundException: org.geotools.util.Version     org.geotools.util.Version     </ServiceException></ServiceExceptionReport>      which seems pretty serious. I copied and extracted `$TOMCAT/webapps/geoserver/WEB-INF/lib/gt-metadata-11.1.jar` and found `Version.class` under `org/geotools/util` as expected. So why can't it find it? I also got the same error on a slightly older version of the `geoserver.war` (2.4.5). GeoServer is generally working. OpenLayers is able to request and display polygons from PostGIS over WMS. I even managed a parametrised SQL view. I've restarted my computer and still get the same issue. What could be wrong? In case it helps, when I start Tomcat I get:               Using CATALINA_BASE:   /Library/Tomcat     Using CATALINA_HOME:   /Library/Tomcat     Using CATALINA_TMPDIR: /Library/Tomcat/temp     Using JRE_HOME:        /Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home     Using CLASSPATH:       /Library/Tomcat/bin/bootstrap.jar:/Library/Tomcat/bin/tomcat-juli.jar     Tomcat started.      Update: now I'm finding that WFS isn't working in general for similar reasons. When I try making a WFS request, I get `java.lang.ClassNotFoundException: org.geoserver.wfs.WFSInfo$Version`. I also see this if I click on one WFS 1.1.0 link on the home page, i.e. a `GetCapabilities` request. While I'm at it, in case they're linked (maybe a general JRE problem?) if I click on the WFS link on the left sidebar, I get:               org.apache.wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = srsNameStyle]]      I also can't enable any services for workspaces (I'm not sure how I managed before). When I tick a checkbox (e.g. for WMS), it tells me instantly that my session has timed out when it definetely hasn't. Before, it would let me tick, but once I clicked 'Save' it would show a `java.lang.reflect.InvocationException` or something at the top and not save. Basically all my installations seem completely broken.


title: Custom Layer Properties

text: I am coding a custom layer for ArcMap using C#. I want the eleven standard property pages to display for the layer (General, Source, Selection, ... , HTML Popup), when the user selects Properties from the TOC context menu. I have not been able to find documentation that associates each page with the interface(s) that it requires. (Other than the General Page which requires ILayer). Anyone have a list that associates the property pages and their interfaces? I suspect that if my custom layer class implements those interfaces, those pages will display. If I am taking the wrong approach, then how do I get those property pages to appear for my custom layer? Thanks, Steve * * * Thanks for your attention. I read those articles before making my post. They describe how to create a property page for my layer. What I am looking for is how to get the eleven standard property pages to appear for my feature layer, when the user selects "Properties" from the TOC context menu, for a feature layer. For example: The first standard property page, for a feature layer, is titled, "General" it appears because the custom layer implements the ILayer interface. The association between "General" and ILayer is not mentioned in those recommended articles. I will reduce my post to singular questions, as follows: What interface(s) are required for the "Source" page? What interface(s) are required for the "Selection" page? What interface(s) are required for the "Display" page? What interface(s) are required for the "Symbology" page? What interface(s) are required for the "Fields" page? What interface(s) are required for the "Definition Query" page? What interface(s) are required for the "Labels" page? What interface(s) are required for the "Join and Relates" page? What interface(s) are required for the "Time" page? What interface(s) are required for the "HTML Popup" page? Respectfully, Steve


title: proxy.cgi for GeoServer is not accessible in browser

text: I have a problem with WFS request:                 var wfs = new OpenLayers.Layer.Vector("WFS",{                           strategies: [new OpenLayers.Strategy.Fixed()],       projection: new OpenLayers.Projection("EPSG:4326"),       protocol: new OpenLayers.Protocol.WFS({                                 version: "1.1.0",       url : "http://localhost:8080/geoserver/wfs",//        featureNS : "http://www.opengeospatial.net/cite", // workspace namespace URI                         geometryName: "geom",  // field in Feature Type details with type "Geometry"                  featurePrefix: 'cite',    //geoserver workspace name       featureType: "InfoGeometric"        //geoserver Layer Name                                                                                }),      In particular in chrome console i have the error POST http:// localhost:8081/cgi- bin/proxy.cgi?url=http%3A%2F%2Flocalhost%3A8080%2Fgeoserver%2Fwfs 404 (Not Found). I have create in C:\Program Files\apache-tomcat-6.0.33\lib the folder cgi-bin and in it the file proxy.cgi (i added in allowedHosts variable values'localhost','localhost:8080','localhost:8081', 'localhost:8080/geoserver/wfs'). In OpenLayers.js i set OpenLayers.ProxyHost="/cgi-bin/proxy.cgi?url="; Now, if i go on http:// localhost:8080/geoserver/wfs/DescribeFeatureType?version=1.1.0&typename=cite:InfoGeometric i have a description in xml of my InfoGeometric but if i go on http:// localhost:8081/cgi-bin/proxy.cgi i don't connect to it. I don't know i must do. Thanks very much.


title: Need to generate ids to connect points and polygons

text: I have a simple question as I am just getting my head into GIS. I am trying to compare the demographics of charter schools to traditional public schools. I have universe listings (lat,long) of US public schools in a vector layer with additional layers that include separate listings of   1. independent charter schools (not part of a school district) and    2. district linked (tabular district/school links) charter schools.  I want to compare the charters to comparable local schools, but this requires exploring multiple matches- district public schools to charter schools in the same districts and then compare schools in a 10 mile buffer of each charter school. Since the independent charters are not linked to a district I would like to use QGIS to connect points to the polygons they are in. What I cannot figure out is, after I have the schools in a shapefile, how can I generate new ID's to nest 1) charters within the district geographic areas (polygons) and a second id for each charter school that includes all the traditional public schools within the 10 m buffer? Any ideas? Thanks in advance.


title: Raster display for topographic map

text: I'm trying to see how good a custom topographic map could be using only free data For the moment I'm just playing with the data so of course the colours are not pretty. I did some classification and used some land cover data anyway I have a raster layer as background with the main land cover basically swamp forest and no vegetation. Since the result of a vectorization was awful and hard to fix I'm going to stay with the raster as background, the question is: How to avoid the squared shape on my map? I would like to smooth the area to have a prettier map. I tried the bilinear interpolation but it creates white boundaries around the area and with the Nearest neighbour it's not pretty. I tried some generalization tools as well but they are way too strong! So what would you do? Here is what I have done so far: ![Progress](http://i.stack.imgur.com/rxZaC.jpg)


title: arcpy - how to run geoprocessing python script on SDE

text: I was testing my script on a .gdb on my local drive and I got it to work. The actual geodatabase I would like to run the script on is an SDE. I tried changing my filepath from the .gdb to the .sde and it failed. Can someone help me figure out how to configure my script so that it will work on the SDE?               #import system module      import arcpy, os          #define filepath     filepath = r"C:\Users\kkaszas\AppData\Roaming\ESRI\Desktop10.0\ArcCatalog\SANGeodatabase.sde"          arcpy.env.workspace = filepath          #enable overwrite      arcpy.env.overwriteOutput = True          fcList = arcpy.ListFeatureClasses()     fieldName1 = "Author"     fieldName2 = "LastUpdated"     expression1 = "\"John Doe\""     expression2 = 20121011          for fc in fcList:              arcpy.AddField_management(fc,fieldName1, "TEXT")         arcpy.AddField_management(fc,fieldName2, "LONG")         print "fields added to " + fc                   arcpy.CalculateField_management(fc, fieldName1, expression1, "PYTHON")         arcpy.CalculateField_management(fc, fieldName2, expression2,"PYTHON")         print "Fields have been calculated for " + fc


title: How to change the view of a map window in MapInfo to a new center coordinate?

text: How can I change the map view of a map window in MapInfo Professional to a new center coordinate? I need to change the viewed map in the MapInfo window via a predefined set of coordinates via MapBasic. I tried to find it out through the MapBasic window but didn't find anything useful. Thanks Medo


title: ArcGIS 10.0 \ arcpy - CalculateField_management : help with syntax for updating text in attribute table of feature classes

text: I am trying to add (ie "Author", "LastUpdated") to feature classes within a gdb and then populate each of those fields. I have been able to get my code to run properly for the numerical field but I cannot get it to run for the text field.                   fcList = arcpy.ListFeatureClasses()         fieldName1 = "Author"         expression1 = "John Doe"              for fc in fcList:                          arcpy.AddField_management(fc,fieldName1, "TEXT")                      arcpy.CalculateField_management(fc, fieldName1, expression1, "PYTHON")      My code returns this error:               ExecuteError: ERROR 000539: <type 'exceptions.SyntaxError'>: unexpected EOF while parsing (<expression>, line 1)     Failed to execute (CalculateField).      How can I fix this? Thanks!!


title: Python Add in: Pass Selection from Combo Box into Definition Query

text: I am trying to pass the users selection into a definition query in an addin combo box python script. Basically, I have a feature class with a field called "SITE". I build a python list from that field (using the search cursor and appending the results) and pass it into the combo box items list. The user will choose a value in the combo box box from that list. I want to further pass the users selection into a definition query. You can see in my script below, I just tried to pass the selection into the definition query, but it crashes the whole combo box and toolbar. I've tried converting it to string, placing quotes around it, etc and no luck. Obviously I am doing something wrong with. I believe it's how I'm passing the selection. As suggestions?               import arcpy     import pythonaddins          sitename = []     for row in arcpy.SearchCursor("Z:\Geodatabases\Test.gdb\Tesfc"):     sitename.append(row.SITE)          class ComboBoxClass(object):         """Implementation for SolsticeFigureUpdater_addin.combobox (ComboBox)"""         def __init__(self):             self.items = sorted(sitename)             self.editable = True             self.enabled = True             self.dropdownWidth = 'WWWWWWWWWWWWWW'             self.width = 'WWWWWWWW'         def onSelChange(self, selection):             mxd = arcpy.mapping.MapDocument("CURRENT")                  for df in arcpy.mapping.ListDataFrames(mxd):                 if df.name == "DFMAIN":                     main = arcpy.mapping.ListDataFrames(mxd, "DFMAIN")[0]                 if df.name == "DFINSET":                     dfinset = arcpy.mapping.ListDataFrames(mxd, "DFINSET")[0]                  for lyr in arcpy.mapping.ListLayers(mxd, "", dfmain):                 if lyr.name == "PDA Boundary":                     lyr.definitionQuery = '"SITE" =' selection                  arcpy.RefreshActiveView()             arcpy.RefreshTOC()                   def onEditChange(self, text):             pass         def onFocus(self, focused):             pass         def onEnter(self):             pass         def refresh(self):             pass


title: How do I export circles from ArcObjects to WKB?

text: I have a small circle in SDE which I'm trying to extract through ArcObjects into well-known-binary (for later import into other systems). Using the IWkb interface I can obtain the WKB, but it comes out as a PolyLine with 2 points - both exactly the same. I've hand parsed the WKB to confirm this is what ArcObjects is returning. Are there any ways to get ArcObjects to export circles as WKB and maintain the circle? e.g. as a CircularString or similar. I'm using ArcObjects 9.3.


title: how to make grid cells by point data

text: I have a csv data. the X, and Y columns show bottom left corner of each grid. It is supposed to show as grid square, but it shows points. what is the problem? and is there any way I can make cell grids from these points? help me please! Thanks a lot.


title: Does OSGeo4W install a 32 bit or 64 bit version of QGIS?

text: I just want to know if you are installing Qgis via OSGeo installer on a windows 64 bits OS (XP, vista or 7) Does it install a 32 bits or 64 bits version of QGIS? Usually the stand alone installer installs a 32 bits version, so I want to use the full potential of my new computer (win 7 64 bits, 16 Mb of Ram).... Thanks


title: How to properly utilize DWITHIN Spatial Filter in OpenLayers

text: Given the following code:               var points = [];                                     points.push(new OpenLayers.Geometry.Point(-110, 38));     points.push(new OpenLayers.Geometry.Point(-108, 40));     var lineString = new OpenLayers.Geometry.LineString(points);     var filteredPoint = new OpenLayers.Geometry.Point(-108.25, 39.78);     var newFilter = new OpenLayers.Filter.Spatial({             type: OpenLayers.Filter.Spatial.DWITHIN,             distanceUnits: 'm',             distance: 92600,             value: lineString     }); //92600 meters, or 50 nautical miles                                       alert(newFilter.evaluate(filteredPoint));      When the alert is fired, it results in **false**. I'm a beginner to OpenLayers, looking for a way in Javascript to determine whether or not a point is within a certain distance, either side of a line. I cannot use a bounding box for this feature, because I want the user to be able to pick any two points and a distance from the line, so an MBR isn't available here. **filteredPoint** is less than 20nm from the 2nd point in the linestring, so my assumption is that this alert would return **true** , but alas it is **false**. Meanwhile, given the following code, in addition to that above:               var bounds = new OpenLayers.Bounds();     bounds.extend(new OpenLayers.LonLat(-110, 38));     bounds.extend(new OpenLayers.LonLat(-108, 40));     bounds.toBBOX();     var newFilter2 = new OpenLayers.Filter.Spatial({             type: OpenLayers.Filter.Spatial.BBOX,             value: bounds            });      alert(newFilter2.evaluate(filteredPoint));      That code gives a result of **true** inside of this bounding box.   I would think that the two bits of code are trying to find points in the block below represented by the asterisk. Am I wrong in interpreting DWITHIN as such?               ----------                     /     |      * |                 *--/     |  bbox  |                   /     |        |                  /     ----------                 /      Any tips or guidance in the right direction would be greatly appreciated. My overall goal is to determine how many points out of ~3700 points I have fall within a distance of the line.


title: Translating lat/lon coordinate on rotated/scaled maps

text: I need to indicate a lat/lon coordinate in an old map like this: http://www.davidrumsey.com/luna/servlet/detail/RUMSEY~8~1~3017~90020003:Topographical- Map-Of-The-City-and-C Projected on Google Maps: http://rumsey.geogarage.com/maps/g2784000.html I know the bounding box of the map as well as the dimensions of the image in pixels, but I couldn't figure out how to locate a lat/lon within this map. Upper left is (40.698291,-74.079051), Lower Left (40.659855,-73.979638), Lower Right (40.855232,-73.835582) and Upper Right (40.882919,-73.940263). Is there a standard formula on how to do locate a lot/lon datum in the historic map?


title: How do I import UK Environment Agency Lidar data (.asc) into Quantum GIS

text: I have downloaded Lidar data from the UK Environment Agency as ESRI ASCII files but being a complete novice as far as GIS is concerned I do not know how to view them. Quantum GIS was recommended to me so I have installed this. Any help gratefully received.


title: Geodjango InspectDB Fails on Postgis Raster_Columns View

text: I am trying to generate models for an existing Postgresql database using the `Django InspectDB` command. Models are produced but a failure occurs on the raster_columns view. The error is:                Exception: Could not find a geometry or geography column for "raster_columns"."extent". Inspectdb does not continue generating models for the remaining tables.      This makes sense because raster_columns is a system view created by Postgis. Looking at the definition of the geography/geometry_columns views, the raster_columns table is explicitly filtered out from them. Since the Extent field in raster_columns is a spatial type but does not exist in the geometry/geography_columns views, the model generation fails. Anybody know how to get around this aside from generating the models by hand? ...


title: Create Polylines from arrays of points

text: Let me describe the data setup. A line has been provided as an array of coordinate pairs, one for each vertex. This array is variable in size, anywhere from 2 to 200 coordinate pairs per line. What I am trying to wrap my mind around is the best way to create these lines. Arcpy and ArcObjects are both viable options, but ArcObjects is preferred due to its speed (generally). I have brainstormed a few methods, but they fall short for some reason or another: 1) I could use the Polyline class with arcpy to create polylines and then Copy Features, but the resulting geometry would not have any of the attribution necessary to identify said points. 2) I could use XY To Line, but this only works with one pair of point, and I require something much more robust. The **long and short** is that I require a method that can create a polyline from arrays and maintain a schema for data that I have created in a table. One idea I have is to create said table and schema, and then somehow create the polyline and copy its `shape` property to the output table, porting over the ID and whatever other attribution is needed. How can I go about creating the polyline's shape property without resorting to an intermediate shapefile? Or, if there is a better method that comes to mind, please share it with me. **Update** This code seems to work!               IFeatureClass fClass = gpUtil.OpenFeatureClassFromString(path);     IFeatureCursor cursor = fClass.Insert(true);     IFeatureBuffer buffer = fClass.CreateFeatureBuffer();          <snip...>          string[] nodearray = a.Split(';');     foreach (string i in nodearray)     {         query.WhereClause = "\"PNT_ID\" = '" + i+"'";         Console.WriteLine(query.WhereClause.ToString());         ICursor search = table.Search(query, false);         IRow row = search.NextRow();         float x = float.Parse(row.get_Value(2).ToString());         float y = float.Parse(row.get_Value(3).ToString());         int id = int.Parse(row.get_Value(1).ToString());         point.X = x;         point.Y = y;         point.ID = id;         point.SpatialReference = sRef;         pCollection.AddPoint(point, ref Missing, ref Missing);          }     IGeometry5 polygeo = (IGeometry5)pCollection;     buffer.set_Value(1, polygeo);     buffer.set_Value(2, wayid);     cursor.InsertFeature(buffer);


title: How do I create dynamic legend in REST?

text: I am going through Generate renderer sample in ArcGIS Java Script API and I want to make similar example using my rest service. I am going through the sample REST service and wondering that how they created dynamic legend in REST? I searched and tried to generate the dynamic legend at my end but its not displaying in REST. I am classifying data in Arc Map (using layer properties-- symbology) and publishing on server but not getting dynamic legend.. So any help will be great !! thanks in advance : ) Software's : ArcGIS Server & Desktop 10.1 and JSAPI 3.2/3.3


title: How to enable smooth zoom in Openlayers in default library set?

text: I've compared two Openlayers samples:   * Online dev example - clientzoom   * release dev example - clientzoom First one zooms in smoothly, second one just flashes and shows tiles from next zoom level. The only difference between those two versions is the library - release dev example (second) uses default multi-file version, while the first one - uses some compiled version (not sure from which tag). Question is: how to enable smooth zoom in Openlayers 2.12? Or how to enable smooth zooming in any Openlayers version ;) [Edit] The fluent zoom feature is included by default in 2.13 library:   * release dev example for 2.13 - clientzoom


title: Reducing the resolution of a huge raster

text: I'm not much of a GIS user, but I've got a big ascii file that I'm trying to convert into a               lat  long  data     x1   y1     d1     x1   y2     d2     x1   y3     d3     x2   y1     d4     ...     etc      format, so that I can work with it in R. I've got global national identifier data (i.e.: which country occupies what grid) at 2.5 arc-minute resolution, but I want to coarsen it into half-degree, because that is the resolution of the rest of my data. I could do so in R if the file weren't so large -- its 3.9GB and I can't read it into memory. A NetCDF file would obviously be ideal for me, but I can't find a netcdf version of the data I want. The data is categorical -- country identifiers. What I want to do is simple to take each 12x12 block of gridcells, evaluate that N=144 matrix, and return the country that appears the most times. (I'd also like it to ignore NA values, unless all values are NA). This would be easy enough in R if I could only open the darn text file. So I opened qgis, but there doesn't seem to be any obvious way to "coarsen" a raster. Is there one? Then it occured to me that I could convert the data to vector, and then convert it _back_ to raster, specifying the resolution that I want. BUT is there a way to do so that would allow me to specify that each gridcell should be .5x.5 degrees, going from -180 to 180 and -90 to 90? This seems like a pretty gross hack. Is there a better way? Thanks in advance for any tips. Edit: Thanks for the help all, but I've decided that it makes more sense for me to just make the file into a netcdf using a remote machine with the memory for it.


title: OpenLayers.Layer.Markers Does not works with Google maps

text: Hello I am currently Testing OpenLayers, but I have a problem with the markers, the markers that I add with OpenLayers does not work with google maps, all marks appear in the center of the map, not in the position that I established with open layers. With openlayers my marks works so fine. Any idea what is happens? Thank you. Note: i'm working with GeoExt2 for extjs 4.x


title: How write query in "Select_analysis" that compare string from one column with another column?

text: I have a shp file (s.shp) with column "A" and column "B". I try copy from this file only that rows where string value from column "A" is part of string value from column "B" e.g.               A       0.1       0.2       0.3            B       0.12       0.21       0.43      The output file should have two rows first and second. I try make:               import arcpy       source='c:\\MY\\s.shp'         output='c:\\MY\\o.shp'       arcpy.Select_analysis(source,output,"\"B\" like '%'||\"A\"||'%'")      but I have a error :( > ERROR 000358: Invalid expression "B" like '%'||"A"||'%' I use ArcMap 10.1.


title: MS4W (MapServer 4 Windows) - version 3.0.3 Crashes JVM and Tomcat frequently. How to fix this?

text: I am using MS4W (MapServer 4 Windows with **Java Mapscript** ) - v 3.0.3 for a GIS web application hosted over Tomcat 6.0.33 with Java jdk1.6.0_13 and PostgreSQL 9.1 with PostGIS 1.5.2 @ the database end. The GIS application has polygon,line and point spatial layers. The problem is that ms4w(MapServer) crashes the JVM & Tomcat very frequently for simple map functionalities such as pan, zoom-in and sometimes even at first time loading of the map. Attached is log file generated in E:\Program Files\apache-tomcat-6.0.33-for-ME\bin\ folder.hs_err_pid3848.log http://osgeo-org.1560.x6.nabble.com/file/n4995523/hs_err_pid5948.log **Is the MapServer MS4W Java API thread safe? Will making the method declarations in`edu.umn.gis.mapscript.mapscriptJNI` or `edu.umn.gis.mapscript.mapObj` classes as `synchronized` effect the API adversely?** I did try marking all the method declarations as `synchronized` in the `edu.umn.gis.mapscript.mapObj` class and few methods such as `mapObj_draw(..)`, `mapObj_drawQuery(..)`, `mapObj_drawLegend(..)`,`mapObj_drawScalebar(..)` and `mapObj_drawReferenceMap(...)` in `edu.umn.gis.mapscript.mapscriptJNI` class. This helped reduce the tomcat crashing issue. Is there any particular way to create (thread-safe) `mapObj` and using it? I have a common `mapObj` with all its properties like `mapHeight`,`mapWidth`,`boundingBox` coords shared by different mapping functionality methods such as zoom-in,zoom-out,pan,fullExtent,etc. Can anybody suggest me about the best way (thread-safe) to create and use the mapObj in MapServer Java Mapscript API? Regards, Shiva


title: GeoServer Web Map Service

text: I have added all data in PostgreSQL with the help of POSTGIS. I made a store in Geoserver, but after adding data when I click on the Open Layer option it does not open, and a file downloaded is shown at the bottom (showing WMS service). What is the problem?


title: QGIS crashes on exit()

text: Here his my test code               import os     print("in qgis, quitting")     os.sys.exit()      When i execute it in QGIS2.0 with line `qgis --nologo --code q.py` it shows an error on line 3 `os.sys.exit()` Can you tell me what is wrong with this?


title: Creating summary table using ArcMap 10.2 Report Wizard?

text: I've been having a play and reading the help about a part of ArcMap I don't really use and that is the Reports. I thought I would teach myself a bit more about this by creating a simple report, for which I have spectacularly failed! I have a point dataset, say with 100 points and there is a text field that gives each point a type. For arguments sake I have types A, B, C and D. I've been trying to create a single page that would give a count for each type, something that the Summary Statistics tool can do. The end result would be a nice looking report with a simple table like:               Type  Count     A      25     B      25     C      30     D      20      That is it! Nothing more complex. Have I misunderstood what a report is actually about? I've tried setting Group Levels, Summary Function to count and Summary Group properties and have not succeeded in creating a simple table.


title: How to interact with other layers in a QGis Python init function?

text: I am using QGis and making a Python script that sets the Python Init function to a custom UI file. I have a function with the following signature:               def formOpen(dialog, layer, feature):         ...      I can access the given layer and it's contents - this works fine. But what should I do in order to access other layers? My use case is the following: Whenever a given feature F of layer A is modified, I want to calculate the intersection of feature F with all geometry objects of layer B and show it to user. This information is later saved to the database. I understand that in order to do that, I should be able to access the interface object. In my plugin I save the reference to the interface by:               self.iface = iface.      However, the Python init function is out of my plugin. Should I put it inside my plugin? Or use global variables?


title: classify lines in shapefile by distance to other lines in same shapefile

text: I'm using ArcGIS 9.3 (and have XTools Pro). I need to classify each line in a shapefile by how close it is to other lines in the shapefile (ie less than 475 ft, less than 450 ft, less than 425 ft) and am unsure how - usually for things like this I use select by location, but it's always between two different shapefiles, not the same one. I can't easily split it up because there are ~200 lines.


title: How to convert from one ellipsoid to another?

text: ## Introduction I have the following problem: I want to convert from WGS84 to "Anguilla 1957 / British West Indies Grid" (EPSG 2000). This seems to be straight-forward, as the transformation is a simple Transverse Mercator and the projection uses the Clarke 1880 Ellipsoid without any datum shift. My result differs significantly (some 400m) from the one i.e. epsg.io is returning. ## Problem The reason seems to be the datum transformation chain. Since the code is implemented such that it can convert from any cs to any cs, it also in this case does   1. WGS84 geographic -> WGS84 Geocentric (using the WGS ellipsoid)   2. WGS84 Geocentric -> Clarke 1880 Geocentric (nothing to do here)   3. Clarke 1880 Geocentric -> Clarke 1880 Geographic (now using the Clarke Ellipsoid) The last step is giving me a headache now, because the output of step 3 is _not_ equal to the input at step 1, while the same conversion returns the exact input on reference pages I've checked. ## Question Should and can a "Geographic Ellipsoid 1->Geocentric->Geographic Ellipsoid 2" Conversion change latitude and/or longitude? **Update** Here's the steps I take: I basically want to convert from WGS84 to Anguilla, British West Indies Grid (EPSG 2000). According to http://epsg.io/2000 this uses Datum 4600. This datum consists of the Clarke 1880 RGS ellipsoid 7012 and no datum transformation. I'm only considering the conversion from WGS84 to Datum 4600 here, because the rest is not relevant here. I'm getting `-63.000000000000014, 18.001851635270203, -78.860902368091047`, which is the exact same result as mkennedy below using a 0 0 0 transformation. However, If I input the same coordinates at http://epsg.io/4600/map, The output is precisely `-63, 18`. That's where the confusion comes from. May I assume that the web site is wrong and whatever coordinate system library they're using is incorrectly assuming that a conversion whose datum parameters are 0 can be skipped altogether?


title: How to Complete ModelBuilder Process Quicker?

text: I've built a script tool in ArcGIS's ModelBuilder to collect parameters from the user and use them as arguments for another python script. The output of this script is a text file. The only GIS processes being performed is a spatial and attribute query on a feature class. The python script runs with no problem however the processing of the tool in ArcGIS seems to take an inordinate amount of time closing out after completing the script when I have larger (but not too large) output text files. From the tool’s dialog box I would quickly (< 30 seconds) get the “Completed script …” message and my output text file is complete. When a small text (1-2 KB) file is generated the tool generates a 1 KB XML metadata file within 1 second completes with the “Succeeded …” message. However as my output text file gets larger so does the time taken from “Completed script” to “Succeeded”. For example; with a 122 KB output text file the “Completed script” to “Succeeded” process took 1 to 2 minutes and with a mere 366 KB output text file the “Completed script” to “Succeeded” process took over 10 minutes. Does anyone know what’s going on between “Completed script” and “Succeeded” and can make suggestions to speed this up other than adding code that will cause an error and force an immediate break at the of my code?


title: Expression with postgis

text: I'm using mapserver and PostGis and I want to draw a geometric table in mapserver. The trouble is when I connect mapserver to PostGis and I want to draw the objects but in different colours. I mean I have this code               LAYER     NAME "poligono"     STATUS ON     CONNECTIONTYPE POSTGIS     CONNECTION "host=localhost user=*** dbname=ejemplo password=*** "     DATA " geom from prueba using srid=4258"     TYPE LINE        PROJECTION         "init=epsg:4258"     END     CLASS         OUTLINECOLOR 0 255 255          END      And the table has 3 columns (gid[PK], name, geom), I want to change the colour for the different names. I tried whith               CLASSITEM "name from prueba"     CLASS         EXPRESSION "Distrito 1"             OUTLINECOLOR 255 255 255              EXPRESSION "Distrito 2"             OUTLINECOLOR 0 255 255              EXPRESSION "Distrito 1"             OUTLINECOLOR 0 128 255      But it doesn`t work. What do I made wrong?


title: My raster values are always changed to zero

text: I'm uploading a series of XYZ data points onto GIS and the co-ordinates are coming up fine, but some of the Z values are changed to zero - and in some cases, all! I've interpolated the majority of the data, but cannot for those with 0's across the board. Trawled these pages for answers but I just can't get my head around it. Would someone please put me out of my misery?


title: Correcting coordinates of CAD drawing imported into ArcGIS?

text: I am having some issues with some CAD drawings that I have imported to ArcGIS. I have a number of CAD drawings where by the features within the drawing have an error in their coordinates. For example, the CAD file has a coordinate like 308092578,52639792281 where as it should read 308092.578, 52639792.281. The result of this error is obviously causing the features to be placed far outside its actual location. Is there any way to correct this error outside of manually moving the features?


title: Get geometry from coordinates

text: I have a table with geometry column called point, saved in SRID 4326. I want to get the geometry by its coordinates, but something didn't work. I suspect database configuration or something. Here is what I do               select point from geom_data limit 1      And I get "0101000060E610000000000020558A5EC0000000C0F3B8424000B0CFCFA4717342" This as text is               select AsText(point) from geom_data where point = '0101000060E610000000000020558A5EC0000000C0F3B8424000B0CFCFA4717342'      And the result is "POINT(-122.161445617676 37.444938659668)" Trying this               select * from geom_data where ST_Contains(point, ST_GeomFromEWKT('SRID=4326;POINT(-122.161445617676 37.444938659668)'))      Didn't give a result. Tried this               select ST_PointFromText('POINT(-122.161445617676 37.444938659668)', 4326)      and get "0101000020E61000000F000020558A5EC0040000C0F3B84240" which is different. Selecting within bounding box didn't worked either               select * from geom_data where     st_x(point) >= '-122.161445617670' AND st_x(point) <= '-122.161445617679'     AND st_y(point) >= '37.444938659660' AND st_y(point) <= '37.444938659669'      Any ideas?


title: Flood extent extraction from satellite images

text: How i can extract the floodwater from satellite images? Is the image classification method accurate for moderate-resolution satellite (Terra/Aqua MODIS)? Or is there a more accurate methods? Thanks.


title: Polygon coordinates Format in Openlayers?

text: I am new to Openlayers and I am moving my application from Google Map to Openlayers. And also successfully displaying Polygons (coordinates captured via Google Map in Decimal Degrees - default for Google Maps), When I am drawing the polygon on a layer and on `onFeaturesAdded` Event, while getting co-ordinates of added feature like this                var tArr = event.features[0].geometry.getVertices();      output comes out like               [POINT(-919690.32419922 -5068080.7227148),POINT(1780677.0106836 -6868325.6126367),POINT(1819812.7691602 -6868325.6126367)      But, while I am drawing this feature back to OpenLayers displays NOTHING. Questions are : 1). Google Uses **Decimal Degrees** Notions to give points of Geometry, Openlayers give in which GIS notation ? (searched on web found nothing) 2). When I am saving co-ordinates in same Projection and redrawing it back, give nothing to me, why ? thanks for any help.


title: Raster terrain analysis on QGIS 2.0.1 - No curvature analysis?

text: I need to perform a curvature analysis on a DEM. I've found this tutorial http://www.gistutor.com/quantum-gis/20-intermediate-quantum-gis- tutorials/48-quantum-gis-qgis-raster-based-terrain-analysis-techniques.html that mentions a "Total curvature analysis" on the Raster terrain analysis plugin. However I've been unable to find that option in the plugin's menu. I am relatively new to QGIS, so I may be missing something, or has that function been discontinued? Thanks in advance


title: FME Donut Hole Extractor

text: I am using FME to fill in some small holes within polygons. I have used DonutHoleExtractor to split these out, however I have found the output via the HOLE port also brings existing 'filled' holes (valid polys that have an outershell). How can I differentiate these??


title: How to handle spatial join 10 chars field name limit?

text: When I try to perform a spatial join between a point and polygon file, I get a notice saying spatial join will not be performed because following field names exceed 10 Characters. Kindly help to rectify this. Regards.


title: Can overlays have different resolutions from the base layer?

text: I am trying to show a regional map on top of base map but without success. While debugging I noticed that my regional map has a different set of resolutions from the base. Is this allowed in OpenLayers? See http://jsfiddle.net/Sq9hE/15/ If you change the map options to use `yorkLayer`'s resolutions array then the regional tiles will load but no the base map's.


title: Layer misalignment with UK Ordnance Survey data and OpenLayers

text: I am in the UK and my QGIS projects are based on UK Ordnance Survey mapping data and are set up in EPSG:27700. Whenever I have tried dropping an OpenLayers layer (Google Satellite/Bing Maps Aerial) in via the OpenLayers plugin (v0.90) it is always offset by 10 metres or so from my mapping data (rendering it useless). I have tried turning on 'on the fly' reprojection, reprojecting in Google Mercator (EPSG:900913), starting a new QGIS project in Google Mercator projection, etc etc but the result is always the same. _I don't suppose anyone can **describe a workflow** that would result in a QGIS project containing an OpenLayers layer correctly aligned with (UK Ordnance Survey) mapping data?_ (Apologies if this is the wrong place to post this type of query but I am inclined to think it is a case of me being stupid rather than a bug in the software.) **----Edit----** **Update...** The problem appears to be with QGIS, as an export of a correctly georeferenced vector map to KML as suggested by nhopton below also results in a misalignment with the satellite imagery.


title: How to open two projects at once in one QGIS window?

text: is it possible to have open two gis projects at once within QGIS? I want to compare the position of points between two different coordinate refercence systems. nice regards, jörn


title: Which open source software to create desktop interface for Geo-processing tools?

text: I want to create an desktop interface to create geo-processing tool and that to using Open source GIS software. I will be using Postgresql and postgis too to save and retrieve data for operations. I want to save resulted geo- processing data with naming conventions in Postgresql. For that i want to know Open sources Software to create interface, geo-processing tool and how tO save and retrieve same. Is it possible?


title: Is it valid to have a properties element in an geoJSON featureCollection?

text: Is it valid to have a properties element with a featureCollection-element as parent? This is, according to geojson.org valid:               { "type": "FeatureCollection",       "features": [                   { "type": "Feature",                     "geometry": {"type": "Point", "coordinates": [102.0, 0.5]},                     "properties": {"prop0": "value0"}                   }                   ]     }      But I can't find is it is valid nor if it is in-valid to have this:               { "type": "FeatureCollection",       "properties" : { "description" : "This is the geometry for..." }       "features": [                   { "type": "Feature",                     "geometry": {"type": "Point", "coordinates": [102.0, 0.5]},                     "properties": {"prop0": "value0"}                   }                   ]     }      According to the answer underneath it is not in-valid to put it there, but programs/scripts won't know its there. So, let me rephrase the question: (Where) Is it possible to put some descriptive information about the property as a total??


title: Error reading database file from: /Applications/QGIS.app/Contents/Resources/resources/srs.db

text: I've suddenly started getting the following error using QGIS 2.0.1 on Mac:               Error reading database file from:     /Applications/QGIS.app/Contents/MacOS/../Resources/resources/srs.db     Because of this the projection selector will not work...      This results in my map not rending at all and the application frequently crashing. What is causing this and how do I fix it?


title: Converting coordinates: Feet to Degrees-Minutes-Seconds

text: I have a point shapefile and I want to get the coordinates for each point in Degrees-Minutes-Seconds format. When I use Add XY Coordinates (Data Management) it gives me the coordinates in Feet format. Any idea/ thought?


title: Calculate distance to median point for a group of points in ArcGIS 10.1

text: I have a shapefile called "household_points" of ~2,000 points, which are divided into about 100 sites. The shapefile has a field in the attribute table called "SNAME" and in the field each point is assigned to a site. Using Median Center, I have created a new shapefile, called "household_points_median" for the median point for all the sites. Now, I want to calculate the distance from each point in each site in "household_points" to its corresponding median point in "household_points_median". I know I can select the appropriate records for each site in the two shapefiles and use the Point Distance Tool, but as there are about 100 sites this would be laborious. I feel like it can be done iteratively, using a for loop in python or something, but I'm not really sure how to loop over field in an attribute table. Or maybe there's just a better tool? Thanks in advance!


title: display a kml on rumsey historical map

text: i want to diplay a kml (on a public url) on this map http://rumsey.geogarage.com/maps/g2104028.html?lat=44.22158376545796&lon=10.634765625&zoom=8 any hint to start? looking at that page source i see   var map = new geogarage.Maps(document.getElementById("map"), MY_IMAGE, {method:"overlay"}); but i'm not finding anything about geogarage documentation


title: Question about the TableInfo function in MapBasic

text: I have a problem I really can't seem to get my head around, MapInfo crashes when I try to run and if statement. I have pretty much exactly the same code in another sub to check for other things and that works perfectly fine. It crashes on the zlRow = TableInfo("zerolengths",TAB_INFO_NROWS), I've tried this with zlRow = TableInfo(0,TAB_INFO_NROWS) as there will only be one TAB file open when this rool is running. I just don't know why it works for other subs and queries but not this!!               Sub LenSub          nMID = FrontWindow()          nLayers = MapperInfo(nMID, MAPPER_INFO_LAYERS)          sLayer = LayerInfo(nMID, nLayers, LAYER_INFO_NAME)          Dim sDir as String           sDir = PathToDirectory$(TableInfo(sLayer,TAB_INFO_TABFILE))              '###Check for blanks          Dim sLen as string          Dialog         Title "Length"         Control statictext             Title "Enter length field"         Control edittext             Value sLen             into sLen         Control OKButton         Control CancelButton          if commandinfo (CMD_INFO_DLG_OK) then          Else     End Program     End if          Run Command "select * from " & sLayer & " where " & sLen & " < 1 into zerolengths"          Dim zlRow as smallint          zlRow = TableInfo("zerolengths",TAB_INFO_NROWS)          if zlRow > 0 then         Export Multipolylines Into sDir & "zerolengths.csv" Type "CSV"          Delimiter ","      Titles              Dialog                 Title "Zero lengths"                 Control statictext                     Title "Sections with zero lengths exported into zerolengths.csv"                 Control OKButton     Else     End If          End Sub      Thanks, Alan


title: Mosaic Imagery to Tile Grid

text: I am hoping to come up with a script that would allow me to mosaic imagery into a polygon tile grid. My hopes is to do this with gdal or QGIS. I am wondering if anyone knows of an existing script, before I start. My first thoughts was to use gdal_merge, but I do not see a variable for using a polygon (shapefile) as the boundary. gdal_merge does have the -ul_lr function, so I know that it will work on subsets of images. What I am looking to do is the following: From a source of ortho imagery, transfer any and all pixels that intersect with the tile grid, then move on to the next grid. There may be 10 source images (for example) that are large in size (geographic extent and disks space) that would be used to populate the individual grid tiles (ie: 1km X 1km). Thanks....


title: Is there Python 3 module to read .dbf files written by ArcGIS for Desktop?

text: I would like to know whether there are Python 3.x-compatible (preferably Python 3.3) modules to read the kind of .dbf files produced by ArcGIS for Desktop. All the modules I found were only compatible with Python 2.x. I may have missed something, but I really couldn't find any which was compatible with Python 3.x.


title: Calculate area within Python script in Arcmap

text: _I am trying to calculate the area of a polygon within my Python script._ I create a new polygon from merging two together, and I'd like to add the area of the resulting polygon to a field in the output file. The polygon is stored in a regular shape file, and is projected. Area preferably in map units. I would have thought this to be a quite common and simple task, but despite a lot of googleing I have been unable to find a working solutions so far. I was planning on using arcpy.updateCursor to insert the value once it's calculated (there's only one feature in the FC at this stage), so easiest is if it can be returned as a variable. Any alternative solution that accomplishes the same task (getting the area value into correct field) will also work. I have also tried the Field calculator from Python. Modified from the help pages I thought the following would work, but so far no luck.               arcpy.AddField_management(tempPgs, "Shape_area", 'DOUBLE')     exp = "float(!SHAPE.AREA!.split())"     arcpy.CalculateField_management(tempPgs, "Shape_area", exp)         Any help would be much appreciated. Running ArcGIS Basic 10.1 SP1 with Python 2.7 on Windows 7. Relevant parts of my current code looks like this:               #/.../     arcpy.Copy_management(inpgs, outpgs)     arcpy.AddField_management(outpgs, 'Shape_area', 'LONG')     fields = AM.FieldLst(outpgs)          #/.../          # Identify and search for shapes smaller than minimum area     where1 = '"' + 'Shape_Area' + '" < ' + str(msz)     polyrows = arcpy.SearchCursor(inpgs, where1)          for prow in polyrows:         grd1 = prow.GridID   # GridID on the current polygon         grd2 = nDD.get(grd1) # GridID on the polygon downstream              # Update features         if grd2             geometry1 = prow.Shape             geometry2 = geometryDictionary[grd2]                  # Update temporary features             arcpy.Merge_management([geometry1, geometry2], tempMerged)             arcpy.Dissolve_management(tempMerged, tempPgs)                  fds = AM.FieldLst(tempPgs)                  for field in fields[2:]:                 arcpy.AddField_management(tempPgs, field, 'DOUBLE')                  for fd in fds[2:]:                 arcpy.DeleteField_management(tempPgs, fd)                  exp = "float(!SHAPE.AREA!.split())"             arcpy.CalculateField_management(tempPgs, "Shape_area", exp)                  # Append them to output FC             try:                 arcpy.Append_management(tempPgs, outpgs, "TEST")             except arcgisscripting.ExecuteError:                 arcpy.Append_management(tempPgs, outpgs, "NO_TEST")              elif ...              else ...


title: How to call a querytask.execute in a event

text: My map needs to be updated every 15 minutes. I need to query to get new data time from the update. So i put a query function in "update-end" event. However the display function is never called. please help. Thanks system info: ArcGIS Server 10.2.1 Javascript API 3.9                   var l;                      if (layer.type == 'dynamic')                  {                     l = new esri.layers.ArcGISDynamicMapServiceLayer(layer.url, layer.options);                          l.on("update-end", function (evt)                     {                         refreshcount++;                         var timequery = new query();                         alert("fewsquerytask==" + config.fewsQueryTaskService);                         var queryTask = new QueryTask(config.fewsQueryTaskService);                         timequery.returnGeometry = false;                         timequery.outFields = ["PACKET_DATE_TIME"];                         timequery.where = "PACKET_DATE_TIME is not null";                              queryTask.execute(querytime, showTime);                              function showTime(listfeatures)                         {                             alter("inside showTime");                             var feature = listfeatures.features[0];                             var value = feature.attributes["PACKET_DATE_TIME"];                             alert("packet value==" + value);                                  dom.byId("packettime").innerHTML = "Refresh:  "+refreshcount+"  Packet Time:  " + value;                         }                                                         });


title: MapInfo Populating Dates in Table

text: I am opening an Excel spreadsheet in MapInfo. One column of the Excel spreadsheet holds a date per row. Some of the rows dont have an assigned date this is fine. When opening the table in MapInfo, the browser window shows that these blank cells have now been infilled with the date 1899? How can I stop this happening?


title: Las to bare-earth DEM: average points spacing and cell size

text: I am using ArcGIS 10.1 to generate a DEM (bare earth) from LAS dataset. To accomplish this, I use 'Las Dataset to Raster' tool as described in Esri website. I have read here and there in the web that the the cell size of the output raster should be set at a value corresponding to the average LAS points spacing; somewhere else, they suggest to use a value that is three times the average point spacing. Now, since I wish to produce a bare earth DEM (i.e., with only ground returns), I am wondering if the cell size has to be set at the average point spacing of the whole LAS dataset (i.e., comprising non-ground, ground, etc), or exclusively of the ground points? On the basis of the ArcGIS's 'point file information', I managed to get statistics for each lidar class. The average spacing (whole dataset) is 1.5 m, while for ground points only is 0.67. Any insight into the issue?


title: Writing a final output to geodatabase in Model Builder

text: I wanted to write a Model Builder but I am not sure how to do save the final output as a geodatabase. ![enter image description here](http://i.stack.imgur.com/9keD1.png) I am working on to classify each imagery (about 83 of them) and then sent it to a polygon and then rename it to the same name from the original file to save to the geodatabase. It is working but I could not get the final output to change the pathname to the geodatabase I wanted.


title: OpenLayers.Layer.Vector and BBOX

text: i configured this on my client page               var kmlLayer = new OpenLayers.Layer.Vector("KML" ,{         strategies: [new OpenLayers.Strategy.Fixed(), new OpenLayers.Strategy.BBOX()],         protocol: new OpenLayers.Protocol.HTTP({             url: "http://localhost:8080/geoserver/wms/kml?layers=avl:mobiles",             headers: {'Access-Control-Allow-Origin': '*'},             format: new OpenLayers.Format.GeoKML({                     extractStyles: true,                     extractAttributes: true,                     maxDepth: 2,                     bbox: '11.246,43.777,11.24833,43.833'             })         })     });      but at every refresh I got this error message on GeoServer log               13 giu 16:19:07 INFO [geoserver.wms] -     Request: getServiceInfo     13 giu 16:18:18 INFO [geoserver.wms] -     Request: kml         Filters = null         Tiled = false         Palette = null         SRS = null         FeatureVersion = null         Styles = [StyleImpl[ name=point]]         Layers = [org.geoserver.wms.MapLayerInfo@a1fef13]         MaxFeatures = null         Crs = null         Bbox = null         RemoteOwsType = null         RemoteOwsURL = null         Env = {}         FormatOptions = {}         Angle = 0.0         CQLFilter = null         Elevation = []         FeatureId = null         StartIndex = null         ViewParams = null         BgColor = java.awt.Color[r=255,g=255,b=255]         Transparent = false         SldBody = null         ValidateSchema = false         Sld = null         SldVersion = null         TilesOrigin = null         Exceptions = SE_XML         Height = 0         Width = 0         Filter = null         Time = []         Format = null         Buffer = 0         Request = GetMap         RawKvp = {LAYERS=avl:mobiles}         Get = true         BaseUrl = http://localhost:8080/geoserver/         RequestCharset = UTF-8         Version = null          13 giu 16:18:19 INFO [geoserver.wms] -     Request: getServiceInfo     13 giu 16:18:19 ERROR [geoserver.ows] -     org.geoserver.platform.ServiceException: GetMap requests must include a BBOX parameter.      Any help? Thanks in advance.


title: Is it possible to have run-time dynamic table updates to visualization using javascript interacting with postgis and geoserver

text: I have an idea of/have seen implementations, of dynamic map retrieval/updating using wms on openlayers by using updates to a postgis database which was hooked into geoserver and having a refresh policy. I have also seen examples done using cURL with php and python. Is this possible using JavaScript without using openlayers? The reason I don't want to use openlayers is because my "base map" is a google earth plugin and I've heard they don't really get along well. In any case how would I update a postgis database which is connected to geoserver so that I can essentially move a point's coordinates and display this accordingly? And I know that using geowebcache is how geoserver updates the databases it is connected to, but I have heard issues regarding this before as such what was the process for making sure geoserver updates? Preferably I'd like to do this in JavaScript without some kind of wrapper.


title: OGR FeatureCount returns '-1' with OSM data

text: I am trying to read in an OSM file with OGR.               import ogr     driverOSM = ogr.GetDriverByName('OSM')     roadsDs = driverOSM.Open('data/map.osm', 0)     roadsLayer = roadsDs.GetLayer()      The feature count returns `-1`               print roadsLayer.GetFeatureCount()      When I loop over the features only points are returned, eventhough I know there are ways too (tested the data in QGIS).               featureStand = roadsLayer.GetNextFeature()     while featureStand:       geomStand = featureStand.GetGeometryRef()       print geomStand       featureStand.Destroy()       featureStand = roadsLayer.GetNextFeature()      Can anybody reproduce that or sees what I am doing wrong? * * * Python 2.7.5, GDAL 1.10.1, did not modify `osmconf.ini`


title: How to perform euclidean distance analysis with coefficients?

text: I would like to perform an euclidean distance analysis in ArcGIS 10 for multi- points which represent seaports. The thing is these facilities have different capabilities for handling and i want to take this specialty into consideration in my analysis. Thats why i added a column in my attribute table. How i represent this coefficient in my analysis? Thanks for your helps.


title: Handle error if geocoding exceed request limit - mapquest geocoding

text: I use Mapquest's Open Geocoding API for Address Geocoding The Open API has a limit of 5000 requests per day. My question is , how can I get a warning that the limit is exceeded , so I can show a message to the user like "Sorry, service not available" Is there an error coming from the service, so I can catch it and show a message? My code is like that                 $.ajax({           type: "POST",           url: "http://www.mapquestapi.com/geocoding/v1/address?key=hereIsMyKey",           data: { location: userInput, maxResults: 1}               })         .done(function( response ) {            //take lon-lan and show them to map


title: Why do I get a no module error when I try to batch process in Arc10?

text: I was trying to batch reproject a set of shapefiles and I kept getting the error `No OS Module` As the set was relatively small I just did it individually, however I want to be able to batch process in the future. How do I correct this problem? Any advice or answers would be greatly appreciated. Thanks, Jason


title: How to concatenate double with string in field calculator with Python expression?

text: I'd like to concatenate my lat/lng with a few string fields in ArcGIS. What is the correct expression to use, avoiding VBA. I don't want to convert the lat/lng fields to string either. my 4 fields are category, type, x, y. with x and y being doubles.


title: PCA on correlation matrix in ArcGIS

text: I am trying to run a PCA on a set of normalized raster bands within ArcGIS. I would like to calculate the PCA on the correlation, not the covariance, matrix of the PCA, but Arc as far as I can tell only calculates PCs on the covariance matrix of the input bands. It seems the only fix to this is to feed the tool pre-normalized band values in the form of a z-score. I z-scored all of the input raster bands before feeding them into the Principle Components tool in Arc 10.1. The function is completing nicely, but the output is producing bands with mean values of anywhere between 9 and 34, even though they should be producing bands with a mean of 0, due to the nature of a PCA. What am I missing? Has anyone has experience with this issue before? As requested, , here is a snapshot of my study site with a zscore raster overlaid: you can't see it well: ![enter image description here](http://i.stack.imgur.com/8ajfi.png) Here is a zoom-in to a New Jersey site showing PCA bands: ![enter image description here](http://i.stack.imgur.com/Nrcyu.png) Finally, here is a screenshot of the first 2 PCA band output properties:![enter image description here](http://i.stack.imgur.com/wquV9.png)