title: Automatically update feature class based on another feature class in same geodatabase

text: I work at headquarters and there are 3 regions. Each region is responsible for their data and headquarters is responsible for merging the data and creating a national coverage. All regions and headquarters have the same fields in their feature classes. I am using ArcGIS 10.1. The data is currently stored as follows: there’s one SDE geodatabase, each region has a Feature Dataset with their data in it. Headquarters also has a Feature Dataset with national data – which is just basically a merge of the regional datasets. What I want is an automatic or even semi-automatic way of updating a national feature class when the related regional feature class has been updated. I originally wanted to have a geodatabase for each region and then create a parent child relationship but the IT people will not allow it. We are allowed only one geodatabase on the network for this project. I made a test file geodatabase locally and I have tried to create a Relationship Class with one region and headquarters. I put the region as the origin and national data as the destination. I made it a 1 to 1 and composite relationship. It was created successfully, but then when I edited the regional data (I added a new polygon, moved a polygon, deleted a polygon and changed the name of a polygon) the changes were not reflected in the related national feature class. I want to know if the Relationship Class the best route to take for this project (assuming I can get it to work) or should I get my hands dirty with Python and use an update cursor? Or is there some other solution that I haven’t considered? edit: The database is a SQL Server Enterprise Database and Headquarters has all privileges, but the regions are only able to edit their own. There are four feature classes per region, three of which will be edited. They are not currently versioned. Right now the process of updating is tedious – they send us the file and we update the national. They do all have GUID columns. Everything is running through shared services on Citrix, so there is a login associated with each user.


title: Saving edits slowing down (QGIS 2.01)

text: QGIS 2.01 on Windows 8 I have a polygon layer which I edit in QGIS 2.01. Editing (cutting, deleting, editing new polygons with attributes) works fine. I am saving the changes after every edit or so while in edit session. Then after editing away for some time (10 Min) and saving 4-5 edits the saving process becomes unbearably slow and it takes between 1 and 7 (!) minutes to save the changes. Mouse cursor is going crazy, CPU and ram are maxing out. Then after the edits are finally saved, ending the edit session again takes several minutes. I tried the dataset with SQLite and shp, both delivered the same experience. Any clues why this might be the case? Thanks for your help.


title: How to create 3D water depth with ArcScene?

text: I was trying to visualize flood depth in 3D using ArcScene. What I had for this purposes are:   1. high-resolution DTM of the valley    2. orthophoto and   3. Raster with flood depth information. I have draped the orthophoto over the DTM and it looks like as follows: ![enter image description here](http://i.stack.imgur.com/i0TFc.png) Then I draped orthophoto over it: ![enter image description here](http://i.stack.imgur.com/7oOB6.png) Finally I overlayed flood map on top of orthophoto: ![enter image description here](http://i.stack.imgur.com/FTalC.png) My question is , is there any way to visualize flood water in 3D with height. it looks like Flood depth raster only touches the base of the DTM. But I need to incorporate DTM + raster height in Flood depth map . How can I do it ?


title: GDAL and Geospatial PDF on Windows

text: GDAL 1.8 now supports reading GeospatialPDF, see pdf format description page. Using it depends on the poppler pdf library. What is the smoothest route to getting gdal and geospatial pdf working on Windows? UPDATE: I mean getting the gdal _utilities_ , the end user programs not the just the programming libraries.


title: Converting Landsat8 DN to TOA reflectance for use in envi

text: I am used to working in envi, however my current version does not support Landsat8. I downloaded GRASS for the express purpose of converting Landsat8 DN to TOA reflectance for use/analysis in envi. I have managed to do the conversion fine using the tutorial provided (http://courses.neteler.org/processing-landsat8-data-in-grass- gis-7/#Unpacking_the_downloaded_Landsat_8_dataset), however once I try to export that to a format usable by envi, I get stuck. I have tried " **r.out.tiff** ": However get this warning: "WARNING: Raster map > is a floating point map. Fractional values will be rounded to integer" When I load it in envi it is clear that the image quality has decreased and it is no longer suitable for my analyses. When I try " **r.out.gdal** ": I get the following error message: "ERROR 6: SetColorTable() only supported for Byte or UInt16 bands in TIFF format." And when I try to open it in envi, I get this message: "Cannot open in envi: unsupported number of bits per pixel" Can anyone help me please?


title: Create line between polygon and nearest raster cell

text: I need to create a line between polygons (centroid) and the nearest cell of a raster dataset. The polygon and raster do not intersect. Each polygon has a UID. One cell can be linked to many polygons, but the polygon can only be linked to one cell. To start, I'm converting the raster to point. From there, I think a Spatial Join needs to be performed using "CLOSEST" as the match option. If I can get the raster cell point to have the polygon UID, I can then use Points to Line with the UID field as the "Line Field" parameter to create an individual line between the two points to connect the polygons to the nearest raster cell. I tested this on a small area and sample, but it was taking a long time to run each step. In the end, this needs to be performed for hundreds of polygons at a time. Can anyone tell me if I'm on the right track or offer any suggestions to make this work? Some searching has indicated using Near analysis and creating a line from the xy coordinates could be an option as well. Whatever is most efficient. Thanks! EDIT: Making a grid with only values along the boundary would make the raster to point processing faster, as described here. I'm still not sure if the rest of the process is going to work correctly.


title: Geodatabase Connection to Oracle Active Data Guard Standby

text: Thank you in advance for any help you can provide. **ENVIRONMENT** Database Server:   * Oracle 11.2.0.2.0 Single-Instance Database on Windows Server 2003 R2   * Enterprise 64-bit Oracle Active Data Guard for Oracle Database 11g R2   * ArcSDE for Oracle 11g 9.3.1 SP2 using SDELOB Client Machine:   * Oracle Client 11.2.0.1.0 on Windows 7 Enterprise   * ArcGIS Desktop 9.3.1 SP2 on Windows 7 Enterprise   * ArcGIS Desktop 9.3.1 SP2 QIP Patch   * ArcGIS Desktop 9.3.1 SP2 Geodatabase Patch   * ArcGIS Desktop 9.3.1 SP2 Geometric Network Patch **BACKGROUND** I have successfully created two standby databases from my primary Oracle database; one is a physical standby (with realtime-SQL enabled) and the other is a logical standby. When attempting to connect to either of the standby databases using direct connect in ArcCatalog, I receive the following error: Error: Operation Failed (-1) It then occurs to me that both standby databases are running in read-only mode, which is expected when creating standby databases via Oracle Active Data Guard. After some more research, I find that it is possible to modify a standby database such that it can run in read-write mode. After modifying the standby to run in read-write mode, I am then able to make edits to the standby. Afterward, however, I was unable to resume the application of redo logs for the standby database which essentially broke the connection between my standby and my primary. This was evident after receiving a variety of Oracle errors (e.g., ORA-01665 and ORA-01153) when following the Oracle documentation for how to switch from the standby back to the primary. In essence, I wasn't able to re-link the standby and primary databases ever again such that redo logs were applied correctly from the primary to the standby. The good news is that I _can_ connect to either the logical or physical standby if I perform a Switchover within OEM 12c R3 such that the primary and standby databases swap roles. Therefore, I think it has something to do with the read-only status of the database whereby Data Guard is enabled. After some discussion with a contact at Esri, part of the solution might reside in the SDE.SERVER_CONFIG table, specifically with the READONLY parameter. Setting the CHAR field to TRUE and the NUM field to 1 would set the geodatabase to read-only mode (Esri's method of read only). However, I can't change this value on the standby because it's in read-only mode according to the Oracle software. I found out that making a geodatabase connection actually performs edits at login. There is an Oracle package that executes a function or two which performs inserts and object creations within the database. Setting the geodatabase to read-only mode per the method above may be the way to change this behavior but I'm still waiting for answers at the moment. Lastly, I believe there are a list of exclusions that are needed when setting up the Active Data Guard replication for _logical_ standby databases. I'm yet to find those, though. **QUESTION** Has anyone used ArcSDE in conjunction with Oracle Active Data Guard? If so, how am I able to make a geodatabase connection to the standby? Any insight would be greatly appreciated. I am trying to determine the high-level proper workflow for creating a standby database and subsequently configuring the standby to receive archived redo data from the primary database (using either Redo Apply, Real-Time Apply, or SQL Apply).


title: Read esri shape point data and spline interpolation using python shell scripts?

text: I am quite new in python scripting. I am a dedicated user of arcgis but this time I have to work without arcgis. I have a point shapefile with 10 different attribute fields of different peat layer with ordered sequence. I have to make spline interpolation with each specific layer and also have to use polygon mask to limit the interpolation area. I am wondering if anyone could help me guide a workflow so that I can do it without the help of arcgis?


title: How to compute a line intersection point in a street layer in postgis 1.4?

text: I have a street layer downloaded from osm. I need to calculated intersection point as we do in qgis from vector menu -> Analysis tool -> Line intersections. I am new to postgis/postgres. any how i managed to download and install it spending whole day on ubuntu machine.using `shp2psql-gui` i imported data into pgadmin3. i know how to do in QGIS. but tell me how to do same in postgis.i have heard some st_intersects etc. but it cant help. i want to return something like this Below are snapshot for more clearer picture of my issue. Blue indicate street layer. ![enter image description here](http://i.stack.imgur.com/RMk8l.png)               name_1 | name_2 | laitude | longitude     xyz st | abc st | #value| #value     lmn st | pqr st | #value| #value     xyz st | pqr st | #value| #value     pqr st | abc st | #value| #value     lmn st | xyz st | #value| #value     lmn st | abc st | #value| #value


title: SLD to Esri lyr file?

text: Does anybody know if there's a sw/extension to convert an SLD to Esri. lyr format, or to import the SLD directly?


title: Node rating like in Google Places?

text: Is there any tool or node/way tag in openstreetmap to obtain a POI rate as with the Google Places service ?(here nodes/places have a label/tag with the rating. e.g. `<rating>3.2</rating>`) Thanks in advance!


title: How to determine the Geoid model used by GPS receiver?

text: I have the following NMEA output by Holux M-241 GPS receiver:               $GPGGA,144014.000,2227.0987,N,11410.1382,E,2,6,1.67,32.6,M,-1.3,M,0000,0000*7B      I know that WGS84 height is higher than geoid height 1.3 meter. But how can I know that which geoid model it is using? Also, is it a database stored in the GPS chip for geoid height and WGS84 height conversion?


title: How to add offsets to the route?

text: **Edited:** ![sample](http://i.stack.imgur.com/7ucef.jpg) I want to ilustrate my question. Suppose that you're in "Point A" and want to go to "Point B". This points wouldn't be in "at_2po_4pgr" table cause aren't source/targets nodes. Then, I would search for the nearest node for points A and B (green points). After this, I might perform a shortest_path call using green points ids and I would obtain "orange" path. But to obtain the real path cost (distance) in first case I would have to substract "offsetA" and in second case add de "offset B". To calculate distance between red-points and green-points, I run the following query: `SELECT * FROM st_distance( ST_GeomFromText('POINT(-3.6963314 42.3498066)',4326), ST_GeomFromText('POINT(-3.6954276 42.3479634)',4326))`. How I would know when add or substract the offset? Sorry for my english!


title: V.kernel not working correctly in grass-6.4.2

text: I am using grass-6.4.2 for generation of heat maps of crime data. For testing purpose, I created a vector layer from my places shapefile which is a point data.The places shapefile contains more than 3000 data.I used **v.kernel** command for generation of raster map as follows:               g.region rows=20 cols=20     v.kernel input=Places@PERMANENT output=raster1 stddeviation=0.001      But the output was a rectangle. I increased the `stddeviation` value step by step to 10000. The output has `Maximum value in output: 1.591528e-11.` but the raster image is completely wrong. Please help me in solving this issue. * * * I checked with rows=600 and columns=600 with a standard deviation of 1000. Here is the output I got:               (Thu Nov 15 11:05:14 2012) Command finished (0 sec)                                  (Thu Nov 15 11:06:05 2012)                                                           v.kernel input=Places@PERMANENT output=raster3 stddeviation=10000                    STDDEV: 10000.000000     RES: 1324.680000    ROWS: 600   COLS: 600          Writing output raster map using smooth parameter=10000.000000.          Normalising factor=648263501.877776.     Maximum value in output: 1.589441e-09.     (Thu Nov 15 11:06:07 2012) Command finished (2 sec)      All I get is several rings with different colors radiating from the center. Thanks in advance.


title: Is there a way to use image sprite for different marker icons?

text: I just made the switch from Google Maps V3 to OpenLayers. I realise that OpenLayers API uses a lot of inline styling. If an image file consisting of several images can be used, it would cut down server request. Has anyone implemented this on marker icons of varying sizes?


title: What is the CRS for France

text: Has anyone any idea what the CRS is for France? I am new to QGIS (moving over from using Arcgis) and trying to find out basics. I have found a huge list beginning NTF (Paris) but wonder which one to apply.


title: How to take 2 points from One featureClass, create a line between those points, and add the line to a new featureClass (aka Shape File)?

text: I'm a total noob/beginner in ArcObjects. I'm coding in C#. I want to extract 2 points from a given featureClass, create a straight line between those 2 points, create a new feature class and add those points to the new featureClass. The following is code (I have taken a lot of code from internet), but I am facing problems.               some_function()     {             IWorkspaceFactory workspaceFactory = new FileGDBWorkspaceFactory();             IWorkspace workspace = workspaceFactory.OpenFromFile(@"myGDB1.gdb", 0);                  IFeatureWorkspace featureWorkspace = workspace as IFeatureWorkspace;             IFeatureClass fc_tenActors = featureWorkspace.OpenFeatureClass("ten_points");                            ISpatialReference lineFeatureSpatialReference = GetSpatialReference(fc_tenActors);             IFeatureClass fc_line1 = IFeatureWorkspace__CreateFeatureClass(featureWorkspace, "Line1", lineFeatureSpatialReference);             fc_line1 = featureWorkspace.OpenFeatureClass("Line1");             IFeatureCursor featureCursorInsert = fc_line1.Insert(true);             IFeatureBuffer featureBufferInsert = fc_line1.CreateFeatureBuffer();                  IFeature pFeature1 = fc_tenActors.GetFeature(3);             IGeometry pFirstPointShape = pFeature1.Shape;             IPoint pFirstPoint = pFirstPointShape as IPoint;                  IFeature pFeature2 = fc_tenActors.GetFeature(4);             IGeometry pSecondPointShape = pFeature2.Shape;             IPoint pSecondPoint = pSecondPointShape as IPoint;            //************* PROBLEM HERE************************************             IFeature pLine = CreateSegment(pFirstPoint, pSecondPoint);        //************* PROBLEM HERE**************************************       //  This is problem. pLine is empty after this statement.                  featureBufferInsert.Shape = pLine.Shape;                         AddFields(featureBufferInsert, pLine);             featureCursorInsert.InsertFeature(featureBufferInsert);             featureCursorInsert.Flush();          }               public static IFeature CreateSegment(IPoint pFrom, IPoint pTo)         {             Line line = new LineClass();             line.PutCoords(pFrom,pTo);             return line as IFeature;         }          private static void AddFields(IFeatureBuffer featureBuffer, IFeature feature)         {             // Copy the attributes of the orig feature the new feature             IRowBuffer rowBuffer = (IRowBuffer)featureBuffer;             IFields fieldsNew = rowBuffer.Fields;                  IFields fields = feature.Fields;             for (int i = 0; i <= fields.FieldCount - 1; i++)             {                 IField field = fields.get_Field(i);                 if ((field.Type != esriFieldType.esriFieldTypeGeometry) &&                     (field.Type != esriFieldType.esriFieldTypeOID))                 {                     int intFieldIndex = fieldsNew.FindField(field.Name);                     if (intFieldIndex != -1)                     {                         featureBuffer.set_Value(intFieldIndex, feature.get_Value(i));                     }                 }             }         }


title: XML not getting convert into list of Feature Objects

text: I'm getting a following XML response: `<wfs:FeatureCollection xmlns="http://www.opengis.net/wfs" xmlns:wfs="http://www.opengis.net/wfs" xmlns:Alexandria="http://www.opengeo.org/alexandria" xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengeo.org/alexandria http://localhost:8080/geoserver/wfs?service=WFS&version=1.0.0&request=DescribeFeatureType&typeName=Alexandria%3ALink http://www.opengis.net/wfs http://localhost:8080/geoserver/schemas/wfs/1.0.0/WFS-basic.xsd"> <gml:boundedBy> <gml:null>unknown</gml:null> </gml:boundedBy> <gml:featureMember> <Alexandria:Link fid="Link.3606"> <Alexandria:link>10011</Alexandria:link> <Alexandria:street>MetroRail</Alexandria:street> <Alexandria:anode>7809</Alexandria:anode> <Alexandria:bnode>7810</Alexandria:bnode> <Alexandria:length>5900.0</Alexandria:length> <Alexandria:setback_a>7.5</Alexandria:setback_a> <Alexandria:setback_b>7.5</Alexandria:setback_b> <Alexandria:bearing_a>258</Alexandria:bearing_a> <Alexandria:bearing_b>264</Alexandria:bearing_b> <Alexandria:type>HEAVYRAIL</Alexandria:type> <Alexandria:lanes_ab>1</Alexandria:lanes_ab> <Alexandria:left_ab>0</Alexandria:left_ab> <Alexandria:right_ab>0</Alexandria:right_ab> <Alexandria:speed_ab>24.0</Alexandria:speed_ab> <Alexandria:fspd_ab>15.0</Alexandria:fspd_ab> <Alexandria:cap_ab>800</Alexandria:cap_ab> <Alexandria:lanes_ba>1</Alexandria:lanes_ba> <Alexandria:left_ba>0</Alexandria:left_ba> <Alexandria:right_ba>0</Alexandria:right_ba> <Alexandria:speed_ba>24.0</Alexandria:speed_ba> <Alexandria:fspd_ba>15.0</Alexandria:fspd_ba> <Alexandria:cap_ba>800</Alexandria:cap_ba> <Alexandria:use>RAIL</Alexandria:use> <Alexandria:notes>Network Link</Alexandria:notes> <Alexandria:the_geom> <gml:MultiLineString srsName="http://www.opengis.net/gml/srs/epsg.xml#26918"> <gml:lineStringMember> <gml:LineString> <gml:coordinates xmlns:gml="http://www.opengis.net/gml" decimal="." cs="," ts=" "> 320695.41213026,4297152.0969028 320640.19318712,4297139.92142997 320587.60391463,4297132.73849488 320507.99922226,4297125.6462426 320372.01896506,4297122.04868058 320139.61381536,4297133.2460428 319570.57549324,4297180.04088008 319077.50062411,4297238.93844794 318769.48314967,4297273.2403574 318384.07201306,4297311.44152552 318358.66079594,4297313.94256447 318010.3407805,4297343.94430273 317699.46222885,4297367.34752366 317497.16184099,4297366.53956364 317208.71190984,4297321.60207638 316919.31081203,4297234.0455083 316803.6568586,4297185.98240055 316572.93697881,4297064.62138347 316385.3476619,4296950.17015898 316099.77576633,4296847.2680627 315736.80626258,4296749.50396585 315523.91602008,4296708.32610939 315280.39092313,4296675.23725991 314961.76338186,4296641.82134139 </gml:coordinates> </gml:LineString> </gml:lineStringMember> <gml:lineStringMember> <gml:LineString> <gml:coordinates xmlns:gml="http://www.opengis.net/gml" decimal="." cs="," ts=" "> 314962.12893922,4296638.34050277 315280.80907687,4296671.76274009 315524.48397992,4296704.87389061 315737.59373742,4296746.09603415 316100.82423367,4296843.9319373 316386.8523381,4296947.02984102 316574.66302119,4297061.57861653 316805.1431414,4297182.81759945 316920.48918797,4297230.7544917 317209.48809016,4297318.19792362 317497.43815901,4297363.06043636 317699.33777115,4297363.85247634 318010.0592195,4297340.45569728 318358.33920406,4297310.45743553 318383.72798694,4297307.95847448 318769.11685033,4297269.7596426 319077.09937589,4297235.46155206 319570.22450676,4297176.55911992 320139.38618464,4297129.7539572 320371.98103494,4297118.55131942 320508.20077774,4297122.1537574 320587.99608537,4297129.26150512 320640.80681288,4297136.47857003 320696.1649725,4297148.67951847 </gml:coordinates> </gml:LineString> </gml:lineStringMember> </gml:MultiLineString> </Alexandria:the_geom> </Alexandria:Link> </gml:featureMember> </wfs:FeatureCollection>` This response is stored in a variable named `response`. I try to convert it into list of feature objects by the following code:               var features = new OpenLayers.Format.GML().read(response);      I get an empty array ([]) when I print features. Can anybody point me out what I'm doing wrong?


title: Postgis extension is not detected although it's installed

text: I have a database with postgis extension installed. i can verify it by running \x then \dx. The postgis and postgis_topology is available. But, if i run `SELECT PostGIS_Version();`, it says ERROR: function postgis_version() does not exist. The question is, \x and \dx shows that the database have postgis extension installed. But when i want to verify it with `SELECT PostGIS_Version();`, it says ERROR: function postgis_version() does not exist. HINT: No function matches the given name and argument types. You might need to add explicit type casts. And if i try to `CREATE EXTENSION postgis;` it says. ERROR: extension "postgis" already exists. **SOLVED ! Turns out, the schema is not public.** So this is what i did. I just `ALTER EXTENSION postgis SET SCHEMA public`.


title: Tilemill misses parts of motorways from PBF

text: I have a problem with importing data from PBF format. See the pictures below. This happens at all zoom levels, which is really annoying. `osm2pgsql -d gis -U postgres --style openstreetmap-carto.style --hstore -C 2048 error-highway-only.pbf` ![Tilmill osm2pgsql PBF error](http://i.stack.imgur.com/dxP8e.png) The same import command with osm file is ok: ![Tilemill import ok](http://i.stack.imgur.com/0ZpuL.png) Here is what i used:   * postgresql 9.3 x64-win   * osm2pgsql SVN version af61cae663 (64bit id space) from February 6, 2013   * OSM and PBF files + tilemill test-project Please   * do you know how to correctly import PBF on Win_x64?   * possibly where to get newer osm2pgsql?   * possibly is there another option then cygwin binary? (i prefer mingw to cygwin) Any help much appreciated!


title: What kind of hardware configuration is needed for fast map services?

text: I have been trying to figure out the best way to have fast map services. So far i have done lot of changes on the process side like scale rendering, analysis, projections, SDE data layer indexing, seperating map services etc. I have found some improvement. I am at the point where I need to figure out the best hardware configuration that will provide fast map services. I have gone through some documentation from ESRI and it seems lot of information but hard to get develop clear understanding. Being a developer, I am looking for some solid/simple ideas on what i should be asking my Server team. This is the last option that i would like to explore. Appreciate any feedback. Thanks Jay


title: How to Create Evenly Spaced Nodes/Lines or Set a Spacing Rule in Arc 10

text: I have written a Python script for ArcMap 10 that uses the x/y coords from a shapefile to create perpendicular transects to the existing line. Since these shapefiles are actually rivers the lines are very curved. In order to accurately represent the river's shape there are more points in the curves. My problem is that the program I created takes all of these points to create multiple transects and in the curves it looks like a horrible mess because there are so many points. Is there any way to create some kind of spacing rule where my program chooses evenly spaced nodes so I can avoid this messy overlap? Any suggestions will be greatly appreciated. Nick Wissler Naval Research Lab


title: ArcObjects: IMapEvents.FeatureClassChanged doesn't fire if the layer's previous data source was invalid

text: Is there any other event besides `IMapEvents.FeatureClassChanged` that will be fired when a layer's data source changes? `FeatureClassChanged` doesn't seem to fire if the layer's previous data source was invalid (red exclamation mark next to the layer in the TOC).


title: arcpy: check for same record in cell above and below

text: After using the find duplicates in arcmap 10, I want to check if the feat sequence ("find duplicates" marks all records with the same attributes with the same number [in "feat_seq"] and creates a ROWID_ that has unique numbers for each record) is the same in the cell above and below and record and if it is the same then mark the duplicate/triplicate etc as "1", if not mark with 0. > The logic we used in excel is =IF(OR(C1=C2,C3=C2),1,0) > > If c2 = c1 or c2 =c3, give the cell a value of 1, if not, give the cell a > value of 0. Used to identify duplicate values that are in order. If the cell > above or below is the same as the cell in question, give the cell a value of > 1. If not, give the cell a value of 0. The code I started to write was               import arcpy     rows = arcpy.UpdateCursor("TestDuplicateID")          for row in rows:         rowCur=row         rowPost= row.next()         rowPre= # how can we get this?                   if rowCur.getValue("FEAT_SEQ")==row.getValue("FEAT_SEQ"):             rowCur.setValue("Dups", "1")         elif rowCur.getValue("FEAT_SEQ")==rowPre.getValue("FEAT_SEQ"):             rowCur.setValue("Dups", "1")         else:             rowCur.setValue("Dups","0")      I can't seem to find a way to retain the PRE record and get the following error "Runtime error : unsupported operand type(s) for -: 'Row' and 'int'". Thanks for your help


title: GeoDjango 'NoneType' error when using 'distance' function

text: I have a site that's working on our staging server but after copying it to the live server I am getting the following error when trying to perform a distance() call (code cut down to minimum)               >>> Buddy.objects.all().distance(pnt[0].geom, field_name='postalcode__geom')                                                                                Traceback (most recent call last):       File "<console>", line 1, in <module>       File "/home/buddyup/sites/buddyup/lib/python2.6/site-packages/django/contrib/gis/db/models/query.py", line 100, in distance         return self._distance_attribute('distance', geom, **kwargs)       File "/home/buddyup/sites/buddyup/lib/python2.6/site-packages/django/contrib/gis/db/models/query.py", line 582, in _distance_attribute         geodetic = geo_field.geodetic(connection)       File "/home/buddyup/sites/buddyup/lib/python2.6/site-packages/django/contrib/gis/db/models/fields.py", line 131, in geodetic         return self.units_name(connection) in self.geodetic_units       File "/home/buddyup/sites/buddyup/lib/python2.6/site-packages/django/contrib/gis/db/models/fields.py", line 122, in units_name         self._get_srid_info(connection)       File "/home/buddyup/sites/buddyup/lib/python2.6/site-packages/django/contrib/gis/db/models/fields.py", line 108, in _get_srid_info         self._units, self._units_name, self._spheroid = get_srid_info(self.srid, connection)       File "/home/buddyup/sites/buddyup/lib/python2.6/site-packages/django/contrib/gis/db/models/fields.py", line 35, in get_srid_info         units, units_name = sr.units       File "/home/buddyup/sites/buddyup/lib/python2.6/site-packages/django/contrib/gis/db/backends/base.py", line 281, in units         return (self.linear_units, self.linear_name)       File "/home/buddyup/sites/buddyup/lib/python2.6/site-packages/django/contrib/gis/db/backends/base.py", line 253, in linear_units         return m.group('unit')     AttributeError: 'NoneType' object has no attribute 'group'          >>> pnt[0].geom     <Point object at 0x1fb0370>      I've been unable to find any information elsewhere this error. Any help as to what might be causing this would be very welcome. **EDIT** Not having a clue what I'm doing, I've come up with possibly the best patch in the world /s               --- /home/buddyup/base.py       2012-01-18 22:17:04.000000000 -0500     +++ /home/buddyup/sites/buddyup/lib/python2.6/site-packages/django/contrib/gis/db/backends/base.py      2012-01-18 22:16:09.000000000 -0500     @@ -239,7 +239,8 @@                  return None              else:                  m = self.units_regex.match(self.wkt)     -            return m.group('unit_name')     +            return 'meter'     +            #return m.group('unit_name')               @property          def linear_units(self):     @@ -250,7 +251,8 @@                  return None              else:                  m = self.units_regex.match(self.wkt)     -            return m.group('unit')     +            return 'm'     +            #return m.group('unit')               @property          def angular_name(self):      I have no idea why it is unable to find the units or the units name, but for now that works for me. I would love to hear what the actual problem could be and find a valid solution. **EDIT 2**               yum install gdal      After talking to pizzaparty in the #django IRC channel he pointed out that installed gdal should stop Django trying to get the units from a Point object that doesn't have any. That seems to be a much better solution.


title: Convert absolute file path to raster databaset

text: I wrote a simple python script that outputs an absolute path as string to a GeoTiff file. So this file can be treated as Raster. In a Model, the GeoTiff file is to be the input raster of a CopyRaster arctool procedure. I dragged the python script in the Model and realised CopyRaster only accepts Raster Dataset as input but not the string. How can I make the python script work the CopyRaster tool?


title: Is the TIN created out of several cross sections different from merging the TINs created out of each set of two cross sections?

text: I have a river with cross sections that have the water surface elevation values. I am trying to create TIN from the water surface values and then compare it with the topo (to see the flooded areas). I wonder what would be the difference between the TIN created out of several cross sections is different from merging the TINs created out of each set of two cross sections? Does the TIN creation process includes any sort of generalization/ approximation/ getting average when it comes to several features or it is dependent on the adjacent features only? My tests on the river shows no distinct difference between the resulting floodplain but I am not quite sure it is the same everywhere. Any thought? ![enter image description here](http://i.stack.imgur.com/9V7EO.jpg)


title: OpenLayers Vector polygon and Jquery Droppable

text: How can I use Jquery Droppable to drag and drop an Icon over an openlayers polygon vector and select the polygon while over on hover? I have managed create a create a popup when over a div element, but i cant figure out how to do the same for a polygon inside the "map" div. Hope that makes sense. Here is a link to show the concept: Update: Here is a bit of code to show specifically the bit of code I am struggling with. I can currently select a polygon by clicking...but want to select by dropping an icon on the polygon.               $(function() {          $( "#cow" ).draggable({ revert: true});     $( "#map" ).droppable({       drop: function( event, ui ) {              **\\How do I select a polygon on drop here?**         alert( "Dropped!" );       }     });


title: Is there a way to export data with coordinates from QGIS to a csv file

text: I have saved waypoints from my Garmin as gpx and have successfully imported them into QGIS. Is there a way to now export the layers into a csv file with coordinates? I've tried the export to csv but that does not give me the coordinates.


title: Insert cursor raises exception on geodatabase

text: world, I'm having trouble to insert a line geometry into a personal geodatabase (using `Python/ArcGIS 9.3.1`). Everything works fine if the target feature is a shapefile. My guess is that calling: `traj.shape = lineArray` is causing the exception:                File "C:\Python27\lib\site-packages\win32com\client\dynamic.py", line 570,       in __setattr__ raise AttributeError("Property '%s.%s' can not be set." %      (self._username_, attr))AttributeError: Property '<unknown>.shape' can not be set.      However, lineArray holds the coordinates of the vertexes. To populate a new row I call:               newTraj = rowInserter.newRow()      newTraj.shape = lineArray     rowInserter.insertRow(newTraj)     lineArray.RemoveAll()     del rowInserter      Is there maybe someone with some experience on this topic? Thanks for your help in advance, Lars


title: Avoiding Legends too large to display in ArcGIS message from ArcGIS for Server WMS service?

text: I have created a WMS on ArcGIS for Server 10.2 with a polygon layer which contains a unique value renderer with 4 categories. The resulting legend item can be called via service call, which responds with an image of 22 width and 64 height in pixels, this legend item is not displayed in the table of contents. (other layers symbolized with a single symbol of 12x12 pixels have a legend in ToC). When I open the properties of the WMS Server and click on the layer which has no legend in Table of Contents (ToC), I can see: > Legend Information: Available(Legends too large to display in ArcGIS) A little googling results in this page: Using WMS service layers It is documented that... > ...when the image received for a layer in a WMS service exceeds this limit, > no legend is displayed for the layer My question: Is there a way to alter the limits of the legend item shown in ArcMap?


title: Which Writer do I need for PDF Documents in FME 2014?

text: I have successfully used the ImageFetcher transformer to download many images from a URL by using a JPG writer. Now I want to do this with PDF Documents, but have the problem that the Adobe 3D PDF writer and Adobe Geospatial PDF don´t write the outputs to a file. Here is the log. How can I use the HTTPfetcher to download pdf documents?                   f_39(CreationFactory): Created 1 features     f_40(TeeFactory): Cloned 1 input feature(s) into 0 output feature(s)     MULTI_WRITER: multi_writer_id `1': Started outputting features     Trying to find a DYNAMIC plugin for writer named `PDF2D'     Loaded module 'PDF2D' from file 'C:\Program Files (x86)\FME\plugins/pdf/pdf.dll'     FME API version of module 'PDF2D' matches current internal version (3.7 20140327)     FME Configuration: No destination coordinate system set     FME API version of module 'PDF2D' matches current internal version (3.7 20140327)     Writer `PDF2D_1' of type `PDF2D' using group definition keyword `PDF2D_1_DEF'     FME API version of module 'PDF2D' matches current internal version (3.7 20140327)     Could not open output file for writing.  Please verify that the file is not open in other applications or that the file is not read-only     A fatal error has occurred. Check the logfile above for details     =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-     Feature output statistics for `PDF2D' writer using keyword `PDF2D_1':     =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-                    Features Written     =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-     ==============================================================================     Total Features Written                                                       0     =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-     A fatal error has occurred. Check the logfile above for details     A fatal error has occurred. Check the logfile above for details     FME Session Duration: 51.7 seconds. (CPU: 3.3s user, 0.3s system)     END - ProcessID: 8464, peak process memory usage: 103668 kB, current process memory usage: 103252 kB          A fatal error has occurred. Check the logfile above for details     Program Terminating          Translation FAILED.


title: Best method to georeference oblique photographs?

text: I have a series of oblique photos taken from an airplane of oyster beds that need to be mapped. Does anyone have any tips on georeferencing oblique images? I have access to ArcGIS and ENVI.


title: Way to Ensure that the Image Centroid is Within Image Bounds

text: My application uses the ArcGIS Silverlight API to select polygons from a map layer. It uses the Geometry.Extent.GetCenter() method to get the centroid of the shape and add a thumbtack image at those coordinates. The problem I'm having is that for some shapes (crescents, for example), the centroid will actually fall outside the bounds of the shape. In this case, the thumbtack will appear outside of the shape. Is there any way that I can ensure that the coordinates I choose are actually inside of the polygon?


title: How to format dynamic text element in Data Driven Pages

text: Is there a way to format the Name element generated as dynamic text from Data Driven Pages. This element serves as my title and it is too long and needs to be wrapped onto another line.


title: How WiFi can tell my exact location?

text: There is no GPS installed in computer PC/laptops. Please let me know how WiFi can show my exact location.


title: How can I centralize QGIS connections for multiple QGIS installations

text: I have multiple computers with QGIS installed on them. I regularly use the same WMS / WFS services. Now I have to connect to these services for each QGIS installation separately. It would be great if there was a way to place the configuration for connections in the QGIS browser on a centralised locations (such as a NAS). That way I could access the same connections from every QGIS installation without having to add them manually every time. Is this possible? And if so, how? Cheers! Mark


title: Identifying coordinate system for Jersey

text: I'm trying to plot some X,Y coordinates which should be located on Jersey (the British dependency, not the state). The metadata that came with the points is as follows:               Coordinate System: Transverse_Mercator     False_Easting: 500000.000000     False_Northing: 0.000000     Central_Meridian: -3.000000     Scale_Factor: 0.999600     Latitude_Of_Origin: 0.000000     GCS_European_1950     Datum: D_European_1950     Prime Meridian: 0      An example coordinate is: 40844, 68194 However, when I try to put this into QGIS or ArcGIS, I end up with points near latlng 0,0. What am I doing wrong? How do I reference these points correctly, so I can plot them over a basemap?


title: Flip labels 180° with CartoCSS

text: How can I flip labels on my lines upside down? I am styling some OSM data and the cartocss is currently               #streets{      text-size: 14;      text-name: [NAME];      text-face-name: 'ATRotSemSanLigIta Regular';      text-fill: #000;      text-halo-fill: fadeout(white, 40%);      text-halo-radius: 2;      text-placement: line;      text-dy: 12;      }      I think its via text-orientation but cannot get it to fire


title: Building Qgis-1.8 on Scientific Linux - a sip error occured

text: I'm on Scientific Linux 6.3 and after trying to build Qgis 1.8 fter "ccmake" I got the error: * * * [ 89%] Built target translations [ 89%] Generating analysis/sipanalysispart0.cpp, analysis/sipanalysispart1.cpp, analysis/sipanalysispart2.cpp, analysis/sipanalysispart3.cpp sip: Usage: sip [-h] [-V] [-a file] [-c dir] [-d file] [-e] [-g] [-I dir] [-j #] [-m file] [-p module] [-r] [-s suffix] [-t tag] [-w] [-x feature] [-z file] [file] make[2]: *** [python/analysis/sipanalysispart0.cpp] Error 1 make[1]: *** [python/CMakeFiles/python_module_qgis_analysis.dir/all] Error 2 make: _*_ [all] Error 2 * * * here's my ccmake configuration screen: BINDINGS_GLOBAL_INSTALL OFF   BISON_EXECUTABLE /usr/bin/bison   BUILD_TESTING ON   CMAKE_BUILD_TYPE   CMAKE_INSTALL_PREFIX /usr/local   DART_ROOT DART_ROOT-NOTFOUND   ENABLE_TESTS ON   EXPAT_INCLUDE_DIR /usr/include   EXPAT_LIBRARY /usr/lib64/libexpat.so   FLEX_EXECUTABLE /usr/bin/flex   GDAL_CONFIG /usr/local/bin/gdal-config   GDAL_CONFIG_PREFER_FWTOOLS_PAT /bin_safe   GDAL_CONFIG_PREFER_PATH /bin   GDAL_INCLUDE_DIR /usr/local/include   GDAL_LIBRARY /usr/local/lib/libgdal.so   GEOS_CONFIG /usr/bin/geos-config   GEOS_CONFIG_PREFER_PATH /bin   GEOS_INCLUDE_DIR /usr/include   GEOS_LIBRARY /usr/lib64/libgeos_c.so   GEOS_LIB_NAME_WITH_PREFIX -lgeos_c   GITCOMMAND /usr/bin/git   GIT_MARKER /home/tomas/Downloads/libspatialindex-master/ GRASS_PREFIX /usr/local/grass-6.4.3svn   GSL_CONFIG /usr/bin/gsl-config   GSL_CONFIG_PREFER_PATH /bin   GSL_EXE_LINKER_FLAGS -Wl,-rpath,   PEDANTIC ON   POSTGRESQL_PREFIX /usr/pgsql-9.2   POSTGRES_CONFIG /usr/pgsql-9.2/bin/pg_config   POSTGRES_CONFIG_PREFER_PATH /usr/pgsql-9.2/bin   POSTGRES_INCLUDE_DIR /usr/pgsql-9.2/include   POSTGRES_LIBRARY /usr/pgsql-9.2/lib/libpq.so   PROJ_INCLUDE_DIR /usr/include   PROJ_LIBRARY /usr/lib64/libproj.so   PYRCC4_PROGRAM /usr/bin/pyrcc4   PYTHON_LIBRARY /usr/lib64/libpython2.6.so PYUIC4_PROGRAM /usr/bin/pyuic4   QSCINTILLA_INCLUDE_DIR QSCINTILLA_INCLUDE_DIR-NOTFOUND   QSCINTILLA_LIBRARY QSCINTILLA_LIBRARY-NOTFOUND   QT_QMAKE_EXECUTABLE /usr/bin/qmake-qt4   QWT_INCLUDE_DIR /usr/include/qwt   QWT_LIBRARY /usr/lib64/libqwt.so   SPATIALINDEX_INCLUDE_DIR /usr/local/include/spatialindex   SPATIALINDEX_LIBRARY /usr/local/lib/libspatialindex.so   SPATIALITE_INCLUDE_DIR SPATIALITE_INCLUDE_DIR-NOTFOUND   SPATIALITE_LIBRARY SPATIALITE_LIBRARY-NOTFOUND   SQLITE3_INCLUDE_DIR /usr/include   SQLITE3_LIBRARY /usr/lib64   TXT2TAGS_EXECUTABLE TXT2TAGS_EXECUTABLE-NOTFOUND   WITH_APIDOC OFF   WITH_ASTYLE OFF   WITH_BINDINGS ON   WITH_DESKTOP ON   WITH_GLOBE OFF PYUIC4_PROGRAM /usr/bin/pyuic4   QSCINTILLA_INCLUDE_DIR QSCINTILLA_INCLUDE_DIR-NOTFOUND   QSCINTILLA_LIBRARY QSCINTILLA_LIBRARY-NOTFOUND   QT_QMAKE_EXECUTABLE /usr/bin/qmake-qt4   QWT_INCLUDE_DIR /usr/include/qwt   QWT_LIBRARY /usr/lib64/libqwt.so   SPATIALINDEX_INCLUDE_DIR /usr/local/include/spatialindex   SPATIALINDEX_LIBRARY /usr/local/lib/libspatialindex.so   SPATIALITE_INCLUDE_DIR SPATIALITE_INCLUDE_DIR-NOTFOUND   SPATIALITE_LIBRARY SPATIALITE_LIBRARY-NOTFOUND   SQLITE3_INCLUDE_DIR /usr/include   SQLITE3_LIBRARY /usr/lib64   TXT2TAGS_EXECUTABLE TXT2TAGS_EXECUTABLE-NOTFOUND   WITH_APIDOC OFF   WITH_ASTYLE OFF   WITH_BINDINGS ON   WITH_DESKTOP ON   WITH_GLOBE OFF WITH_GRASS ON   WITH_INTERNAL_QEXTSERIALPORT ON   WITH_INTERNAL_QWTPOLAR ON   WITH_INTERNAL_SPATIALITE ON   WITH_MAPSERVER OFF   WITH_POSTGRESQL ON   WITH_PYSPATIALITE OFF   WITH_PY_COMPILE OFF   WITH_QSCIAPI ON   WITH_QTMOBILITY OFF   WITH_SPATIALITE OFF   WITH_STAGED_PLUGINS ON   WITH_TOUCH OFF   WITH_TXT2TAGS_PDF OFF   _find_lib_python_py /home/tomas/Downloads/libspatialindex-master/ _find_pyqt_py /home/tomas/Downloads/libspatialindex-master/ _find_qsci_py /home/tomas/Downloads/libspatialindex-master/ _find_sip_py /home/tomas/Downloads/libspatialindex-master/


title: What is the correct variable type for a single value in raster calculator, modelbuilder?

text: The equation includes several raster and several single values, and I want to do it in raster calculator, modelbuilder for the purpose of multiple calculations. In raster part, it is ok to select raster band, but how about the single values? I have selected any value under the function of create variable, but it does not work. The expression is Cos("%Solar Zenith Angle%") * Cos("%Slope%") + Sin("%Solar Zenith Angle%") * Sin("%Slope%") * Cos("%Solar Azimuth Angle%" - "%Aspect%") P.S. Slope and aspect are both raster, and Solar Zenith Angle and Solar Azimuth Angle are only single values. It works, when I use raster calculator directly, so I think the problem probably comes from the variable type. Any hint? Thanks!


title: Seeking ArcGISTiledMapServiceLayer Sample

text: I'm trying to use ArcGISTiledMapServiceLayer to show a cached set of image tiles on our local server. There is good help on the arcgis developer's site but I can't seem to find good examples. None of the samples they list actually call this method. I'm using esri javascript api version 3.7


title: Help with building a batch model to extend radiating lines to nearest feature for multiple points

text: I'm new to using modelbuilder in ArcGIS 10 and was hoping I could get some help for creating a batch model to extend lines from points to the nearest feature. ![Example Point](http://i.stack.imgur.com/1FJE2.jpg) Here's what I need it to do: 1) Select a specific point and all of its associated radiating lines (n=32, spaced at equal 11.25 deg intervals) 2) Extend lines from this point to the nearest land feature or max distance (50 km) 3) Iterate this process for all unique points with radiating lines. 4) Merge these layers together to create one shapefile with all extended radiating lines and points. I'm using a pre-built tool that extends lines to nearest feature by converting the feature polygon shapefile to a line feature and then intersecting this with the radiating lines (http://resources.arcgis.com/gallery/file/geoprocessing/details?entryID=A23B4FB2-1422-2418-A056-231051051FEB). The problem I have if I run this tool alone on the entire radiating line layer and a polygon feature layer is that the tool will trim the lines to the nearest line feature which is sometimes another radiating line. ![Extend Line Issue](http://i.stack.imgur.com/dfarL.jpg) So far I've been able to successfully create 3 separate models to get the desired results. I was hoping to incorporate these three models into a single model that can run start to finish and not fill up my hard drive with batch files, just a single output file. Here is what I'm using: Model 1 - Create Unique Features from unique IDs ![Select by Attribute](http://i.stack.imgur.com/KZaBK.jpg) Model 2 - Extend lines to nearest feature of each Unique line feature ![Extend Lines](http://i.stack.imgur.com/FMd34.jpg) Model 3 - Merge extended line features ![Merge Features](http://i.stack.imgur.com/Q74Vb.jpg) Resulting final output: ![Final Output Result](http://i.stack.imgur.com/rWg71.jpg) My radiating line layer is setup in a grid with center points every ~1 km or so and I want to extend each radiating line to the nearest feature or maximum of 50 km (whichever comes first). Thanks for the help and please excuse any ignorance I may have for creating models as this is my first try.


title: Understanding Scale and Resolution between WGS84 and Web Mercator

text: This might be very basic question, am trying to understand the relationship between scale, resolution and coordinate system. First, let me explain the problem I have a web mapping application (using ESRI silverlight API) which uses dynamic service which is in WG84 coordinate system. Application supports Web Mercator projection as well. i.e on fly map projection is set to WGS_1984_Web_Mercator_Auxiliary_Sphere. Note that published map service is still in WGS84 only. The one of main layer has set a specific scale range and it works fine in WGS84, whereas when application is switched to Web Mercator polygons are not appearing i.e scale does not suit to web Mercator projection. Conclusion - How to control layer scale on the web application which uses dual coordinate system. ? We do not have luxury to create a seperate map service in web mercator at this point of time. Any help or pointers is appreciated.


title: Silverlight API like OpenLayers?

text: Is there any Silverlight based WebGIS API like OpenLayers?


title: Howto setup osm2psql

text: I'm following these instructions to setup `osm2psql` . I need it to import `osm` data file inside a `PostGIS DB`. The following steps worked fine:               createdb -E UTF8 -O user mydb     createlang plpgsql mydb      I successfully added PostGIS extensions too:               psql mydb < postgis.sql     psql mydb < spatial_ref_sys.sql      I start getting problems when trying to alter table's owner:               psql -d mydb -c "ALTER TABLE geometry_columns OWNER TO user"     psql -d mydb -c "ALTER TABLE spatial_ref_sys OWNER TO user"      both above commands produce the following syntax error: > ERROR: syntax error at or near "user" LINE 1: ALTER TABLE geometry_columns > OWNER TO user I've also tried to add a semicolon at the end of the query, but I still get the same error:               psql -d mydb -c "ALTER TABLE geometry_columns OWNER TO user;"     psql -d mydb -c "ALTER TABLE spatial_ref_sys OWNER TO user;"      I'm not so confident with SQL nor with Postgres. Could anyone tell me where's my mistake?


title: Line feature, Merge and Dissolve

text: I have a layer with several polygons and a layer with line above these polygons. Its like a map and a road network on it. I have to find out the length of line in each polygon. I used the intersect tool to spit the lines. However, I have three roads(from same layer) and when i intersect it. Instead of getting three different attribute, I get three lines but one single line attribute. Could someone tell me how to measure the length of each line.


title: How could I rate roads for scenic drives?

text: relative GIS newbie here. I've been working on a personal project to rate roads on how nice a ride they'd be on a motorcycle. I wrote a Python program to work through road data in the TIGER dataset (PostGIS) and apply a small number of metrics:   1. Road variance (twistyness)   2. Road elevation variance   3. Does the road pass by a body of water   4. Does the road go through a park The results of applying the metrics have been a good start, but they are far from perfect. So I'm trying to decide on some new metrics to apply.   1. Check land coverage around road. Riding along rolling hillsides is better than a forest which is better than an industrial park.   2. Road condition (paved or unpaved)   3. Number of stop signs, street lights encountered   4. Utilize viewshed analysis to check if a body of water is actually visible from road   5. Identify mountain views and use viewshed analysis to see if mountain can be seen from road (think Great Smokey Mountains)   6. Apply historical traffic data I need the advice of some GIS professionals. Do these sound feasible, or even make sense? Can you think of any other things I should try? Most importantly, where can I get data for the valid ideas?


title: How to create a new table with point geometry column using QGIS DB Manager?

text: I have been trying to use QGIS DB Manager to create an empty table (QGIS 2.0 on Win7). My hope is that I can make an empty point file and use it to add data to, via heads-up digitizing (like you would when you create an empty shapefile). But when I do this, the table that is created, and added to QGIS does not have geometry, or the ability to digitize in. Any help would be appreciated Thanks.... ![enter image description here](http://i.stack.imgur.com/HJAqv.png)


title: Select points approx. 2000 metres from another point along a river?

text: ![enter image description here](http://i.stack.imgur.com/DoxnM.jpg) I have a series of points representing a river network (See Image Above). Each point contains attributes on Latitude, Longitude, Z value and Length calculated using flow accumulation. The river network was created from Digital Elevation Models using hydrology tools in ArcGIS (Fill, Flow Direction, Flow Accumulation, Strahler Order > 4). I also have a polyline shapefile that also runs along this river network. Starting at the first point at the beginning of each network I would like to determine another point "downstream" that is approximately 2000 metres away (Or closest to 2000 metres). I would then like to calculate channel slope based on the difference in elevation divided by the difference in length (2000m) using the two points. I am aware that at the junctions there will be an issue, any suggestions on accomplishing this task in GIS to determine the point 2000m downstream and continuing downstream at junctions? I am using ArcGIS 10.1 with an ArcInfo license and also have access to QGIS and GrassGIS. I am familiar with using python scripts as well. Edit: Progress The stream polyline has the following attributes: x1: x coordinate of start point (Double) y1: y coordinate of start point (Double) x2: x coordinate of end point (Double) y2: y coordinate of end point (Double) length: length of polyline shape: shape of polyline startxy: [x1]&", "&[y1] (Text) endxy: [x2]&", "&[y2] (Text) I am using the tool to make arrays `start = arcpy.da.FeatureClassToNumPyArray("polyline",["x1","y1"])` Dictionary               G ={}     >>> for (st,sh,le,en) in zip (start,shape,length,end):     ...     G[st]=(st,le,en)      Algorithm               def Downstream (p, x, G):     ...     e = G[p]     ...     if (IsNull(e)):     ...         return ("Not Found")     ...         if (x < 0):     ...             return ("Invalid")     ...             if (x < e.length):     ...                 return (Along (e.shape, x))     ...                 return (Downstream (e.end, x-e.length,G))      The Downstream function is receiving a runtime error where there is a key error. I have used G.keys() to see the keys, but they are not working when inputted in the function.


title: How can I calculate the distances between my points in sequence automatically?

text: I have a rookie problem (again). I am trying to measure distances between points and writing the calculated measure between these points in the attribute table. The points represents a vehicle's location based on gps datas according to existence location in time aspect. I could add the longtitude and latitude data from excel to a shape layer. ![table photo](http://i.stack.imgur.com/SC4hj.jpg) ![how the points seen in the map](http://i.stack.imgur.com/tvQic.jpg) After creating shape file, i could be able to measure the euclidean distances between the nodes, but if i will do the calculations manually, i might need to have immortal life. Heres my question, how i can calculate automatically the distances between the nodes and write the calculations in my table or excel or csv data. the distance will calculate according to the id's. I mean the first distance will be for FID 1 and 2; the second will be for 2-3, third 3-4 and etc. Please help me :) Thanks a lot.


title: How to convert a .tif with .tfw to a GeoTiff?

text: I have a tif image file, and a .tfw world file (created from OSM data with Mapertive). How can I (using linux command line) convert that to a GeoTIFF file? (i.e. I want to have one file, not 2). I'm sure it's possible with gdal or something.


title: Layers not aligning in ArcGIS10

text: I have two layers, one of points (locations of fruit trees) and one of Atlanta zip codes, in an ArcMap, but the layers are not aligning. The fruit trees are in a corner and the map is in the middle top. The fruit points were successfully converted to a shp file from a csv file. The two layers have the same projected coordinate system NAD_1983_StatePlane_Georgia_West_FIPS_1002_Feet and the same geographic coordinate system GCS_North_American_1983 I thought the error would be that the systems didn't match up, but that's not the case. Any ideas would be appreciated!


title: How to change area inside mask to different RGB Value in ECW Format with FME

text: I have 3 Band RGB ECW Raster files and would like to change all the RGB values within the masked area to 0,0,0. I am using the SpatialFilter to set the masking area and thought that I could use the RasterExpressionEvaluator(REV) to manipulate the rgb values. However I cannot find an expression which works. I am using FME 2014 and setting the SpatialFilter to Mask = Filter, ECW File as Candidate with the Filter being "Intersects"and if does not pass, then the REV should work its magic. For each band in the REV (red8,green8,blue8) I set the the expression to               if ((A[0]+A[1]+A[2])>0, 0, A[0])      changing the last parameter for each band ...ie A1, A[2]...but this changes the whole image to 0,0,0. This doesn´t seem to be working.


title: Why am I getting 'Error 000732 Raster does not exist'?

text: I am trying to apply symbology to a raster layer via kernel density analysis. When I run the Python script below in ArcMap, I am get the error message below. I have searched and tried the common suggestions but none seem to work. Any help would be great.               Runtime error Traceback (most recent call last):   File "<string>", line 42, in <module>     File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\management.py", line 5722,     in ApplySymbologyFromLayer     raise e ExecuteError: Failed to execute. Parameters are not valid.      ERROR 000732: Input Layer: Dataset C:\Users\cbriglia\Desktop\GIS\Python_Test\clip_raster      does not exist or is not supported Failed to execute (ApplySymbologyFromLayer).               #____________________________________________________________________________________________________     # testpy.py     # Created on: 2014-02-24 15:34:03.00000     #   (generated by ArcGIS/ModelBuilder)     # Description:      # ---------------------------------------------------------------------------          # Import arcpy module     import arcpy          # Check out any necessary licenses     arcpy.CheckOutExtension("spatial")               # Local variables:     Input_Table = "C:\\Users\\cbriglia\\Desktop\\GIS\\Shapefiles\\test.gdb\\test"     state_border_shp = "C:\\Users\\cbriglia\\Desktop\\GIS\\Shapefiles\\state_border.shp"     Python_Test = "C:\\Users\\cbriglia\\Desktop\\GIS\\Python_Test"     xy_layer = "C:\\Users\\cbriglia\\Desktop\\GIS\\Python_Test\\xy_layer"     xy_output_shp = "C:\\Users\\cbriglia\\Desktop\\GIS\\Python_Test\\xy_output.shp"     Hot_Spot_Output = "C:\\Users\\cbriglia\\Desktop\\GIS\\Python_Test\\hot_spot1"     Hot_Spot_Raster = "C:\\Users\\cbriglia\\Desktop\\GIS\\Python_Test\\clip_raster"     symbologyLayer = "C:\\Users\\cbriglia\\Desktop\\GIS\\Shapefiles\\HotSpotSymbology.lyr"               mxd=arcpy.mapping.MapDocument("CURRENT")          # Process: Make XY Event Layer     arcpy.MakeXYEventLayer_management(Input_Table, "longitude", "latitude", xy_layer, "GEOGCS['GCS_North_American_1983_CSRS',DATUM['D_North_American_1983_CSRS',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]];-400 -400 1000000000;-100000 10000;-100000 10000;8.98315284119521E-09;0.001;0.001;IsHighPrecision", "")          # Process: Feature Class to Feature Class     arcpy.FeatureClassToFeatureClass_conversion(xy_layer, Python_Test, "xy_output.shp", "\"Time\" >= '0:00:00' AND \"Time\" <= '0:04:59'", "RowNumber \"RowNumber\" true true false 8 Double 0 0 ,First,#,,RowNumber,-1,-1;Date \"Date\" true true false 8 Date 0 0 ,First,#,,Date,-1,-1;Time \"Time\" true true false 255 Text 0 0 ,First,#,,Time,-1,-1;Day \"Day\" true true false 255 Text 0 0 ,First,#,,Day,-1,-1;Location \"Location\" true true false 255 Text 0 0 ,First,#,,Location,-1,-1;Actual_Cal \"Actual_Call_Type\" true true false 255 Text 0 0 ,First,#,,Actual_Call_Type,-1,-1;Sub_Type \"Sub_Type\" true true false 255 Text 0 0 ,First,#,,Sub_Type,-1,-1;Agency \"Agency\" true true false 255 Text 0 0 ,First,#,,Agency,-1,-1;District \"District\" true true false 255 Text 0 0 ,First,#,,District,-1,-1;Latitude \"Latitude\" true true false 8 Double 0 0 ,First,#,,Latitude,-1,-1;Longitude \"Longitude\" true true false 8 Double 0 0 ,First,#,,Longitude,-1,-1", "")          # Process: Kernel Density     arcpy.gp.KernelDensity_sa(xy_output_shp, "NONE", Hot_Spot_Output, "2.04744399999998E-03", "1.70620333333332E-02", "SQUARE_MAP_UNITS")          # Process: Clip     arcpy.Clip_management(Hot_Spot_Output, "-73.7275781441499 40.9867050023656 -71.7867901391991 42.0506901260974", Hot_Spot_Raster, state_border_shp, "-3.402823e+038", "ClippingGeometry")          # apply symbology     arcpy.ApplySymbologyFromLayer_management (Hot_Spot_Raster, symbologyLayer)


title: How to find X,Y coordinates of a single point in ArcMap 10.1?

text: I have a shapefile of a road layout (name: US-101). I drew a line across the road section which intersects the left and right edges of the road and pavement marking (which is also the part of shapefile US-101). Now, I want to find the X, Y coordinates (location in arcmap) of the intersection points of Us-101 and drawn line. The projected coordinate system of dataframe and shapefile is NAD_1983_StatePlane_California_III_FIPS_0403_Feet. This means that the coordinates should be in feet. If I use identify tool, it selects the whole shapefile and gives some location but I am not sure if that represents the location of the particular point I clicked on OR the location of shapefile. Please help me finding the coordinates. Refer to attached image. ![enter image description here](http://i.stack.imgur.com/Vbqrd.png)


title: geoprocessing libraries for Google Maps

text: Are there any GeoProcessing libraries that I can use with Google Maps to get some more advanced features?


title: merging TIGER Line shp files for better labeling in ArcGIS

text: When working with TIGER line shp data at county level scale the labeling of roads, rivers, railroads, etc. is cumbersome due to all of the tiny line segments. Merging the dozens of segments that comprise a particular road or river will result in much cleaner labeling. The only problem is the amount of tedious work this requires. Anyone know of a Python script that will automate this process? It needs to find all records with the same name and merge them into one record. I thought ET Geowizards had a tool for this but can't seem to locate it. ![enter image description here](http://i.stack.imgur.com/uypna.png)_screen shot for better explanation_


title: Divide Line Into Sections Using Points Offset from It

text: I have track (line) and milemarkers (point). Each point is offset by a different distance. Is there a way to find where each point would intersect the line if going perpeniduclarly out from the line? As an analogy, imagine riding a train, sitting perpendicular to the direction of travel, looking out the window. Each time you see a milepost directly in front of you, you make note of your position on the track. Any help is greatly appreciated, Thanks


title: NOAA IWS Data as a point layer

text: Does anyone know how to get observation data from the NOAA IWS Data as a point layer? http://w1.weather.gov/obhistory/KEET.html http://weather.noaa.gov/


title: adding feature grid using ClientSDK

text: I am adding a Feature Grid in the Map page using this tutorial and I am not sure where exactly I have to add,               autoLoadFeatures: true      The tutorial says that I need to edit the feature manager section of the app.js but despite making the changes, I am still getting an empty feature grid. Here is my code of the app.js that I modified,               {                 ptype: "gxp_featuremanager",                 id: "states_manager",                 paging: false,                 /*layer: {                     source: "local",                     name: "usa:states"                 }*/                 autoSetLayer: true,                 autoLoadFeature: true             }, {                 ptype: "gxp_featuregrid",                 featureManager: "states_manager",                 outputConfig: {                     loadMask: true                 },                 outputTarget: "south"             }


title: Bulk insert geometry in PostGIS inserting geom from an already existing table in database

text: My goal is to bulk insert original data into a table I created within PostGIS. I want to insert geographical data into this same table as well; this geographical data already exists within my database. I'm creating my table using the command:                    CREATE TABLE schema.DOCUMENT (             id    SERIAL PRIMARY KEY,              name  varchar,              geom  geometry(multipolygon, 2972)  );      Even though I am not getting an error message, my geometry column is not populated when I am inserting data:                   INSERT INTO schema.DOCUMENT (name, geom) VALUES            ('perimeter', (SELECT ST_Union(geom) FROM schema.perimeters)::geometry(geometry, 2972)        );      PostGIS performs the resquest without error message, QGIS reads the table within postGIS, displays its attributes, but not its geometry. Is there any type conversion I should have perform?


title: Revealing the different layers of a shape file in QGIS

text: Shapefile I am referring to is 'NUTS_RG_03M_2010' which is together with several other Shapefiles available in a ZIP file on the Eurostat web site. the ZIP file the available map sets at Eurostat I am importing NUTS_RG_03M_2010.shp as a vector layer. ![enter image description here](http://i.stack.imgur.com/NUX13.jpg) Actually I am interested in the NUTS 2 or 3 level - not the here displayed national level. Now I print this map in a PDF and when I open it I can see the different layers in short intervals displayed - from very fine grained to the national level. The screen shot shows one intermediate level: ![enter image description here](http://i.stack.imgur.com/b9xal.jpg) My conclusion is that those levels, layers or whatever it is called are "hidden" somewhere and must be displayable and editable in QGIS. How do I access them? **My ultimate goal is** to convert a NUTS 3 level layer to GeoJSON or SVG.


title: Removing a Table from several MXD-Files using ArcPy

text: I'm trying to remove a certain Table (xlsx-File) from some MXD-Files using python, but I can't finguring out how. I tried the code sniplet for removing:               import arcpy, os     from arcpy import env          arcpy.env.workspace = 'V:/Projects/ZEL'          mxd =arcpy.mapping.MapDocument('V:/Projects/ZEL/test04.mxd')          df=arcpy.mapping.ListDataFrames(mxd, 'u')[0]          for lyr in arcpy.mapping.ListLayers(mxd, '', df):         if lyr.name.lower()=='header_vorlage$':             if lyr.dataSource == 'V:\Projects\ZEL\SHP\Daten_111004\ZEL_LB_Tabelle_V3_2010_2030.xlsx':                 arcpy.mapping.RemoveLayer(df, lyr)               mxd.saveACopy('pt.mxd')          print 'fertig'          del mxd      It works, but when I open the new created 'pt.mxd' there is still the symbol of the xlsx-Table with an '!' and you have the option to fix the datasource, because I have removed the path, but not the table... I hope its not too confusing :) My question is: Is there a way to remove a xlsx-Sheet from MXD-File without opening?


title: Working out the coords of a square x miles from a center point

text: I am trying to create a x mile square (or circle) around a central point, where all sides of the square would be x miles from the centre. I need the 4 corner coordinates. It is scrambling my brain trying to get my head round it? I can work out the distance between two points using the haversine formula but maths is seriously not my strong point and I don't understand sin,cos etc.. and trying sort this out has lost me! I have come across this post but I just don't get it! Would anyone be kind enough to explain how I do this in apples and pears terms? **EDIT** To explain exactly what I trying to do; I have a website, where users can search for buildings in a specific area. They will enter a town or place (which I will know the lat long of) and they search within a specific radius of say 10 miles of the place. I need to find the min/max lat and longs of the 10mile radius so I can query my database using a where clause similar to:               Where buildingLat <= maxLat        and buildingLat <= minLat        and buildingLong >= minLong         or buildingLong >= maxLong      I need some kind of formula! My coordinates are in decimal degrees


title: Clear ArcGIS server rest cache with an in through script

text: I would like to script the process to clear the rest cache on the \rest\admin page after I do a start/stop with the AGSSOM.exe provided on arcscripts. Is it typical to have to clear the cache after creating new services or start/stop- ing services. We seem to have to. Thanks.


title: How to display mouse position as tooltip in OpenLayers?

text: I want map coordinates as mouse over effect in OpenLayers. I am using the following code, however it is showing pixel coordinates:                   map.events.register("mousemove", map, function(e) {               var position = e.map.x + e.xy.y;         OpenLayers.Util.getElement("tooltip").innerHTML = position          });      thank you


title: How to convert a line Shapefile into a CSV with nodes and links?

text: Is there a way to convert a linear shape file into a csv file of the following format:               Node_1, Node_2, attribute_1, ...., attribute_x          1       2       "hello"        567845.334      I have looked at GDAL/OGR2OGR and PostGIS and i don't think either converts the data to the format I want. I don't mind writing a script to do it, if i'm guided in the right direction.


title: How do you normalize a field in Qgis symbology?

text: I'm trying to normalize a field in symbology in Qgis but there is no normalization option like in Arc. I've tried to add a field to the attribute table and use the field calculator to do the normalizing but it doesn't seem to work. Is there a plugin or some other way to normalize without adding a new field to the table? Thanks, MG


title: How do you create an ArcCatalog-friendly xml metadata file from a url metadata?

text: How do you take metadata information from a url like this and create an xml file that ArcCatalog's "import xml" metadata tool will accept? I have tried a few variations on pasting the url information into a text editor and saving as xml but haven't found the right method. I am using ArcGIS 10.


title: Processing(.org) for geospatial visualization?

text: Does anyone know if Processing is being used for geospatial visualization? I can't find much out there, but this is impressive: http://benfry.com/zipdecode/ Here's one I just found: http://fathom.info/projects/countyhealth.html


title: Open source tool for point/node conflation/matching?

text: ## The Question Are there any **open source** tools for **conflating** (matching) two layers of **point** (node) data? ## Motivation I'm particularly interested in using such a tool to sync data with **OpenStreetMap** , where I've created a wiki page on the subject of conflation. That page links to some university research projects on the conflation of vector datasets using open source software ( **OpenJUMP** and **Quantum GIS** ), however they don't share their work. ## Implementation if tool doesn't exist I know algorithmically this task shouldn't be that difficult especially compared to handling generic vectors, as it would simply use **distance** and similar **properties** along with some math, however I suppose I'm more interested in a **graphical interface** implemented in open source software. **I wrote up a possible workflow for conflating nodes** here on the OSM wiki. I thought of trying to implement it in JOSM, however if there are others from the broader GIS community interested in this then it would make sense to implement it in something like QGIS, especially if other developers would get involved. ## Use cases I think it might be useful to say what I'd be interested in using this tool for.   * Syncing Virginia interstate exit data from VDOT with OSM   * Syncing GNIS feature points with OSM After an extension to conflate polygons (using their centroids), the tool could also be used for:   * Transferring properties (tags, attributes) between nodes representing a house along with addressing data to a polygon (area, closed way) of the actual building I'm sure there are many other possibilities, but these are the few I'm planning to use it for.


title: Problem overlaying WFS on top of Bing maps using OpenLayers

text: I have a simple set of 99 polygons loaded into GeoServer from PostGIS. They were loaded from GeoJSON using ogr2ogr. (I'm using OpenGeo Suite 3.1 if it matters.) When I go to the layer preview and select OpenLayers it does display successfully. When I copy pasted the code and adjusted it slightly it also worked on the different server. However, now I'm trying to overlay it on top of a Bing base map. The base map displays just fine. The overlay does not display. (That is in Chrome, in Firebug it fails on map.addLayer() and aborts the entire script.) Based on that walk through it would seem that the problem is somewhere in my declaration of the vector layer. BTW, I went into the geoserver workspace area and explicitly set the URI to what is listed under "featureNS." I've tried both declaring and not declaring the geometry name explicitly.               function init()     {            var map = new OpenLayers.Map("map");              var road = new OpenLayers.Layer.Bing({              name: "Road",              key: apiKey,              type: "Road"             });             var aerial = new OpenLayers.Layer.Bing({                 name: "Aerial",                 key: apiKey,                 type: "Aerial"             });//,{isBaseLayer: false});*/             var hybrid = new OpenLayers.Layer.Bing({                 key: apiKey,                 type: "AerialWithLabels",                 name: "Bing Aerial With Labels"             });                  map.addLayers([road, hybrid, aerial]);              var data = new OpenLayers.Layer.Vector(         "WFS Display",          {                protocol: new OpenLayers.Protocol.WFS ({             version: "1.1.0",             url: "http://<servername:port>/geoserver/opengeo/wfs",             featurePrefix: "opengeo",             featureType: "ogrgeojson1",             featureNS: "http://<servername:port>/data/opengeo"         }),             strategies: [new OpenLayers.Strategy.Fixed()]         });              map.addLayer(data);     }      Any thoughts? Just for the heck of it I tried using OSM instead of Bing (although that's the job) and still no joy. So it isn't Bing at least. What did I do stupid?


title: Question about Import 71 and file permission in ArcGIS

text: I am making a map for my thesis. While using ArcGIS, I must use Import71 to convert some .e00 files (In this particular case, political boundaries and Hydrography networks). When I select my output folder, I receive the message: [ "E:\ File Path" This file cannot be accessed. Make sure you have security privileges on the drive."] I use Windows 7. Is this simply a Windows/administrator problem or am I doing something wrong? If someone knows, I would appreciate any suggestions.


title: ArcGIS - Is It Possible To "Lock" Metadata

text: I've been asked by a customer if I can "lock" the metadata in their various geodatasets. I immediately asked why, and was told that they don't want other organizations/users editing/deleting certain tags. A quick search hasn't really turned anything up. Anyone have any ideas/suggestions on how I could accomplish this?


title: Looking for good resources for batch files in relation to databases/geodatabases

text: I hesitated a bit before asking this, as it isn't necessarily a GIS specific question, though I'm using it to update geodatabases. I have found plenty of hits on a Google search, but frankly, many of the websites out there for .bat files are hacky and not real trustworthy. Do you have a resource that you use for database manipulation through batch files? Any GIS/Geodatabase specific resources for .bat's? A little background, I'm just starting to dabble in batch files. I'm aware that I can automate many things that are done manually, but am terrified of doing anything I shouldn't be doing/cannot undo. I have found introductory sites that don't give much more information than printing to the console. I'm looking for something that goes into detail about databases. Mods, feel free to move this to another area if this is too objective of a question. Thanks for your help!


title: Centroid of the equator and a point

text: Suppose I already have a way to compute the centroids of different geometry types:   * **Points** (arithmetic mean of Cartesian coordinates).   * **Linestrings** (polylines) (weighted mean of segment mid-points in Cartesian coordinates, weighted by great-circle distance).   * **Polygons** (weighted mean of spherical triangle centroids converted to Cartesian coordinates, weighted by spherical triangle areas). I've included my methods for computing each type of centroid, but they can probably be ignored. According to the PostGIS documentation for ST_Centroid: > The centroid is equal to the centroid of the set of component Geometries of > highest dimension (since the lower-dimension geometries contribute zero > "weight" to the centroid). The dimension here refers to points (0), lines (1) and polygons (2). What is the most consistent way of defining the centroid if the geometries of highest dimension have **undefined** (ambiguous) centroids? There are two possibilities:   1. The combined centroid is also **undefined** (I assume this is what ST_Centroid does).   2. The combined centroid is equal to that of the geometries of highest dimension with **non-zero weight**. If a geometry has no defined centroid, then we give it zero weight. An example ambiguous situation is an equally-spaced LineString going around the equator. In this case, the centre of mass is at the sphere's origin. Another situation is two hemispherical polygons, N and S, covering the whole sphere. If such ambiguous geometries are combined with a point, should the point be the centroid? One possibility is to interpret the centroids physically: the Earth is an invisible sphere suspended by a string, such that it can rotate about its centre. The centroid is therefore the point at the southernmost point if a collection of features are present on the spherical surface and the sphere is allowed to spin until it comes to rest. In this situation, it seems reasonable that if the sphere is covered by area polygons, then adding a single point (of infinitesimally small area) is sufficient to make it come to rest at that point.


title: To what extent is SQL's language accessible via ArcGIS tools?

text: That question just sounds so redundant...   At any rate, I have been asked to explore the uses of SQL in ArcGIS. We use an SDE DB for all server-side storage and DB managing/large-scale editing. However, I am attempting to delve deeper into just how integrated SQL is in ArcGIS's tools. There is a note in the SQL Query Reference Guide of ArcGIS 10's help that clearly states SQL syntax does **not** work when using the Field Calculator tool. I find this very disappointing as it would seem very useful to be able to pull and mangle information directly from the database itself when calculating field values. What are the largest limitations and pitfalls one might fall into when attempting to make use of SQL in ArcGIS? Which tools see best functionality when integrated with SQL? If an example is required to make this a clearer question, I am attempting to track the number of points of interest that are of a certain type in a given region. Each point has an attribute which describes its type and region. My current solution involves heavy use of cursors for counting and data retrieval, but a superior pointed out that a simple SQL query could do all of this and more. Unfortunately, it seems the functionality is not present for this. Or is it?


title: Geonode to harvest metadata from Geonetwork-like services?

text: I am in charge of setting up a gis web portal and one of the functionalities would be to harvest some metadata from metadata servers like Geonetwork. I have been thinking of using Geonode because I have already used Geoserver. Apparently Geonode uses Pycsw to publish metadata but I can't see whether it allows to collect metadata from other servers and how? Is it possible to do it through the Geonode interface?


title: Database for offline slippy map tiles

text: I currently have an offline HTML5 map application (built on Leaflet & KendoUI with custom additions) that has an app manifest and works fine on multiple platforms. However, I am hesitant to use the manifest to store the actual map tiles this way(PNG files stored as a TMS style Tile Cache). **Issues:**   * There could be a lot of tiles (10MB - 50MB) in about 1,000 PNG files   * The initial download could be really slow (and hard to show progress to the user)   * App Manifests work or they don't if they don't the entire offline caching will fail (accord to [whatwg.org][1])   * The offline user will occasionally reconnect and need to get refreshes of the Tiles, These are small deltas but the app manifest mechanism would reload all the js, css, and PNG files as soon at the manifest updates **Alternative idea:** keep the web application separate from the storage of the slippy map tiles. Store the tiles in a web application friendly database # Update: **[PouchDB recently added support for binary blobs. I am getting good initial results. See:http://stackoverflow.com/questions/16721312/using-pouchdb-as-an- offline-raster-map-cache ]**   * This is suggested by Ben Nolan http://bennolan.com/2011/06/03/offline-mapping.html     * Similar work on Maps on a Stick: http://developmentseed.org/blog/2010/oct/02/maps-stick-version-2-released/ ([deprecated][2])      * MBtiles http://mapbox.com/developers/mbtiles/     * TileStream https://github.com/mapbox/tilestream     * Lous Remi: http://louisremi.com/2011/10/07/offline-web-applications-were-not-there-yet/ **Question:** What does the collective wisdom (and experience) say about the following choices for a JavaScript friendly DB:   1. **SqlLite**     * Seems like you need to create a native app wrapper for this to allow it to talk to JavaScript     * E.g. Add you DLL to a native program for windows, and PhoneGap for android/IOS   2. **WebSQL**     * depricated     * but it was a SQL Lite that I could easily generate and distribute from the host web server   3. **IndexDB**     * Storing blobs seems to work see: https://hacks.mozilla.org/2012/02/storing-images-and-files-in-indexeddb/     * I am concerned if this is the only way to initially populate the DB     * Is this basically a SQLLite file? Can I ship it for bulk DB upload?     * I am leaning towards this as a solution. Are their gotchas I don't know about? **Requirements:**     * Fast initial population (via download) to the client Web DB     * Compatible with current Leaflet TileLayer API (i.e. I would rather not write a custom layer, but if needed ...) (e.g. MbTiles)     * Platform: Windows Laptops, but Android and IOS tablets desired (I can wait till IndexDB is released, don't need immediate support)     * I would rather not write a native app (EXE, IOS, Android) but it if that is the best way...     * Server Side generation of web maps (this will be an automated process). The user picks a location, chooses maps, and they get dynamically transformed and turned into a slippy tile cache (this work is already largely done).     * Fast bulk initial download     * Map change delta refreshes (I will write this logic, based on constant stock numbers, and update date logic)     * Minimal impact on current Leaflet & KendoUI web application **Update:** Key background idea: while the web app is fairly stable, the slippy map tiles are generated on the fly for your location and what type of problem you are doing (at the back-end). So I thought of two other ways for transferring the initial 'big bang' and then updates: Zip File (probably not a good idea - as it adds server load) also expansion on client machine will require user interaction, but it does allow slippy tiles to use local url's HTML5 File API: I have not looked at this in great detail. But it appears has most operations to create a local file tree in TMS format: http://www.html5rocks.com/en/tutorials/file/filesystem/ what will be interesting to test is the performance (e.g. can I use web works to maximize the bandwidth to disk and across the net). IndexDB is not widely implemented to be web worker friendly (sync interface: http://stackoverflow.com/questions/10698728/indexeddb-in-web-worker-on-firefox I have found some additional info about using IndexDB with Leaflet: https://github.com/calvinmetcalf/leaflet.pouch (syncs couchdb with indexdb for offline) Also here are some tests for the read/write speeds for indexdb, websql, & local store: http://jsperf.com/indexeddb-vs-localstorage/15 And here is how to use the read/write file API from javascript: (and also to ask to increase storage limits) http://www.html5rocks.com/en/tutorials/file/filesystem/ * * * Thank you,Tom MacWright (aka tmcw), for some good feedback. Your example is really going to help when I get to creating custom layers to ingest the binary blobs. I did some testing yesterday with IndexedDB and by using some polyfills and libraries I think it will solve my issues. Now it is time to put some sweat equity into this, and I will report back. * * * **BTW: if you want to see my results of my study on client side databases see:** http://stackoverflow.com/questions/14113278/storing-image-data-for-offline- web-application-client-side-storage-database * * *


title: Labeling from a defined string in MapBasic

text: I am currently working on a code to apply a variety of different changes to layers with certain attributes, I have been successful with this so far (thanks to Peter). However I now want to add a text box to this so the user can enter the name of the field they want labeling (as this is the only thing differs in the .TABs I intend to use this tool for). I have currently created a dialog box for the user to input this however when it comes to labeling (I assume), MapInfo is looking for a field with the same name as my string to label with, instead of looking at what is stored there. For example               Dim sLabinput As String               Set Map Window nMID                 Layer nLayer                      Display Global Global Line (2,2,16711680)                     Arrows On                         Label With sLabinput Auto On Visibility On                         Font ("Arial",257,9,0,16777215)      I haven't put the rest of the code as I want to try and learn this myself however if that is the only way to solve it I can post it. Am I right in assuming in this instance MapInfo is looking for a field called sLabinput, rather than the value stored in there? Thanks, Alan


title: Using QgsSpatialIndex for spatial join

text: I've written a bit of code to do a simple spatial join in QGIS 2 and 2.2 (points that lie within a buffer to take attribute of the buffer). However, I'd like to employ a QgsSpatialIndex in order to speed things up a bit. Where can I go from here:               pointProvider = self.pointLayer.dataProvider()     rotateProvider = self.rotateBUFF.dataProvider()          all_point = pointProvider.getFeatures()     point_spIndex = QgsSpatialIndex()     for feat in all_point:         point_spIndex.insertFeature(feat)          all_line = rotateProvider.getFeatures()     line_spIndex = QgsSpatialIndex()     for feat in all_line:         line_spIndex.insertFeature(feat)          rotate_IDX = self.rotateBUFF.fieldNameIndex('bearing')     point_IDX = self.pointLayer.fieldNameIndex('bearing')          self.pointLayer.startEditing()     for rotatefeat in self.rotateBUFF.getFeatures():         for pointfeat in self.pointLayer.getFeatures():             if pointfeat.geometry().intersects(rotatefeat.geometry()) == True:                 pointID = pointfeat.id()     bearing = rotatefeat.attributes()[rotate_IDX]     self.pointLayer.changeAttributeValue(pointID, point_IDX, bearing)     self.pointLayer.commitChanges()


title: Epoch Time Incorrectly Auto-formatted As Int

text: I'm accessing seismic data from a USGS geojson (set to sync in CartoDB). When the data is brought into CartoDB the column is set as an int when it should be a long int. What is the best way to convert the field column so future syncs of the data come in correctly? I tried the following with no luck: UPDATE table SET field= CAST (field AS bigint)


title: How to automatically set polygons borders to improve map readability when rendering thematic maps?

text: When mapping an value as a color to render a thematic map the objects borders can alter the map readability a lot. For example in this thematic map of the US counties with black borders: ![enter image description here](http://i.stack.imgur.com/TJW7S.jpg) There are a lot of small objects in some areas, and it makes them look darker because of the borders without respect to the thematic color. If the borders are drawn with 30% opacity it results in the following map: ![enter image description here](http://i.stack.imgur.com/Ex3iw.jpg) This one is obviously better at communicating the data mapped on the objects. However having a static opacity rate can also degrade readability since it makes the objects boundaries less visible, which is a problem if there is only a few big objects. Moreover the change in readibility also depends on the contrast between border and fill colors. Do automatic ways of finding the good color/opacity for layers exist? What GIS software provide method to properly handle this issue?


title: How to display raster attributes by default?

text: I have a 4-bit thematic raster image with a color map from white to dark blue (Figure 1). The values 1 - 6 represent tree canopy cover at various breakpoints. I also created a raster attribute table with the various classified breakpoints (Figure 2). Is there a way (i.e. other than creating a .mxd document) for the image to immediately display the "Cover" attributes in Figure 2, rather than what currently displays in figure 1? Essentially what I am trying to do is eliminate the classes with no data (e.g. 0, 7-15) and make the "Cover" raster attributes display by default when the user brings up the image in the viewer. **Figure 1** ![enter image description here](http://i.stack.imgur.com/DUNjY.jpg) **Figure 2** ![enter image description here](http://i.stack.imgur.com/ppsM7.jpg)


title: How to obtain the width and height of an image using arcpy

text: This Stack Overflow question shows how to obtain the pixel dimensions of an image using Python. Is it possible to find an image's height and width using arcpy and ArcGIS? arcpy.Describe would seem like a logical place to start, but I can't see whether it returns the height and width properties. I looked at File Properties and Raster Dataset Properties \- am I missing something obvious?


title: Distinguish between the types of cultivated crops in remote sensing

text: I recently produced map of LULC but there is the difficulty of distinguishing between the types of crops. Is there a method to distinguish between the types of cultivated crops such as wheat, barley, maize etc.?


title: WFS layer doesn't display in OpenLayers

text: I have a few layers in a PostGIS database that I serve through Geoserver and that I try to display in OpenLayers. When I had the geoserver installed on localhost, it worked flawlessly. Now that I migrated the Geoserver on a remote server, the WFS is no longer displayed on my OpenLayers map. Looking at Firebug, the request is sent to the server but no answer is received. What is even weirder is that I can access the WFS from Qgis without any problem. Also, even the Geoserver examples (WMS though) work perfectly. The page is here: http://www.henriod.info/khub2/khub2.html Do you see any problem with this part of the code?               var schools        = new OpenLayers.Layer.Vector("Schools", {                        styleMap: style_schools,                        strategies: [new OpenLayers.Strategy.BBOX()],                        projection: new OpenLayers.Projection("EPSG:4326"),                        protocol: new OpenLayers.Protocol.WFS({                        version: "1.1.0",                                        url:  "http://thething.disco.unimib.it:12080/geoserver/wfs",                        featurePrefix: "humadat",                        featureNS: "http://thething.disco.unimib.it:12080/geoserver/khub2",                                        featureType: "schools",                        geometryName: "the_geom"                                    })                     });      Or could the problem be somewhere else? Thanks in advance!


title: What solution is there to project google/bing layers to another EPSG (e.g. 3844)?

text: I am using Geoserver and Openlayers. The Openlayers map has all the layers in EPSG:3844. I need to overlay Google/Bing layers. I am currently trying to do it with proj4js, mapproxy.org as openlayers doesn't have reproject support for WMS. Any solutions?


title: Methods of cloud shadow detection for Landsat data?

text: Detecting clouds doesn't seem to be much of a problem, rather the challenge is in selecting cloud-shadow classes that don't also include coastal areas, agriculture, etc. For a project I'm working on, I've been using two methods: Fmask (https://code.google.com/p/fmask/) is powerful and fully automated, plus it works for TM, ETM+, and OLI/TIRS data. It is great at catching harder to detect haze and the majority of other clouds/shadows. The problem I have with it however is that it tends to miss certain cloud types, namely smaller low altitude clouds and their shadows. I played around with the input parameters and found the best success using default values. My other method is a semi-automated classification. I create NDSI, NDVI, and NDWI for a particular scene, stack those as RGB, and perform unsupervised classification in ERDAS Imagine 2013 (k-means, 10 iterations, 0.95 convergence threshold, and usually 256 classes). After working on several scenes, I preferred to use the stacked indices over classifying individual bands because it took less time and did a slightly better job at separating clouds/shadows from other classes. In the end, I had fairly good success with detecting and removing clouds by combining these two methods, but ended up losing good data in my classification of cloud-shadows in particular. Has anyone had success in removing shadow areas that they'd like to share, or perhaps some insight into improving my classification process?


title: What is the best way to host mbtiles?

text: What is/are the best way(s) to host mbtiles? I have tried:   * **hosting on my own server** with tileserver.php: this works and is very straighforward and simple to set up, but doesn't seem to be super fast (maybe a problem with my server) and I fear that when the site opens to the world it will simply break down; (also, tileserver.php sends HTTP error 500 when a tile isn't found, which I find misleading?)   * **hosting on S3** (1 tile per S3 object): serving tiles is very efficient and fast, but uploading to S3 using tilecloud always raises an S3 error "connection reset by peer" in the middle of the process, so uploading never ends properly and more than half the tiles are not sent (and it seems that trying again just restarts everything from the beginning) MapBox would be the obvious choice but their prices seem very high? The mbtiles file is under 500 Mo for zoom levels [9,15], gets to 1 Go for levels [9,16] and 2.7 Go for levels [9,17]; I can live with [9,15]. S3 would be the simplest for me, if I can find a way to upload all tiles without error (or, with an error that can be debugged: S3 logging doesn't show anything for the error I'm experiencing). Any other idea?


title: Using geotag photos with Geoserver

text: Anyone has an idea how I can add geotaged photos inside Geoserver? At the end I want to have a map that has as background Google Maps APIs and on top of it with some geotaged photos. The photos I want to appear on the map as I zoom in. Thanks, Corina


title: How can I use the QGIS api on Jenkins

text: I have a python script with another script for unit testing. I would like to add it to jenkins to get continuous integration. Since I can't pip install qgis, how am I supposed to get the qgis api onto jenkins so that a build passes? I'm using version 1.8 of the api


title: How to activate edit tools

text: I have opened a project I worked on earlier on another machine, but the edit tools are not active, so i cant turn on editing to change a layer. What is the reason for them to be gray, and how can i continue to edit the layers in the project? Here is an image if its for any more use.. ![enter image description here](http://i.stack.imgur.com/3saAJ.jpg)


title: Custom infowindow exception in CartoDB

text: I'm building a runtime layer and til a couple of days ago my code was working. Since today it started giving me an exception that is causing subsequent code not to work.               Uncaught ReferenceError: layerView is not defined       The problem is caused by this call:               cdb.vis.Vis.addInfowindow(map, sublayer1, ['cartodb_id','ppe_ma']);      I guess something has changed in the api but i dunno how to track this changes as these functions are not yet documented.


What is the difference between QGIS for Windows and QGIS for Android? Is the functionality the same?