Dynamically Reload OpenLayers Marker Layer based on user input

Not really sure how to ask this, so I'll outline the scenario. We have a database with locations in it. There are various types of cars at each location and each car has a problem of varying importance associated with it. Some Sample Scenarios Location A - has a Mercedes - With a Level 3 problem Location A - has a Ford - With a Level 1 problem. Location A - has a Toyota - With a Level 2 problem. Location B - has a Nissan - With a Level 3 problem. Level 1 problems are the most severe, they get a red marker icon. Level 2 problems are severe but less so, an orange marker icon. Level 3 problems are not that bad, a yellow marker icon. Marker icons for a location are selected by the highest priority problem at the location. i.e. Location A would have a red icon because the ford has a Level 1 problem. Location B would have a yellow icon because it only has a problem 3 there. We have managers who are responsible for types. i.e. Manager 1 is responsible for Mercedes and Nissan vehicles. So Manager 1 would like to select Mercedes and Nissan and see a Yellow icon at Location A and a Yellow icon at location B. Manager 2 might select Ford and Toyota. He should see Red at location A and there shouldn't even be a marker at location B. I'm using a simple OSM tile map and marker layers. I have a one marker layer for each type of car and that marker color is based on the highest priority, it works fine as long as they only select one layer at a time, if there's 2 selected, the icon for one type gets drawn over the icon for the previous type and the icon color is only representative of one type, not the highest priority of the types selected. Currently, the data is loaded and the layers built via an AJAX call, what I would like to do is change the application to only have 1 marker layer but allow the user to select types and rebuilt it via AJAX call each time. Is there a way to do this? Ideally it would still work like the LayerSwitcher control. Is there a better way to go about solving this?


WMS - Export Retrieved XML Data

I use WMS layer in my app and could successfully retrieved Feature Info by click like so: http://openlayers.org/dev/examples/getfeatureinfo-control.html My question is: Is there any way to export the retrieved data in separate variables? So that I can organize the popup instead id this table. I see that its an XML file but still can't find a way to handle it.


Change the Default geodatabase in ArcGIS 10?

In a multi-user environment I have a need to be able to configure ArcGIS so that it uses an SDE connection as the default geodatabase instead of the Default.gdb in each users' profile. What is the best way to do this? An add- in?


How to calculate an elevation profile for a polyline in arcgis 10 with spatial analyst/3D analyst?

My elevation data is a floating point tif. I have a road for which I need to calculate the elevation profile, but I can´t see the tools to do this. Can I do this with ArcGIS? yours, Rob


Is ArcGIS available on Ubuntu?

Is ESRI's ArcGIS platform of programs available on Ubuntu? I love open source and if I could I would love to try and migrate to this open source OS.


Empty geometry resulting from pgrouting function

Let me start by saying I'm assuming I'm missing something very silly but I can't see it. I have a table of points and I'm trying to generate a polygon around each point that estimates a maximum of 1000m driving distance from the point. I'm using the current Ordnance Survey Vector Map District road layer loaded into postgis as multilinestrings, with Postgis 2.2 and Postgres 9.3. All layers are using the OSGB 27700 projection. The point data has a column which contains the nearest road node calculated from the source road data. When I run the SQL for a single point to generate the list of individual roads using pgrouting driving distance it works perfectly:               SELECT seq,             id1 AS node,             id2 AS edge,             cost,             geom       FROM pgr_drivingdistance(            'SELECT gid AS id,                     source,                     target,                     st_length(geom) as cost                FROM public.os_vd_2014_road',            1529980, -- The node            1000,    -- The driving distance            false, false                               ) as di       JOIN os_vd_2014_road_nodes AS pt       ON di.id1 = pt.id;      (Since this was essentially Anita Graser's code from her examples I expected nothing else). However, I want to create a general case, ideally returning a polygon displaying the limits of each route but at the least a single geometry for each point. To do this I created a function that would hopefully do that for a given point, and then call it in a simple SELECT statement:               CREATE OR REPLACE FUNCTION vdsl_hull (integer, integer)     RETURNS geometry AS $$          SELECT St_Collect(geom) AS the_geom       FROM pgr_drivingdistance(            'SELECT gid AS id,                     source,                     target,                     st_length(geom) as cost                FROM public.os_vd_2014_road',            $1,    -- The node            $2,    -- The driving distance            false, false                               ) as di       JOIN os_vd_2014_road_nodes AS pt       ON di.id1 = pt.id;     $$ LANGUAGE SQL;          SELECT bt_pcp_list.pcp_id,             bt_pcp_list.id AS gid,            vdsl_hull(bt_pcp_list.nearest_node, 1000) AS the_geom     FROM   public.bt_pcp_list     WHERE  district_code = 'SMBRD';      This "appears" to work in that it generates output for each point, a valid "gid" value, and a column labelled "the_geom" but the geometry column is empty. The next stage was to surround the ST_Collect with ST_ConcaveHull() but clearly that's a stage too far for now. I'm assuming the error in my thinking is something to do with the resulting geometry from the ST_Collect but could be completely wrong. Any help would be very welcome!


How to calculate length of feature in MapInfo

i Would like to calculate the Sum of pipe lengths in Mapinfo within a polygon. Any ideas?


Coordinate Reference System issues between SHP and Raster file

I am having an issue with the CRS of a given Aster DEM. I have downloaded a Aster DEM from www.oziexplorer3.com which comes with the EPSG:4326 - WGS 84 as the CRS. This is a DEM from Gabon, and all the other data I have for the project I am working on has the CRS defined as EPSG:32632 - WGS 84 / UTM zone 32N. I have to create some contours from the DEM in order to use them in another software for the elevation definition of a water network. When I open the DEM and SHPs I have in QGis they perfectly overlap (although they have different CRS) and so do the contours I extract from the DEM. But then, when I import the contours into the other software, because they have different CRS, they do not overlap and so I can't use the newly created contours in order to define the water network's elevations... and if I change the CRS in QGis (for the DEM or for the contours) they do not overlap even in QGIS... Is there a solution for this problem? PS - please know that I am quite inexperienced with GIS softwares, but you might already noticed that...


Any Piri Reis shapefiles?

Incredible claims have been made about a map named after its creator (Piri Reis). ![enter image description here](http://i.stack.imgur.com/xiQKo.jpg) I was looking into digitizing the map and overlaying it with a modern map of the world, specifically the east coast of the Americas, Antarctica and the west coast of Africa. Before attempting this I wanted to make sure it hasn't already been done. So, has anyone seen/done this and have pointers to the data? A shapefile or GML file? Something that can load into Google Earth? http://1.bp.blogspot.com/_tBL67utkyNw/S_lE7zti5RI/AAAAAAAAAU8/HgEFCjd74Ik/s1600/piri_reis_full.jpg


How do I save edits from an ArcMap editing session using VB.Net?

I have figured out how to do a map save document, but I would also like to be able to save edits whether or not I am also saving the map document.


Dialog Table Name Prompt Error In MapBasic_Mapbasic

I am trying to prompt the Table name from the opened tables and to use it in the rest of the program, but what i get is (Table (i) is not open) after clicking ok the Sub Procedure is below, please help               Sub Selection          Dim num_open_Tabs, Ix  As Integer         Dim Tab_names(50) As string     Dim Sector_table as string     Dim Sector_Table_Name as String      Dim sector_Table_Obj as Object          Win_ID = FrontWindow()     num_open_Tabs = NumTables() 'Create Array of the Layers Names          Redim Tab_Names(num_open_Tabs)       For Ix = 1 to num_open_Tabs        Tab_names(ix) = TableINFO(Ix, Tab_INFO_NAME)     Next          Dialog 'Prompt the wanted Layer name        Title "Choose Cell_Data Table"        Control StaticText               Position 10,10 Width 250 Height 10           ID 1           Title "Please Choose The Table Containing Your Sector Info"                 Control popupmenu           Title From Variable Tab_names           Position 10,20 Width 250 Height 15           Id 2           Value Sector_table               Into Sector_table        Control StaticText           Position 10,50            Title "Enter Buffer Width"             Control EditText           Position 10, 60           Value "200"           Into Sel_Width        Control OKButton        Control CancelButton          If CommandInfo (CMD_INFO_DLG_OK) then        Sector_Table_Name = TableInfo(Sector_Table, TAB_INFO_NAME)     Else         Exit Sub     End If


How to move an Oracle spatial table to another db?

I have uploaded a polyline data (50 million rows) to oracle spatial 10g as sdo_geometry through arccatalog and arcsde in my TEST database. Now, I need to move this table to QA database, this table is not having any relationships with other table. It took nearly 1 day to upload the data to TEST through arcsde. I want to do it using Oracle tools, which is the best method to copy/move this huge data with all informations like index, metadata etc., thanks, vadivelan. P


Why does ArcGIS model not recognize Z value column?

My ArcGIS model used to handle .XYZ files well, but now it fails to recognize Z-value column as such - it either recognise no field at all, or it offers some defaults such as "OID".   Since the last successful run, I changed workspace and resolution of target raster (I doubt anything of it caused the problem, and I tried it with the same settings as before, and no joy here).   Do anyone have any idea what to do? Here is a snapshot of my model: ![enter image description here](http://i.stack.imgur.com/nBUl5.png) My data is classical .XYZ file, with no header. EDIT: doing the same outside the model (running the two tools used in my model manually, with intermediate multipoint feature class preserved) worked. This means the problem is not in the data (the same space delimited XYZ file from the very start), but in the model. Some parameters: Coordinate system: S-JTSK_Krovak_East_North (it suits the data; this is default, can be changed if the data were different) Intermediate feature:   - type: multipoint - managed - path: blank -- AFAIK this should be necessary for sharing the model, and it shouldn't make problems as it's "managed" - but when I used the model for the first time, and successfuly, the path was set. The rest shouldn't matter, these are mostly constants relevant to data and the results I need.


How to select only areas bigger than x acres?

I would like to create a new shapefile from another area shapefile. The new shapefile should only contain all areas that are bigger than 5 acres (10.000 m²). How do I do this?


determining what polygons intersect another layer

I am attempting to establish what spatial relationship exists (if any) between two layers. I have two layers - one is a road network with a buffer of 500m, and the other is a collection of polygons relating to environmental features. The road network buffer layer comprises of multiple roads and I would like to know what envrironmental features intersect what roads. Or more specifically I would like a column in the environmental layer attribute table which describes what road it interacts with? Apart from using the 'select by location' spatial tool and then manually populating an empty column in the environmental layer, is there another spatial tool or method that I haven't considered? The data itself is being stored in PostGIS and used in QGIS, but it would be possible to use ArcGIS if necessary. Thanks for your time.


Running CartoDB without WebServer

I've been a using CartoDB on a self hosted server now for a few months, and I'm trying to get it set up correctly for my needs in a production environment. However I am a newbie when it comes to the ruby/rails and node.js apps. I've uploaded my shapefile with the data into CartoDB using the web interface (by running the full stack), and it is accessible by Windshaft and the SQL API. I have CartoDB running on a separate server than my public facing webserver, and am only using it to query my data (no updates/changes). I edited my webserver's copy of CartoDB.js to point to my CartoDB server. So while I have my webserver at test1.com, it looks for the image tiles at cartodb.test2.com I've found if I only start Redis, CartoDB-SQL-API, and Windshaft (and don't start the rails server) my data can be queried and my image tiles are created. So, my question is if I actually need to run the the rails server at all when I'm in my production environment, or is it better to just run my node.js apps standalone? Is the rails server only for the CartoDB web interface? Are there any security issues with running the node.js apps in such a way? What about performance hits? I really appreciate any input! Jeremy


mathematics of spatial diffusion models

There are different types of spatial diffusion such as contagious model, migration model, etc. What are the good books to learn about the mathematics behind these spatial diffusion models?


Add building height from xyz points in PostGIS

I have been trying to get this query right and just can' seem to. I have a building polygon table with over 7 million polygons, indexed I then have a grided height XYZ table with attribute 'height' spaced at 50m, which is also indexed. I want to create a new table by selecting the closest height point to the centroid of the polygon and take the height attribute and add it to the building. The query I was using at the moment it               CREATE TABLE buildingheight AS          SELECT DISTINCT ON (b.ogc_fid) b.ogc_fid, b.ID, b.wkb_geometry, h.height          FROM building b JOIN xy_height h ON ST_DWithin(b.wkb_geometry, h.geom, 50)          ORDER BY b.ogc_fid, ST_Distance(b.wkb_geometry, h.geom);      I tested this on a sample of 400 buildings but only a certain number gained the height attribute. This was a hash of code I found from some other posts. I have also tried to use the ST_ClosestPoint               CREATE TABLE buildingheight2 AS          SELECT b.ogc_fid, b.ID, b.wkb_geoemtry, h.height          FROM vmd.building b, gb_xy_height h               ON ST_ClosestPoint(h.geom, ST_Centroid(b.wkb_geoemtry) LIMIT 1;      and also the new nearest neighbour posted here http://blog.opengeo.org/tag/knn/ I am surprised no one else has done this as I thought with all the LiDAR data that this query would be straight forward. thanks for any help


How to get vector feature information (distance and extent ) on OpenLayers

I have basic WMS layer and vector layer in openlayers. Using EditingToolbar i can draw some features as shown below ![enter image description here](http://i.stack.imgur.com/6okLX.png) Then I want to get some information (like distance and extent) of drawn features in any format.At the movement I stuck on above point. Pls give me some tips or sample code or some links. Thanks for your valuable time


Generating plan sets using different layer configurations

I am working on a flood modelling project that will generate a very large number of plan sets. Each set will have several plans - say a general arrangement plan and say 5-10+ sheets tracking along a intercourse. Each set of plans will be generally the same, except with a different "results" layer turned on. For example Set 1 covers the 100year flood extent, Set 2 covers the 50year flood extent, etc. As the model develops, options tested, refinements made, etc, there is the need to reprint the drawings with the updated results layers shown. Can I do the following with QGIS?:   1. Set up a template composer titlebox   2. Define a set of plans along a river reached for example   3. Set up a layer configuration then save the layer configuration for later reuse.   4. Print out the set of plans.   5. Change the layer configuration Then save for later reuse. Repeat this for all results.   6. At a later date, update the results files, and regenerate all the drawings using the saved layouts. Any pointers would be appreciated.


How to set up a public facing server?

Depending on this post **How to host web map app on ArcGIS.com?**. i have installed arcgis server 10.2 for .net with web adapter, on win7 sp1 ultimate, i just guideline, how to setup my web map as public facing server, i have published services successfully, then i registered in arcgis.com as a new user for free,, then i have created a new Organization and group,finally i added a new item as web map application, but my challenge it how to make my web map app public for any one, so can any one guide me how to solving it,@Alex Tereshenkov, talking about set up a public facing server, but i cant what he mean!. OK, here is more information: my ip 10.10.1.103 subset mask: 255.255.255.0 i put my ip address liek this "10.10.1.103/arcgis/rest, but it is not responding, in firefox says the connection has timed out, also in internet explorer, as, i have installed IIS for arcgis server default gateway: 10.1.1.254


Summing volumes through a pipeline system

I need to fill a volume attribute for a pipeline system. Volume would come from a well at the end and I can easily start with a spatial join to get volume for all the line segments at the edge of the system. At this point I need to find a way to start summing the volumes through the system so that I know how much volume runs through a segment. Say a well volume 1 and well volume 2 come together. The resulting line needs to have a 3 applied to its volume attribute. I understand that the best way to do this will probably involve building a geometric network and I have explored this but haven't come up with a good way to automate the summation. I'd thought about using some of the hydrology toolset but had never worked with it before and don't know where to start. **Finally solved this using a combination of Attribute Assistant and the Water Utility Network Reporting Toolbar with the Summary Flow Accumulation tool.**


Lambert_Conformal_Conic Geographic coordinate system

A shape file I am working on uses the Lambert_Conformal_Conic projection. I would like to get a reference to this system via the IGeographicCoordinate interface. To get at the standard lat long projection, I do this IGeographicCoordinate gcs = srFactory.CreateGeographicCoordinateSystem((int)esriSRGeoCSType.esriSRGeoCS_WGS1984); So I looked for lambert in the enum type of esriSRGeoCSType but couldn't find anything close. Does anyone know what I'm missing? I'm using ArcEngine 10 in VS2010 with C#


Import Cad to ArcGis

I'm trying to import some CAD files from microstation (dgn) v7 to ArcGis 9.3.1 and i need to access the User Data Linkage from it but i have not the Data Interoperability License. Is there any alternative way to do this? Thanks in advance!


How to get layers from a specific store of geoserver using python gsconfig?

I'm using gsconfig python library to acess geoserver rest, my question is how can i get layers from a specific store ? I'm tried as follow:               from geoserver.catalog import Catalog          cat=Catalog("http://localhost:8080/geoserver/rest")          layers=cat.get_layers('storename')      but it's giving all published layers from geoserver not from that particular store. Please help me?


Creating a Time series NDVI map

I would like to create a NDVI Time Series map? How do I do that? The one I probably would like to have similar like this http://proceedings.esri.com/library/userconf/proc02/pap0593/p05931.jpg I created many NDVI for each or several months from the year of 2002 to 2013? 1) Do I need to add monthly NDVI to create an output monthly NDVI file and then the next step is to take new output monthly NDVI to produce a new output one year file? (or) 2) Add all the NVDI from one year to generate a new output for one year file ? The NDVI were produced from an ASTER.


How to display clickable features from Geoserver over Google Maps v3 Base?

Please forgive what I am sure is a very noob question, but I need to do some research into the best way to achieve this and I am a beginner to GIS. My employer has a Geoserver instance set up which can serve up files in all manner of formats. Is it possible to plot one of these onto Google Maps v3 in such a way as to make the feature's properties available to an information pop-up? My development server is not on the same domain as the Geoserver, but the Geoserver serves up files publicly. I have tried using GeoJSON but this seems to rely on the Geoserver and web server being on the same domain, otherwise cross site scripting protection prevents the connection - this works fine as long as I download the GeoJSON into a text file and store it on the web server but the source database will be regularly updated so the mapping needs to be dynamic. I've tried using a KML layer, but nothing displays at all when I use this method replacing the KML file URL with my own Geoserver's KML file url. I think this must not be a weird question as having a map with features that pop up info when you click them seems to be a fairly common thing, so can someone advise me where to start? e.g. What is the best format to use to serve up dynamically updated data from Geoserver? Is it possible to display this kind of info on Google Maps? I believe that this needs to be a web feature service in order to plot vector objects rather than image-based maps - how would you handle this kind of request?


Find projection of a point to a line

I have a segment defined by 2 LatLon points(A and B) and a third LatLon point (C). I need an alghorithm, formulae, or some code to find the projection point of C on the segment AB (call this point D) so that CD segment is perpendicular to AB... i few word I've to find the minimum distance between C and AB segment or in other word the height of the triangle ABC. I'found this question: Find the nearest point on a line and this reply: http://gis.stackexchange.com/a/39176/16839 I've translated the algorithm in Java (GeoPoint is a simple implementation LatLon class and VectorN is a class that mantain an array of doubles and implement basic vector operation like dot product, sum etc...) but it don't seems to work well... My source for Geopoints coordinates is googleMap... so they are in WGS84 system... and this may be the source of problems... but in my debug I found that results are very inconsistent... a point that stay at 30meters is given as staying at 0.5meters and a point at 18meters is given as 3m away... Can you help me?               public static GeoPoint GetOrthographicProjection(GeoPoint start, GeoPoint end, GeoPoint offsetpoint) {             double EarthRadius=6371;                   // Start node conversion         double sLat = degToRad(start.getLat());         double sLon = degToRad(start.getLng());              double sX = EarthRadius * Math.cos(sLat) * Math.cos(sLon);         double sY = EarthRadius * Math.cos(sLat) * Math.sin(sLon);         double sZ = EarthRadius * Math.sin(sLat);              //End node conversion         double eLat = degToRad(end.getLat());         double eLon = degToRad(end.getLng());              double eX = EarthRadius * Math.cos(eLat) * Math.cos(eLon);         double eY = EarthRadius * Math.cos(eLat) * Math.sin(eLon);         double eZ = EarthRadius * Math.sin(eLat);              //Offsetpoint conversion         double  oLat = degToRad(offsetpoint.getLat());         double  oLon = degToRad(offsetpoint.getLng());              double  oX = EarthRadius * Math.cos(oLat) * Math.cos(oLon);         double  oY = EarthRadius * Math.cos(oLat) * Math.sin(oLon);         double  oZ = EarthRadius * Math.sin(oLat);                        // Create vectors         VectorN p1 = new VectorN(new double[] {sX,sY,sZ});              VectorN p2 = new VectorN(new double[] {eX,eY,eZ});              VectorN o = new VectorN(new double[] {oX,oY,oZ});                        // Calculate         /*Vector<Double> u = p2 - p1;         Vector<Double> po = o - p1;         Vector<Double> w2 = po - (u * Vector3.DotProduct(po, u) / Math.Pow(u.Magnitude, 2));         Vector<Double> point = o - w2;*/              VectorN u = p2.minus(p1);         VectorN po = o.minus(p1);         VectorN w2 = po.minus( (u.times(po.dot(u)).times(1 / Math.pow(u.magnitude(), 2)))  );         VectorN point = o.minus(w2);              // Convert to latlon         double rlat = radToDegrees(Math.asin(point.cartesian(2) / EarthRadius));         double rlon = radToDegrees(Math.atan2(point.cartesian(1), point.cartesian(0)));              return new GeoPoint(rlat, rlon);            }      Example of result: gp1= 40.8880224061686 , 17.391275949776173 gp2= 40.888020378444516 , 17.39116732031107 output point (that should stay on the segment gp1-gp2) 40.88801433354826 , 17.390843482462408 On gMaps you can see the point (gp1 and gp2 are blue, the output is the red marker... it should be between blue markers... instead is far away...) see this pic: http://i.stack.imgur.com/bBMd6.png


How can i use field of view in ArcGIS?

The field of view analysis in GIS is a polygon file that shows the portions of an area that are visible versus no visible across a terrain starting from a given point. see this Link How can I use Field of view analysis in ArcGIS? is there any tools to use field of view analysis in ArcGIS or any scripts ?


Adding, Updating, and Deleting information from arcGIS Server

I am new to ESRI and GIS. I am starting to get into using client data. I have created maps and put them to the server using arcMap and arcGIS for Server. I need to know how easily I can access these fields and if it is even possible to change them since the mapping data will change from time to time. Attached is a screen shot of the fields in my map layer. I need to do this somewhat dynamically since each customer is different. These are the fields for my layer (WVALVE): ![enter image description here](http://i.stack.imgur.com/ExiTH.png) I would like to be able to change what is contained in each field through the application and even take the information given in the maps and put it in my own database.


What is the advantage to using a representation vs a layer file?

I understand that the representation stores the symbology inside of the geodatabase. It creates it's own field for a RuleID. I made a layer file that had 'unique values and many fields' and chose two fields illustrated in my screenshot. ![enter image description here](http://i.stack.imgur.com/ZDQXI.png) This makes the analyst pick two fields in order to be attributed correctly. When I make representation based off of this layer this is what appears in the Layer Properties. ![enter image description here](http://i.stack.imgur.com/iUKlU.png) I get what is going on between them. With a representation it moves the symbology into a new field (rule ID) that is attributed when you create a new feature. The problem I have is I want the original fields that made up the RuleID attributed. The picture below shows the RuleID field based on what I created. It's based off the Type of Facility and Status (not pictured). ![enter image description here](http://i.stack.imgur.com/stYfX.png) Is there a way to attribute the original fields, but still have the symbology built in the GDB? Am I better off using layer files and resourcing to the current GDB for every client? I'm using ArcGIS 10.1 and about to upgrade to 10.2.2 in a few weeks.


Using ArcPy to batch merge based on shapefile name?

ArcGIS 10 SP4 Python 2.6.5 I have quite a few shapefiles that are in many different directories. I'd like to pull out groups of like shapefiles, merge them, and move the results into a FGDB. I've read the posts about making a GIS inventory, using a .csv as an input list, as well as few others. Those seem to point me in the right direction, but I'm still having a hard time wrapping my head around it. Obviously I'm new to Python, but believe automating this process is within my abilities. It seems easy conceptually, but I don't have enough experience to generate the code. Make multiple lists based on the shapefile name (startswith?) Use those lists as inputs for a batch merge. Convert merged files to GDB Any input would be greatly appreciated.


How can I get Sokkia total station .RAW file data into ArcGIS

I have a .raw file from a Sokkia total station. I want to view the data in ArcGIS and create contours from this data. Can anyone help? The survey analyst extension is longer supported in ArcGIS 10.1 so I'm not sure where to begin...


how to set WMS reprojection config in mapserver if I creating virtual map (e.g. star map)

all, I want to use openlayers with mapserver to create map of stars. but I dont know how to setting up the WMS config in mapserver , especially the EPSG re-projection things. In fact, I didnt any re-projection, and I just want to mapserver provide WMS and communicate with openlayers. anyone can give some advice? many thanks zzz


Points generated using mmqgis are invalid

I used mmqgis plugin to geocode some addresses, he pointed to have found them all. But the screen shows only a point when there are more than 100, in the attribute table all appear. I loaded this shape in postgis and tried to get the coordinates of longitude and latitude of each geometric and did not return anything.               SELECT         ST_AsText(geom), ST_X(geom) as lat,             ST_Y(geom) as lon          from             "Controle AAE.shp"      So veirifiquei the validity of geometry and did not return anything, so are invalid               SELECT         ST_IsValid (geom)     FROM           "Controle AAE.shp"      Someone already used this plugin and this happened? I've used with other data and it worked.


Is there a web page where I can test a WMS URL?

I am using JMP 9, which supports WMS maps (as a client), but it doesn't seem to be working now. Is there a web based, or small install GIS client on which I can test a WMS URL? [To clarify, I was looking for something that would help me find out the correct querystring parameters to send, as the service I was hoping to use did not specify them] Thanks


Error Updating Gdal with Homebrew

I recently updated my version of Gdal using the homebrew package manager. However, now whenever I use gdal from within my terminal shell, I get the following error:               dyld: Library not loaded: /usr/local/lib/libspatialite.2.dylib       Referenced from: /usr/local/bin/gdaladdo       Reason: image not found     Trace/BPT trap: 5      Gdal commands that are made from within qGIS, however, still work. (I'm assuming that a path needs to be updated, but have no idea how to procede). If anyone has any advice on how to procede, all help would be much appreciated. Thanks in advance.


Shortest raster path

I am trying to create a path from the blue square to all the green dots. The blue square represents an existing road and the green dots represent centroids of forest stands. The total path distance shall be as short as possible and the path shall be the least cost-path (based on Slope Raster). The least cost path can be done with ArcGIS Cost Path. But I don't know how I could create the shortest possible path. ![enter image description here](http://i.stack.imgur.com/SRwIx.png)


Common GIS data sources for developing nations. Where to start?

Not all countries have the benefit of funding/technologies for developing GIS data stores. I'm looking for a list of common GIS data sources that should be investigated when trying to build a good basis for GIS analysis in developing nations (e.g road/river networks, DEMs, land use). Free or paid data. My first stop is usually Glovis for Landsat coverage, but I often come up short on vector data. For example, I would like to create a series of thematic maps for Nepal containing any and all GIS information I can get my hands on. Where would you begin? EDIT: Organizational sources could also be useful, even if their data is not available online. E.g contacting the government department in charge of water resources.


How to work with shapefile with 110,000 points?

I have a very large shapefile. It has 110,000 parcels, represented as points. I'm not trying to do anything too advanced with it. Here's what I want to do:   1. Join it with an Excel file, export it as a new shapefile (unless there's an easier way to incorporate the joined attributes into a shapefile)   2. Use the identity tool to group the parcels into census tracts   3. Use the field calculator to create a Boolean variable of sorts. I just copy and paste one column into a new field, and turn a value into 1 and all other values into 0. The computer I'm using right now has i7-3770 and 16 GB of RAM, so I don't know why ArcMap 10.1 would not respond when I'm trying to do any of those things. If there is a way for me to do those things listed above without crashing the software, I'd like to know. Thank you.


How do I insert the string field and calculate it in Python?

Hello I am trying to insert a code that force a column Sum_Acres_ to add a comma to display like this 300,000 from 300000.456 Here is my sample I wrote from a ModelBuilder and export it to python.                   # -*- coding: utf-8 -*-     # ---------------------------------------------------------------------------     # Summary.py     # Created on: 2014-07-16 08:10:58.00000     #   (generated by ArcGIS/ModelBuilder)     # Description:      # ---------------------------------------------------------------------------          # Import arcpy module     import arcpy          # Load required toolboxes     arcpy.ImportToolbox("Model Functions")               # Local variables:     Final_Intersect = "E:\\FY2013_projects\\PMC_project\\USGS EarthExplorer\\2004\\Final_Intersect"     Statistics_Field_s_ = "Acres_1 SUM"     ast_l1b_00301132004175715_20101206173613_5997_ndvi_shp = "E:\\FY2013_projects\\PMC_project\\USGS EarthExplorer\\2004\\Final_Intersect\\ast_l1b_00301132004175715_20101206173613_5997_ndvi.shp"     v_name__dbf = "E:\\FY2013_projects\\PMC_project\\USGS EarthExplorer\\2004\\Final_Summarize\\%name%.dbf"     Name = "ast_l1b_00301132004175715_20101206173613_5997_ndvi"          # Process: Iterate Feature Classes     arcpy.IterateFeatureClasses_mb(Final_Intersect, "A*", "", "RECURSIVE")          # Process: Summary Statistics     arcpy.Statistics_analysis(ast_l1b_00301132004175715_20101206173613_5997_ndvi_shp, v_name__dbf, Statistics_Field_s_, "Crops")               # Process: Parse Path     arcpy.ParsePath_mb(Name, "FILE")      How or where should I insert this code ({:,}'.format(!SUM_Acres_!)) above ? Actually I have 10 of them in separate modelbuilder and it is the same thing but just a different dictionary and it would save me a lot of my time to do this by copy python and then just simply change the path names to different For example, C:\2004\final , C:\2005\final, C:\2006\final so on...


Simple Question: Raster from ArcGIS to Geoserver

we have a couple raster files which could be open in ArcGIS. They come with the extension of .aux and .rrd and they are the GRID file format from ESRI. We want to put them on Geoserver to overlay them on Google Map. They are all in WGS 84 projection. I was wondering:   1. What is the flow chart of work we should do to finish this task?   2. What kind of conversions we need to do for the data? We want relative fast loading of those data, so we need caching on the server. I would like to hear from you and try to write a tutorial thereafter.


Is it possible to set the color of a symbol from an attribute of the graphic?

I have a feature layer used in a client flex application. The feature layer is used to publish a feature class that has many attributes. Among those attributes there is one named "color". As its name indicates, this attribute contains the color of the feature. This attribute (color) is meant to be modified by the user. The symbology of the feature layer is set by a renderer created on the MXML file. I'd like to be able to set the color of each graphic of the feature layer, from its color attribute. Is it possible to tell the mxml renderer to set the color of its symbol to the value contained in the color attribute? I'd like to do that on the mxml side without using ActionScript.


Layers not displaying in the correct order

![enter image description here](http://i.stack.imgur.com/e8Kga.jpg)I have a shapefile that is in my Layer tree above an aerial imagery layer. Yet, the map covers the shapefile with the aerial imagery. Any ideas how to fix this?


How to Add image and hyperlink along with GetFeatureInfo Popup?

I want to cutomize the Geoserver GetFeatureInfo Popup. I want to add image against each parcel I click. For this purpose I've read to change the content.ftl file of geoserver. But I found that file in wms.jar file. So, I extract it and after changing the content.ftl file, when i agin convert into .jar file, Geoserver doesn't work. Is there a solution to it? Any other suggestion to add the image along Featureinfo.


How to create a new feature layer from the selected features?

I have a simple tool written in ArcObjects which takes features from a layer and does some processing on them. I use a feature cursor to loop through all the features in the layer. To perform the necessary processing I have written several functions which accept an IFeatureLayer reference. What I want to achieve is:   * I want to process only those features which are selected   * I don't want to change my code in all my existing functions. So I want to be able to continue to pass an IFeatureLayer reference to these functions. How can I do this?


How to design labels which look like a fraction (with a fraction line)?

I want to create labels like a fraction using data from two columns. I have tried to use:               "Field" || '\n' || '――' || '\n' || "Field2"       but it doesn't look good. How can I do it using other method? Here I have added the picture![enter image description here](http://i.stack.imgur.com/cEyYJ.jpg)


Tiles on SSL website loading over http

I have an application on a SLL domain. Loading all the ArcGIS Javascript files is correctly done over https. But when actually using the application, the tiles of the basemap are loaded over http, resulting in security warnings in firefox en chrome. You can see it working at https://topografieindeklas.nl/topotrainer/nederland/. Edit: For debugging I isolated the script at https://topografieindeklas.nl/SSLtest.php. The code would be down to snippet below (I know this is legacy code; AMD made no difference whoever). Edit2: from there, it becomes more clear where things go wrong. Looking at the JSON url, the tile sub-servers are having http instead of https! **Edit3:** As it turns out, this is caused by a Bug on Esri's side. Their planing to fix it in the March release of ArcGIS Online. As a workaround a Proxy is suggested. What could be causing the tiles being loaded over http, while the rest of the page is loaded over https?               <link rel="stylesheet" href="https://js.arcgis.com/3.7/js/dojo/dijit/themes/claro/claro.css">     <link rel="stylesheet" href="https://js.arcgis.com/3.7/js/esri/css/esri.css">


Cluster numbering in openlayers

I am using openlayers 2 for making clustering on vector point data for which I am a beginner. I have installed geoserver locally via opengeo suite and using 'world_cities' dataset as an example. I have been able to implement simple cluster strategy. Now I want to display count numbers on each cluster. For example, when I start to zoom in , the big cluster should display how many element points are inside. Then when I zoom in further, the big cluster will break down and at the same time show it shoud display the reduced number of points and until it becomes 1. I would appreciate any help. Here is my code. At which position shall I place another method/rule to get numbering staff done ? ![enter image description here](http://i.stack.imgur.com/KiQ6I.png)               var style = new OpenLayers.Style({                     pointRadius: "${radius}",                     fillColor: "#FF3300",                     fillOpacity: 0.8,                     strokeColor: "#66FF00",                     strokeWidth: "${width}",                     strokeOpacity: 0.8                 }, {                     context: {                         width: function(feature) {                             return (feature.cluster) ? 2 : 1;                         },                         radius: function(feature) {                             var pix = 2;                             if(feature.cluster) {                                 pix = Math.min(feature.attributes.count, 7) + 2;                             }                             return pix;                         }                     }                 });            var wfs_layer2 = new OpenLayers.Layer.Vector("world_cities", {       strategies: [new OpenLayers.Strategy.BBOX()],       protocol: new OpenLayers.Protocol.WFS({       version: "1.1.0",       url: "http://localhost:8081/geoserver/wfs",       featureNS :  "http://world.opengeo.org",       featureType: "cities",      }),             strategies: [                 new OpenLayers.Strategy.Fixed(),                 new OpenLayers.Strategy.Cluster({distance: 30})                 ],                 styleMap: new OpenLayers.StyleMap({                         "default": style,                         "select": {                             fillColor: "#8aeeef",                             strokeColor: "#32a8a9"                         }                     })      });


Which geostatistical tools to use to determine surface changes over 40 years?

I have a data from the Weather station with SWEmax (snow water equivalent) collected over 40 years. I need to interpolate the data over my river's watershed and then, somehow, determine the differences which might have happened over this time.   * Which tools do I need to use in ArcGIS 10.1 to achieve this?    * Do I need to make z-surfaces first and then take statistics from them?    * Is the best way to show the differences is to use a diagram with years on the x-axis? Thanks.


How do I edit a Direct Connection Workspace using arcpy.da.Editor?

How to start editor to edit version data for ArcGIS 10.1 direct connection. I tried as given below code but it is throwing an error "Operation only allowed by the owner of the version [SDE.DEFAULT]". We are able to edit features manually.               workspace = "Database Connections/Connection.sde"     edit = arcpy.da.Editor(workspace)     edit.startEditing(False, True)     edit.startOperation()


How to zoom to a specific point?

How is it possible to make the map zoom to a specific point like an address that the user wants to find? Codebehind:               private void btnSearch_Click(object sender, RoutedEventArgs e){         var queryTask = new QueryTask();         queryTask.Url = /*URL*/;         queryTask.ExecuteCompleted += new EventHandler<QueryEventArgs>(queryTask_ExecuteCompleted);              string[] addressInput = txtBoxAddress.Text.Split(' '); //Here goes the address in              var query = new Query();         query.ReturnGeometry = true;         query.OutFields.Add("*");              if (addressInput[0] != null)             query.Where = String.Format(/*SQL-Statement*/, addressInput[0], addressInput[1]);              queryTask.ExecuteAsync(query);     }          void queryTask_ExecuteCompleted(object sender, QueryEventArgs e){         //throw new NotImplementedException();              var graphicsLayer = (ESRI.ArcGIS.Client.GraphicsLayer)Map.Layers["graphic"]; //A little circle marks the address on the layer         graphicsLayer.ClearGraphics();              foreach (var item in e.FeatureSet){             item.Symbol = null;             graphicsLayer.Graphics.Add(item);         }     }      Code in XAML:               <esri:GraphicsLayer ID="graphic" x:Name="graphic">         <esri:GraphicsLayer.Renderer>             <esri:SimpleRenderer>                 <esri:SimpleMarkerSymbol Color="Cyan"></esri:SimpleMarkerSymbol>             </esri:SimpleRenderer>          </esri:GraphicsLayer.Renderer>      </esri:GraphicsLayer>      I'm developing in visual studio with C# (WPF)


QGIS: Comparing 2 attribute tables to discern unmatched attributes

In QGIS, I am trying to compare two different attribute tables. One is simply the updated version of the other. Each feature has a unique identifier. How can I return the number of unmatched records? Is it possible to compare two separate attribute tables in QGIS?


Disabling QGIS layers context menu

Does anyone know how to disable items in the QGIS layers panel context menu? I am using QGIS 2.2.0 under Windows and have been experimenting with customization to allow use in a library context. It does not appear to be possible to disable items in the layers panel context menu. So for example, users can remove layers or change styles.


change the direction of the marker of a line in QGIS

I have a map with three lines. Each has a marker on it. ![enter image description here](http://i.stack.imgur.com/Co6Mu.png) I would like to reverse the direction of the topmost marker. So I open Style dialog and enter the expression `"direction" * 180`. The value of direction of the topmost line is 1. Others are 0. ![enter image description here](http://i.stack.imgur.com/njwHu.png) The result is shown below. ![enter image description here](http://i.stack.imgur.com/j5w7c.png) Two issues here:   * The angles of all markers are the same.   * The direction of the topmost marker is not reversed. (Is there a way to access a default value of 'Angle' property?)


openlayers and specific symbol

I m trying to use a specific marker with my geojson file. they dont show up depsite my readings and firebug. can any1 help me plz ? Thx                var map = new OpenLayers.Map('map'          );          var emprise_style = new OpenLayers.Symbolizer.Point({             externalGraphic: '../symbol/marker.png'             });                                   var empriseStyleMap = new OpenLayers.StyleMap({'default': emprise_style});          var emprise_layer = new OpenLayers.Layer.Vector("GeoJSON", {             projection: "EPSG:3857",             strategies: [new OpenLayers.Strategy.Fixed()],             protocol: new OpenLayers.Protocol.HTTP({                 url: "emprise.geojson",                 format: new OpenLayers.Format.GeoJSON()                 }),             styleMap: empriseStyleMap              });              map.addLayer(emprise_layer)      `


Simplify polyline with the intersection point kept

I have a some line and polygon features which consist of too many points, so I tried to simplify them. I found the "Ramer–Douglas–Peucker algorithm". I think it will work well for a single feature (line or polygon), but in my case, the feature are connected with others like this: ![enter image description here](http://i.stack.imgur.com/eBaB1.png) Note the point inside the red circle is the intersection point of the two line. This point must not be removed during the simplify process. So I wonder if there is any out of box solution? BTW, we have ArcMap Desktop 10. But we prefer to make it by program rather than manually since there are almost 20+ layers.


features label didn't appear for some featuresClass

i'm working in a stand-alone application using arcEngine , arcSDE geodatabase , VB.net so my problem is that i can't appear the features label for some featuresClass. when i opened it in arcMap to test it, despite Labels are set in Properties, layers are checked to label in the TOC,I'm unable to get labels to display in Arcmap 10. like this question but mine is different : ArcMap 10: Labels not appearing i'm not looking to change my mxd file. all feature classes are in a geodatabase.


Comments Layer not working in Parks Finder?

I have installed and begun testing the ParksFinder from ESRI. I have managed to get it running, somewhat, but I keep hitting these weird walls. My ArcGIS Server is a 10.1 Server. My SDE DB is a 10.1 Geodatabase on SQL Server. My WebAdapter is a 10.1 Adapter. The Parks App I am using is 10.2. in my config.js on line 132 [URL of CommentsLayer] I am pointing to: http://maps.cityoftulsa.org/gis/rest/services/LGDM/Parks/MapServer/1 If I change this to a FeatureServer/1 (like the documentation says to) I get an error message whenever I click on a Park: " **Required configuration key values are either null or not exactly matching with layer attributes, This message may appear multiple times.** " After this message I get a spinner of doom... the page locks up. But, if I keep that url pointing to: http://maps.cityoftulsa.org/gis/rest/services/LGDM/Parks/MapServer/1 Then I can click on a park and in the popup window I can click on the Comments icon, type in a comment, give it a Rating, and click Submit whereupon I get the following error: " **Unable to add comments. Comments table is either absent or does not have write access.** " Anyone got any ideas?


Where can I find official Land Use/Land Cover GIS data for Ecuador?

Right now I'm specifically looking for Land Use/Land Cover data but things like roads and soils would be handy in the future as well. In the U.S. my source for nationwide LULC data would be the Multi-Resolution Land Characteristics (MRLC) Consortium but I don't know the equivalent group/agency in Ecuador, if there is one. I do have some LULC data for Ecuador and it is pretty detailed, so I think that there **is** official LULC data for the country but I need to be able to cite my sources. Also, the data I have (from 2008) is in vector format but it was obviously converted from raster, so it would be great if I could get a hold of the original, untouched raster and its metadata. Basically, I'm trying to identify the provenance of the data I do have, and find more of it (for different years) if it exists.


Creating symbology by category in python?

I'm trying to create a python script that creates color-coded symbology by county for multiple maps with different data. I've never created a layer file for the purposes of symbology before, but I figured you simply had to save the layer. However, every time I run by script, no symbology is visible. Is there a way to automate symbology that I'm missing? Thanks!                   # Process: Add Join         arcpy.AddJoin_management(Map_Lyr, "CNTYIDFP", selected_input, "FIPS", "KEEP_COMMON")              #Process: Make Feature Layer         arcpy.MakeFeatureLayer_management(Map_Lyr, lyr_again)              #Process: Add Symbology         arcpy.ApplySymbologyFromLayer_management(lyr_again, symbol_lyr)              # Save to Layer File         arcpy.SaveToLayerFile_management(lyr_again, Final_Product, "", "CURRENT")


Converting huge multipolygon to polygons

I have a shapefile with some huge multipolygons, with 100.000's of parts. What would be the easiest way to split them to singlepart polygons? I'm looking for something like QGIS ”Multipart to singlepart” function, but the file is to large for QGIS to handle. I'm guessing that there is probably already some Python module that can do it for me. Any tips?


Deriving coordinates from Application.Display or MxDocument.ActiveView in ArcObjects?

I've found two possible ways of converting a `MouseEventsArg`'s coordinates to the coordinates of the current map: The first is taken from a snippet included with ArcObjects:               protected override IPoint OnMouseDown(ESRI.ArcGIS.Desktop.AddIns.Tool.MouseEventArgs arg)     {         IPoint screenPt = new Point();         screenPt.PutCoords(arg.X, arg.Y);              IMxDocument mxdoc = ArcMap.Application.Document as IMxDocument;         mxdoc.ActiveView.ScreenDisplay.DisplayTransformation.ToMapPoint((System.Int32)screenPt.X, (System.Int32)     }      The second was included in some code I've inherited:               protected override IPoint OnMouseDown(ESRI.ArcGIS.Desktop.AddIns.Tool.MouseEventArgs arg)     {         IPoint pnt;         IMxApplication app = ArcMap.Application as IMxApplication;         IPoint pnt = app.Display.DisplayTransformation.ToMapPoint(e.X, e.Y);     }      As far as I can tell, the first is drawing the transformation information from the `ActiveView` of an `MxDocument`, while the second takes it from the `Display` of the `ArcMap.Application`. Is there ever a time when these two codes will return `Point`s with different XY coordinates? Is one way safer than the other?


Adding popup to geojson layer based on feature property?

I'm using leaflet and trying to add a popup to a point on the map that will return a property of the point from the geojson file. Going off this post has been helpful problem adding pop-up to GeoJSON layer in Leaflet , but it only returns the same text for each point. Here's part of the code:               function eqcolors(mag) {               return  mag >= 5 ? 'maroon':                       mag >= 4 ? 'red':                       mag >= 3 ? 'orange':                       mag >= 2 ? 'yellow':                       mag >= 1 ? 'green':                                 'rgb(255,255,255)';      }          function eqstyle(feature){         return {             radius: 8,             fillColor: eqcolors(feature.properties.mag),             color: eqcolors(feature.properties.mag),             weight: 1,             opacity: 1,             fillOpacity: 0.8         }     }          function onEachPoint(feature, layer){         switch (feature.properties.mag){             case 1.0 : return layer.setRadius(5);             case 1.1 : return layer.setRadius(5);             case 1.2 : return layer.setRadius(5);             case 1.3 : return layer.setRadius(5);             case 1.4 : return layer.setRadius(5);             case 1.5 : return layer.setRadius(5);             case 1.6 : return layer.setRadius(5);             case 1.7 : return layer.setRadius(5);             case 1.8 : return layer.setRadius(5);             case 1.9 : return layer.setRadius(5);             case 2.0 : return layer.setRadius(10);             case 2.1 : return layer.setRadius(10);             case 2.2 : return layer.setRadius(10);             case 2.3 : return layer.setRadius(10);             case 2.4 : return layer.setRadius(10);             case 2.5 : return layer.setRadius(10);             case 2.6 : return layer.setRadius(10);             case 2.7 : return layer.setRadius(10);             case 2.8 : return layer.setRadius(10);             case 2.9 : return layer.setRadius(10);             case 3.0 : return layer.setRadius(15);             case 3.1 : return layer.setRadius(15);             case 3.2 : return layer.setRadius(15);             case 3.3 : return layer.setRadius(15);             case 3.4 : return layer.setRadius(15);             case 3.5 : return layer.setRadius(15);             case 3.6 : return layer.setRadius(15);             case 3.7 : return layer.setRadius(15);             case 3.8 : return layer.setRadius(15);             case 3.9 : return layer.setRadius(15);             case 4.0 : return layer.setRadius(20);              case 4.1 : return layer.setRadius(20);             case 4.2 : return layer.setRadius(20);             case 4.3 : return layer.setRadius(20);             case 4.4 : return layer.setRadius(20);             case 4.5 : return layer.setRadius(20);             case 4.6 : return layer.setRadius(20);             case 4.7 : return layer.setRadius(20);             case 4.8 : return layer.setRadius(20);             case 4.9 : return layer.setRadius(20);             case 5.0 : return layer.setRadius(25);             default: layer.setRadius(100);         }     }          function pointToLayer(feature, latlng){         var popupOptions = {maxWidth: 200};         var popupContent = "This is some content";         return L.circleMarker(latlng, eqstyle).bindPopup(popupContent, popupOptions);          }          var geojson;     //map output         geojson = L.geoJson(eq, {         style: eqstyle,         onEachFeature: onEachPoint,         pointToLayer: pointToLayer     }).addTo(map);      and the geojson file:               var eq =     {     "type": "FeatureCollection",     "features": [     { "type": "Feature", "properties": { "time": "2014-02-16T20:23:35.420Z","depth": 5.0, "mag": 3.2, "magType": "mb_lg", "nst": 0.0, "gap": 52.0, "dmin": 0.47, "rms": 0.45, "net": "us", "id": "usc000mrls", "updated": "2014-02-17T16:34:23.777Z","type": "earthquake"}, "geometry": { "type": "Point"      For polygons layer.bindPopup(feature.properties.popupContent) works. Is a different method used for points?


Kernel density estimator - batch

I've unfortunately just found out that Hawth's batch kernel density estimator doesn't work on ArcGIS 10.1. I've installed GME - unfortunately I can't run batches as there's not tool that will do it. I can see that batch processing can be done but with coding, and I can't code. Can anyone help me figure out how I can do this? I'm guessing there's also no way of doing this in ARC? I've discovered that there is a kernel density tool but again it looks like it'll won't do more than one at a time. If anyone has any idea whether there's a tool out there similar to Hawth's or if it can be done natively I'd be really grateful. Thanks,


Get list of CRS in QGIS by python?

It is possible to get list/dictionary of "Recently used coordinate reference system" from QGIS by python? Or get list of all "Coordinate reference systems of the world" also from QGIS by python.


How can I count overlapping polygons, resulting in a new set of polygons?

I have 100 polygons in a GeoJSON file that partially overlap each other. I would like to produce 100 new polygons as follows:   * The area covered by any of the original 100. This is their union.   * The area covered by at least two of the original 100.   * ...   * The area covered by all but one of the original 100.   * The area covered by all of the original 100. This is their intersection. (I'm actually going to only keep 5-10 of these 100 results, but I expect the process for generating all 100 of them is the same as generating a subset of them) What software / functions can I use to do this? * * * One approach I've already encountered in another similar project involves rasterizing all of the original polygons, then counting the overlapping pixels and producing new polygons from that data. This approach loses precision earlier than I would like to (I want to maintain near perfect precision up until the end of the process, THEN simplify things for display). * * * I could do this semi-manually with hundreds of union and intersection operations. This approach is not ideal because I want to re-run this process at intervals in the future as the dataset grows.


Remove last line segment of an OpenLayers.Control.Measure

i'm using OpenLayers library, i'm trying to delete the last line segment of a drawing realized with the following code:               layerLine = new OpenLayers.Layer.Vector("layerLine");     layerLine.id = "id_layer_line";     map.addLayer(layerLine);          lineControl = new OpenLayers.Control.Measure(OpenLayers.Handler.Path, {             id: 'id_layer_line',             persist: true,             layer: layerLine ,             //immediate:true,             handlerOptions: {                 layerOptions: {styleMap: styleMap},             }         }     );      But the layerLine has no features (empty array), it means i can't access to line segments, is there are any way to do this?


Take parallel lines and automatically move them apart

Rather than collapsing parallel lines, I am looking for a process that would separate them. There are a number of lines on the network that run too close together to distinguish as separate features and I would like to 'push' them apart from each other. The image below has an inset that shows the features where they visually merge, but the full picture shows the lines at a larger scale. Anything? ![Parallel lines](http://i.stack.imgur.com/ES0NV.jpg)


Projecting INEGI shapefiles from Mexico

I have two INEGI files from Mexico (1990 and 2010) that I want to use the same projection. The 2010 file works fine (see below) and I would like the 1990 file to match the 2010 one. The shapefiles are of all of Mexico and have detailed information about various cities. Right now, the 1990 prj file reads: "GEOGCS["GCS_ITRF_1992",DATUM["D_GRS_1980",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]" I'd like the file to match my 2010 file, which reads: Projected Coordinate System: Conica Conforme de Lambert Projection: Lambert_Conformal_Conic False_Easting: 2500000.00000000 False_Northing: 0.00000000 Central_Meridian: -102.00000000 Standard_Parallel_1: 17.50000000 Standard_Parallel_2: 29.50000000 Scale_Factor: 1.00000000 Latitude_Of_Origin: 12.00000000 Linear Unit: Meter Geographic Coordinate System: ITRF92 Datum: D_GRS_1980 Prime Meridian: Greenwich Angular Unit: Degree


Can I change how Maplex decides which duplicate labels to remove?

I have a lot of recreation location points, and most of them are labeled. Sometimes there are many points close together which really only need one label. For example, the recreation location below has a campground, picnic area, and boat ramp. I don't need/want each of these points to say "Woods Ferry" by them, so using the Maplex labeling, I can turn on "Remove duplicates" and get only one label for the set of points. (Yay.) But, I would prefer it if the label were put on the boat ramp or picnic table instead, since then it would be covering up a river instead of some roads. In this case, the campground point has the lowest OBJECTID, and apparently that is how priority is determined. Is there any way I can change how the label priority is chosen? ![enter image description here](http://i.stack.imgur.com/LrvC3.png)


How do I sync Google Spreadsheet data with a filled contour Google Earth map

I have a google spreadsheet file with the following data.   40 -75 32   The first column is latitude. The second column is longitude. The third column is temperature.   How would I   a. Make this into a map with filled contours online (WITHOUT USING GIS SOFTWARE!).   b. Put this contour map on an online Google Earth globe.


Optimising Min/Max temporal raster search in python/gdal

I need to search across ~100 1200x1200 raster tiles and produce a min and a max raster. Along the way i also want to exclude values that are over 1 or less than 0. What would be the quickest method to do this in python with gdal? I was previously loading all the rasters into memory and then looping over the pixels, but this seems the slowest possible method. Thanks!


primary key in sql server uneditable in mapinfo attribute?

I trying create table relationship in sqlserver 2008 R2. Tables will have spatial table and non-spatial (tabular) . I having trouble while selecting varchar field as primary key, this field cannon be editted on mapinfo attribute while I create new shape. I tried use MI_PRINX as primary key but still success to get primary key field editable in mapinfo attribute editing.


GDAL/OGR to extract pixel values

I want to use GDAL/OGR to extract pixel values from a raster file. The extraction should be based on polygons, stored in a shapefile. My thought was to iterate over the features in the shapefile, extract the pixel values of those pixels that have there center point within the polygon and calculate a percentile from those values. When this is done I want to write the calculated percentile back to the polygon and go on with the next polygon. Iterating over the polygons is easy, but what I do not get is how to extract the pixel values from the pixels, covered by the polygon. PS: I'm using Python. Could somebody help me at this point? Cheers Thomas


How to get feature id for particular feature after feature ismodify in openlayer?

I am using modify control in openlayer 2.12. After feature is modified i am running the function below:               building.events.register('afterfeaturemodified',building, onchanges);      Where building is my wfs layer. Now in " **onchanges** " function rune and now i want my wfs feature id/name,etc. My function is as follow:               function onchanges(ev)             {                 var polygonch=ev.feature.geometry;             }      Now in this function i want feature id/name on which modification is done. Or other method to get feature info on which editing/modification is done.


How to tell the size of grid cells created by the vector grid tool?

Im working with qgis 1.8.0 and Im making a vector grid on a map. Does someone know how big are the squares if the grid settings look like in the picture? Thanks for your time! ![vector grid settings](http://i.stack.imgur.com/7iOHi.png)


raster2pgsql missing in Opengeo-suite installation

I installed opengeo-suite 3.0.2 on Ubuntu 12.04 and although the stack seems to be working fine, `raster2pgsql` is no where to be seen!               root@mywebsite:/usr/local/lib/postgresql/9.2# locate raster2pgsql     /usr/lib/postgresql/9.2/bin/raster2pgsql          root@mywebsite:/usr/lib/postgresql/9.2/bin/raster2pgsql# raster2pgsql     /usr/bin/raster2pgsql: No such file or directory      Did the installation go wrong? Or is it really not included in the opengeo- suite? * * * ## Update               ls -l /usr/bin/raster2pgsql     ls: cannot access /usr/bin/raster2pgsql: No such file or directory          ls -l /usr/lib/postgresql/9.2/bin/raster2pgsql     -rwxr-xr-x 1 root root 159016 Sep 24  2012 /usr/lib/postgresql/9.2/bin/raster2pgsql


Add labels to points in OpenLayers

I have a Layer:                         pointLayer = new OpenLayers.Layer.Vector("Point Layer", {                 strategies: [strategy],                 styleMap: new OpenLayers.StyleMap({                     "default": {                         label : "${text}",                         pointRadius: 10,                         fillColor: "#ffcc66",                         fillOpacity: 0.8,                         strokeColor: "#cc6633",                         strokeWidth: 2,                         strokeOpacity: 0.8                     },                     "select": {                         fillColor: "#8aeeef",                         strokeColor: "#32a8a9"                     }                 })             });        I create this layer without any feature. I periodically call the server and get json objects from it. The json objects have coordinate attributes and a text attribute. After i get the objects, i put points on the layer. I set the text attribute in the point features:               pointFeature.attributes = {         text: jsonObj.text     };      The problem is that the labels don't appear on the layer (but the points appear). I noticed that the labels appeared only when i added the point features to the layer before i added the layer to the map. I found the redraw() method, but it doesn't work because after the server call i remove all the points from the layer and add the new points to it. To summarize the problem: i want to display labels of point features which were added to the layer after the layer was added to the map.


What practices are available for modelling land suitability?

I currently use a "classic" raster based approach of dividing a study area into cells. All input layers are converted to rasters at the same cell resolution and given a suitability rating. ![alt text](http://i.stack.imgur.com/O7wxU.png) A final suitability rating for each cell is calculated by combining each layers rating, with weightings to reflect the factors importance. A final mask is applied to exclude any areas, such as waterbodies, that are unsuitable for the proposed land use. Problems with this approach include:   * choosing a cell resolution that is either to large to provide meaningful results, or a high resolution giving a false sense of accuracy.    * finding weightings for each of the input parameters. Are there any other problems or alternatives to producing land suitability maps?


Copying domain (and only domain) between Esri geodatabases?

Sometimes I have the need to copy a domain(s) from one geodatabase to another (without the featureclass or table). In the past, I have accomplished this in a few different ways, but each method is not as straightforward as I think it could be (or maybe there's a _CopyDomain_ tool that I've missed). What method do you use to accomplish this?


How to compare and report the shift between two shape files

Ok, I have two shape files.One is an original route polyline file and another is an updated polyline file, where the shape is modified to google maps. How can I compare the updated shape file with the original and report how much shift or variation is there in the second file, with reference to the original ? There seems to be a feature compare tool in ArcGIS , but seems that it wont suit the purpose.


How to create a new empty vector layer programmatically?

I am new to python and QGIS. I have looked at a few tutorials of python scripts for QGIS. All of them create new vector and raster layers with some existing data source. eg. shapefile or geotiff or postgis database table. Is it possible to create a QGIS layer through a python script, where i can create/add/modify new features through the python script, as the need arises. It will be typically a vector layer with point data and custom symbols. Will this be possible? Is there a example i can look at?


How can I dismantle and reassemble a polyline by joining each point to its nearest neighboring point?

How can I reconfigure a PolylineMZ feature class in a way as shown in the image below? I have a feature class (PolylineMZ) which contains x-sections. Some x-sections (polylines) are badly constructed (as shown below in figure "a"), so I want to dismantle and reassemble them again in the right order. By "right order", I mean that I want to join the points that are closest to each other (as shown below in figure "b"). Any idea for an existing tool? Preferably in Arc 10. ![3 polylines with vertex points](http://i.stack.imgur.com/nQKpp.png)


How to create a valid global polygon grid in PostGIS?

I want to create a grid spawning the whole globe. The grid is used to measure a density value by counting the number of certain spatial objects in each grid cell. To create the grid, I have created multiline polygons, both using a script of my own, and the function suggested here: How to create a regular polygon grid in PostGIS? . Both algorithms loop from -90 .. 90 , -180 .. 180 in a fixed step size creating the multiline polygons. I have two problems. First, adjacent cells share a separating line, making objects on it counting towards two or more cells. I could subtract a very small value from corners, but this risks loosing objects when they come to lay exactly on the original line. The question is thus if there is a constant for the absolute minimum step value that I could use to guarantee that one point exactly lays next to another with no space inbetween. Second, it seems the algorithm generates invalid geometries. e.g when I compute the square meters of a grid (for the density)               SELECT ST_Area(ST_GeographyFromText('POLYGON((-15 0,-15 5,-10 5,-10 0,-15 0))'))      throws an error `ptarray_area_spheroid: cannot handle ptarray that crosses equator` If I avoid the geography type, and use a geometry there is no global projection that outputs the correct size of all grids. e.g               Select ST_Transform( ST_GeomFromEWKT('SRID=4326;POINT(-180 90 0)'), 32630 )       throws `couldn't project point (-180 90 0): latitude or longitude exceeded limits (-14)` How could I generate a grid of valid geometries that covers the whole globe? thanks


Why does Geoserver WMS not work in GeoExt?

Geoserver URL               {http://localhost:8090/geoserver/Test/wms?service=WMS&version=1.1.0&request=GetMap&layers=Test:B901_AS&styles=&bbox=638500.0,5309500.0,639000.0,5310000.0&width=512&height=512&srs=EPSG:4326&format=application/openlayers}      HTML code                              <title> A Basic GeoExt Page </title>               <link rel="stylesheet" type="text/css" href="ext-3.4.0/resources/css/ext-all.css"></link>               <link rel="stylesheet" type="text/css" href="GeoExt/resources/geoext-all-debug.css"></link>

                What is the problem? Pls help me.


OpenLayers WMSGetFeatureInfo Windows Mobile

I have built an app using Phonegap build that uses OpenLayers 2.13.1 with wms layers from geoserver and I have a WMSGetFeatureInfo control set up. When I click a point on Windows phone 8, the error I get is "Unable to get property 'documentElement' of undefined or null reference" at line 1308. I think it might be a cross-domain issue. Can anyone help me with this?


r.walk: Incorrect cost parameter values on GRASS GIS Windows version 6.4.3

GRASS GIS 6.4.3 (MS Windows OS): When I run r.walk (from command line), the cost parameters (a,b,c,d) come back like this: > Walking costs are a=0.000000 b=-0.000000 > c=-10573191236985776157781220617732356153360729341723621623235945189034074298176 > 64252077133915155460886099856748275471469380614104001584315043870794742683685052 > 98382321143826545909641023083067668968732332018057366289445156134721600643901568 > 07728360938225655811637394092313691311334690178022387298986550421158457215826204 > 38013387365871910193930336189864383076340030628277027363365288533894058976602681 > 71700068461073739376125144493735637597410488814257146033382833480331234589247073 > 48881530027860301628518582080270355597287421375359596901146560421231552338210133 > 06790229594182538210800008576669031694412819459340091549962001361469104555774003 > 04070692008858011487696853756221355356448964295976845415932586875467455028149801 > 27637275269091689311528339862554429108816855008284504758120827340975328250458928 > 10368682417412614834069661657982726557319695416226017610451208671697729366498610 > 54860744855146802281070102254807164683416848891117471697175090419253092796127428 > 55483718934005742680955658641242304981141402734191492223840625484809134558708280 > 63644361746207850969055028675461017529310131791516840575880979555901812633388137 > 66449789032273946995706363652206097828666788661540752095606470850018922364180471 > 04420348497187234085535066134300067801493380088150051014395205199678552654641895 > 73694258412006691641070473351746031268803564354962630050216606997842447774487912 > 05352625071549896815245158037394030526103432326057057274220210587759762878553222 > 69529780099272832115775635805002471291364879421518585269682052401351677800684475 > 15489319341055993409910256193664610028180768377984245641204911206075680735135223 > 94490622659410162675714054935918988133099641267570438376840487451772005814904558 > 26692363969087271620405309688608144985683643558217188093442780658594520149313700 > 15868484477313468936889812460460379751369023432798105037984000787894246463943739 > 36793362533723338985147373720893905264510260239839054419899936143693234097802159 > 97692351519603008104514793694623369644284256605840098484303008297540508267938147 > 20888993640526312955633177923095534609638212740494214622854987503639310429080940 > 64752029799963826526672403914993842449011686606384474514118128684796865486920727 > 89992463750696884306341217122836877790033755738504421446710030449452853873487229 > 29887820658313368756977172462608170310719020091926961383664320464101318873119789 > 90090610031511019429874499231775670359467896908341721732179571316387593148931787 > 04413003163643004779947590072143924535754752.000000 d=-0.000000 I did not change the default values, which are 0.72,6.0,1.9998,-1.9998 (respectively). I run the exact same function on a Mac, and the parameters are correct. Is this a known bug for the Windows version? If so, is there a workaround? Has anybody else come across this? Below is the Python looping script I am running               import os     import sys          strMainPart_1 = 'r.walk -k --overwrite elevation=CGIAR_barriers02@qhapaq_nan friction=CGIAR_barriers02_sl@qhapaq_nan output='     strMainPart_2 = '_cost outdir='     strMainPart_3 = '_backlink start_points=Node_'     strMainPart_4 = '@qhapaq_nan stop_points=Node_'     strMainPart_5 = '@qhapaq_nan percent_memory=50'          #myCurrentDir = sys.getcwd('')          # make sure this exists  since no error checking     myCurrentDir = '/Users/loaner/grassdata/peru/qhapaq_nan/cell'          # setup an array of start nodes and end nodes, make sure they line up     startNodes = ['027','029','005','318','313','311','276','131','339','135','007','027','029']     endNodes   = ['030','032','317','036','130','275','277','134','039','160','028','030','032']  # add needed nodes          # iterate through all the nodes pair wise.  make a directory and move their before operation     for start,end in zip(startNodes, endNodes):              debug = '\nDEBUG: start = ' + start + ', end = ' + end + '\n'         print debug              strFinalGrassGISCmd = strMainPart_1 + start + '_' + end + strMainPart_2 + start + '_' + end + strMainPart_3 + start +  strMainPart_4  + end + strMainPart_5  #  etc.              # make a new directory         # subDirectory = 'data_' + str(start) + '_' + str(end)         subDirectory = ''         # newDirectoryName = myCurrentDir + subDirectory         newDirectoryName = myCurrentDir               # make the local directory for data storage         # os.mkdir(newDirectoryName)         # now go to the new directory and run Grass GIS         os.chdir(newDirectoryName)              # now run the command line from Grass GIS         os.system(strFinalGrassGISCmd)      When I run that, it will produce a cost surface for each of the indicated point pairs. However, it appears to be assigning the walking costs as indicated above, rather than the defaults. Even when I manually attempt to force it to use the default values by specifying them in the script, it outputs these values. If more info is needed to diagnose, let me know.


How to plot geographical coordinates in mapinfo?

I want to get started with mapinfo and plot some coordinates i.e latitude and longitute . How is it possibe?


Is it possible to have tool parameters appear only if clause met?

I'm writing an arcpy script for a tool that has a large number of parameters (around 10). About half of these are "dependent" (perhaps not in the technical sense of the term), as in [first parameter] "1. Add a new layer or use existing" (binary 1 for new layer or 0 for old layer possible response) [next parameter] "2. {if 1 in first parameter} Specify workspace for new layer It is in this way that I am describing the parameters as dependent. My question is whether it is possible to have parameter 2 appear only if parameter 1 has a response that warrants it? I.e. if the user uses the layer in the existing .mxd then there is no need to specify the workspace. I've looked through the various parameter options, but there doesn't seem to be a way to do this. Any advice would be greatly appreciated


Is there a way to speed up gIntersections for large spatial objects?

I'm attempting to perform a gIntersection of a big grid on a shapefile for country boundaries, so that I can calculate the % area of each grid cell that lies within the country. It takes a few seconds for smaller countries, but takes ages for larger ones. I have a method that cut down the time substantially, but it still takes an unreasonable amount of time for larger countries. Here's a reproducible example, that uses gIntersects to subset the grid, which cut down on time substantially.               #### demo script for stackoverflow ####     # set up demo grid     lat <- seq(from = -11, to = 55, by = 0.5)     long <- seq(from = 70, to = 150, by = 2/3)     demo.grid <- SpatialPoints(coords = cbind(rep(long, times = length(lat)), rep(lat, each = length(long))))     demo.grid <- SpatialPixels(demo.grid, tolerance = 0.000001, proj4string = CRS("+proj=longlat +datum=WGS84"))     demo.grid.poly <- as.SpatialPolygons.GridTopology(getGridTopology(demo.grid), proj4string = CRS("+proj=longlat +datum=WGS84"))          # looks like a grid     plot(demo.grid.poly)          # get my file - I used the SpatialPolygonsDataFrame for level 0 administrative boundaries for China, downloaded from www.gadm.org     CHN <- get(load(file.choose()))     plot(CHN, add = TRUE, border = "blue") # China is located in the right place          CHN.p <- spTransform(CHN, CRS("+proj=aea +lat_1=7 +lat_2=-32 +lat_0=-15 +lon_0=125 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"))     demo.grid.poly.p <- spTransform(demo.grid.poly, CRS("+proj=aea +lat_1=7 +lat_2=-32 +lat_0=-15 +lon_0=125 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"))          plot(demo.grid.poly.p)     plot(CHN.p, add = TRUE, border = "blue")          # looks good          system.time(subset <- gIntersects(CHN.p, demo.grid.poly.p, byid = TRUE)) # find the grid cells that intersect with China     summary(subset)     demo.grid.poly.subset <- demo.grid.poly.p[subset] # make new set of gridcells that are subsetted to only those that intersect with China          plot(demo.grid.poly.subset)     plot(CHN.p, add = TRUE, border = "blue")     # still looks good     system.time(intersection <- gIntersection(CHN, demo.grid.poly.subset, byid = TRUE)) # create intersection SPDF. Go get sandwich, sleep, exercise, take a small vacation. Learn piano.      This is related to a question I asked a while ago (http://stackoverflow.com/questions/16918767/gintersection-on-very-large- spatial-objects). I'm facing a similar issue with a new dataset, and have a new method for solving the problem that has a new problem.


Importing Census TIGER Shape Files to SQL Server 2012?

I've been doing my research on how to import shape files into **Microsoft SQL Server 2012**. and am still unable to figure out how to do it after hours of playing around with it. I'll document what I've done below: I first downloaded the latest Census TIGER Shape files at the census block level for all 50 U.S. states and the District of Columbia, unzipped those files, and now have the .dbf, .prj, .shp, and .shx files sitting in separate folders. I opened the .prj file in Notepad++ to determine whether or not the shape file itself was Geographic or Geometric and to determine the correct SRID. This is what it said: > > GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] I concluded that these Census shape files I downloaded were Geographic (since I had a longitude/latitude column within the shape file) and the SRID was 4269 (after comparing the results to a simple query in SQL Server on sys.spatial_reference_systems) I downloaded Shape2Sql.exe and attempted to import one of the smallest shape files I had (Rhode Island - roughly 25,000 polygon features). When I pressed the "Upload to Database" button nothing happened. The application recognizes the file but perhaps the file (even for a small state) is too big to handle the number of shapes at the census block level. If I switched from "Geography(Spheric)" to "Planar Geography" and from "geog" to "geom" in the "Geometry Name" column, and SRID from 4269 to 4326, I would get an error seen below when I pressed the "Upload to Database" button. I hadn't created the table in SQL Server prior to running it but I don't think that's where the problem lies (since I read it should create a new table if you're not replacing an existing one). I've also been looking at alternate solutions besides the Shape2Sql.exe application. I've read a little about GDAL and OGR2OGR but that has me a little lost. (http://alastaira.wordpress.com/ogr2ogr-patterns-for-sql- server/). Has anyone had success bringing in large shape files into SQL Server? Perhaps there is another way that I'm missing that can be easily explained? Any help would be greatly appreciated. ![Attempting to Import Alabama using Shape2Sql.exe](http://i.stack.imgur.com/pajms.png) ![Error message when executing with Planar Geography settings](http://i.stack.imgur.com/c5GfU.png)


OpenLayers : Map not loading

If i use a single wmslayer as map baselayer it loads the map, but adding different layers like (google,yahoo) to map it won't works. Can anyone tell me how to overcome this.. thanks in advance.. please check this:                   <script src="http://maps.google.com/maps/api/js?sensor=false&v=3.3" type="text/javascript"></script>         <script src="http://api.maps.yahoo.com/ajaxymap?v=3.0&appid=abcdefg1234" type="text/javascript"></script>         <script src="http://openlayers.org/api/OpenLayers.js" type="text/javascript"></script>              <script type="text/javascript">             var map;                  function init() {                map = new OpenLayers.Map('map');                     var googleLayer = new OpenLayers.Layer.Google("Google", { 'sphericalMercator': true,                                     'maxExtent': new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34)});                var wmsLayer = new OpenLayers.Layer.WMS("OpenLayers WMS",                                                  "http://vmap0.tiles.osgeo.org/wms/vmap0", { layers: 'basic' });                var yahooLayer = new OpenLayers.Layer.Yahoo("Yahoo");                     map.addLayers([googleLayer, wmsLayer, yahooLayer]);                     map.setCenter(new OpenLayers.LonLat(75.5, 8.5), 5);                map.addControl(new OpenLayers.Control.LayerSwitcher());                map.addControl(new OpenLayers.Control.MousePosition());             }         </script>


Lat/Long to XY conversion with Geometry Service

I am attempting to make a simple map that will allow users to see a truck's GPS location on top of a tiled map service. I am having difficulty getting the graphic symbol to overlap my tiled service because the spatial systems do not match. Is there a good example or could someone help me conversion through a geometry service? Is a geometry service even the correct method to use for plotting my graphics? Here is my code so far. Xaml:               <UserControl x:Class="TruckGPS_Test.MainPage"         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"         xmlns:d="http://schemas.microsoft.com/expression/blend/2008"         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"         mc:Ignorable="d"         d:DesignHeight="300" d:DesignWidth="400"         xmlns:esri="http://schemas.esri.com/arcgis/client/2009"                  xmlns:esriSymbols="clr-namespace:ESRI.ArcGIS.Client.Symbols;assembly=ESRI.ArcGIS.Client">         <Grid x:Name="LayoutRoot" Background="White">                       <Grid.Resources>                  <esri:SimpleMarkerSymbol x:Key="RedMarkerSymbol" Color="Red" Size="12" Style="Circle" />                 <esri:SimpleMarkerSymbol x:Key="YellowMarkerSymbol" Color="Yellow" Size="25" Style="Circle" />                 <esriSymbols:PictureMarkerSymbol x:Name="TRUCK" Source="images/bucket-truck-box.png" />             </Grid.Resources>                       <esri:Map x:Name="MyMap" WrapAround="True" Margin="0,0,-325,-506" MouseMove="MyMap_MouseMove">                 <!--<esri:ArcGISTiledMapServiceLayer ID="MyLayer"                     Url="http://gisaprd/ArcGIS/rest/services/BaseMap_ArcReader_Cached/MapServer" />-->                 <!--<esri:ArcGISTiledMapServiceLayer ID="MyLayer"                     Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />-->                 <esri:ArcGISTiledMapServiceLayer ID="Aerials" Url="http://gisaprd/ArcGIS/rest/services/AerialCoordinateTest/MapServer" Visible="False"  />                 <esri:ArcGISDynamicMapServiceLayer Url="http://gisaprd/ArcGIS/rest/services/BaseMapCool__WebViewer/MapServer" />                      <esri:GraphicsLayer ID="TruckGPS" >                          <esri:GraphicsLayer.MapTip>                         <Grid Background="#FFD65555" >                             <Border BorderBrush="#FFFF0000" BorderThickness="1" CornerRadius="5" />                             <StackPanel Orientation="Vertical" >                                 <StackPanel Orientation="Horizontal">                                     <TextBlock Text="{Binding [USER_NAME]}" FontWeight="Bold" Foreground="White"  HorizontalAlignment="Left"/>                                 </StackPanel>                                 <StackPanel Orientation="Horizontal">                                     <TextBlock Text="{Binding [SYSTIME]}" FontWeight="Bold" Foreground="White"  HorizontalAlignment="Left"/>                                 </StackPanel>                             </StackPanel>                         </Grid>                     </esri:GraphicsLayer.MapTip>                 </esri:GraphicsLayer>                  </esri:Map>                  <Grid MinWidth="300" HorizontalAlignment="Right" Background="White" VerticalAlignment="Top" Margin="0,15,15,0" >                 <StackPanel Margin="5">                     <TextBlock x:Name="ScreenCoordsTextBlock"                          HorizontalAlignment="Left" VerticalAlignment="Center" Text="Screen Coords: "                                TextWrapping="Wrap" />                     <TextBlock x:Name="MapCoordsTextBlock"                          HorizontalAlignment="Left" VerticalAlignment="Center" Text="Map Coords: "                                 TextWrapping="Wrap" />                 </StackPanel>             </Grid>                   </Grid>     </UserControl>      C#               using System;     using System.Collections.Generic;     using System.Linq;     using System.Net;     using System.Windows;     using System.Windows.Controls;     using System.Windows.Documents;     using System.Windows.Input;     using System.Windows.Media;     using System.Windows.Media.Animation;     using System.Windows.Shapes;     using ESRI.ArcGIS.Client;     using ESRI.ArcGIS.Client.Geometry;     using ESRI.ArcGIS.Client.Symbols;     using System.Runtime.Serialization;     using ESRI.ArcGIS.Client.Tasks;     using System.Windows.Threading;     using ESRI.ArcGIS.Client.Bing;               namespace TruckGPS_Test     {         public partial class MainPage : UserControl         {             public MainPage()             {                 InitializeComponent();                  //AddMarkerGraphics();                      QueryTask queryTaskTruckGPS = new QueryTask("http://gisaprd/ArcGIS/rest/services/TruckGPS/MapServer/8");                 queryTaskTruckGPS.ExecuteCompleted += QueryTask_ExecuteCompletedTruckGPS;                 ESRI.ArcGIS.Client.Tasks.Query queryTruckGPS = new ESRI.ArcGIS.Client.Tasks.Query();                 queryTruckGPS.OutFields.Add("*");                 queryTruckGPS.ReturnGeometry = false;                 queryTruckGPS.Where = "1=1";                 queryTaskTruckGPS.ExecuteAsync(queryTruckGPS, "initial");                      //This timer updates the outage feature count after a 30 second wait                 System.Windows.Threading.DispatcherTimer myDispatcherTimer = new System.Windows.Threading.DispatcherTimer();                 myDispatcherTimer.Interval = new TimeSpan(0, 0, 0, 10, 0);                 myDispatcherTimer.Tick += new EventHandler(Each_Tick);                 myDispatcherTimer.Start();                  }                  public void Each_Tick(object o, EventArgs sender)             {                 QueryTask queryTaskTruckGPS = new QueryTask("http://gisaprd/ArcGIS/rest/services/TruckGPS/MapServer/8");                 queryTaskTruckGPS.ExecuteCompleted += QueryTask_ExecuteCompletedTruckGPS;                 ESRI.ArcGIS.Client.Tasks.Query queryTruckGPS = new ESRI.ArcGIS.Client.Tasks.Query();                 queryTruckGPS.OutFields.Add("*");                 queryTruckGPS.ReturnGeometry = false;                 queryTruckGPS.Where = "1=1";                 queryTaskTruckGPS.ExecuteAsync(queryTruckGPS, "initial");                  }                  private void QueryTask_ExecuteCompletedTruckGPS(object sender, ESRI.ArcGIS.Client.Tasks.QueryEventArgs args)             {                 //If Counter isn't working check the web service, make sure the table is added to the map service                      FeatureSet featureSet = args.FeatureSet;                 GraphicsLayer graphicsLayer = MyMap.Layers["TruckGPS"] as GraphicsLayer;                 graphicsLayer.ClearGraphics();                 if (featureSet != null && featureSet.Features.Count > 0)                 {                          ////Check the system time and subtract the time amount wanted from the last gps systime read for movement or idle truck                     //System.DateTime dTime = DateTime.Now;                     //// tSpan is 0 days, 0 hours, 0 minutes, and 0 seconds.                     //System.TimeSpan tSpan = new System.TimeSpan(0, 1, 0, 0);                     //System.DateTime result = dTime - tSpan;                               foreach (ESRI.ArcGIS.Client.Graphic feature in featureSet.Features)                     {                              if ((feature.Attributes["LONGITUDE"] != null) && (feature.Attributes["LATITUDE"] != null) )                              //&& (feature.Attributes["S"])                         {                                  var Machine_Name = feature.Attributes["MACHINE_NAME"].ToString();                             var User_Name = feature.Attributes["USER_NAME"].ToString();                             double x = Convert.ToDouble(feature.Attributes["LONGITUDE"]);                             double y =Convert.ToDouble(feature.Attributes["LATITUDE"]);                                  feature.Geometry = new MapPoint(x, y);                             //if (User_Name == "CU656")                             //{                                 feature.Symbol = LayoutRoot.Resources["TRUCK"] as ESRI.ArcGIS.Client.Symbols.Symbol;                                 graphicsLayer.Graphics.Add(feature);                             //}                             //else                             //{                             //    feature.Symbol = LayoutRoot.Resources["RedMarkerSymbol"] as ESRI.ArcGIS.Client.Symbols.Symbol;                             //    graphicsLayer.Graphics.Add(feature);                             //}                         }                     }                     { (MyMap.Layers["TruckGPS"] as GraphicsLayer).Refresh(); };                 }                 else                 {                     graphicsLayer.ClearGraphics();                     //MessageBox.Show("No features returned from query");                 }             }              }          }


How can I Transfer mysql wkt directly into a postgis table?

I have wkt geometry data in mysql stored in blob format. I need to get this data into a postgis db and am looking for the quickest-easiest way to do it. I have managed to select the data "ASTEXT" but can then only copy it into QGIS -> export to shape -> import to postgis....but this is probably not the easiest way. Is there a way to directly import a table from mysql into postgis? thanks for any help,


Are these 9.2 CASE tools instructions still valid using ArcGIS 10.1?

The Using CASE tools in ArcGIS 10 document links to some older documentation at Building geodatabases with case tools, which specifically mentions ArcGIS 9.2 throughout. Are these instructions still valid for creating a geodatabase using CASE tools? Is there a more up-to-date set of instructions which I should follow instead? thanks


How to use the coordinate system in arcgis 10?

I have a favor to ask. I have a few layers. The layers have been made by a different company. So how do I combine them all together so that they have the same coordinate systems? If there are any links regarding this matter please kindly tell/show me. I already add the layers, right click < Data frame properties < coordinate system. And select a coordinate system. But it shows the same. The layers do not seem to overlap. (For example I pick a river layer at the same place, and I add a road layer also from the same place.) But they don't overlap. Is it because the size of the layers are different? Or is the coordinate system from map info is different from the beginning? Kindly help me please. Thank you. I am still a beginner.


ArcGIS 10.1 & SQL Server 2012

We currently updated to SQL Server 2012 and now we are encountering a slower performance when connecting to the geodatabase on SQL Server 2012. Here are the things that we tried to fix the issue: \- Re-indexed all the tables. \- Installed the support patch from ESRI.(http://support.esri.com/en/downloads/patches- servicepacks/view/productid/160/metaid/1954). But none of those fixed the performance issue. The machine hosting the SQL Server 2012 is a VM but it is running with 24 gb of ram. So it shouldnt be under resourced. I found a similar problem and one of the post was saying to use the SDE Binary Storage type. I didn't do that yet because he did mention that its not recommended. Any help is really appreciated. Thanks.


How to decode Google's proprietary latLon format for China?

This Google Maps link returns train stations in Shanghai, China. By appending '&output=js' it returns it in JSON format. I'm trying to decode the format Google uses for lat/lon:               latlng:{         lat:0,         lng:0,         alt:{             ll:"35122131713574191160",             mode:2         }     }      For all other countries, Google returns the lat lon values separated in the `lat` and `lon` . Only for China they return this strange `ll` value. Does anybody know how to decode it?