Is there a way to add a PDF to ArcMap as data?

I receive a lot of PDF maps (vector, image, with georeference and without) and I am having to convert them to an image file before I can add them to ArcMap and georeference. I can't see any obvious out-of-the-box utility that would allow me to add and georeference a PDF directly without having to convert to an image file first. Any ideas?


How to aquire a topographical map of Britain?

First of all, let me say that I know next to nothing about GISs. I'm trying to find / make / aquire a topographical map of britain. I want to use it as a height map in Dwarf Fortress so it needs to be gradient grayscale, without labels and bmp format. I've done some googling and so far haven't found any maps I could use, free or otherwise. Which seems absurd, so I must be looking for the wrong thing? It seems possible to retrieve the height from Google Maps API. My first thought is to make a program that requests the height for every coordinate from Google. Leave the program running for a week and then construct an image from the data. Though I thought I should ask here to see if people look at me like I'm crazy!?


Custom osm2po postprocessor to generate a node file and a way file

For a software component were using we need to provide 2 input files. One with a list of nodes (nodeId, lat, lon) and one with ways (fromNodeId, toNodeId, oneway, maxSpeed, lenght). To create these 2 files I created a custom postprocessor class, you can find the code here: https://gist.github.com/anonymous/5047904 To get the Nodes I read the "tn_raw.2po" file, for the ways the "sw_all.2po" file. This works great, but now my node output files contains all osm nodes. What I would like, is that the file only contains the nodes used in the ways file. Is it possible to only output the used nodes in a file? Thanks!


Spatial Join on two point featureclasses produces empty output featureclass

I have two point featureclasses that intersect each other. They are in the same projection and dataframe. The issue is, when I perform a Spatial Join the output point featureclass is empty. The file is created and the attribute table contains fields, but the points are not created where they intersect. In reverse this operation works successfully (proving they do intersect), but I obviously end up with the wrong attributes in the output file. I have searched this issue, but have yet to come up with a plausible solution. I suspect this may have something to do with the fields used to uniquely identify the points within each featureclass, but so far I have yet to find a problem. I even attempted to delete extraneous fields from each file, since I only really want to transfer one attribute field across the featureclasses. Edit: This questions is related to my previous post. Edit 2: As some have suggested I have incremented the search tolerance without change.


Google geocoding v3 stopped working

I've been using Google geocoding v3 for about 6 months but all of a sudden it's stopped working (I get a 610 error). It's only stopped in the last week or so. Then I came across this (see the pink box at the top of the page!): https://developers.google.com/maps/documentation/geocoding/v2/ I've read through all the documentation and not sure where to start! I'm hoping it's a small change as it's taken a long time to get this far, can anyone help? See the full site here This is my code:                          This is doing the geocoding:               <?php           require("database.php");     // Opens a connection to a MySQL server     $con = mysql_connect("localhost", $username, $password);          if (!$con)     {         die('Could not connect: ' . mysql_error());     }          mysql_select_db("medicom_wp", $con);                   $company = get_the_title();         $address = get_field('address_line_1');         $city = get_field('town_/_city');         $post_code = get_field('post_code');         $link = get_permalink();         $type = get_field('kind_of_organisation');              $sql = sprintf("select count('x') as cnt from markers where `name` = '%s'", mysql_real_escape_string($company));         $row_dup = mysql_fetch_assoc(mysql_query($sql,$con));         if ($row_dup['cnt'] == 0) {             mysql_query("INSERT INTO markers (`name`, `address`, `lat`, `lng`, `type`, `link`) VALUES ('".$company."', '".$address.", ".$city.", ".$post_code."', '0.0', '0.0', '".$type."', '".$link."')");     }     wp_reset_query();               define("MAPS_HOST", "maps.google.com");     define("KEY", "(my key)");          // Opens a connection to a MySQL server     $connection = mysql_connect("localhost", $username, $password);     if (!$connection) {       die("Not connected : " . mysql_error());     }          // Set the active MySQL database     $db_selected = mysql_select_db($database, $connection);     if (!$db_selected) {       die("Can\'t use db : " . mysql_error());     }          // Select all the rows in the markers table     $query = "SELECT * FROM markers WHERE 1";     $result = mysql_query($query);     if (!$result) {       die("Invalid query: " . mysql_error());     }          // Initialize delay in geocode speed     $delay = 0;     $base_url = "http://" . MAPS_HOST . "/maps/geo?output=xml" . "&Key=" . KEY;          // Iterate through the rows, geocoding each address     while ($row = @mysql_fetch_assoc($result)) {       $geocode_pending = true;            while ($geocode_pending) {         $address = $row["address"];         $id = $row["id"];         $request_url = $base_url . "&q=" . urlencode($address);         $xml = simplexml_load_file($request_url) or die("url not loading");              $status = $xml->Response->Status->code;         if (strcmp($status, "200") == 0) {           // Successful geocode           $geocode_pending = false;           $coordinates = $xml->Response->Placemark->Point->coordinates;           $coordinatesSplit = split(",", $coordinates);           // Format: Longitude, Latitude, Altitude           $lat = $coordinatesSplit[1];           $lng = $coordinatesSplit[0];                $query = sprintf("UPDATE markers " .                  " SET lat = '%s', lng = '%s' " .                  " WHERE id = '%s' LIMIT 1;",                  mysql_real_escape_string($lat),                  mysql_real_escape_string($lng),                  mysql_real_escape_string($id));           $update_result = mysql_query($query);           if (!$update_result) {             die("Invalid query: " . mysql_error());           }         } else if (strcmp($status, "620") == 0) {           // sent geocodes too fast           $delay += 1000;         } else {           // failure to geocode           $geocode_pending = false;           echo "Address " . $address . " failed to geocoded. ";           echo "Received status " . $status . "     \n";         }         usleep($delay);       }     }               ?>      This is creating the xml:               <?php     require("database.php");     function parseToXML($htmlStr)     {     $xmlStr=str_replace('<','<',$htmlStr);     $xmlStr=str_replace('>','>',$xmlStr);     $xmlStr=str_replace('"','"',$xmlStr);     $xmlStr=str_replace("'",''',$xmlStr);     $xmlStr=str_replace("&",'&',$xmlStr);     return $xmlStr;     }     // Opens a connection to a MySQL server     $connection=mysql_connect (localhost, $username, $password);     if (!$connection) {       die('Not connected : ' . mysql_error());     }     // Set the active MySQL database     $db_selected = mysql_select_db($database, $connection);     if (!$db_selected) {       die ('Can\'t use db : ' . mysql_error());     }     // Select all the rows in the markers table     $query = "SELECT * FROM markers WHERE 1";     $result = mysql_query($query);     if (!$result) {       die('Invalid query: ' . mysql_error());     }     header("Content-type: text/xml");     // Start XML file, echo parent node     echo '<markers>';     // Iterate through the rows, printing XML nodes for each     while ($row = @mysql_fetch_assoc($result)){       // ADD TO XML DOCUMENT NODE       echo '<marker ';       echo 'name="' . parseToXML($row['name']) . '" ';       echo 'address="' . parseToXML($row['address']) . '" ';       echo 'lat="' . $row['lat'] . '" ';       echo 'lng="' . $row['lng'] . '" ';       echo 'link="' . $row['link'] . '" ';         echo 'type="' . $row['type'] . '" ';       echo '/>';     }     // End XML file     echo '</markers>';     ?>      This is generating the map:


How to obtain the center of Vector layer created using WFS query?

I created a vector GML layer using a WFS query with a filter. The layer renders fine . However, the layer does not appear to have any features associated with it (layer.features.length is 0 ) I need to get the center lat/lon of this layer to do further processing. This is how I create the layer               layer= new OpenLayers.Layer.Vector("GML", {                    strategies: [new OpenLayers.Strategy.Fixed()],                    protocol: new OpenLayers.Protocol.WFS({                             url:  <url>,                     featureType: "xxx",                     featureNS: "yyy",                     featurePrefix: "zzz"                         }),                    filter: new OpenLayers.Filter.Comparison({                         type: OpenLayers.Filter.Comparison.EQUAL_TO,                         property: 'aa',                         value: bb                     })                 });


How to add multiple relative hyperlinks to single point in ArcGIS for Desktop with Basic level license?

It may be a very obvious one, but how do I add more than one relative hyperlink to a point feature class in ArcGIS for Desktop with a Basic level license? The Basic level license eliminates using Attachments being a possibility.


How to migrate from ArcGIS Server 10.0 to 10.1

Due to the new system architecture of arcgis for server 10.1 I am first writing here to ask if anyone has successfully migrated from AGS 10.0 to 10.1 and what problems were encountered. I am currently serving data on Windows 2008 R2 with ArcGIS Server 10.0. I have about 20 map-client applications using aounrd 50 AGS services and no Fail-Save system. Around 400 People use the clients in my organisation. As I am relatively new to ArcGIS server and the windows server environment (I was previously in an organisation which used Linux Ubuntu server,Apache, tomcat6, geoserver with PostgreSQL) I am quite worried about things not going to plan! If anyone can offer some good advice, I would be very very grateful, Yours, Robert


ArcObjects: Alternative workflow to using a SQL query with over 1000 values in IN statement

I have a ListBox listing the unique values of a column in a feature class; the user can select any number of values and click a button to then zoom to the set of features matching those values. A function builds a WHERE clause that packs the selected values into an IN statement. This works great when the number of selected values is <= 1000, but if there are over 1000 then no rows are returned. This appears to be an Oracle limitation (the issue does not occur on shapefiles or file geodatabase feature classes), for which some Oracle-specific workarounds are described in this StackOverflow question, but I want to make this function database-agnostic so that it works with shapefiles and file geodatabases as well as SDE geodatabases. Can anyone suggest any alternative workflows that are 1) implemented in ArcObjects; and 2) database-agnostic; to using an IN statement with 1000+ values? I had thought about creating an in-memory table consisting of the selected values and joining against it but have not attempted this yet, pending any better ideas that may pop up here! If you know of the specific interfaces I should be looking at, that would be very helpful as well.


What is your workflow for designing "antique" maps?

I currently work with ArcGIS 9.3 and have decent competence with Adobe CS4-5 of Photoshop and Illustrator. I'm more than happy to branch out to other software. Essentially, I'd like to get really good at creating maps that look like old maps with unknown "there be dragons" areas. One project I have in mind is maps of old spice trade routes. I'm thinking of a Art Noveau style like Alphonse Mucha. I get a kick out of imaginative maps that are aesthetically pleasing, simple, and easy to read. This isn't exactly what I'm looking for, but yes, in this general direction. Map-poster from Conservation GIS 2011 Contest


Libraries to navigate and choose path based on congestion level?

I'm trying to develop a system to get best path to travel user based on road traffic (congestion level). Functionality of the system should be provide least congested path for traveler given destination from his/her current location. Note - I'm using OSGeo live 6.5 , Postgresql , MapServer wms services etc. for now. There are routing libraries like pgroute to get shortest path. Is there such libraries/tool that we can use for above stated development?


Performance problems using big points shapefile in TileMill

I've downloaded all the addresses in Italy from OSM and now I've a shapefile with more 514.000 points (16.065 KBbyte when zipped). I need to publish them with other geospatial information (points ...): I've not a public GIS infrastructure with some GIS engine (GeoServer, MapServer, etc.), so I've planned to use TileMill to create tiles and then to use a little Leaflet page to publish all togheter. At the moment I'm not able to generate tiles because TileMill is very very slow to upload the shapefile (I've started with OSM addresses that is the biggest one ....), and it's quite impossibile to export them in mbtiles. Note that the shapefile has the .shx and is shown right in QGIS. I think that I'm wrong somewhere Any suggestion? Alternatives? I'd to use both raster tiles and vector tiles when I'll show the details. You can see my points data at this address https://www.dropbox.com/s/a32pudxht18z832/CiviciOSM.zip


Cloudmade geocoding API: what are the volume limitations?

I'm trying to understand the TOS of the Cloudmade's Geocoding API, but it's not very clear. It says in section 6: > use CloudMade APIs in a manner that exceeds request volumes that are set by > CloudMade in its sole discretion and published to CloudMade’s website at > www.cloudmade.com. Unfortunately I can't find it anywhere on their website (page on geocoding API).


How to copy selected (targeted) features to new shapefile using ArcPy?

I'm trying to copy specific attribute table rows from one shapefile to a new shapefile that will contain only the specified rows in its attribute table, that is, if a field `GDP_TOP10 = 1`. I'm using this at the moment:               #Grab rows using Search Cursor with WHERE clause     rows = arcpy.SearchCursor("C:/CGDP.shp", "GDP_TOP10 = 1")     for row in rows:         arcpy.CopyFeatures_management("CGDP.shp", "New.shp")     del row     del rows      However, this just copies the entire shapefile, not the rows I want to select with the cursor. If I execute a print statement under my for loop instead, it works and prints only the relevant fields, but the copy to new shapefile command does not seem to copy specifically. Am I using the wrong script here? Is there a different `arcpy.` command to only copy rows that match a query?


How best to share QGIS data with an ArcGIS user?

I mainly use QGIS and have a large project to complete. Once I am done I'll need submit my data to an ArcGIS user. The data will consist of mostly point and polygon shape files. Is there a best practice for setting up a project from the get go if I know that I'll be handing it over to someone who uses a different software suite?


How to automatically get mode (modus) of a raster in ArcGIS

do you have some experience how to automatically get **mode value from a raster** ( value that appears most often in a dataset)? I am looking for something like "get raster properties" in Spatial analysis in ArcGIS, unfortunately there is no possibility to directly calculate **mode**. Subsequently, I would like to use this calculation of mode in Model Builder. Based on "mode value" I would like to reclassify raster image into binary file (0= values < mode, 1 = values > mode).


Problem installing PostGIS on Ubuntu Server 13.10

I've installed PostgreSQL 9.1 and postgis on Ubuntu Server 13.10 as follows:               sudo add-apt-repository-ppa:ubuntugis/ubuntugis-unstable     apt-get update     apt-get install postgresql-9.1-postgis      then I tried creating some special columns allowed by postgis like a geometry column but that doesn't exist. I did some search and found this http://stackoverflow.com/questions/8459361/postgis-install so I tried:               CREATE EXTENSION postgis;     CREATE EXTENSION postgis_topology;      but I got this error: could not open extension control file "usr/share/postgresql"


How do I fill null cells?

In my attribute table I have a field with some null cells and I want to fill them with the value of the other cells. how can I do it?


Validate Python Fme

i have a problem with my script for convert GDB to Excel.                 if s=='xls':             reader=FMEReader("GEODATABASE_FILE")             reader.open(param_filename_gdb)             writerXls= FMEWriter("XLS_ADO")             new_schema = export + "Excel\\" + filenameGDB+  ".xls"             writerXls.open(new_schema)                  schemaXls=FMEFeature()             while reader.readSchema(schemaXls):                 log.logFeature(schemaXls)                 writerXls.addSchema(schemaXls)             features=FMEFeature()             while reader.read(features):                log.logFeature(features)                writerXls.write(features)                  reader.close()              writerXls.close()      The creation of my Xls works but the logger of FME tell me : MS Excel Writer: Connection failed. Connection string `Provider=Microsoft.Jet.OLEDB.4.0;Data Source=null;Extended Properties="Excel 8.0;HDR=YES"'. Provider error`The table is not in the expected format.' Failed to open writer But the logger tell : MS Excel Writer: Closing `C:\Excel\test2.xls' . **Write operation complete**   The code is in Startup Python Script. Why ? Thanks


OpenLayers: How to draw multiple zipcodes with multiple colors

I have well-Known Text (Wkt) for 2 zipcodes, it could be for more but I want to draw 2 zipcodes first, how to draw them with boundaries and how to set the color for each zip code different than the other. for example:               ZipCode-46530:     POLYGON((-86.2175 41.76,-86.1278 41.7605,-86.1271 41.7605,-86.1254 41.7605,-86.125 41.7605,-86.0556 41.7605,-86.0556 41.7605,-86.0549 41.7593,-86.0556 41.7541,-86.0561 41.7535,-86.035 41.7535,-86.0281 41.7461,-86.0429 41.7463,-86.0425 41.7264,-86.0502 41.7312,-86.0564 41.7311,-86.0558 41.728,-86.0493 41.7206,-86.0493 41.7206,-86.0581 41.7162,-86.0622 41.7147,-86.0622 41.7096,-86.0673 41.7096,-86.0703 41.713,-86.0766 41.7182,-86.0767 41.7241,-86.0962 41.7241,-86.0962 41.7241,-86.1129 41.7241,-86.1232 41.7198,-86.1383 41.7162,-86.149 41.713,-86.1584 41.7128,-86.1608 41.7095,-86.1699 41.7094,-86.1716 41.7126,-86.1716 41.7164,-86.1783 41.7158,-86.178 41.72,-86.1878 41.7199,-86.1879 41.7236,-86.1901 41.7236,-86.1913 41.7214,-86.1913 41.7214,-86.1921 41.7233,-86.2039 41.7231,-86.2038 41.7268,-86.2075 41.7332,-86.2067 41.7343,-86.2066 41.7353,-86.2113 41.7395,-86.2111 41.7426,-86.2087 41.7431,-86.2087 41.7451,-86.2173 41.7451,-86.2173 41.7451,-86.2175 41.76,POLYGON((-86.2175 41.76,-86.1278 41.7605,-86.1271 41.7605,-86.1254 41.7605,-86.125 41.7605,-86.0556 41.7605,-86.0556 41.7605,-86.0549 41.7593,-86.0556 41.7541,-86.0561 41.7535,-86.035 41.7535,-86.0281 41.7461,-86.0429 41.7463,-86.0425 41.7264,-86.0502 41.7312,-86.0564 41.7311,-86.0558 41.728,-86.0493 41.7206,-86.0493 41.7206,-86.0581 41.7162,-86.0622 41.7147,-86.0622 41.7096,-86.0673 41.7096,-86.0703 41.713,-86.0766 41.7182,-86.0767 41.7241,-86.0962 41.7241,-86.0962 41.7241,-86.1129 41.7241,-86.1232 41.7198,-86.1383 41.7162,-86.149 41.713,-86.1584 41.7128,-86.1608 41.7095,-86.1699 41.7094,-86.1716 41.7126,-86.1716 41.7164,-86.1783 41.7158,-86.178 41.72,-86.1878 41.7199,-86.1879 41.7236,-86.1901 41.7236,-86.1913 41.7214,-86.1913 41.7214,-86.1921 41.7233,-86.2039 41.7231,-86.2038 41.7268,-86.2075 41.7332,-86.2067 41.7343,-86.2066 41.7353,-86.2113 41.7395,-86.2111 41.7426,-86.2087 41.7431,-86.2087 41.7451,-86.2173 41.7451,-86.2173 41.7451,-86.2175 41.76))          ZipCode-46514:          POLYGON((-85.8978 41.7594,-85.8988 41.7562,-85.8984 41.7391,-85.8887 41.7391,-85.8887 41.7302,-85.871 41.731,-85.8708 41.7241,-85.8882 41.724,-85.8886 41.7245,-85.9032 41.7242,-85.9029 41.705,-85.898 41.7052,-85.8885 41.7077,-85.8884 41.7072,-85.8884 41.7072,-85.896 41.7048,-85.8965 41.7051,-85.8972 41.7039,-85.8971 41.701,-85.8986 41.6995,-85.9052 41.6989,-85.9104 41.6968,-85.9164 41.6957,-85.9162 41.6971,-85.913 41.6976,-85.9159 41.6976,-85.9172 41.6962,-85.9226 41.6967,-85.9227 41.6971,-85.9319 41.6967,-85.9344 41.6974,-85.9378 41.6968,-85.9447 41.6985,-85.9451 41.6997,-85.9454 41.699,-85.9485 41.6986,-85.9554 41.6949,-85.9576 41.6947,-85.9584 41.6939,-85.9632 41.6944,-85.9689 41.6924,-85.9709 41.6927,-85.9743 41.6921,-85.9781 41.6923,-85.9831 41.6886,-85.9832 41.6858,-85.9813 41.684,-85.9811 41.6827,-85.9815 41.6819,-85.9833 41.6815,-85.9851 41.6819,-85.987 41.6837,-85.9881 41.6838,-85.9907 41.6825,-85.992 41.6808,-85.9919 41.6791,-85.9911 41.6769,-85.9925 41.6752,-85.9948 41.6759,-85.9985 41.6801,-86.0032 41.6798,-86.0076 41.678,-86.0135 41.6791,-86.0143 41.68,-86.0171 41.6805,-86.0167 41.6843,-86.0192 41.6803,-86.0213 41.6797,-86.0234 41.6779,-86.0243 41.6788,-86.0252 41.6855,-86.0268 41.6864,-86.0292 41.6866,-86.0294 41.6871,-86.0342 41.689,-86.037 41.6886,-86.038 41.6851,-86.0344 41.6822,-86.0342 41.6807,-86.0356 41.6801,-86.037 41.6814,-86.0439 41.6846,-86.0486 41.6829,-86.0536 41.6828,-86.0592 41.6813,-86.0613 41.68,-86.0613 41.68,-86.0617 41.6882,-86.0617 41.6915,-86.0619 41.7001,-86.0619 41.704,-86.0618 41.7054,-86.0535 41.7098,-86.0522 41.7099,-86.049 41.7128,-86.0477 41.7188,-86.0493 41.7206,-86.0493 41.7206,-86.0558 41.728,-86.0564 41.7311,-86.0502 41.7312,-86.0425 41.7264,-86.0429 41.7463,-86.0281 41.7461,-86.035 41.7535,-86.0561 41.7535,-86.0556 41.7541,-86.0549 41.7593,-86.0556 41.7605,-86.0556 41.7605,-86.0466 41.7605,-86.041 41.7605,-86.0339 41.7604,-85.9913 41.7599,-85.9749 41.7598,-85.9749 41.7598,-85.8978 41.7594,POLYGON((-85.8978 41.7594,-85.8988 41.7562,-85.8984 41.7391,-85.8887 41.7391,-85.8887 41.7302,-85.871 41.731,-85.8708 41.7241,-85.8882 41.724,-85.8886 41.7245,-85.9032 41.7242,-85.9029 41.705,-85.898 41.7052,-85.8885 41.7077,-85.8884 41.7072,-85.8884 41.7072,-85.896 41.7048,-85.8965 41.7051,-85.8972 41.7039,-85.8971 41.701,-85.8986 41.6995,-85.9052 41.6989,-85.9104 41.6968,-85.9164 41.6957,-85.9162 41.6971,-85.913 41.6976,-85.9159 41.6976,-85.9172 41.6962,-85.9226 41.6967,-85.9227 41.6971,-85.9319 41.6967,-85.9344 41.6974,-85.9378 41.6968,-85.9447 41.6985,-85.9451 41.6997,-85.9454 41.699,-85.9485 41.6986,-85.9554 41.6949,-85.9576 41.6947,-85.9584 41.6939,-85.9632 41.6944,-85.9689 41.6924,-85.9709 41.6927,-85.9743 41.6921,-85.9781 41.6923,-85.9831 41.6886,-85.9832 41.6858,-85.9813 41.684,-85.9811 41.6827,-85.9815 41.6819,-85.9833 41.6815,-85.9851 41.6819,-85.987 41.6837,-85.9881 41.6838,-85.9907 41.6825,-85.992 41.6808,-85.9919 41.6791,-85.9911 41.6769,-85.9925 41.6752,-85.9948 41.6759,-85.9985 41.6801,-86.0032 41.6798,-86.0076 41.678,-86.0135 41.6791,-86.0143 41.68,-86.0171 41.6805,-86.0167 41.6843,-86.0192 41.6803,-86.0213 41.6797,-86.0234 41.6779,-86.0243 41.6788,-86.0252 41.6855,-86.0268 41.6864,-86.0292 41.6866,-86.0294 41.6871,-86.0342 41.689,-86.037 41.6886,-86.038 41.6851,-86.0344 41.6822,-86.0342 41.6807,-86.0356 41.6801,-86.037 41.6814,-86.0439 41.6846,-86.0486 41.6829,-86.0536 41.6828,-86.0592 41.6813,-86.0613 41.68,-86.0613 41.68,-86.0617 41.6882,-86.0617 41.6915,-86.0619 41.7001,-86.0619 41.704,-86.0618 41.7054,-86.0535 41.7098,-86.0522 41.7099,-86.049 41.7128,-86.0477 41.7188,-86.0493 41.7206,-86.0493 41.7206,-86.0558 41.728,-86.0564 41.7311,-86.0502 41.7312,-86.0425 41.7264,-86.0429 41.7463,-86.0281 41.7461,-86.035 41.7535,-86.0561 41.7535,-86.0556 41.7541,-86.0549 41.7593,-86.0556 41.7605,-86.0556 41.7605,-86.0466 41.7605,-86.041 41.7605,-86.0339 41.7604,-85.9913 41.7599,-85.9749 41.7598,-85.9749 41.7598,-85.8978 41.7594))      would you give me the initialization of map and how to draw them with different colors


Aggregating points to grid using R

I have a question with regard to spatial aggregation in R. What I am trying to do is aggregate a point dataset to a grid. I am unsure however how to do this as I have little experience with this sort of stuff. I was hoping anyone of you might have some useful guidance/a possible solution. My vantage point is a dataset containing georeferenced data on conflict events in Africa (see www.acleddata.com). The points are georeferenced with latitude/longitude coordinates and contain data on event type and time. What I want to do is aggregate these points to a 1x1 degree grid. Thus a grid-cell should contain the information of the data points if a event happened to occur within that grid-cell. The eventual product of this should be a data frame or something that I can export to a csv-file as the data is intended to be used in a panel data-set for statistical analysis. So far I loaded and plotted the data and the shapefile using the code below. I believe that I should use the _over_ function from the _sp_ package to aggregate but I do not know how. Hope one of you can help. The code I used so far can be found here with the corresponding visual result over there. Suggestion for doing this in QGIS are welcome as well.


How to set the holeModifier on OpenLayers.Control.DrawFeature to always be active?

I would like to create a button "draw a hole" taht uses by default the holeModifier functionality but the user dont need to press the cttrlBtn. The "standard" way I guess, would be to create a way of create holes in OpenLayers would be something like this:               var drawPolygon = new OpenLayers.Control.DrawFeature(ftthLayer,                           OpenLayers.Handler.Polygon,{                             handlerOptions: { holeModifier: "ctrlKey"} };      By this way the user needs to press the ctrlKey to draw a hole, or else a new polygon is created. Is it possible to make the control DrawFeature always be in "holeModifier" mode? I have tried setting the property `drawingHole= true` on the handler (`OpenLayers.Handler.Polygon`) that's connected to DrawFeature control , but that doesn't seem to help. I know there are different ways to solve hole creation, but the ones I have seen havn't solved so that the user see you are drawing a hole. Like the way it's working when you use the holeModifier. Happy for any input Br Mike


Column "osm_meta" in osm2po 4.6.9

What's the utility of *osm_meta* column in osm2po (Version: 4.6.9) generated data? Thanks in advance!


arcApplySymbologyFromLayer w/out adding to map

Is there a way to apply symbology from layer without adding to map. I have heard there an environment setting that may allow this? I am trying to both apply symbology and add layer at position in a map. Here is what I have...                       layer1 = arcpy.mapping.ListLayers(mxd, "AP_Map_Numbers", df)[0]                  symbologyLayer = r'G:\Texas\Potter-Randall\Database\Ownership.lyr'                  #create a search cursor to get relevant information about a parcel             sc = arcpy.SearchCursor(layer1)                  #for loop to get the selected data             for row in sc:                 #select the relevant fields to be put on the map                 ap = row.getValue("MAP_NUMBER")                 addLayer = arcpy.mapping.Layer(r'G:\Texas\Potter-Randall\Database' + '\\' + str(ap) + '\\' + str(ap) + ".gdb" + '\\' + str(ap))                 arcpy.ApplySymbologyFromLayer_management (addLayer, symbologyLayer)                 arcpy.mapping.InsertLayer(df, layer1, addLayer, "BEFORE")


Re-centering a map layer using manually input coordinates in GeoExt

I am trying to create some code in GeoExt that will allow me to centre that map layer I am viewing to coordinates that have been submitted through a formPanel. I would have thought that this would have been fairly straightforward but this is proving to be quite troublesome and I am wondering if any of you guys could help? So far I have created the the panel with 2 boxes to accept the eastings and northings but can't work out how to get the values that have been submitted to actually move the image. The code I have cobbled together this far is:               formPanelCoord = new GeoExt.form.FormPanel({         border: true,         layout: 'anchor',         bodyStyle:'padding: 20px',             items: [{             xtype: "textfield",             width: 100,             fieldLabel: "Easting",             name: "search_lc",             value: "",             emptyText:'Easting',             allowblank: false         },          {             xtype: "textfield",             width: 100,             fieldLabel: "Northing",             name: "search_lc",             value: "",             emptyText:'Northing',             allowblank: false         }],                        listeners: {            actioncomplete: function(form, action) {                  features = action.response.features;             console.log(features.length)          }                      }               });               formPanelCoord.addButton({             text:"Go to Coord",             handler:function() {             console.log(formPanelCoord);                 //alert(formPanelCoord.items.items[0].getValue());                 //alert(formPanelCoord.items.items[1].getValue());                 formPanelCoord.items.items[0].getValue();                 formPanelCoord.items.items[1].getValue();                            //function recentreMap (form) {                            var easting = from.Easting.value;                            var northing = form.Northing.value;                            //var easting = formPanelCoord.items.items[0].value;                            //var northing = formPanelCoord.items.items[1].value;                            map.setCenter(new OpenLayers.LonLat(easting,northing));               formPanelCoord.addButton({             text:"Go to Coord",             handler:function() {                 this.search();          },          scope:formPanelCoord     });                           //this.search();          },          scope:formPanelCoord     });      Any help gratefully received!


Ozone concentration when providing coordinates

Does anybody know where can I find data about ozone? I used TOMS, but it seems that data are not available anymore. What I used to do to retrieve data was **specifying lat/lon** coordinates and then obtaining the **value in Dobson** units. I am looking to a service like this one: http://ozoneaq.gsfc.nasa.gov/ozone_overhead_all_v8.md But, of course, working! Thanks


Math and Stat for GIS and Computing

I am planning to do an advanced program in spatial science and engineering. It states as a requirement in the program, that the student should have a through understanding in math and statistics. So far I have done only up to undergraduate level (i.e. only A/Ls) in both the fields and am baffled as to how much of understanding I should have in the fields. Also I my BS degree is a special in Geology. As the program is basically an engineering graduate level one, what do you recommend? Some good books, would be highly appreciated.


DEM problem in ArcGIS

I have a 32 bit DEM with resolution 0.5 * 0.5 and range of elevation is 1299 to 1489. When I want to export or use copy raster tool or create fill in Arcgis, the results are elevation between -3.40282e+038 and 3.4282e+038 and the map does not show any elevation and range of color. I tried to convert 32 bit to 16 bit but it didn't work. ![enter image description here](http://i.stack.imgur.com/XVvOM.png) Please help. Thank you.


How to Open a Table, Convert it to ShapeFile & projecting the data using the X and Y

it's my first project using ArcObject, i create this interface : http://i118.photobucket.com/albums/o104/b_sara/Cap2-1.png i did programme the button "Parcourir" ( browse ) using a commonDialog, it get just the files "*.dbf" **Code:**               Private Sub CmdPrc_Click()      On Error GoTo Annuler      With CommonDialog1          .DialogTitle = "Choisissez une Table"           .CancelError = True             .Filter = "Tous (*.dbf)|*.dbf"            .InitDir = "C:\"          .ShowOpen         Text1.Text = .fileName               Annuler:            If Text1.Text = "" Then            Label1.Caption = "Vous n'avez sélectionné aucun fichier."          Else          Label1.Caption = ""       End If      End With     End Sub      the combobox also works good, but they take there value manually, this is the code : **Code:**               Private Sub UserForm_Initialize()          With CmboX             .AddItem "OID"            .AddItem "PT"             .AddItem "PP"             .AddItem "PI"             .AddItem "BPLB"             .AddItem "BPLL"             .AddItem "RP"             .AddItem "CO2B"             .AddItem "CO2L"             .AddItem "MGOB"             .AddItem "MGOL"             .AddItem "X"             .AddItem "Y"         End With          With CmboY             .AddItem "OID"             .AddItem "PT"             .AddItem "PP"             .AddItem "PI"             .AddItem "BPLB"             .AddItem "BPLL"             .AddItem "RP"             .AddItem "CO2B"             .AddItem "CO2L"             .AddItem "MGOB"             .AddItem "MGOL"             .AddItem "X"             .AddItem "Y"         End With     CmboX.ListIndex = 11     CmboY.ListIndex = 12     End Sub      now i'm sticked at "Ok" button, and Edit button i don't know how to fix it, the Button "Ok" should :   * Open the Table "*.dbf" , then take the coordinate X and Y, and convert it to a shapefile, then open all the data with there (X, Y) in ArcMAP the Button "Edit" should open that window to define a projection and a coordinate system : that you can get it by adding a table -> click right -> Display XY Data -> click button "Edit" http://i118.photobucket.com/albums/o104/b_sara/Cap3.png i need to programme that, that's the point of my training end of study I need help, please if anyone could help me.


How to calculate purchasing power on postcode level?

Does anyone know of an algorithm to calculate purchasing power on a postcode level? What source data is needed? Purchasing power on admin. level, population?


How to repair and clean contours from high data resolution (lidar)?

I'm unsuccessfully trying to make a bathymetric map with contours extracted from Lidar data at 1 m resolution. The extracted contours have a lot of artifacts like dangles and islands. First I used QGIS/GRASS 1.8 with v.clean, running the rmdangle which successfully removed a large part of dangles. But it also created some holes in the main line, and the snapping algorithm don't work well because it's snapping the wrong vertices. Then, after a few manual operations, the algorithms of Sextante doesn't work anymore and I have an error message : Could not load layer... So I use ArcGIS 10 for build the topology, but I don't success repairing it. When I try trim or snap, it doesn't work at all. To conclude I can't remove all the "islands" and other artifacts like intersections. I think I've tried all I know... And I can't do it manually for the whole study area! Does anybody have a solution for it? Thank you very much.


How to create a suitable filtered .osm for osm2po using OpenStreetMap Overpass API?

I successfully created a (.osm) set suitable for routing in a desktop GIS over a large custom area thus keeping only primary network (way object) using the Overpass API (see below). I'm trying this approach because my study area is crossing national and local borders, so other approach to parse a full planet file might take a lot of resources... which I don't have... However the resulting OSM XML was rejected by osm2po because the file tr_raw.2po is missing after the first reading phase (see log below). Is there a way to produce through Overpass API a suitable file (but not too heavy!) to use along with osm2po? Or can we modify osm2po behavior to work without relations so no error is thrown? Thanks and sorry for my poor English ;) Here is the overpass request:               <osm-script>       <query type="way">         <has-kv k="highway" regv="junction|motorway|motorway_junction|motorway_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|trunk|trunk_link"/>         <bbox-query e="8.1024169921875" n="48.34529727896014" s="47.331377157798244" w="6.8060302734375"/>       </query>       <union>         <item/>         <recurse type="down"/>       </union>       <print/>     </osm-script>      And here is the log:               LOG    Opened at Thu Apr 25 11:59:14 CEST 2013     INFO   Running osm2po 4.7.7 with cmd=tjsp            SingleTileMode Uncompressed - 1 359M     INFO   Starting Tiler at Thu Apr 25 11:59:14 CEST 2013     INFO   Reading from            mypath\extract.osm     INFO   Using parser de.cm.osm2po.converter.OsmXmlParser     INFO   166 865 of 166 865 nodes extracted - 1 354M     INFO   0 of 0 relations extracted - 1 354M     DEBUG  Writing TileFile:tm_info.2po     DEBUG  Prefix:extract Ways:0 Relations:0            Tiles[1] SingleTileMode            [0] Id:0 (s090-w180) Coords:166 520 Complex:345     INFO   Tiler finished at Thu Apr 25 11:59:16 CEST 2013     INFO   Starting Joiner at Thu Apr 25 11:59:16 CEST 2013     DEBUG  Reading TileFile tm_info.2po     DEBUG  Prefix:extract Ways:0 Relations:0            Tiles[1] SingleTileMode            [0] Id:0 (s090-w180) Coords:166 520 Complex:345     DEBUG  Capacity for Shared Ids is 3     INFO   Caching relations from tr_raw.2po - 1 358M     FATAL  Exception at Thu Apr 25 11:59:16 CEST 2013            Message: java.io.FileNotFoundException: extract\tr_raw.2po (Le fichier spécifié est introuvable)            Class: java.lang.RuntimeException            Stacktrace:            de.cm.osm2po.primitives.InStreamDisk.<init>(InStreamDisk.java:30)            de.cm.osm2po.converter.Joiner.cacheOsmRelations(Joiner.java:106)            de.cm.osm2po.converter.Joiner.run(Joiner.java:171)            de.cm.osm2po.Main.runJoiner(Main.java:191)            de.cm.osm2po.Main.main(Main.java:126)     INFO   ------------------------------------------------------------------                 For more help enter            java -jar osm2po-core-4.7.7-signed.jar -h               LOG    Closed at Thu Apr 25 11:59:16 CEST 2013


How to display point features w.r.t field values of a polygon file in arcobjects?

I have a point & polygon shapefile. Point file has a field namely, **Type** : atm,hospital,school etc... Polygon file has a field **Zone** : Zn1, Zn2, Zn3. There will be two combo boxes which will populate this two fields respectively What i like to do is.......If i select school & Zn2 in the comboboxes and click the "Show" button...... only schools which fall under the **Zn2** polygon should be displayed. W.r.t arcobjects, i m just a beginner. Trying this for the past two days. Can anyone help me regarding this ? Thanks in advance... (ArcGIS Version 9.3 )


Using a parametric SQL View in Geoserver

In Geoserver i create parametric view:               SELECT *     FROM MyTable     LEFT JOIN Track On MyTable.SegmentID=Track.SegmentID     WHERE (DATEPART(yy, MyTable.Date)=%year%     AND DATEPART(mm, MyTable.Date)=%month%     AND DATEPART(dd, MyTable.Date)=%day%)      i set default values `2009-09-18` Now i go in layer preview pick my layer and see layer with features with Date=2009-09-18.   Now i want to see features with another date. In address line i add:               viewparams=year:2009      But still see same features. I try another dates but not help.   Whats wrong?


Custom Geographic Transformation on QGIS

Is there a way to create a custom geographic transformation with specifics parameters in QGIS like in ArcGIS? Okay, I want to tranform SAD69 system into WGS84. Well, I'm in doubt because in ArcGIS you have to enter both systems and then specify the method of the transformation - wich is the Molodensky method - and its three parameters - defined by the brazilian government.               a1 = 6.378.160 m     f1 = 1/298,25     a2 = 6.378.137 m     f2 = 1/298,257222101 ΔX = − 67,35 m     ΔY = + 3,88 m     ΔZ = − 38,22 m      Thanks in advance,


ArcGIS 10: Create an event linear layer from a point layer based on directionality

I have a point layer that reflects the speed limits and a line layer of the roads. The location of the speed sign indicates in which direction the speed limit applies. How can I make linear event table on top of the road layer that reflects the speeds? So for each segment, return two speed attributes, one for each direction. ![Speed/road layer](http://i.stack.imgur.com/0bXM6.jpg)


How do I find license number for ArcGIS Desktop?

I have a machine with ArcGIS for Desktop 10.0 installed on it. I need to find out which license it's using. The machine is single use ArcEditor and was authorized online. How can I find what the license number is?


Get Number of Rows, ArcObjects (VBA 6.0)

I am sorry to bother with what may be an easy question for most of you but i am new to ArcObjects (VBA 6.0) in ArcMap (ArcGIS 10.0) and i am really struggling here. I am trying to count the number of rows in a feature class attribute table. I have declared a feature cursor which i want to use later in the code to do some processing and field value calculation. (In the code below pFClass was declared to the IFeatureClass interface)               Dim pCursor As IFeatureCursor       pCursor = pFClass.Search(Nothing, False)            Dim pFeature As IFeature       Set pFeature = pFCursor.NextFeature            Dim LngCounter As Long            Do Until pFeature Is Nothing           LngCounter = LngCounter + 1           Set pFeature = pCursor.NextFeature       LOOP        When i run this code to get the number of items in the table i use a msgbox to print the number to screen which is accurate. But then i Cannot reuse my pFeature because it is now nothing. Other permutations i have tried include declaring 2 cursors and 2 IFeature objects and then using the first to get the total count and then the second to do subsequent calculations of the attribute table but to no avail. I looked at the ITable.rowCount but could not get that to work for me. I'd really appreciate some help on this. Thanks


Which are the best open source tools/solutions for digitizing road networks?

I was thinking on tools/plugins for QGIS, but other good suggestions are welcome.


How to encode shapefiles from LATIN1 to UTF-8?

Is there a way to encode shapefiles from LATIN1 to UTF-8?


How to get all features in current extent

I like to add text information to each feature in the shown map extent in my MapControl/PageLayoutControl. Adding the text is not a problem, but I couldn't find a way on how to get the features. Is there a way to get all features in a layer that are in the current map extent?


How to set up pycsw on xampp (win7)?

I'm trying to setting up pycsw on xampp. In the pycsw's default.cfg I've the following configuration:               [server]     home=C:\Users\masa\xampp-201405\htdocs\pycsw     url=http://localhost:8000/pycsw/csw.py     ...     [repository]     # sqlite     database=sqlite:///C:\\Users\\masa\\xampp-201405\\htdocs\\pycsw\\tests\\suites\\cite\\data\\records.db     ...      When I start the **csw.wsgi** and go to the address `localhost:8000/?service=CSW&version=2.0.2&request=GetCapabilities` then I get the following error:               Could not load repository (local): (OperationalError) unable to open database file None None      I think the problem is caused by the insufficent permisions configure on apache . I added to **httpd.conf** the following lines:               <Location /pycsw/>     Options +FollowSymLinks +ExecCGI     Allow from all     AddHandler cgi-script .py     </Location>          <Directory "C:/Users/masa/xampp-201405/htdocs/pycsw">       Order deny,allow       Allow from all     </Directory>      But I get the same error. Can you give me any advice?? I'm not fluent about apache configuration.


Valid values of mollweide projection in QGis

i just imported a vectorlayer (without any reference points) to qgis as mollweide projection to save it to longlat. What i am wondering about is a mathematical problem: Not every x,y coordinate on the screen is valid when i put it to the inverse formular for this projection. So how do i find the valid area so i can resize my vectorlayer properly? Many thanks in advance an sorry for mistakes, im german MX117


Raster data type as input in processing algorithms

Why the processing algorithms run just with input files located in QGIS desktop? Is there any way to work with directories? I am developing a plugin and I am using processing algorithms but the number of input files doesn't give the possibility to work in QGIS desktop. Is there any way to work with directories?


How to Select By Attributes on only Field with all its chars in Capital letters?

Need some assistance with this situation: I have a polygon feature class with a **string Field**. It has mixed values like: "PARIS" - "LISBON" - "london" - "luxemburg" - "Athens". In this example, I'd only want to SELECT: _PARIS_ and _LISBON_. How could be the statement? I think it is something with UPPER ("Name_Field") within the Select By Attributes text box... but I don`t know.


How to display Arcscene polygon extrusion edges?

When I extrude polygons in Arcscene 10.0, the polygon outlines are not displayed regardless of the symbol outline width/color. Thus the extruded edges are not shown. Here's a screenshot showing the problem with USA states. I need to outline each state at the top of it's extrusion. How do I do this? Thanks in advance! ![enter image description here](http://i.stack.imgur.com/kUnMj.jpg)


External scripting in GRASS libgrass_grass.6.43.dll not found

I need to run interpolation through GRASS through a script such that its requires no user interaction in the process and the interpolation raster output can be used for display in HTML Web Page. To make my external script i have used the following webpage as a reference: http://geoinformatics.fsv.cvut.cz/gwiki/On_scripting_GRASS_GIS:_Building_location- independent_command_line_tools But when I made my script as per the above webpage and ran it, it is giving me a libgrass_grass.6.4.3.dll not found for all the grass commands. Also sometimes is will give a "g.gisenv LOCATION NAME not found" error. I am not able to figure out what is it that is still missing in my script. Please take a look at my script below: > >       echo "proj:       0 zone:       0 north:      1 south:      0 east: > 1 west:       0 cols:       1 rows:       1 e-w resol:  1 >   > > n-s resol: 1 top: 1 bottom: 0 cols3: 1 rows3: 1 depths: 1 e-w resol3: 1 n-s > resol3: 1 t-b resol: 1 " > D:/DB/THE_LOCATION/THE_MAPSET/WIND > > # Copy WIND-file to DEFAULT_WIND: echo "proj: 0 zone: 0 north: 1 south: 0 > east: 1 west: 0 cols: 1 > > rows: 1 e-w resol: 1 n-s resol: 1 top: 1 bottom: 0 cols3: 1 rows3: 1 depths: > 1 e-w resol3: 1 n-s resol3: 1 t-b resol: 1 "> > D:/DB/THE_LOCATION/PERMANENT/DEFAULT_WIND > > # Set default database driver: echo "DBF_DRIVER: dbf DB_DATABASE : > C:/Program Files/QGISDufour/apps/grass/grass-6.4.3/driver/db "> > > D:/DB/THE_LOCATION/THE_MAPSET/VAR > > echo "GISDBASE: D:/AbTask/GRASSGISDBASE LOCATION_NAME: NewTask MAPSET: > PERMANENT GRASS_GUI: text "> D:/AbTask/GRASSGISDBASE/THE_GRASSRC > > echo "GISDBASE: D:/AbTask/GRASSGISDBASE LOCATION_NAME: NewTask MAPSET: > PERMANENT GRASS_GUI: text ">> "$GISRC" > > GISDBASE=`g.gisenv -s get=GISDBASE` LOCATION_NAME=`g.gisenv -s > get=LOCATION_NAME` MAPSET=`g.gisenv -s get=MAPSET` echo These are related > MAPSET variables echo $GISDBASE echo $LOCATION_NAME echo $MAPSET > > # $GISBASE points to the GRASS installation to be used: export > GISBASE="C:/PROGRA~1/QGISDufour/apps/grass/grass-6.4.3" > > # Extend $PATH for the default GRASS scripts: export > PATH="$PATH:$GISBASE/bin:$GISBASE/scripts:$GISBASE/lib:C:/PROGRA~1/QGISDufour/apps/msys/bin" > > echo hi! This PATH variable echo $PATH echo hi!! This GISBASE variable echo > $GISBASE > > # Add GRASS library information: # export > GRASS_LD_LIBRARY_PATH="$PATH:$GISBASE/lib:$GRASS_LD_LIBRARY_PATH" > > echo hi! This Library PATH variable # echo $GRASS_LD_LIBRARY_PATH export > LD_LIBRARY_PATH="$GISBASE/lib" export > GRASS_LD_LIBRARY_PATH="$LD_LIBRARY_PATH" echo hi! This Library PATH variable > echo $LD_LIBRARY_PATH > > # use process ID (PID) as lock file number: export GIS_LOCK=$$ > > # Backup previously existing GRASS references > > # export GISRC_BACKUP=${GISRC} > > # path to GRASS settings file: export > GISRC="C:/Users/ab281182/AppData/Roaming/Grass6" echo HEY!!! this > > is GISRC echo $GISRC export PYTHONPATH="$GISBASE/etc/python:$PYTHONPATH" # > VARIABLES AS THEY ARE SET BY THE ENV.BAT FILE export > GRASS_SH="C:/PROGRA~1/QGISDufour/apps/msys/bin/sh.exe" export > GRASS_HTML_BROWSER=explorer export > GRASS_PYTHON="C:/PROGRA~1/QGISDufour/bin/python.exe" export > PYTHONHOME="C:/PROGRA~1/QGISDufour/apps/Python27" export > GRASS_WISH="C:/PROGRA~1/QGISDufour/bin/wish.exe" export > GRASS_PROJSHARE="C:/PROGRA~1/QGISDufour/share/proj" export > PROJ_LIB="C:/PROGRA~1/QGISDufour/share/proj" export > GDAL_DATA="C:/PROGRA~1/QGISDufour/share/gdal" export > GEOTIFF_CSV="C:/PROGRA~1/QGISDufour/share/epsg_csv" db.connect driver=dbf > database='D:/AbTask/GRASSGISDBASE/PERMANENT/dbf/' g.mapset mapset=PERMANENT > location=NewTask gisdbase=D:\abtask\grassgisdbase echo @Algorithm v.surf.idw > - Surface interpolation from vector point data by Inverse Distance Squared > Weighting. started g.proj -c proj4="+proj=longlat +ellps=GRS80 > +towgs84=0,0,0,0,0,0,0 +no_defs" echo hi1 v.in.ogr min_area=0.0001 snap=-1 > dsn="D:/AbTask/GRASSGISDBASE/NewTask/Again" layer=S1_Wells > output=tmp1398149517372 --overwrite -o echo hi2 g.region n=24.3085034495 > s=24.3058890798 e=54.1026976818 w=54.0981444255 res=0.0001 echo hi3 > v.surf.idw input=tmp1398149517372 npoints=9 power=2 column=Saturation > output=output19862aedc1c646ce948bc808981de1db --overwrite echo hi4 g.region > rast=output19862aedc1c646ce948bc808981de1db echo hi5 r.out.gdal -c > createopt="TFW=YES,COMPRESS=LZW" > input=output19862aedc1c646ce948bc808981de1db > output="D:/AbTask/GRASSGISDBASE/NewTask/again/cmd/S1_cmd_idw_grass_COD.rst" > gdalwarp -s_srs EPSG:4269 -t_srs EPSG:4269 -r near -dstnodata 0 -q -cutline > "D:/AbTask/GRASSGISDBASE/NewTask/Again/S1_Polygon.shp" -dstalpha -of GTiff > "D:/Ab-Task/GRASSGISDBASE/NewTask/again/cmd/S1_cmd_idw_grass_COD.rst" > "D:/Ab-Task/GRASSGISDBASE/NewTask/again/cmd/S1_idw_grass_reproject_11.tif" > gdal_translate -a_srs EPSG:4269 -a_nodata 0 -of GTiff > "D:\Ab\GRASSGISDBASE\NewTask\Again\cmd\S1_idw_grass_reproject_11.tif" > "D:/Ab/GRASSGISDBASE/NewTask/Again/cmd/zoozoo.png"


Why does reading shapefile from PostgreSQL database give Error reading OID from table ...?

I'm using arcgis 10.1 and i have a connection to a PostgreSQL 9.3 database. When i try to load a shapefile using the add query layer I get an error when opening the attribute table. The error says "Error reading OID from table. Reading rows has been stopped. Check that the datasource is valid. OID mapped column has null values. the operation is not supported by this implementation". I know there is a field that is causing this issue yet i don't know which one is or how to go solve it. Has anyone come across to the same issue?


Call post-execution command manually in QGIS Processing

I wrote myself a Processing Script and it works fine. Now i want to style the outcome (a new raster layer) with a `QgsColorRampShader()`, but the problem is that Processing adds the output **after** the whole code has been executed, so my output layer is not yet available while the script is still running. So how can I call a post-execution script manually in Processing? Alternatively how can I style layers customarily within a Processing script?


Interview questions for hiring a GIS Analyst

What are the best interview questions for candidates for a GIS Analyst position? I am looking for techniques for interviewing analysts at varied experience levels (we are currently looking at hiring for entry and senior-level positions). In the past, I've asked questions about their most recent projects and what sites/newsletters they use to keep up with the industry. Any good ideas would be greatly appreciated.


Mapnik PGRaster Plugin creating 8x8 tiles with visible boundaries

I have used the latest addition to Mapnik PGRaster plugin (https://github.com/mapnik/mapnik/tree/2.3.x) by Strk(https://github.com/strk/mapnik/tree/2.3.x-pgraster) and merged recently. I am able to get the images properly projected on the Map. But the images are tiled into an 8x8 manner and I could see the boundaries of the images at certain zoom levels. ![enter image description here](http://i.stack.imgur.com/vJ0aF.jpg) I have added a Raster with a black patch so that the tiling boundaries would be more clear. I am using OSM, Mapnik(2.3.x branch), ModTile and Renderd. Also, when I run Renderd, I am getting logs like: > renderd[15011]: Rendering projected coordinates 14 4896 6056 -> > -8061966.247298|5205055.878110 -8042398.368057|5224623.757351 to a 8 x 8 > tile I have added a layer via layer-shapefile xml as follows:               <Layer name="MS-GIS" status="on" srs="+proj=utm +zone=18 +datum=WGS84 +units=m +no_defs">         <StyleName>raster</StyleName>         <Datasource>           <Parameter name="type">pgraster</Parameter>           <Parameter name="table">ms_test</Parameter>           <Parameter name="raster_field">rast</Parameter>           <Parameter name="dbname">gis</Parameter>           <Parameter name="estimate_extent">false</Parameter>           <Parameter name="extent">-20037508,-19929239,20037508,19929239</Parameter>         </Datasource>     </Layer>      How can I get the tiling to be smooth without boundaries? Any help greatly appreciated.


"construct points" troubleshooting

Apologies for the potential simplicity of this problem but I just cant find a solution! I need to create a series of points along a line at a specific interval. I am using ArcMap 10.2.1 and the obvious tool appears to be Construct Points. I have tried to follow the instruction steps given on the ESRI website. However, the Edit tool on the editor toolbar is not selectable so have used Editor > Start Editing and selecting the line feature instead. At no time is Construct Points selectable on the Editor drop-down menu even after trying various thing. What am I doing wrong?!


Qgis on MacOS. Color picker does not show?

Style palette in my Qgis does not work. When choose Properties, Style on a Shape layer and click Change color only an empty dialog of 1 X 1 cm shows up. What do I do wrong? Mac OS 10.6.8, Qgis 1.8


How to calculate the shortest distance for multiple source and targets using PgRouting?

I have a table with points and a road network which includes driveways (where you enter the highway). I want to find the point which is closest to a driveway. So I was thinking I can calculate the distance from all the points to all the driveways (maybe within a specific boundary). And from there I can find which point is closest to a driveway. I have joined the points with the network, so I know which ‘source’ I can use from the network. I also know the ‘targets’. And I can calculate the distance from one point (source-network) to one target using the source and target columns in the network. Using the following query:                   with subset as (     SELECT seq, id1 AS node, id2 AS edge, cost       FROM pgr_dijkstra(         'SELECT gid as id, source, target, st_length(geom) as cost FROM roadnetwork,         473384, 440012, FALSE, False       ) as di     )     select sum(cost)::decimal (8,2) from subset      But how can I calculate multiple sources to multiple target? So in the query above I want the numbers 473384 and 440012 to be ‘flexible’. Or is there any other way to calculate this? Hope someone can help me with this problem


Stop a Cursor loop when only 1 item is selected with Python

I am trying to create a Cursor that goes through a selection process and stops looping when only one feature is selected. Basically, as the Cursor loops it subsets a selection, and instead of going through every row of the table I'd like to save time and stop the Cursor when one item is selected. So it would look something like this:               for row in rows:         ... (selecting process) ...         if [number of features selected] = 1:             [stop cursor]         else:             rows.updateRow(row)     del row, rows      Any advice? I can't seem to even find any way to stop a cursor other than deleting it but I don't think I could do that type of command from within the cursor itself.


Automating script to set geodatabase?

I got some good help here yesterday. I'm basically trying to set up my script in such a way that once the user just puts in the workspace in the script tool in ArcGIS the script will do the rest. I have been able to create a geodatabase and now I'm trying to run the following code and I'm having trouble. I basically need to be able to change or reset the workspace halfway through to tell it to use the newly created GDB. This is the next piece of code that I'm trying to run:               # Create Raster Dataset     out_path = "Prog.gdb"     out_name = "R_Dataset"     # Run the Create Raster Dataset Script     arcpy.CreateRasterDataset_management (out_path, out_name, "", "8_BIT_UNSIGNED", "", "1", "", "PYRAMIDS -1 NEAREST DEFAULT 75 NO_SKIP", "128 128", "LZ77", "")     # Mosaic Rasters into a the Raster Dataset     inputs = arcpy.ListRasters("", "TIF")     # Set the target to the Raster Dataset that was already created     target = "R_Dataset"     # Run the Mosaic tool     arcpy.Mosaic_management (inputs, target, "LAST", "FIRST", "", "", "NONE", "0", "NONE")      The out_path is basically referencing the GDB that was just created in the workspace folder. It's telling me that this isn't a valid input etc. I was then trying to get it to sort through to Tiffs and automatically mosaic these into the newly created raster dataset. Any and all help greatly appreciated. Thanks **Edit:** @Aaron Below is the entire script that I want to use, basically if I can get the user to get the workspace as a parameter the script will then do everything else. Where I'm falling short is that basically the initial (and hopefully only) workspace they define is a folder. I then want the Mosaic to New Raster to select the 4 tiffs in the original workspace folder to create a new raster in the gdb I have already created. I think then if I could then somehow change the workspace to the gdb (as in the workspace they select + the name of the gdb I have created) it would work as everything from then on in the script happens in the gdb if that makes sense?                   # Create file Geodatabase     # Import ArcGIS modules     import arcpy, os     # Check out the ArcGIS Spatial Analyst Extension     arcpy.CheckOutExtension("spatial")     # Need to be able to OverWrite Outputs     arcpy.env.overwriteOutput = True     #Set the workspace     arcpy.env.workspace = out_folder_path = arcpy.GetParameterAsText(0)     # Set up variables)     out_name = "Prog.gdb"     # Execute CreateFileGDB     arcpy.CreateFileGDB_management(out_folder_path, out_name)     # Set local variables before importing shapefiles to Geodatabase     inFeatures =  arcpy.ListFeatureClasses()     outLocation = "Prog.gdb"     # Execute shapefile to Geodatabase     arcpy.FeatureClassToGeodatabase_conversion(inFeatures, outLocation)     # Remove _shp if it is present in feature class name     arcpy.env.workspace = os.path.join(out_folder_path, outLocation)     newFC = arcpy.ListFeatureClasses()     [arcpy.Rename_management(fc, fc.replace("_shp", "")) for fc in newFC if "_shp" in fc]     #Mosaic rasters to a new raster dataset     inputs = arcpy.ListRasters()     arcpy.env.workspace = Location = os.path.join(arcpy.env.workspace)     #Set Name     mosaic_name = "All_Mosaic.tif"     #Run the Mosaic Tool     arcpy.MosaicToNewRaster_management(inputs, Location, mosaic_name, "", "", "", 1, "", "")     #Inputs for the extract by mask tool     in_raster = "All_Mosaic.tif"     in_mask_data = "Study_area_extent"     #Extract by Mask     outExtractByMask = arcpy.sa.ExtractByMask (in_raster, in_mask_data)     # Save the output     outExtractByMask.save("T_Mask")     # Buffer the Thames feature class to create the Flood Risk Area     in_features = "Thames"     out_feature_class = "Flood_R_A"     # Run the Buffer Tool     arcpy.Buffer_analysis (in_features, out_feature_class, "300 Meters", "FULL", "ROUND", "ALL", "")     #Clip the Flood Risk Area to the Study Area Extent     # Set local variables     in_features = "Flood_R_A"     clip_features = "Study_area_extent"     out_feature_class = "Clipped_Flood_R_A"     xy_tolerance = ""     # Execute Clip     arcpy.Clip_analysis(in_features, clip_features, out_feature_class, xy_tolerance)     #Super Output Areas: Add field (this field will be used to calculate the population density of the each of the SOAs     inFeatures= "Super_Output_Areas"     arcpy.AddField_management(inFeatures, "Pop_Density", "DOUBLE", "", "", "", "", "NULLABLE", "NON_REQUIRED", "")     #Calculate field     #Set variables     inFeatures = "Super_Output_Areas"     fieldName1 = "Pop_Density"     arcpy.CalculateField_management(inFeatures, fieldName1, "!LSOA_POP! / !AreaSQKM!", "PYTHON", "")     # The Flood Risk Area and the SOA are going to be intersected in order try and find the population at risk     in_Features = (["Super_Output_Areas", "Clipped_Flood_R_A"])     intersectOutput = "Intersect"     arcpy.Intersect_analysis(in_Features, intersectOutput, "ALL", "", "INPUT")     #Add field. This will add a field to the Intersect file (intersection of SOAs and Flood Risk Area). This field will be used to calculate the population at risk.     inFeatures= "Intersect"     arcpy.AddField_management(inFeatures, "Pop_Risk", "DOUBLE", "", "", "", "", "NULLABLE", "NON_REQUIRED", "")     # Local variables:     Intersect = "Intersect"     # Process: Calculate Field     arcpy.CalculateField_management(Intersect, "Pop_Risk", "!Shape_Area! * !Pop_Density!", "PYTHON", "")     #Summary Statistics for the Total Population Effected     in_table = "Intersect"     out_table = "Pop_Risk_Sum"     stats = "SUM"     casefield = "Pop_Risk"     arcpy.Statistics_analysis(in_table, out_table, "Pop_Risk SUM", "")     # Process: Make Feature Layer     in_features = "Points_of_interest"     out_layer = "POIs_Layer"     arcpy.MakeFeatureLayer_management(in_features, out_layer, "", "", "OBJECTID OBJECTID VISIBLE NONE;Shape Shape VISIBLE NONE;CATEGORY CATEGORY VISIBLE NONE;NAME NAME VISIBLE NONE")     # Process: Select Layer By Location     in_layer = "POIs_Layer"     select_features = "Clipped_Flood_R_A"     arcpy.SelectLayerByLocation_management(in_layer, "INTERSECT", select_features, "", "NEW_SELECTION")     # Process: Copy Features     in_features = "POIs_Layer"     out_feature_class = "Copy_POI_LAYER"     arcpy.CopyFeatures_management(in_features, out_feature_class, "", "0", "0", "0")     # Process: Summary Statistics (2)     in_table = "Copy_POI_LAYER"     out_table = "POI_SUMMARY"     arcpy.Statistics_analysis(in_table, out_table, "CATEGORY COUNT", "CATEGORY")


Cross sections of two surfaces in Civil 3D

In Civil 3D I have calculated the volume between two surfaces. I would like to have corresponding cross sections of the first and second surface for all the study area. "Create superimposed profile" cannot solve the problem completely since it creates only profiles along one alignment and doesn't cover entire study area. I have did it in Land but I could not find the tools in Civil 3D. Any suggestion.


connect signal to function with arguments

Hello I have this function on python that take 2 arguments:                    def niveau(controName,idNiveau):                   ........      I want to connect it to this signal: `QObject.connect(dialog.findChild(QDialogButtonBox, 'buttonBox'), SIGNAL('accepted()'),niveau(control,1))` But I got this error: `Qt signal is not callable`. Does someone could help me please!


OD Cost Matrix Settings (Arcpy)

I have what is hopefully a fairly simple question. I am trying to run an OD cost matrix for every minute of a day for research I am performing. All of the settings will be the same for each run, except the time will change. I will be automating the process in Python. I know how to create a cost matrix with the settings, add the locations, and solve it all using Arcpy. However, I am hoping to be able to just change the time setting for each run without having to create a whole new cost matrix and add the locations again (similar to what you can do manually in ArcMap). I have not been able to find a way to do this in Python (if there even is a way). Any help would be appreciated. Thanks.


Adding an AddIns.Button to an Add-In Menu

I know the title sounds unwieldy but as I am beginning convert an existing COM interface to Add-Ins, I am having trouble adding a button to a root menu. I have an AddIn.Button that is used both as a button (in Add-In Controls) and an item in a rootmenu. The button works but when I add the namespace.classname to the .esriaddinx (as a Button refID="...", I get the modifier "static' and "internal" errors from the config.designer.cs. How do I reference this addin.button in the rootmenu so it can build the designer correctly?


How to speed up query through view in postgis?

I want to set up a postgis database that have some base tables, then the users interact with them through views (which restrict their viewable and acessible regions). The server runs PostgreSQL 9.2 on Ubuntu 12.04 and has been configured as recommended here. Result of `SELECT PostGIS_full_version();`               "POSTGIS="2.0.1 r9979" GEOS="3.3.3-CAPI-1.7.4" PROJ="Rel. 4.8.0, 6 March 2012" LIBXML="2.8.0""      I tested the above model with a road layer (polyline) with 6040 rows but the time it takes to select all rows through view is 13 seconds v.s. 2.2 seconds for selecting all rows on original table (nearly 6 times as much - this makes working with multiple postgis layer in Qgis at the same time terribly slow, except when zoomed in to a small region). My create view sql:               CREATE VIEW user_1_road AS     SELECT pk_id, geom, name, type, importance, notes, label_x, label_y, label_angle     FROM road     WHERE st_contains(( SELECT geom FROM regions where user_id = '1'), road.geom);      Is there anyway to improve execution speed?


GetLegendGraphic with bbox or filter

I have geoserver layer with sld style applied. The sld have like 50 rules using type attribute of the feature. Now i need to generate legend but only for specific area (i have bbox coordinates). I am doing this on server side and i can get all the features and their attributes of the choosen area (but i don't have access to style graphics ). The only way i can think of implementing this is to generate sld style (rules) dynamically and pass it to geoserver as SLD_BODY. It seems a lot of work so I wonder maybe there is a better way of doing this? Or maybe it is possible to pass some kind of parameter array to getLegendGraphic request like array of features ids or their type?


install opengeo on Arch Linux

I am trying to install the opengeo suite (community) for a project I have. The thing is that my Linux distribution is Arch Linux, for which the package manager is pacman and not apt-get as it is the case in Ubuntu. Is it possible to install it on Arch Linux? The installation manual says that it provides packages for both debian and red hat, but is possible to build a package from sources somewhere? I know they have a git repository, however, I cannot see how to build a package from it (my knowledge of writing PKGBUILDs is slim at best...) Thank you


Problem with save strategy

Below is my code which i am using for modifying features and drawing new features.               saveStrategy = new OpenLayers.Strategy.Save();     saveStrategy.events.register('success', null, ChangesSuccess);     saveStrategy.events.register('fail', null, ChangesFailed);          wfs = new OpenLayers.Layer.Vector("Edit Vagmitt Polyline", {              styleMap: StyleMap,         eventListeners: {             "featuresadded": ZoomToData         },         strategies: [new OpenLayers.Strategy.Fixed(), saveStrategy],         protocol: new OpenLayers.Protocol.WFS({             url: GEOSERVER_WFS,             featureType: "new_Vagmitt_polyline",             featureNS: "http://www.openplans.org/workspace",             geometryName: "the_geom",             srsName: "EPSG:900913",             version: "1.1.0",             extractAttributes: true,             isBaseLayer: false,             visibility: true         })          });      new OpenLayers.Control.DrawFeature(wfs, OpenLayers.Handler.Path, {displayClass: 'lineButton', title: 'Draw new line feature', handlerOptions: {style: sty}}); new OpenLayers.Control.ModifyFeature(wfs, {title: 'Edit line feature'}); The code works fine for modifyFeature control, but its gives error on save strategy when i draw a new feature. The changes are also saved back to Geoserver when i modify the feature (triggers ChangesSuccess). but in case of DrawFeature control, saveStrategy triggers ChangesFailed function. I could not understand, why ModifyFeature works but DrawFeature does't work. Can anybody explain, where is the problem ?


WMSgetFeatureInfo ProxyHost

Does WMSGetFeatureInfo need a proxyhost to allow remote server accessing the data? I use ProxyHost to allow WFS requests, but seems its not working with WMSGetFeatureInfo. the local machines retrieves data from GeoServer successfully but external machines doesn't! Here is the select feature code:                   control = new OpenLayers.Control.WMSGetFeatureInfo({             layers: [layer],             autoActivate: true,             maxFeatures: 3,             hover: false,             infoFormat: "application/vnd.ogc.gml",             eventListeners: {                 "getfeatureinfo": function (e) {                          var activeLayer = getActiveLayer();                     if (activeLayer != "") {                         var param = {                             REQUEST: "GetFeatureInfo",                             EXCEPTIONS: " application/vnd.ogc.se_xml",                             BBOX: map.getExtent().toBBOX(),                             SERVICE: "WMS",                             VERSION: "1.1.1",                             X: e.xy.x,                             Y: e.xy.y,                             INFO_FORMAT: 'application/vnd.ogc.gml/3.1.1',                             QUERY_LAYERS: activeLayer.params.LAYERS,                             Layers: activeLayer.params.LAYERS,                             FEATURE_COUNT: 6,                             SRS: 'EPSG:3857',                             STYLES: activeLayer.params.STYLES,                             WIDTH: map.size.w,                             HEIGHT: map.size.h                         };                              param.cql_filter = activeLayer.params.CQL_FILTER;                         //     if (activeLayer.params.LAYERS == 'AIS:favoriteVessels');                     //    param.Viewparams = 'UID:' + userid;                                   OpenLayers.loadURL(GeoServerWMS, param, this, setHTML, setHTML);                         OpenLayers.Event.stop(e);                     }                 }             }         });          map.addControl(control);     control.activate();      and the GeoServerWMS is specified by:               <php     if ($_SERVER['SERVER_NAME'] == 'MYPUBLICIP')       GeoServerWMS = 'http://MYPUBLICIP:8080/geoserver/wms'     else       GeoServerWMS = 'http://privateIP:8080/geoserver/wms'      here is my allowedHosts               allowedHosts = ['localhost', 'localhost:8080','localhost:80', 'localhost:8080/geoserver',                     'PrivateIP','PrivateIP:8080', 'PrivateIP:8080/geoserver',                     'PublicIP','PublicIP:8080', 'PublicIP:8080/geoserver',                      'www.openlayers.org', 'openlayers.org',                    ]      **EDIT** Even this event register is not working:               selectControl = new OpenLayers.Control.GetFeature({         id: 'selectControl',         protocol: OpenLayers.Protocol.WFS.fromWMSLayer(test, {         url: GeoServerWMS,             featureType: "layer"         }),         hover: false,         click: true     });      Here is the error I get: Some unexpected error occurred. Error text was > urlopen error [Errno 110] Connection timed out


Adding data at runtime into dataframes

I am trying to create an empty MXD to act as a template. I will have three dataframes for maps, each holding a different object from ArcSDE (1 raster object and 2 features). I know how to query all of the data frames, but I am having trouble finding out how to add actually data to the dataframes. Is there an online guide anywhere? Thanks for any help.


Map.MouseLeftButtonEvent not fired with EditGeometry in Silverlight

We have a Silverlight viewer using the ArcGIS 3.1 API. With the EditGeometry object, you're able to edit the objects in the map. You can ask the geometry after every action (moved, turned...), but I need the geometry at every moment while dragging the geometry. Therefore, I need to know when the dragging started. Normally, you do this by checking if a MouseLeftButtonUp event is fired after a MouseLeftButtonDown event. If not, you're grabbing the object. The problem is that the Map.MouseLeftButtonDown or FeatureLayer.MouseLeftButtonDown event is not fired anymore after your object is focused. You find a sample here: https://dl.dropboxusercontent.com/u/110352157/TestEditGeometry.zip, to reproduce my problem, you can use these steps: 1) Click on a ship. In the output window of VS, you see the Featurelayer.Buttondown, the Map.Buttondown, the Map.MouseButtonUp and the EditGeometry.Action.EditStarted are fired. The object is now focused and read to be dragged. 2) If you click again, you ONLY get LeftButtonUp event and EditCanceled action. So NO buttondown. 3) Click again on a ship to start editing, this gives the same as 1. 4) Click outside the focused object, you get the Map.ButtonDown and Map.ButtonUp 5) Hold your mouse left button down within the focused object. You see that there is NO Map.LeftButtonDown fired, nor a FeatureLayer.ButtonDown. 6) Drag the object and release: You get the MousLeftButtonUp and the GeometryMoved action. What I thus need I in step 5, a certain LeftButtonDown event. One of my thoughts was that from the moment you start editing, the object is transferred to a new object. And maybe I need NewObject.MouseLeftButton down. But I’ve no idea on how to find that object. Anyone an idea or trick to solve this? Thanks!


Show markers only at certain zoom levels

I'm building a cycle touring map in leaflet.js, with subjective information overlaid as markers, along the lines of "this is a great road", "this town is quite nice" etc. To avoid information overload, I want to only show the most prominent markers at a given zoom level (eg, show awesome roads highlighted at zoom 9, good roads at 11, and all road information, including negative comments, at 13+) I have two questions here:   1. Is there a recognised idiom or design pattern for this kind of thing? I'm quite happy to manually decide the prominence of each marker, so I don't need any kind of clustering algorithm. There'll be maybe a couple of hundred for the whole state, so it's manageable.   2. How can I implement this in Leaflet? My obvious thought is to attach a handler to map.zoomend() and simply show or hide the relevant markers. Is there a better way?


How to draw line by scratching on map using OpenLayers?

Is it possible to draw line by scratching on the map using OpenLayers? I tried some examples, all the examples are drawing by clicking. I want to draw by scratching, just like drawing in normal life on the paper. Is it possible to implement by OpenLayers? Thanks, in advance.


Rasterise heights from a 3D linestring

I have a 3D network of streams represented using linestrings with Z-coordinates. I would like to rasterise this feature, where the raster values represent the linearly interpolated Z-values between 3D coordinates from the linestring verticies. I have all open source and Esri tools available, but I don't see any simple solution. Did I miss an available tool to do this conversion, or do I need to make one myself? (I have a few ideas floating around my head, but it would probably take the better part of an afternoon to code out.)


count features in polygon shapefile A that fall within each feature of polygon shapefile B

I have two polygon shapefiles, each of which contain multiple (possibly overlapping) polygons. Is there some way, using GRASS, to calculate the number of polygons belonging to shapefile A that fall within each of the polygons that exist in shapefile B? Preferable would be a method that doesn't require rasterization, but I'm open to going down that route if necessary. (I'm aware that this can be done in R, using the `over()` function, but these are large files I'm referring to, and so I'd prefer to do it in GRASS.)


QGis problem with raster transparent

I am new to QGIS. I found the problem impossible to solve the parts of raster data that are in TIFF format should be made transparent. What do I do?


OpenLayers Google Closure externs file

Has someone written Google Closure Externs file for OpenLayers that I can use freely ? Externs file similar to those for jQuery, GoogleMaps, Underscore  ? Have to ask this before I create my own if none is available.


How to create complex map symbology using AutoCad Map object classes?

I'm trying to find the best way to transfer maps form ArcGIS to AutoCad Map. In ArcGIS map model is separated from it's representation. View is created by applying symbology and representation rules to underlying model. As far as I know this approach could be achieved in AutoCad Map using object definition classes. So I looking for a way to create complex topographic map symbology(like in ArcGIS) using AutoCad Map object classes. Official AutoDesk help describes this very poor. Is it really possible? Could someone provide links to some articles, how-tows about this issue?


Mapnik Server - Hardware recommendations

I'm looking for some suggestions for a Mapnik-TileCache server. How much hardware is really necessary? The dataset I use is about 380mb in osm raw format. My actual database is a bit more than 1GB. What would you suggest?   * QuadCore   * 8GB Ram   * SSD Harddrive for DB   * Bunch of disks for Cache What do you suggest? The server will have frequent trafic and let's say 300 - 500 people will work on that mapset. Thanks and Cheers! Martin


GeoJSON Styling information

As far as I can see there is nothing in the GeoJSON standard to store styling information, i.e. line colours, thicknesses etc. Am I missing something or is this just something that GeoJSON doesn't deal with?


Get all the points of a polyline

I have some polyline feature objects in python. Now I want to get all the points of polylines. For example, if a polyline has start point `[0,0]` end point `[5,5]`. Result: `[1,1];[2,2];[3,3];[4,4];[5,5]`. I want to find all the integer points on that line including end points. For straight line this is dead simple, but if polyline has Beizer Curve, Circular Arc, Elliptic Arc geometry types, then how can I do it? **EDIT:** I can only use those tools which are available in all versions of ArcGIS foe example ArcView


OpenLayers (allOverlays): Vector layer not rendered without raster layer beneath it

This is another newbie question. I'm trying to create a map using OpenLayers that comprises only of vector layers from a WFS server. However, I'm thwarted because my vector layer won't render unless it has a raster layer beneath it. I surmise this is because OpenLayers is deriving some setting(s) (resolution? minExtent?) from the raster layer that it's unable to do from the vector one, but I'm just guessing and I don't know what those settings are. The code below works beautifully, displaying both layers. If I remove the line to add the raster layer to the map, or add it after I've added the vector layer, the map displays nothing (calling oMap.zoomToMaxExtent() still shows nothing). What am I missing?               function initMap() {         var oRasterLayer,             oVectorLayer,             oBounds,             oSpatialProj,             oSphericalMercatorProj;              // Use MapBox dark theme for UI controls         OpenLayers.ImgPath = "http://js.mapbox.com/theme/dark/";              oSpatialProj           = new OpenLayers.Projection("EPSG:4326");         oSphericalMercatorProj = new OpenLayers.Projection("EPSG:3857");              oBounds = new OpenLayers.Bounds(-11, 49.6, 4, 62.6).transform(             oSpatialProj,             oSphericalMercatorProj         );              oMap = new OpenLayers.Map(             sMapDivId,             {                 numZoomLevels    : 10,                 maxExtent        : oBounds,                 restrictedExtent : oBounds,                 allOverlays      : true             }         );         oMap.addControl(new OpenLayers.Control.LayerSwitcher());              oRasterLayer = new OpenLayers.Layer.XYZ(             'Land',             sTilesUrl.replace(/\${layer}/, 'land'),             {                 projection        : oSphericalMercatorProj,                 wrapDateLine      : true,                 sphericalMercator : true             }         );              /* Add a postcode area selection layer. This is a vector layer, working         directly with data from PostGIS. */         oVectorLayer = new OpenLayers.Layer.Vector(             'Selection',             {                 projection        : oSphericalMercatorProj,                 wrapDateLine      : true,                 sphericalMercator : true,                 strategies        : [new OpenLayers.Strategy.BBOX()],                 protocol          : new OpenLayers.Protocol.WFS({                     url          : '/wfs',                     featureType  : 'areas',                     featureNS    : "http://gis.mediatel.co.uk",                     geometryName : 'wkb_geometry',                     srsName      : 'EPSG:3857'                 })             }         );              // SWAP THESE TWO LINES, OR COMMENT-OUT THE RASTER ONE, TO BREAK THE MAP:         oMap.addLayer(oRasterLayer);         oMap.addLayer(oVectorLayer);              oSelectControl = new OpenLayers.Control.SelectFeature(             oVectorLayer,             {                 clickout    : true,                 toggle      : true,                 multiple    : true,                 hover       : false,                 toggleKey   : 'ctrlKey',                 multipleKey : 'shiftKey',                 box         : false             }         );         oMap.addControl(oSelectControl);              oMap.setCenter( // Near London             new OpenLayers.LonLat(0, 51.5).transform(                 oSpatialProj,                 oSphericalMercatorProj             ),             9         );     }


mapserver how to get rid of unknown character from label

I am developing a gis system using mapserver and open scales library. GIS data is taken from a shape file. When i try to show the name attached to a place its showing unknown characters (not in english) along with its name in english. here is my .map file settings                LAYER        NAME city        TYPE POINT        STATUS ON              LABELITEM 'NAME'                 MAXSCALE 7500000       DATA "ndia_location.shp"              CLASS        EXPRESSION ( '[PLACE]'=='city' )              LABEL                            COLOR 0 0 0                 TYPE BITMAP                 SIZE SMALL                           POSITION CC             #MINFEATURESIZE 100             ENCODING UTF-8                 PARTIALS FALSE             BUFFER 0             END           END      Is there a way to show only English name for the label. I have tried with openlayers javascript library also.


Listen to edit events

I recently started working on ArcMap. I want to make some changes to the edit tools. For example I want to prevent the user from using the sketch tool when the time is between 1pm and 2pm But I don't know where to start. If anyone has a simple example I would appreciate it.


How to do Kernel density analysis in QGIS 1.7?

Do someone have some suggestion? We would like to tray Kernel Density analysis as we did with ArcGis using QGIS?


Standalone QGIS application - handling QgsVectorLayer load errors

I am creating an application with QGIS libraries, and in the event that the app can't add a specified layer (e.g. no connection to host, no password specified etc), it causes the app to crash, although I do get some output in the console, like QGIS displays in a message box:               credentials for dbname='testdb' host=testserver port=5432     message: fe_sendauth: no password supplied      This seems to be returned at the point where I create my `QgsVectorLayer` instance because the app becomes unresponsive and doesn't progress further. My script to load the layer:               def add_postgis_vector_layer(self, username, password, layer_name, label, geometry, id):         uri = core.QgsDataSourceURI()         uri.setConnection(HOST, PORT, DATABASE, username, password)         uri.setDataSource(SCHEMA, layer_name, geometry, '', id)         layer = core.QgsVectorLayer(uri.uri(), label, 'postgres', False)  # Error message occurs at this point         if layer.isValid():             self.canvas.setExtent(layer.extent())             self.canvas.zoomScale(self.canvas.scale() * 1.1)             self.canvas.setWheelAction(2)             # Set canvas map layers             layers = [gui.QgsMapCanvasLayer(layer)]             self.canvas.setLayerSet(layers)      The QApplication subclass:               class myApplication(QtGui.QApplication):         def __init__(self, args):             super(myApplication, self).__init__(args)             core.QgsApplication.setPrefixPath(qgis_prefix, True)             core.QgsApplication.initQgis()      How do I access this connection error? I can't call `layer.error()` (not sure if this would even work) because the app has crashed already and won't process any more code. Edit: I'm thinking I could avoid the error by performing a query using `psycopg2` with the parameters I am about to use. Still doesn't address the issue of retrieving any errors in the connection.


Configuring Mapproxy + Mapnik for using Getfeatureinfo

This is probably a duplicate of this question: How to configure mapproxy and mapnik for getfeatureinfo requests, however, that one is old and still unanswered. I'm trying to configure a Mapproxy using Mapnik and I need to make getfeatureinfo requests available. My configuration files are like this (parts that I believe are relevant): mapproxy.yaml:               services:       demo:       kml:       tms:       wmts:       wms:         srs: ['EPSG:4326', 'EPSG:900913']         image_formats: ['image/jpeg', 'image/png']          layers:       - name: poi         title: Pleno POIs         sources: ['poi_wms']       - name: vias         title: Pleno Vias         sources: ['vias_wms']          sources:       poi_wms:         type: mapnik         mapfile: mapnik/Mapnik.xml         transparent: true         layers: ['poi']       vias_wms:         type: mapnik         mapfile: mapnik/Mapnik.xml         transparent: true         layers: ['vias']      And my mapnik xml looks like this:               <Map ...>        <Style>...</Style>             <Layer name="vias"                srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over"                queryable="true">             <StyleName>vias</StyleName>             <Datasource>                 (...)             </Datasource>         </Layer>              <Layer name="poi"                srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over"                queryable="true">             <StyleName>poi</StyleName>             <Datasource>                 (...)             </Datasource>         </Layer>     </Map>      When I try to do a getfeatureinfo request, I get `"layer vias is not queryable"`. I've tried adding the `queryable="true"`, as one answer in old question I've linked suggested and had no success. Also, I had one layer on mapproxy using the 2 layers on mapnik, I changed to two to see if it would matter, still nothing. I'm using Mapproxy 1.5 and on its documentation (http://mapproxy.org/docs/1.5.0/sources.html) it says how to make a wms source queryable (add `wms_opts: featureinfo: true`). The problem is that it only works if you have `type: wms`. When you have `type: mapnik`, it says that the keys wms_opts or featureinfo are unknow and it doesn't work. I've tried several other stuff (like adding a key `mapnik_opts` with `featureinfo: true`) and couldn't get it to work, nor find any information about this on the web. Does anyone know how to solve this problem? (Or at least have some kind of workaround for it?) It seems like either mapproxy doesn't support getfeatureinfo requests when you're using mapnik or the information about how to do it is well hidden. :(


CartoDB: Can't find where to change Google Drive log in credentials

I'm trying to create a new table in CartoDB.   1. I click New Table   2. I click the Google Drive data tab   3. I click the connect with gdrive button   4. At this point it seems to be automatically logging in to the wrong Google Drive account. Is there a way to reset that so I can get into the right account? I'm trying to marry up my table with a Google spreadsheet. Thanks!


Comparing/Correlating NDVI Rasters with other index Raster

So, I've created two rasters. One for NDVI and one for another index for surface water from the same orthorectified World-View 2 image. I can visually see how the indexes are inversely proportional. Areas of higher readings in one raster correlate with areas of low readings in the other index and vis- versa. I'm doing the processing through ArcGIS 10.2. How would I show this to be the case in a quantifiable way?


Error when publishing Geoprocessing tool to ArcGIS Server

I've designed a model which compares some shapefiles to other shapefiles (I want to see if the files I get are the same as the files of my template). When I try to publish the toolbox (where the model is found) on the server I get this message " _Configuration can not be started. Server Object instance creation failed on machine....Geoprocessing service initialization failed. Invalid parameter: Tool..._ " SOC has full access to the folder where my toolbox is so this can't be it. Is it because I'm working with shapefiles? Or why would the parameters be invalid? I am using ArcGIS Server 10.0; ArcDesktop Editor 10.0. ![enter image description here](http://i.stack.imgur.com/mCp3B.png) Thank you


Why is there a shift between OpenLayers and vector layer in print?

Sorry for my poor english. I'm a very recent user of QGIS (QGIS 1.8; ubuntu 12.04). Does anybody knows why the `.tif` or `.jpeg` or `.pdf` files I generate with the QGIS composer have different layers completely shifted? For example, 2 layers: 1 open street map landscape and 1 layer of my GPS points. In the composer window, the points are exactly at the right place, the map is nice and ready to be saved or printed... But when I do `export to pdf` or `.jpeg` or `.tif` the picture that I obtain shows the map very small in a corner and the GPS point in the middle of a white picture. When I try to print, a white sheet of paper is produced. Any ideas? thank you very much


Is it possible to edit a layer in QGIS while there is an active query?

I am new to Quantum and I am digitizing polygon layers using the editing features. I would like to apply simple queries ('date > 2012/08/01'), however while the query is active I cannot edit the layer. Is this possible?


How to speed up Postgis raster layer display in QGIS?

i've been importing some digital orthophoto geotif files into postgis 2.0.1 via raster2pgsql tool (i also made 3 levels of an overview table - pyramid). Then i tried to import the layer into qgis via the postgis load raster plugin. It works, but the speed seems so slow its unusable at the moment. I found a post somewhere about this being a GDAL issue, but i couldnt find if a solution has been found yet. Did anyone get across this? Thanks


how to call click event on marker(may be a simple fill symbol elementt or picture symbol element) element using java arc objects

Hii I am new in GIS and java arcobjects. I have to call a click event on simple marker element   on mapbean using java arc objects but i dont know how to do it. in my application I put approx 200 markers in mapbean now i have to select few of them approx 6 marker which is selected by user but i dont know how to select this particular marker I think if i am able to call click event on marker. then I would select it . putiing a marker on mapbean code is there.               public static void  drawBlackPoint(IPoint fpoint, double hieght,double prev_hieght) {         try {                       ////for Starting point             ISimpleMarkerSymbol markerSymbol2 = new SimpleMarkerSymbol();             markerSymbol2.setStyle(esriSimpleMarkerStyle.esriSMSCircle);                       IRgbColor rgbColor2 = new RgbColor();             if (hieght!=prev_hieght) {                 count1++;             }             if(count1==1){                 rgbColor2.setRed(34);                 rgbColor2.setBlue(139);                 rgbColor2.setGreen(24);             }else if(count1==2){                 rgbColor2.setRed(0);                 rgbColor2.setBlue(0);                 rgbColor2.setGreen(205);             }else if(count1==3){                 rgbColor2.setRed(112);                 rgbColor2.setBlue(219);                 rgbColor2.setGreen(147);             }else if(count1==4){                 rgbColor2.setRed(255);                 rgbColor2.setBlue(255);                 rgbColor2.setGreen(0);             }else if(count1==5){                 rgbColor2.setRed(127);                 rgbColor2.setBlue(0);                 rgbColor2.setGreen(255);             }else if(count1==6){                 rgbColor2.setRed(138);                 rgbColor2.setBlue(69);                 rgbColor2.setGreen(19);             }else if(count1==7){                 rgbColor2.setRed(139);                 rgbColor2.setBlue(131);                 rgbColor2.setGreen(120);             }else{                 rgbColor2.setRed(255);                 rgbColor2.setBlue(255);                 rgbColor2.setGreen(255);             }             markerSymbol2.setColor(rgbColor2);             markerSymbol2.setSize(5.0);             IMarkerElement markerElementOne2 =  new MarkerElement();             markerElementOne2.setSymbol(markerSymbol2);          IElement elementOne2 = (IElement) markerElementOne2;             IElementProperties elementPropertiesTwo = (IElementProperties) elementOne2;             elementPropertiesTwo.setName("FP");             elementOne2.setGeometry(fpoint);                            ILayer layer;             int count = BasicViewer.getMapBean().getLayerCount();                            if (hieght!=prev_hieght) {                      ICompositeGraphicsLayer cgl=new CompositeGraphicsLayer();                 IGraphicsContainer gl=(IGraphicsContainer)cgl;                 gl.addElement(elementOne2, 0);                 layer = (ILayer) gl;                 layer.setName("hieght_"+hieght);                     BasicViewer.getMapBean().addLayer(layer, 0);                 BasicViewer.getMapBean().getActiveView().partialRefresh(esriViewDrawPhase.esriViewGeography,layer, null);                  }else{                           for (int i = 0; i < count; i++) {                     if(BasicViewer.getMapBean().getLayer(i).getName().equals("hieght_"+hieght))                     {                         System.out.println("--Layer Name- if-"+BasicViewer.getMapBean().getLayer(i).getName());                         layer=BasicViewer.getMapBean().getMap().getLayer(i);                              IGraphicsContainer gl=(IGraphicsContainer)layer;                              gl.addElement(elementOne2, 0);                          }                 }                  }              } catch (Exception e) {             System.out.println("Exception In drawPoint :: " + e.toString());             e.printStackTrace();         }     }      please suggest the solution.