title: Displaying a KML File on a Vector Layer in OpenLayers

text:
This should be straight-forward, but I am beating my head over it. KML will not display. I have tried from same server and remote server to ensure it is not a cross-domain issue. The KML file loads into Google Earth okay. However, `kmlcsv Convertor` generates an error saying it cannot read the kml. I suspect the KML has something"advanced" in it, any KML gurus there can look and tell me whether it is the KML or my code? OpenLayers Code               typhoon = new OpenLayers.Layer.Vector("typhoon",      {     strategies: [new OpenLayers.Strategy.Fixed()],     protocol: new OpenLayers.Protocol.HTTP           ({             url: "http://xxx.ph/kmz/storm-track.KML",          // url: "/storm-track.KML",             format: new OpenLayers.Format.KML              ({                extractStyles: true,                 extractAttributes: true,                maxDepth: 10                })             }),                 eventListeners: {             "loadstart": layerLoadStart,             "loadend": layerLoadEnd             },             visibility: false             });          map.addLayers([typhoon]);      KML File                   <kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">       <Document>         <name>storm-track.KML</name>         <Folder>           <name>Actual Position</name>           <Placemark>             <name>Tropical Depression EMONG</name>             <description>
Actual Position

June 16, 2013 02:00 PM

Source: PAGASA
             </description>                          <Point>               <coordinates>128.6,12.2</coordinates>             </Point>           </Placemark>           <Placemark>             <name>Tropical Depression EMONG</name>             <description>
Actual Position

June 16, 2013 08:00 PM

Source: PAGASA
             </description>                          <Point>               <coordinates>128.6,12.8</coordinates>             </Point>           </Placemark>           <Placemark>             <name>Tropical Depression EMONG</name>             <description>
Actual Position

June 17, 2013 02:00 AM

Source: PAGASA
             </description>                          <Point>               <coordinates>127.5,13.5</coordinates>             </Point>           </Placemark>           <Placemark>             <name>Tropical Depression EMONG</name>             <description>
Actual Position

June 17, 2013 08:00 AM

Source: PAGASA
             </description>                          <Point>               <coordinates>127.1,13.7</coordinates>             </Point>           </Placemark>           <Placemark>             <name>Tropical Depression EMONG</name>             <description>
Actual Position

June 17, 2013 02:00 PM

Source: PAGASA
             </description>                          <Point>               <coordinates>126.9,13.8</coordinates>             </Point>           </Placemark>           <Placemark>             <name>Tropical Depression EMONG</name>             <description>
Actual Position

June 17, 2013 08:00 PM

Source: PAGASA
             </description>                          <Point>               <coordinates>126.5,14.5</coordinates>             </Point>           </Placemark>           <Placemark>             <name>Tropical Depression EMONG</name>             <description>
Actual Position

June 17, 2013 02:00 AM

Source: PAGASA
             </description>                          <Point>               <coordinates>126.4,15.5</coordinates>             </Point>           </Placemark>           <Placemark>             <name>Tropical Storm EMONG</name>             <description>
Actual Position

June 18, 2013 08:00 AM

Source: PAGASA
             </description>                          <Point>               <coordinates>126.5,17.0</coordinates>             </Point>           </Placemark>           <Placemark>             <name>Tropical Storm EMONG</name>             <description>
Actual Position

June 18, 2013 02:00 PM

Source: PAGASA
             </description>                          <Point>               <coordinates>126.6,17.9</coordinates>             </Point>           </Placemark>         </Folder>         <Folder>           <name>Forecast Track</name>           <Placemark>             <name>Tropical Storm EMONG</name>             <description>
Forecast Track

June 19, 2013 02:00 PM

Source: PAGASA
             </description>                          <Point>               <coordinates>126.0,22.1</coordinates>             </Point>           </Placemark>           <Placemark>             <name>Tropical Storm EMONG</name>             <description>
Forecast Track

June 20, 2013 02:00 PM

Source: PAGASA
             </description>                          <Point>               <coordinates>128.5,26.4</coordinates>             </Point>           </Placemark>         </Folder>         <Folder>           <name>Forecast Error</name>           <Placemark>                          <LineString>               <coordinates>127.078193099,22.1628395773 127.078193099,22.1628395773 127.072042175,22.2254450582 127.061650156,22.287568964 127.047052537,22.3489653891 127.028301635,22.4093909809 127.005466469,22.4686059153 126.978632571,22.5263748623 126.947901721,22.58246794 126.913391622,22.6366616505 126.875235491,22.6887397955 126.833581591,22.7384943653 126.788592683,22.7857264001 126.740445418,22.8302468168 126.689329656,22.8718771987 126.635447726,22.9104505438 126.57901362,22.9458119691 126.520252127,22.9778193649 126.459397918,23.0063439987 126.396694578,23.0312710637 126.332393582,23.0525001688 126.266753248,23.0699457693 126.200037633,23.0835375341 126.132515417,23.0932206482 126.064458747,23.0989560495 125.996142071,23.1007205965 125.927840957,23.098507169 125.859830907,23.0923246985 125.792386167,23.0821981298 125.725778553,23.0681683131 125.660276277,23.0502918277 125.596142807,23.0286407384 125.533635741,23.0033022854 125.473005717,22.9743785096 125.414495363,22.9419858156 125.358338281,22.9062544742 125.304758088,22.8673280681 125.253967502,22.8253628822 125.206167482,22.7805272429 125.161546433,22.7330008093 125.120279473,22.6829738197 125.082527754,22.6306462974 125.048437867,22.57622722 125.018141301,22.519933655 124.991753978,22.4619898671 124.969375862,22.4026264005 124.951090631,22.3420791403 124.936965428,22.2805883576 124.927050675,22.2183977421 124.921379965,22.1557534261 124.919970016,22.0929030043 124.922820697,22.030094553 124.929915118,21.9675756525 124.941219784,21.9055924173 124.956684816,21.8443885366 124.976244221,21.7842043285 124.999816233,21.7252758134 125.027303704,21.6678338071 125.058594543,21.6121030387 125.093562215,21.5583012948 125.132066279,21.5066385952 125.173952981,21.4573163995 125.219055879,21.4105268501 125.267196517,21.3664520527 125.318185127,21.3252633964 125.371821379,21.2871209158 125.427895148,21.2521726976 125.486187319,21.2205543329 125.546470619,21.1923884162 125.608510464,21.1677840943 125.672065841,21.1468366654 125.736890195,21.129627229 125.802732339,21.1162223889 125.869337376,21.1066740099 125.93644763,21.1010190277 126.003803587,21.0992793142 126.071144839,21.1014615978 126.138211033,21.1075574383 126.204742813,21.1175432586 126.270482771,21.13138043 126.335176383,21.1490154135 126.398572938,21.1703799557 126.460426462,21.1953913386 126.520496622,21.2239526823 126.578549617,21.2559533011 126.634359053,21.2912691098 126.687706788,21.3297630809 126.738383763,21.3712857509 126.786190801,21.4156757726 126.830939376,21.4627605148 126.872452353,21.512356704 126.910564689,21.5642711093 126.945124102,21.6183012661 126.975991693,21.6742362379 127.00304253,21.7318574123 127.026166185,21.7909393298 127.045267226,21.8512505425 127.060265647,21.9125544993 127.071097261,21.9746104543 127.077714023,22.0371743973 127.078193099,22.1628395773</coordinates>             </LineString>           </Placemark>           <Placemark>                          <LineString>               <coordinates>130.268094518,26.4663567297 130.268094518,26.4663567297 130.263946498,26.5326161245 130.256695452,26.5986617625 130.246348768,26.6643773949 130.232919335,26.7296471516 130.216425557,26.7943557469 130.196891364,26.8583886863 130.174346201,26.921632473 130.148825017,26.9839748143 130.120368234,27.0453048268 130.089021717,27.1055132412 130.054836716,27.1644926049 130.017869814,27.2221374832 129.978182849,27.2783446574 129.935842836,27.3330133208 129.890921866,27.386045271 129.843496999,27.4373450985 129.79365015,27.4868203715 129.741467951,27.5343818152 129.687041612,27.5799434871 129.630466763,27.6234229463 129.57184329,27.6647414161 129.511275159,27.7038239421 129.448870223,27.740599541 129.384740024,27.7750013444 129.318999588,27.8069667338 129.251767201,27.8364374673 129.183164182,27.8633597992 129.113314646,27.8876845892 129.04234526,27.9093674043 128.970384988,27.9283686094 128.897564835,27.9446534503 128.824017576,27.9581921249 128.74987749,27.9689598455 128.675280083,27.9769368906 128.600361807,27.9821086455 128.525259781,27.9844656333 128.450111504,27.9840035345 128.375054572,27.9807231959 128.300226391,27.9746306291 128.225763892,27.9657369977 128.151803248,27.9540585943 128.078479594,27.939616806 128.005926745,27.9224380703 127.934276927,27.9025538198 127.863660504,27.880000417 127.794205715,27.8548190792 127.726038419,27.8270557929 127.65928184,27.7967612194 127.59405633,27.7639905909 127.53047913,27.7288035972 127.468664148,27.6912642643 127.40872174,27.6514408248 127.350758506,27.6094055796 127.294877094,27.5652347529 127.241176014,27.51900834 127.189749467,27.4708099479 127.140687177,27.4207266302 127.094074246,27.3688487161 127.049991011,27.3152696336 127.008512916,27.2600857279 126.9697104,27.2033960763 126.93364879,27.1453022973 126.900388211,27.0859083576 126.869983505,27.0253203755 126.842484163,26.9636464213 126.81793427,26.9009963157 126.796372459,26.8374814266 126.777831877,26.7732144642 126.762340162,26.708309275 126.749919432,26.6428806357 126.740586284,26.577044046 126.734351801,26.5109155232 126.731221572,26.4446113951 126.73119572,26.3782480962 126.734268942,26.3119419629 126.740430552,26.2458090322 126.749664537,26.1799648412 126.761949624,26.1145242289 126.777259346,26.0496011409 126.795562126,25.9853084366 126.816821363,25.9217576997 126.840995519,25.8590590515 126.868038229,25.7973209686 126.897898398,25.7366501033 126.93052032,25.6771511095 126.96584379,25.6189264709 127.003804233,25.5620763359 127.044332827,25.5066983551 127.08735664,25.4528875247 127.132798766,25.4007360351 127.180578465,25.3503331236 127.230611313,25.3017649337 127.282809349,25.2551143788 127.337081228,25.2104610125 127.393332377,25.1678809034 127.451465159,25.1274465173 127.511379029,25.089226604 127.572970703,25.0532860913 127.636134326,25.0196859845 127.70076164,24.9884832723 127.766742157,24.9597308398 127.833963332,24.933477387 127.902310741,24.9097673546 127.971668256,24.8886408559 128.041918224,24.8701336163 128.112941648,24.8542769182 128.184618369,24.8410975542 128.256827245,24.8306177859 128.329446336,24.8228553106 128.402353088,24.8178232342 128.475424514,24.8155300517 128.548537384,24.8159796339 128.621568402,24.819171222 128.694394396,24.8250994284 128.766892503,24.833754245 128.838940348,24.8451210585 128.910416234,24.8591806722 128.98119932,24.8759093352 129.051169808,24.8952787785 129.120209122,24.9172562577 129.188200088,24.941804603 129.255027119,24.9688822754 129.320576386,24.9984434304 129.384735999,25.0304379877 129.447396183,25.064811708 129.508449447,25.1015062758 129.567790762,25.1404593895 129.625317721,25.1816048574 129.680930717,25.2248726994 129.734533097,25.2701892563 129.78603133,25.3174773035 129.835335164,25.3666561725 129.882357778,25.4176418763 129.927015941,25.4703472421 129.969230155,25.5246820489 130.008924799,25.5805531701 130.046028273,25.6378647224 130.080473135,25.6965182192 130.112196227,25.7564127284 130.141138805,25.8174450365 130.167246662,25.8795098156 130.190470242,25.9424997958 130.21076475,26.0063059415 130.228090257,26.0708176319 130.242411796,26.1359228444 130.253699458,26.2015083425 130.26192847,26.2674598663 130.267079275,26.3336623264 130.268094518,26.4663567297</coordinates>             </LineString>           </Placemark>         </Folder>         <Folder>           <name>PAR</name>           <Placemark>                          <LineString>               <coordinates>120,25,0 135,25,0 135,5,0 115,5,0 115,15,0 120,21,0 120,25,0</coordinates>             </LineString>           </Placemark>         </Folder>         <Folder>           <name>Actual Track</name>           <Placemark>                          <LineString>               <coordinates xmlns:py="http://codespeak.net/lxml/objectify/pytype" py:pytype="str">128.6,12.2 128.6,12.8 127.5,13.5 127.1,13.7 126.9,13.8 126.5,14.5 126.4,15.5 126.5,17.0 126.6,17.9</coordinates>             </LineString>           </Placemark>         </Folder>         <Folder>           <name>Forecast Track</name>           <Placemark>                          <LineString>               <coordinates xmlns:py="http://codespeak.net/lxml/objectify/pytype" py:pytype="str">126.6,17.9 126.0,22.1 128.5,26.4</coordinates>             </LineString>           </Placemark>         </Folder>       </Document>     </kml>


title: Algorithm to compile Lisiecki stack? (5MM-yr Temperature Record)

text: I have obtained the Lisiecki stack data from www.lorraine- lisiecki.com/stack.html How do I convert the d18O measurement into a figure for average surface temperature? What is the best algorithm? I found this on wikipedia: If the signal can be attributed to temperature change alone, with the effects of salinity and ice volume change ignored, a δ18O increase of 0.22% is equivalent to a 1 °C (1.8 °F) cooling. Any help would be useful. I am also trying to find the dataset for the fabled 65-million-year temperature record.


title: mapserver displays raster image in mirror

text: I've installed Mapserver and used a map file to set a raster layer and vector(shp) layers on top of it. However, although displayed in the expected order, the png file is displayed in mirror(compared to it while being built in OpenEV): ![alt text](http://i.stack.imgur.com/nLZJs.png) ![alt text](http://i.stack.imgur.com/3BGg9.png) any ideas on what is the cause of this and a possible remedy are welcomed. Thanks! from the .map file, the raster layer:                 LAYER         NAME "level_2"         TYPE RASTER         STATUS DEFAULT         DATA "lv2.png"       END      gdalinfo on the .png file               Driver: PNG/Portable Network Graphics     Files: /var/www/mapsdemo/e/data/lv2.png     Size is 1591, 967     Coordinate System is `'     Metadata:       Software=gnome-screenshot     Image Structure Metadata:       INTERLEAVE=PIXEL     Corner Coordinates:     Upper Left  (    0.0,    0.0)     Lower Left  (    0.0,  967.0)     Upper Right ( 1591.0,    0.0)     Lower Right ( 1591.0,  967.0)     Center      (  795.5,  483.5)     Band 1 Block=1591x1 Type=Byte, ColorInterp=Red     Band 2 Block=1591x1 Type=Byte, ColorInterp=Green     Band 3 Block=1591x1 Type=Byte, ColorInterp=Blue


title: RMSE between two rasters step-by-step

text: Can anyone show how to calculate the RMSE (root mean square error) between following two rasters step-by-step and discuss on the obtained results' min and max values, and how to interpret it. Thanks a lot in advance!                First raster (original, 2 by 2):      1 2      3 4           Second raster (obtained, 2 by 2):      2 2      4 1


title: How to calculate peaks in a DEM

text: How could I extract all peaks from a DEM (large mountainous area)? Peak means something like: a pixel which is sourrounded by other pixels with **smaler elevation numbers** in a area arround the "peak-pixel" of about 100m.


title: QGIS DEM (Terrain models) Mode Slope creates wrong data

text: I have a DEM raster file downloaded from the USGS site. The file can be downloaded here. I am trying to create a slope raster in percent with the DEM tool in QGIS. The GDAL command is the following:               gdaldem slope /Users/Downloads/n41w107/imgn41w107_13.img /Users/Downloads/slope.tif -p -s 1.0 -b 1 -of GTiff      The tool runs fine, but the created file `slope.tif` has strange data. The statistics for the band are the following:               STATISTICS_MAXIMUM=29834248     STATISTICS_MEAN=1845376.751065     STATISTICS_MINIMUM=0     STATISTICS_STDDEV=1658350.0283881      So they are obviously way to big for percent. What am I doing wrong? * * * Update: I calculated the Slope in degrees and got the following statistics:               STATISTICS_MAXIMUM=89.999809265137     STATISTICS_MEAN=89.583139343302     STATISTICS_MINIMUM=0     STATISTICS_STDDEV=5.9592219763749      A mean of 89 degrees seems really high to me. Is that reasonable?


title: How to calculate relative height of point on slope relative to nearest creek and ridge?

text: I'm attempting to calculate the relative height (values between 0 and 1 preferably) of waypoints on a slope along the path of least resistance. Ideally, points in creeks would have values of 0 and points on ridges would have values of 1 (or opposite values would also work). I have about 200 waypoints that I need to do this for and will need to do it manually otherwise. I'm using ArcMap version 10.1. Thank you! To clarify, I have waypoints in mountainous terrain and I need to know the change in elevation that water will likely flow from the top of the ridge. I would also like to know the change in height from the same waypoint to the point where it will intersect the nearest creek. I will manually calculate the ratio of the difference in height from the waypoint to the ridge vs. the overall change in height in order to get a ratio of the height of water flow to the overall height of the water path before intersecting a creek. It would be nice if there was a tool that already did this. Thanks again.


title: Trying to load this map service from ArcServer.. its on our own system but its not working... or I don't have access

text: Can anyone see this? http://gis.co.frederick.va.us/ArcGIS/rest/services/TestSDEService/MapServer Spatial reference is.. var initExtent = new esri.geometry.Extent({ "xmin": -8763218.349885626, "ymin": 4742964.96245658, "xmax": -8665378.953680733, "ymax": 4783858.772589095, "spatia lReference": { "wkid": 2283 } }); map = new esri.Map("map", { extent: initExtent });


title: SCS curve numbers for rainfall-runoff model using ArcHydro

text: I'm trying to assign curve numbers to one of my subbasins using ArcHydro (subbasin parameter from raster) following a tutorial as you can see here: ![https://docs.google.com/file/d/0B6GUNg-8d30vSEJaYTliOEpJTWc/edit?usp=sharing](http://i.stack.imgur.com/uWjnX.png) when I turn to the step after generating my own SCS curve number, I was amazed to see that, I don't have the option to apply my CN values as you can see here: ![https://docs.google.com/file/d/0B6GUNg-8d30vb2RsalJpXzVtSGM/edit?usp=sharing](http://i.stack.imgur.com/tvn5m.png) As far as I know, I didn't skip any step while going through the whole process, anyone have any suggestion? Is there any option inside Hec-HMS to provide curve numbers for my subbasins, however?


title: How to Extract Data from U.S. National Landcover Dataset (NLCD) dataset?

text: I am working with U.S. National Landcover Dataset (NLCD) to classify habitat type at more than 150 sites across the northeast U.S. The dataset is very large (15GB) so I cannot upload it here, but it comes in .img format at 30m resolution. I have GPS coordinates in decimal degrees (WGS1984) for the center point of all the sites. I would like to be able to extract the proportion of landcover classes in a 1 square kilometer around the point. My questions are:   1. How do I upload .img files into ArcGIS?    2. How do I extract the information from around the GPS coordinates as proportions of the different habitat classes?   3. How do I project my sites onto the NLCD map?    4. Should I change the projection of my coordinates?


title: Which events are fired when the mapscale changes?

text: > **Possible Duplicate:**   >  How to catch when scale is changed in ArcGIS? Are there any events which are fired when the user changes the mapscale by zooming? What I finally want to do is limiting the scale range. I can't find any ArcGIS-funtionalty (using ArcGIS 9.3.1) doing this. It seems that there is only the possibility to make layers invisible. But I want, that it is not possible to zoom in to an mapsacle greater than 1:1000 or so. So I thought of catching up an event which is fired when the user changes the mapscale and then overwrite the mapscale if it is greater than 1:1000. Or maybe anyone has another idea how to reach this goal? I'M thankful for any suggestions. ako


title: ArcSDE connection limit exceeded

text: We routinely exceed ArcSDE's connection limit, about once a week. Many of the "connections" are nothing but orphaned records in the `SDE.PROCESS_INFORMATION` table. Is there any way to clean up these connections periodically? I just service packed ArcSDE to 9.3.1 SP2, hoping this would resolve the problem. (It did not.) Currently I restart the `arcsde` service to clean up the connections, a pretty inelegant solution. This is the error, by the way: `Failed to connect to database. Maximum number of connections to instance exceeded` **My workaround:** My solution was simple: restart the SDE service weekly, and double the number of allowed connections. This is of course not a _solution_ ; shame on ESRI for shipping enterprise software that requires such a workaround. After all, it's still possible to exceed the maximum connections; I can only hope that our current level of use doesn't lead to this. I altered the `init.d` script to prevent `sdemon` from prompting the user to confirm they want to stop the service (this is what the `-N` argument does). I added a `restart` option as well.               #!/bin/bash     #     # arcsde Init file for starting and stopping ArcSDE 9.3     #     # chkconfig: 35 90 40     # description: ArcSDE startup script          # Source function library.          . /etc/rc.d/init.d/functions          SDE_OWNER="sde"     SDEHOME="/home/sde/sdeexe93"          case "$1" in     start)     echo -n $"Starting ArcSDE:"     su - $SDE_OWNER -c "$SDEHOME/bin/sdemon -o start -p pwd"     echo "OK"     ;;     stop)     echo -n $"Stopping ArcSDE:"     su - $SDE_OWNER -c "$SDEHOME/bin/sdemon -o shutdown -p pwd -N"     echo "OK"     ;;     restart)     cd "$CWD"     $0 stop     sleep 5     $0 start     ;;     *)     echo $"Usage: $0 {start|stop|restart}"     esac      Then I created a cron job to restart the service once weekly:               # restart arcsde once weekly at 5am Saturdays     0 5 * * 6 service arcsde restart      I also increased the maximum number of allowed connections from 64 to 128 by editing the `$SDEHOME/etc/giomgr.defs` file:               CONNECTIONS      128     # maximum number of connections                              # NOTE:  On windows machines, you may need to                              # increase server non-interactive desktop memory.                              # Consult the ESRI support site for more information.      Then I imported the new settings:               $ sdeconfig -o import -f $SDEHOME/etc/giomgr.defs -i esri_sde -u sde      That was it. We'll see how it goes.


title: Why aren't 3D Globes used as the basis of GIS systems?

text: Maps have been around for thousands of years and have been widely accepted as the means of representing spatial information. We all know about several map projections,each with their merits and demerits. However, I often wonder, with all the progress GIS has made, why not make good 3-d globes as the basis of GIS Systems. Most of the outputs of GIS are intended to be presented digitally and not printed. Having near accuarate representation of the curved earth will solve many problems regarding choosing the correct projection. Is ArcGlobe and GoogleEarth (and the likes) the way forward to represent and analyse information upon? What do you think?


title: How to use ArcGIS JavaScript API's map.centerAndZoom()?

text: I'm trying to get the map to move and zoom in to a point when a function is executed. Point gets selected, but without zoom. Interestingly when I zoom in to a random location and then execute the method I'll get zoomed out a bit and moved to correct position.               drawPointToMap(true);      Code:               function drawPointToMap(zoom) {     var lat = $('#id_latitude').val();     var lon = $('#id_longitude').val();          if (lat != '' && lon != '' && !isNaN(lat) && !isNaN(lon)) {         try {             var point = new esri.geometry.Point({                 latitude: lat,                 longitude: lon             });             mapHandler.drawToMap(point);             if (zoom) {                 console.log('center and ZOOM');                 mapHandler.map.centerAndZoom(point, 10);             } else {                 mapHandler.map.centerAt(point);             }         } catch(err) {}     }      } Console prints 'center and ZOOM' as expected, but doesn't actually zoom. I'm displaying a WMS layer without a basemap.


title: How to ensure different colors for surrounding polygons in ArcGIS?

text: I can symbolize my polygon in ArcGIS by categories. I tried for every field. But unfortunately in few polygon it showing same color those are just beside of same color polygon. I have to categorized 572 polygon. So it will be a hectic task if I have to do this manually. Is there any way to categorized polygons which are not identical in color with the polygons its surrounded?


title: random sampling from spatial points in R

text: Can anyone help me out on the best package to sample from a spatial point dataset? My dataset consists of a list of positions inside a region, and for each point I also have the name/number of the subregion where the point is located. I would like to make my sampling using only this dataset (for example I don't want to load a shape file with the subregions or a probability raster). I have already made a "random" sampling for each subregion, however I am not taking into account the spatial distribution of the points inside each subregion. I am looking for a package that would let me do both spatial random sampling as well as stratified random sampling, or some guidelines on how I can create my own code.


title: How to run query in mapbasic?

text: I made a Query in Mapbasic like :               Dim query As String     query = "Select * from some_table"      How to run **query** to form table? Is it possible to save selected value in variable without forming table?


title: How to Separate out the disconnected regions of a raster into independent rasters using ArcGIS?

text: Please refer to the attached image. The overlay on the map shows a raster file with disconnected circles. I want to split each of those circles into independent rasters in one shot. Is that even possible? If yes how? If not whats the fastest way to do it (avoiding as much donkey work as possible)? ![enter image description here](http://i.stack.imgur.com/iYYlF.jpg)


title: Why are Postgis sequences not automatically updating in QGIS?

text: I'm adding new features to a polygon datasets in QGIS. The data is held in PostGIS but when i have a look at the attribute table for the polygon the gid field is not automatically updating, the entry reads NULL I'm editing under the postgres login which looking at the sequeneces in PGadmin says that `ALTER TABLE parking_enforcement.restrictions_gid_seq OWNER TO postgres;` Is there anything special that i need to be doing in Postgres?


title: Determine changes in land cover of isolated features over time?

text: I have a a study area of 2 Landsat scenes from 2013 which were classified for a specific natural community, and these areas have been isolated and extracted and digitized into vectors so that they can be integrated into a GIS. These communities exist as features all throughout the scene, kind of like islands, if you will. I am working with landsat data, so I want to see if these areas have grown/expanded through time, preferably over two or three decades. What is the best way to accomplish this? I was thinking turning the natural communities polygons into a raster, using that as a mask for landsat data, and running a pixel change detection to see how they have changed. But would that give me results for if they had shrunk from previous times, since the mas would only represent current size? Or perhaps is fragstats a better option? I have no experience with fragstats. Thanks for your help and ideas Edit for being too broad: the vectorization was for creating a detailed map for a GIS using a basemap with much higher resolution than landsat, and the change detection is a separate part of the project. I ran a supervised support vector machine classification in ENVI to obtain the results. The images I classified were corrected for atmosphere, so I will do that with the following temporal years. Sorry for the misunderstanding, I suppose my main question is: instead of reclassifying and performing a change detection on the whole scene, what would be the most efficient way to determine land change for only areas of interest? The areas in question are isolated swamp ecosystems, from about 1-10 hectares in size. I'd like to see if they have grown or shrunk over time. Thanks and I hope this isn't too broad or difficult to understand.


title: Setting Output Parameter in ArcPy for Server Tool

text: I have published the following script tool (which is wrapped in a model, i.e. just the script tool and all of its parameters) to ArcGIS Server 10. The GP service succeeds when run, but I cannot determine how to access the final output of the GP service. The result is a RecordSet object, and I can view it in the _arcgisjobs/job-id/_ directory when viewing it _on the server_. However, I cannot figure out how to access the result via the REST API. As you can see, the script tool doesn't have an output parameter. When viewing the GP service via the REST Directory there are only the two inputs. I have tried using SetParameterAsText and a Result object and adding an output parameter to both the ST and the model but without any success. So, the question is _how do I modify the script and/or script tool/model properties to designate an output parameter so that it can be accessed via the REST API and subsequently consumed in a web application?_ I have read through this related question but it has not helped. The REST Endpoint: http://atlas.utc.edu/ArcGIS/rest/services/RRI/DE/GPServer/Decision%20Engine The Python script:               #Import ArcPy site package module     import arcpy     from arcpy import env     from arcpy import Extent     from arcpy import Raster     from arcpy import RecordSet     from arcpy.sa import ZonalStatisticsAsTable     from time import gmtime, strftime          # Check out ArcGIS Spatial Analyst extension license     arcpy.CheckOutExtension("Spatial")     # Set Environment Workspace     ws = env.workspace = WORKSPACE PATH          # Set Environment Raster Cell Size     cellSize = env.cellSize = 10     # Set Environment Processing Extent     processingExtent = Extent(602560.330672585, 3827530.65305605, 746490.330672585, 3966810.65305605)          environProcessingExtent = env.extent = processingExtent          # Strings representing rasters in the workspace     rasters = arcpy.GetParameterAsText(0).split(";")     # The dataset that defines the zones      inZoneData = arcpy.GetParameterAsText(1)          # Determine Zone Dataset     if inZoneData == "Block Group":         zoneField = "Value"         zoneData = ws + "\\ToolData\\Data.gdb\\BG_Ras"     elif inZoneData == "Census Tract":         zoneField = "TRACTCE10"         zoneData = "\\ToolData\\Data.gdb\\CT_Ras"      else:         zoneField = ""          addedRaster = Raster(ws + "\\ToolData\\Data.gdb\\constantRaster")          # Process each raster string     for raster in rasters:         addedRaster = addedRaster + Raster(ws + "\\ToolData\\Data.gdb\\" + raster)          # Execute Zonal Statistics     zonalTable = RecordSet(ZonalStatisticsAsTable(zoneData, zoneField, addedRaster, "%SCRATCHWORKSPACE%\\zontalTable", "DATA", "MAXIMUM")).save("%SCRATCHWORKSPACE%\\rszt")      Some relevant images? ![The Toolbox](http://i.stack.imgur.com/aqNDR.png) Script Tool Parameters ![Script Tool Parameters](http://i.stack.imgur.com/TvClc.png) Model Tool Parameters ![Model Tool Parameters](http://i.stack.imgur.com/PAtUx.png) Thanks.


title: Clipping aerial image pairs by their overlapping area

text: I have a set of aerial images which I am trying to clip by their overlapping areas, for use in a more involved program I am writing. Is there a command line based tool out there with an easy method for extracting the overlapping areas from a pair of images? The images themselves do not have georeferencing, but they DO come with a shapefile containing bounding boxes of the image collects, as well as IMU data from image collection. I know this may be difficult since the images will have slight perspective differences, but I was hoping it would still be possible--especially since I am trying to maintain and utilize these perspective differences for something else.


title: Vectorize cell boundaries in GRASS

text: I need to vectorize the **cell boundaries** of a raster map and I have forgotten how to do this. For instance, if I have a raster map of a region that is just map=1 with a cell size of 500m, I would get a map that shows a grid that is 500m on each side. Thanks in advance !


title: Alternative to Terrasync for Trimble Windows Mobile unit

text: I have a number of Trimble Nomad 900 series devices and am currently using TerraSync. TerraSync does the job, but are there any other alternatives out there that would be even simpler to use? Basically I'm looking for something that's quick and easy to record features and save to a non-post processed file that can be named. Preferably just a text file with the "average" or best coordinate reading. The TerraSync workflow (i.e. having to use GPS Pathfinder Office) is overkill for our uses and takes too much time.


title: Getting placemarks on map and setting bounds based on all placemarks

text: I'm trying to do what most folks do in the Google Maps API, and add a bunch of markers to a WWPanel and then adjust the map bounds to fit all Placemarks in the WWPanel view. How can this be done? This the code I have thus far, and the marker show up, but the map cannot be centered within the constraints of the Placemarker bounds:               private void invoke() {         SwingUtilities.invokeLater(new Runnable() {                  public void run() {                      ArrayList<Position> pos = new ArrayList<Position>();                 pos.add(Position.fromDegrees(32, -117));                 pos.add(Position.fromDegrees(48, -72));                      setWwPanel(new WWPanel());                 WWPanel wwPanel = getWwPanel();                 wwPanel.setPreferredSize(new Dimension((int) (getRootPane().getSize().getWidth()*0.5), (int) wwPanel.getSize().getHeight()));                      LayerList layerList = new LayerList();                      layerList.add(new BMNGWMSLayer());                      ViewControlsLayer vcl = new ViewControlsLayer();                 vcl.setShowPitchControls(false);                 vcl.setShowVeControls(false);                 vcl.setShowHeadingControls(false);                 layerList.add(vcl);                 Model flatModel = new BasicModel(new EarthFlat(), layerList);                 ((EarthFlat) flatModel.getGlobe()).setProjection(FlatGlobe.PROJECTION_MERCATOR);                 wwPanel.getWwd().setModel(flatModel);                 wwPanel.getWwd().addSelectListener(new ViewControlsSelectListener(wwPanel.getWwd(), vcl));                      RenderableLayer rl = new RenderableLayer();                 for(Position curPos : pos) {                     PointPlacemark pm = new PointPlacemark(curPos);                     PointPlacemarkAttributes pma = new PointPlacemarkAttributes();                     pma.setImageColor(Color.RED);                     pma.setLabelFont(Font.decode("Verdana-Bold-11"));                     pma.setLabelMaterial(Material.CYAN);                     pm.setAttributes(pma);                     pm.setValue(AVKey.DISPLAY_NAME, "Text displayed on mouse over");                          rl.addRenderable(pm);                 }                      layerList.add(rl);                                add(wwPanel, BorderLayout.CENTER);             }              });     }


title: Change from data --> layout view using arcpy? (ArcMap 10)

text: The opposite, from layout to data, was asked and answered, but I can't figure out how to switch to the layout view from data view using arcpy. Can it be done? Thanks.


title: When to reproject LAS data?

text: I've downloaded a few LAS files from the NOAA: http://www.csc.noaa.gov/digitalcoast/data/coastallidar I used lasinfo to get the coordinate system of the LAS files and it returned:               GCS_NAD_1983_NSRS2007     WKID: 4759 Authority: EPSG          Angular Unit: Degree (0.0174532925199433)     Prime Meridian: Greenwich (0.0)     Datum: D_NAD_1983_NSRS2007       Spheroid: GRS_1980         Semimajor Axis: 6378137.0         Semiminor Axis: 6356752.314140356         Inverse Flattening: 298.257222101      This is a geographic coordinate system and does not contain a linear unit. I saw this quote in the ESRI documentation: > It is recommended that LAS data be delivered and consumed in a projected > coordinate system, for example, UTM or NAD83 State Plane. LAS data that is > captured in Geographic coordinates can be displayed, but some functionality > may fail or be suboptimal. What type of functionality may fail or be suboptimal? I wish they said a little more here. I'm not positive, but I think this may be the reason I'm having trouble creating a DEM from the LAS points - because it's in a geographic coordinate system? The DEM appears to be correct, but when I add it to ArcScene and set the base heights to itself, it's all messed up. When is the best time to reproject? Do I reproject the LAS file itself, or after I create the multipoint feature? Or do I reproject the DEM itself? Also, the website states the resolution as:               Resolution: Point density is 0.1 to 8 pts/meter2      What would this be equivalent to? Thanks for any guidance!


title: Replacement for ArcScripts

text: Does an equivalent of ArcScripts exist? I know of the the ArcGIS resource center and "Code Galleries" but does something that equates to ArcScripts where users share useful ArcGIS code exist? The new ArcGIS forums are not great for searching for code either. It seems to me as through the ESRI replacement for ArcScripts are a poor replacement and I am wondering if something 3rd party exists. I know we can still search ArcScripts but it does not appear to still be an active repository.


title: Counting traversed arcs to write attribute using ArcGIS Network Analyst?

text: I have number of persons located on a road network and I have calculated their shortest distance to a particular location. From the routes output created from Closest Facility can I   1. break the routes down into the individual arcs traversed by each person?   2. assign each arc a count attribute indicating the number of individuals who use that arc to get to their destination? I am using network analyst in ArcGIS 10.2. Thank you.


title: How to use QGIS field calculator to delete style code?

text: I am struggling with following issue: How to delete style code before id codes _x.x.xx.._ and the }s in the end? Examples below. Any help appreciated!               {\fArial|b1|i0|c0|p34;A.B.11} {\fArial|b1|i0|c0|p34;A.C.1}


title: Tutorial for c# and ArcObjects?

text: I am new to the ArcGIS. Can any one please refer a beginners tutorial for this tool. Referred the help, but couldn't able to get the basics to kick start.


title: Adding an "m" to the end of every number in a row

text: What function do i need to use to add an space and an m after every item in a row, using the field calculator in the attributes table. I have a load of numbers (as strings) and would like to add m after each one


title: Open Layers serverResolutions on WMS don't limit layers loaded

text: I'm building an animation that show an animation of +/- 40 WMS layers. This unfortunately gives some memory issues with OL 2.13 in all browsers but only in IE for OL 2.12. To circumvent this problem in IE and to decrease server load I want to limit the times at which the WMS layers are loaded. For example, I want to have the same layer loaded for zoomlevels 8-12 and zoomlevels 12-15. What I found for this is setting the server resolution: http://trac.osgeo.org/openlayers/wiki/SettingZoomLevels


title: Mapping Precipitation Data

text: I have downloaded daily precipitation data from Global Weather data website and want to create an annual precipitation map like this:   ![example of desired map](http://www.worldatlas.com/webimage/countrys/namerica/usstates/weathermaps/wa.gif) The downloaded data is in TXT and CSV format. The area I am covering has 96 weather stations, so I have 96 files. I am totally confused how to assemble and use this data for the said map. I am using Arcgis 10.


title: How to quickly fill multiple gaps in a series of adjacent polygons

text: I've been given a "background" dataset which is designed to draw as the first layer in a complicated map. For some reason the data provider has previously erased this dataset with roads, parks, etc. The white parts of this image are the areas which have been cut from the dataset, which is comprised of many individual polygons. ![enter image description here](http://i.stack.imgur.com/A8mYn.png) The problem is that the datasets which draw above this layer have changed, leading to many small gaps visible when the datasets are overlaid. ![enter image description here](http://i.stack.imgur.com/bECC1.png) What is the best approach to filling in all the gaps in the background polygon? The full dataset looks like the image below - I want the outer edges to remain, with the white gaps in the middle filled in: ![enter image description here](http://i.stack.imgur.com/iACpl.png) I would normally try Buffer and Dissolve, but I don't have a dataset showing the outside edges of this shape, so I can't clip the resultant polygon back to the original shape. Typically, this dataset doesn't align with other "authoritative" coastline datasets. I only have a Basic license so don't have access to fancy Topology tools. Am I stuck with manually digitising the outer boundary of this shape?


title: RESTful Web Services for Geometry Operations

text: I'm trying to get an idea what web services exist for doing geometry operations. I know that Esri's GeometryService supports several operations, but does anything else exist? I've started a very simple project built on JTS and Google App Engine to support a Code for America project an am trying to decide if I should build it out or not. Any thoughts?


title: Java or .net platform is good for creating interactive web page

text: I have just now completed my degree in Spatial Information Technology, and learned how to use the ARCGIS platform and QGIS. Now I wanted to create a server/client webpage using mapserver for a project work. In the future, I am planing to go more into the GIS developer side. Please advise on whether you think java or .net platform will be better for creating interactive web pages. I would like to use opensource tools like mapserver rather than ArcGIS Server due to cost. Thank you


title: Is it possible to add an ArcMap map to a report in Access?

text: I am using Access to create printable maps where I can change parameters (border colors) on the fly... Currently, I am exporting the maps to JPEG then pulling them in. I would like to import MXD files so I can easily modify either the maps or frames on the fly.


title: Isometric map tiles with Openlayers or similar

text: I wish to show a map layer in a browser based tool such as Openlayers or Leaflet however my tiles are projected isometrically. Has anybody done this before?


title: Shrinked Travel Time Contour

text: I'm relatively new to service area analysis. I use ArcMap 10.2 I made the following travel time contour maps by performing service area analysis.I made the first one first. It looks good. Then I add more roadways to make the second map. As you see, for unknown reason, the lower half of the contour shrinks (picture 3). I can't figure out why. The dataset I used for the second map is built based on the dataset used to make the first map. I just added a little more local roads. So both maps basically use the same data. They calculate the travel time towards the "star". I rebuilt the network when adding more roadways. Actually, the network I built to do service area analysis is rough. There is no turning, direction (so no loop back problem?), elevation restrictions. The only attribute I used from the dataset is travel time calculated based on links.I used network analyst to identify disconnected links and corrected them. And I tried topology check, it seems there is no self-overlap lines. Not sure what else I can check with, there are only a few options for topology check of lines. I'm seeking for suggestions for potential reasons caused the failure of the second map. Thanks! ![enter image description here](http://i.stack.imgur.com/C4VIs.jpg) ![enter image description here](http://i.stack.imgur.com/9nbGy.jpg) ![enter image description here](http://i.stack.imgur.com/u9Nik.jpg) ![Something wrong with the edge](http://i.stack.imgur.com/IJmqJ.jpg)


title: How to export WKT with QGIS suitable for Geophp

text: I like to be able to import the coordinates of may polygon shape file into a php based webapplication. (drupal) However after adding coordinates in my shape file and saving it as CSV i am not able to import it, receiving the error of "this data is not valid" I added the coordinates in my shapefile with `code geomToWKT( $geometry )` resulting in coordinates that do not match the format of my geophp: `code $polygon = geoPHP:load('POLYGON((1 1,5 1,5 5,1 5,1 1),(2 2,2 3,3 3,3 2,2 2))','wkt'); $area = $polygon->getArea(); $centroid = $polygon->getCentroid(); $centX = $centroid->getX(); $centY = $centroid->getY();` What kind of formula would i need to apply in my field calculator to stay within the format of geophp?


title: Change WMS symbology

text: Is it possible to change the symbology of a WMS from external developers - I'm harvesting WMS and the symbology is very messy and unclear when some are viewed together - can I change it? Any help appreciated.


title: Using a Select By Location in Python and Calculating a field based on what State Plane a point falls in

text: Here's what I have so far. Do I need to make another feature layer based on the selection?               import arcpy          arcpy.MakeFeatureLayer_management(r"PATH TO THE POINT", "point_lyr")     arcpy.MakeFeatureLayer_management(r"PATH OF THE STATEPLANE", "stPlane_lyr")          arcpy.SelectLayerByLocation_management("point_lyr", "INTERSECT", "stPlane_lyr")      Here's the updated Script for each state plane zone                #Feature layers      Point_Layer = "Point_Layer"      CP_Layer = "CP_Layer"      IntersectLayerCON = "IntersectLayerCON"           # Process: Make Feature Layer for the SMON Points      arcpy.MakeFeatureLayer_management(SMONPoint, Point_Layer, "", "", "FID FID VISIBLE     NONE;Shape Shape VISIBLE NONE;link_fld link_fld VISIBLE NONE;State State VISIBLE NONE")      # Process: Make Feature Layer for the Control Points      arcpy.MakeFeatureLayer_management(ControlPoint, CP_Layer, "", "", "FID FID VISIBLE NONE;Shape Shape VISIBLE NONE;link_fld link_fld VISIBLE NONE;State State VISIBLE NONE")      # Process: Make Feature Layer for Intersection Shapefiles      arcpy.MakeFeatureLayer_management(IntersectLayer, IntersectLayerCON, "", "", "FID FID     VISIBLE NONE;Shape Shape VISIBLE NONE;OBJECTID OBJECTID VISIBLE NONE;ZONE ZONE VISIBLE NONE;ZONENAME ZONENAME VISIBLE NONE;FIPSZONE FIPSZONE VISIBLE NONE;SQMI SQMI VISIBLE NONE;COLORMAP COLORMAP VISIBLE NONE;Shape_Leng Shape_Leng VISIBLE NONE;Shape_Area Shape_Area VISIBLE NONE")           #This will calculate the fields labeled the correct STATE PLANE zone      # Process: Select Layer By Location for SMON      arcpy.SelectLayerByLocation_management(Point_Layer, "INTERSECT", IntersectLayerCON, "", "NEW_SELECTION")      # Process: Calculate Field for SMON      arcpy.CalculateField_management(Point_Layer, "StatePlane", "\"Colorado North\"", "VB", "")      arcpy.CalculateField_management(Point_Layer, "State", "\"Colorado\"", "VB", "")      It will just calculate the fields for state and state plane.


title: Simple way to compare ranges and distributions of species, looking for correlation and differences between ranges

text: As a biology student just beginning with GIS, wondered if someone could give me an idea of what tools to go about using to compare the range of 3 species that have trophic effects on one another. I have **3 vector layers** , of count data **plotted as xy coordinates** on a map of the UK, taken from latitude and longitude recorded data. The first is Water Vole distribution, the second European Rabbit, the third American Mink. The aim of my assignment is to see whether their ranges coincide (Mink and rabbit supposedly do), or whether they occupy different areas (supposedly, vole and rabbit). I am looking for a tool that will help with this, but as a GIS beginner, I have explored using point density tool to give me nice density maps in **raster form**. But am unsure how to get a **quantitative** output for analysis from this (key for my report). Any help would be much appreciated, thanks. * * * _**I am looking to see if there is a correlation/link between rabbits and lynx, and if there is an inverse relationship between voles and lynx. I need a statistics tool that can give me outputs for this._** * * *


title: Problem opening Natural earth quick start for QGIS

text: Trying to open the file "Natural_Earth_quick_start_for_QGIS.qgs" a window opens, listing 20 "bad layers". The window is entitled "Handle bad layers". Consequently I cannot even get started with Natural Earth in QGIS, although all advice I find assumes that opening this project is a piece of cake. what should I do?


title: How to get the linestring of a way in postgis with pg_snapshot schema

text: I have loaded some data from openstreetmap using osmosis and its pg_snapshot schema. This results in a table `ways`which contains a list of `nodes`referenced by their ids:               select w.nodes from ways as w where w.tags->'railway'='rail' limit 1;              nodes     -----------------------     {358482292,358482290}      and in a separate table you have a geometry column for each node:               select st_astext(nodes.geom) from nodes where id = 358482292;          st_astext     -----------------------------     POINT(6.1253475 45.9259597)      My question what query could give me a `LINESTRING` for each way created from the node list?


title: How to compare areas in scanned historical land use maps

text: I am a relative beginner to using GIS, and am running QGIS 2.0.1 in Linux. I have two historical maps which I want to analyze, that show land use patterns in the same area at two different moments in time. I have them scanned and geo-referenced as layers in one file. Side by side, they look like this: ![1930](http://i.stack.imgur.com/wMbvJ.png) ![1950](http://i.stack.imgur.com/bIUZd.png) The main thing I am interested in is to compare the extent of the light and dark green areas between the two maps. Is this possible, and if so, what is the simplest approach? Is there a way to do this based on raster analysis? And if I have to make a shapefile, what is the best way to do that? What I have already considered:   * Drawing shapefiles as polygons by hand, as described in this tutorial. That would be VERY tedious.   * Creating simplified, high contrast raster images by using color selection, filters etc. by trial and error in the Gimp and converting that to a shapefile. The results were very sloppy.


title: Stop an arcgis model until all values are collected and then continue

text: This is similar to Modelbuilder - If precondition is false, continue iterating next input but I want the iterate tool to run to collect all the values and only then continue to the merge. Any ideas? Currently it just runs the whole process for each file (which works but takes much longer than if the merge is done only once) or I have to manually break the collect-merge link, run the iterate, reconnect the collect-merge link and then continue running the model which is a pain as it is a lot of towers that need processing and this collect values-finish getting all values and then continue will be required in other models as well. ![enter image description here](http://i.stack.imgur.com/ZCo6i.png) I tried the "Select Data" tool as well but this doesn't allow for wildcard searches like the Iterate does -my Iterate has the "_Graded*" as the search param as the gdb included many other files related to each tower chunk. My STOP is set to "True" (tried false as well). I also tried to connect the Stop to the Iterate instead of Collect values but same result. === SCRIPT ADDED I just created a python tool for this and it collects all the values but it passes them back to the model as a long list -how can I get it to output in a proper format?                   import sys, os, arcpy          GDB=arcpy.GetParameterAsText(0)     Search=arcpy.GetParameterAsText(1)     Type=arcpy.GetParameterAsText(2)          ##GDB=r'P:\2012\044_DM_Radio_Propogation\Working\Propogation\Propogation_28355.gdb'     ##Search='_m'     ##Type='Polygon'          path=os.path.dirname(GDB)     arcpy.env.workspace = GDB     List=[]     for item in arcpy.ListFeatureClasses('*'+Search+'*',Type):         List.append(path+"\\"+item)         #arcpy.SetParameterAsText(3, item)          arcpy.SetParameterAsText(3, List)     arcpy.AddMessage("List: "+str(List))      ![enter image description here](http://i.stack.imgur.com/27fFJ.jpg) ![enter image description here](http://i.stack.imgur.com/sdSLv.jpg)


title: Coordinates system in degrees in plugins for QGIS

text: After adding a vector layer of coordinates of settlements of a part of the world INTO QGIS 1.8, I wish to add a topographic or other nice looking, colored map. Trying plugins like maps from Google Earth changes the coordinate system into meters, This has the consequence that I cannot lable coordinates in degrees with a grid. Are there plugins of a world map that can be displayed in degrees in QGIS?


title: Grass GIS 6.4.3, How to create a .PTS file

text: I'm trying to export a raster map in order to use it in the Flo-2d program. This program needs a `.pts` DTM file, do you know how I can create it? Alternatively, I can use a `XYZ` file looking like this one:               6413334.59 1936112.79 81.81     6413388.62 1936112.00 81.57     6413500.78 1936108.47 81.29     ...........      but if I use the `r.out.xyz` command, I get a confused file, looking like an endless row in which the x value is fixed, while the y and z ones changes. I hope I made it clear, thanks in advance for your help!


title: Create GRIB1 file from CSV

text: There is nice software called zyGrib. I'd like to feed zyGrib with my own data (I have it in CSV format). **How to create GRIB1 file with information format like NOAA (GFS Model)?** I know there is gdalwarp but I'm not sure it can write GRIB files.


title: ogr2ogr: issue with batch clipping shapefiles with converted kml file as clip source

text: I wrote this script that (running in MSYS) converts a kml to shp and applies a re-projection to it. The resulting shp then has the same SRS as the shps that I want to clip with it. I use a for loop to look up the shp files in a certain folder and then want to apply the clipping. The conversion throws some neglectable (?) warnings and yields a working shp-file.               Warning 6: Normalized/laundered field name: 'description' to 'descriptio'     Warning 6: Field timestamp create as date field, though DateTime requested.     Warning 6: Field begin create as date field, though DateTime requested.     Warning 6: Field end create as date field, though DateTime requested.     Warning 6: Normalized/laundered field name: 'altitudeMode' to 'altitudeMo'      However, the second part is not working (no errors, just the ogr2ogr usage infos as it appears if there are syntactical errors)               cd D:/GIS_DataBase/GIS_Tirol/Scharnitz          outdir=D:/GIS_DataBase/GIS_Tirol/Scharnitz/Data     indir=D:/GIS_DataBase/GIS_Tirol/Tirol_Verbreitungskarten/Verbreitungs_Daten          mkdir outdir          # reproject and convert clipsource to desired SRS and shpfile-format     ogr2ogr -overwrite -skipfailures -append -f "ESRI Shapefile" -t_srs EPSG:31254 clpsrcfile.shp scharnitz_gem_grenze.kml          # clip all files in indir and save to outdir     for x in $indir/*.shp       do ogrinfo -al $x | grep Extent       ls $x       ogr2ogr -clpsrc clpsrcfile.shp $outdir $x     done


title: How to generate one geojson file from several rows in Postgres/PostGIS?

text: I have a table with geospatial objects, in particular, polygons. I know that I can generate from **one** row a geoJSON string using `ST_AsGeoJSON`(http://www.postgis.org/docs/ST_AsGeoJSON.html). But I would like to _generate_ one geoJSON from all the table. Is this possible? How can I do it? Thanks in advance


title: Error: cannot acquire a lock when editing in ArcMap 10.1

text: We have a problem with a shapefile feature class. Periodically it will not save edits with an error message as the following: > Cannot save edits; cannot acquire a lock Working in 10.1 with a water main shapefile (with about 5 other users on different workstations viewing the layer). It has been suggested to us that the toplogy/rules associated with the layer is causing the problem.   Does anyone know if this might be the problem and or has a solution?


title: How to batch process (100s) of interpolations in QGIS or other open source software programs?

text: Is there an efficient way to run 100s of interpolations in QGIS or other open source software programs? I have groundwater contamination data collected from monitoring wells at about **800** different sites. I would like to interpolate a set of groundwater plume contours for each site. I'd like to avoid running 800 separate interpolations. Any ideas?


title: How to create a value-by-alpha map in Java?

text: Someone has post similar question as mine before : similar question But my objective is slightly different. I have a `shape file (.shp)` (a country map) I would like to write a piece of java code to create a value-by-alpha map like below: ![Example](http://i.stack.imgur.com/tsaiB.png) Do anyone know is there any java library to do this? Can GeoTool do this? If can, then how?


title: Geotiff reprojection

text: I am new for GIS programming. I try to change geotiff coordinate system from epsg 32635 to epsg 4326. I used the following gdal command:               gdalwarp -rc -s_srs epsg:32635 -t_srs epsg:4326 -dstnodata 0 -of GTiff -co tiled=yes UU5L.tif UU5L_rej.tif      The source image is on the left and the result is on the right. ![enter image description here](http://i.stack.imgur.com/FIdDh.png) Obviously something went wrong. When I check metadata on result image, I see that corner coordinates in second cell are not the same as source image second cell. By the Way. What these corner coordinates means? I know first values are image place on Earth, but second? Here is a little example: Corner Coordinates:               Upper Left  (  500000.000, 7530000.000) ( 27d 0' 0.00"E, 67d53' 4.61"N)     Lower Left  (  500000.000, 7434000.000) ( 27d 0' 0.00"E, 67d 1'24.61"N)     Upper Right (  596000.000, 7530000.000) ( 29d17' 2.00"E, 67d52' 7.37"N)     Lower Right (  596000.000, 7434000.000) ( 29d12'10.21"E, 67d 0'29.74"N)     Center      (  548000.000, 7482000.000) ( 28d 7'18.05"E, 67d27' 0.64"N)


title: How can I obtain the unit of a projection SRID?

text: Given a projection SRID, is there a way I can obtain the coordinates unit string ( _meter_ , _degree_ , ...) ? In PostGIS for example, it looks like it is present in the `srtext` column of `spatial_ref_sys`. Should I parse that block of text or is there a shortcut somewhere ? Is there something in libproj directly ? Thanks !


title: How to simulate google maps user experience

text: I’m not familiar so much with GIS applications and libraries. There is something that I would like to know if it’s possible or not. We are using ESRI suite of products as our GIS infrastructure. We use products like ArcGIS desktop and ArcGIS server. However, the published maps are not that user friendly and not smooth. ESRI provides a lot of tools and utilities but not in the UX part. We want to reach a level when maps UX is something similar to the latest Google Maps.   Everyone can agree Google Maps has very smooth graphics, nice display to streets and amazing markers and info box animation.   I would like to ask if it’s possible to approach this goal or not by using some specific libraries or technologies.


title: Need to clip raster based on field name in ArcGIS 9.3

text: Is there a way around for me to batch clip a raster using a field name to create output a raster layer ? Much like using Split tool but it is for a vector. How about that for the raster side ? Going to do that for slope and elevation by 24k quad. I am using ArcGIS 9.3.1 and I am aware that the 10 has a raster split.


title: Install VBA on ArcGIS 10

text: What is the complete recipe for installing VBA for ArcGIS 10 Desktop? The Esri help topic on this is incomplete. From the number of threads I found troubleshooting this I'm not the only one experiencing difficulties. I've opened a tech support issue, but am still waiting for a response. Perhaps GIS.se is faster? I have installed the VBA sdk kit from `%install_media%\ArcGIS Desktop 10\SDK_VBA`.   In ArcGIS Desktop Adminstrator I've set license level to Single Use.   Under _Desktop > Availability_ VBA is listed as installed but not authorized.   When I run the _[Authorize Now]_ wizard VBA is not listed in the available extensions.


title: Some labels are not displaying

text: I'm using arc 10 and trying to label line features. It labels 75% of the features normally, while others will not display any label. There is no obvious geographic or label correlation between the malfunctioning features and they are all part of the same shapefile. If I alter the label slightly (for example: changing 12" to 12'') I can often get the label to display, but this isn't a practical solution. Any suggestions are appreciated!


title: run r.stats as a quiet module in GRASS-Python script

text: Has anyone else used r.stats as a quiet module in a GRASS-python script? As part of my program I'm using:               grass.run_command("r.stats", flags='l', input=<file>, output=<*.csv file>, fs=',')      I'm using the 'l' flag here to print out category labels. If I change the flags to 'lq' r.stats does not produce the specified *.csv file. If I use the flags as '-q', r.stats runs as a quiet module, but it only creates a *.csv file with one row that describes the category values. For my output, I need both category values and their respective labels. Any ideas?


title: Change the symbol for a single feature in ArcObjects?

text: Is it possible to change the symbol for a single feature in ArcObjects? If so how? I know it's possible to setup the map symbology for different field values of a feature class, but I'd like to achieve this without changing any of the underlying field data if possible. P.S. I'm using C# and ArcGIS 10.0


title: Does google maps use elevation to calculate travel distance?

text: For example, lets say I have two parallel roads with starting point and ending point 1 mile apart. The left hand road is as flat and straight as an arrow. The right hand road is also straight....but has a series of sine-wave shaped hills and valleys. Obviously, if I measure using a _Surveyor's wheel_ , the second path will be longer, even though both roads are starting and ending a mile apart. **My question: which measurement does google maps use? Does it account for difference in elevation adding to the travel distance?**


title: How to subtract lines with thickness from polygon

text: I have a polygon and some lines crossing it. I want to subtract the lines with a certain "thickness" from the polygon, so it splits up into various polygons which do not touch each other anymore. You can see the two situations in this picture: ![Result of the difference between line and polygon](http://i.stack.imgur.com/OO7Ag.png) Is there a way to do this?


title: How to create a vector layer from a GeoAlchemy2 query?

text: I'm currently developing a QGIS plugin where I mapped a PostGIS database via GeoAlchemy2. I wrote a function that returns results from a GeoAlchemy query but have no idea how to create a vector layer from this (by using for example a function like `QgsVectorLayer(...)`) and display it. Is there a way to create a vector layer from a query return? This is my function               def queryFunc():         session = loadSession()         PT = aliased(PointsCable)         SYS = aliased(SystemCable)              search = session.query(PT).join(SYS).filter(SYS.sysregion != 'Pacifique', PT.cablefamily == 'SA')              return search          # example #          for row in search:         print row.geom      And it returns a list of values like so :               010400000001000000010100000011f2b3b968f15ec150d5bff095dd5241     0104000000010000000101000000891d19a43bf15ec1c514fbdd20dd5241     0104000000010000000101000000080e8e1f5bea5ec138d2abcc6cd45241     01040000000100000001010000006f75baa5aee35ec10b56e0ffbccd5241     010400000001000000010100000086df75f5a2e35ec1686748deb3cd5241


title: How to lock points using a schematic layout algorithm?

text: I'm using ArcGIS Schematics extension and more particularly the "main ring" layout algorithm. In my data, I have a main ring (ring with the most links) and I want to organize nodes and links around it BUT without moving the ring nodes! Does anyone know if it's possible and how?


title: Mapserver: Change legend font color from CGI Request

text: As the post title says I´m needing to alter the legend color in mapserver in a cgi bin request. Actually I have a website created in OpenLayers and Mapserver and I use legends with white font color because the web has a dark theme, but now I have to create reports with some maps and this must be printed in paper with white background and then i need to convert the legends text to black, exists some parameter to alter this?? Currently I pick the map legends from this URL: https://mapas.moreno.gov.ar:15001/cgi- bin/mapserv?map=/var/www/html/pi/pi_ui/DATA/moreno.map&layer=afis4base&SERVICE=WMS&Version=1.1.1&mode=legend I want something like: https://mapas.moreno.gov.ar:15001/cgi- bin/mapserv?map=/var/www/html/pi/pi_ui/DATA/moreno.map&layer=afis4base&SERVICE=WMS&Version=1.1.1&mode=legend&STYLES=fontColor:0x000000 (Geoserver uses this syntax for styling legends from CGI). Thanks to all for reading, and sorry for my poor english. Regards


title: Wind Data for Newfoundland or New Brunswick

text: I am looking for wind data at an elevation of 100 metres for Newfoundland and New Brunswick that I can potentially bring into ArcGIS 10.2.2 to augment my wind turbine siting process. Any information and links would be quite helpful.


title: Execute multiple process in parallel of Arcpy script

text: I have seen some difficult ways to do parallel processing, but I wonder if it is possible to simply execute multiple process of the same ArcPy script at the same time. My script makes some changes to the default geodatabase, so I thought of making a geodatabase copy for each process. I have updated the script to copy the shared resources between the processes, so it copies the geodatabase and the mxd's related to it. I have made a test to parallelize, using this script:               pool = multiprocessing.Pool(2)          pool.map(test_func, [1, 2] , 1)          pool.close()      I noticed when I browse RAM and CPU use, every process consumes 200Mb. So, if I have 6 Gb of RAM, I think I have to exploit 5Gb RAM of it by enlarging the pool size to: 5000 / 200 = 25 So, to exploit the whole power of the machine, I think I should use 25 as pool size. I need to know if this is the best manner, or how I could measure the efficiency of this parallelization. This an example of the code that I'm trying to parallelize. The whole script contains 1500 lines of code almost like this one:               def dora_layer_goned():         arcpy.Select_analysis( "layer_goned" , "layer_goned22" )         arcpy.MakeFeatureLayer_management("layer_goned", "layer_goned_lyr")         arcpy.SelectLayerByLocation_management("layer_goned_lyr" ,"WITHIN", "current_parcel"  ,  "" , "NEW_SELECTION")         arcpy.SelectLayerByAttribute_management("layer_goned_lyr" , "SWITCH_SELECTION" )         arcpy.Select_analysis("layer_goned_lyr" , "layer_goned_2_dora2" )         arcpy.Clip_analysis("layer_goned_lyr" , "current_parcel_5m_2" , "layer_goned_2_dora" )         arcpy.SelectLayerByAttribute_management("layer_goned_lyr" , "CLEAR_SELECTION" )         arcpy.FeatureToPoint_management("layer_goned_2_dora","layer_goned_2_dora_point","CENTROID")         arcpy.MakeFeatureLayer_management("layer_goned_2_dora2", "layer_goned_2_dora_lyr")         arcpy.SelectLayerByLocation_management("layer_goned_2_dora_lyr" ,"INTERSECT", "layer_goned_2_dora_point"  ,  "" , "NEW_SELECTION")         arcpy.DeleteFeatures_management("layer_goned_2_dora_lyr")         arcpy.FeatureVerticesToPoints_management("current_parcel","current_parcel__point", "ALL")         arcpy.FeatureVerticesToPoints_management("carre_line","carre_line__point", "ALL")         arcpy.CalculateField_management("current_parcel__point","id","!objectid!","PYTHON_9.3")         arcpy.SpatialJoin_analysis("carre_line__point"  , "current_parcel__point" , "carre_line__point_sj","JOIN_ONE_TO_ONE" , "KEEP_COMMON" , "" , "CLOSEST")         arcpy.Append_management("current_parcel__point" , "carre_line__point_sj" , "NO_TEST") #         arcpy.PointsToLine_management("carre_line__point_sj", "carre_line__point_sj_line", "id")         arcpy.Buffer_analysis("carre_line__point_sj_line" , "carre_line__point_sj_line_buf" , 0.2)         arcpy.Erase_analysis("layer_goned_2_dora2" , "carre_line__point_sj_line_buf"  , "layer_goned_2_dora_erz")         arcpy.MultipartToSinglepart_management("layer_goned_2_dora_erz" , "layer_goned_2_dora_erz_mono")         arcpy.MakeFeatureLayer_management("layer_goned_2_dora_erz_mono", "layer_goned_2_dora_erz_lyr")         arcpy.SelectLayerByLocation_management("layer_goned_2_dora_erz_lyr" ,"SHARE_A_LINE_SEGMENT_WITH", "current_parcel"  ,  "" , "NEW_SELECTION")         arcpy.SelectLayerByLocation_management("layer_goned_lyr" ,"CONTAINS", "layer_goned_2_dora_erz_lyr"  ,  "" , "NEW_SELECTION")         arcpy.DeleteFeatures_management("layer_goned_lyr")         arcpy.Append_management("layer_goned_2_dora_erz_lyr" , "layer_goned" , "NO_TEST") #         arcpy.SelectLayerByAttribute_management("layer_goned_2_dora_erz_lyr" , "CLEAR_SELECTION" )


title: How to classify time periods in a new field, using Python?

text: I have a datetime field _(Horario)_ in my feature class, showing only the time. Although the date doesn't appear, it seem to be stored automatically as 30 Dec 1899, I'm not sure why. I want to use this field to populate another field _(Periodo)_ , where I'll have different periods of the day: morning (6 am - 12pm), afternoon (12pm - 6pm), evening (6pm - 12am) and night (12am - 6am). I'm trying to write an if-elif statement on the Field Calculator, but I'm always having an "invalid syntax" error, and I'm guessing that's because of the datetime expression I'm using. Can anyone see what's wrong?               def Reclass(horario):         if (horario < date '1899-12-30 12:00:00' and horario >= date '1899-12-30 06:00:00'):             return "Manhã (6-12h)"         elif (horario < date '1899-12-30 18:00:00' and horario >= date '1899-12-30 12:00:00'):             return "Tarde (12-18h)"         elif (horario <= date '1899-12-30 23:59:00' and horario >= date '1899-12-30 18:00:00'):             return "Noite (18-24h)"         elif (horario < date '1899-12-30 06:00:00' and horario >= date '1899-12-30 00:00:00'):             return "Madrugada (0-6h)"          Reclass(!Horário!)      I'm thinking the problem is I'm referring to the date as               date '1899-12-30 06:00:00'      **How should I refer to datetime fields when using Python?** I'm sorry if that has been answered before, I looked out everywhere and I couldn't find an answer. ![that's how my table looks like](http://i.stack.imgur.com/yAxN5.png)


title: Separate a polygon in different polygons depending of the distance to another polygon

text: ![polygons](http://i.stack.imgur.com/zmJFX.png) I have a reference polygon "R", and others polygons (in grey). I want to separate each grey polygon in multiple polygons, depending on the distance to R with different Buffers : - The red line is R with a 5 meters buffer - The green line is R with a 20 meters buffer - The purple line is R with a 50 meters buffer I dont know how to achieve this simply, because in this case, the smaler grey polygon should be splited into 3 polygons, and I'm able to split it in only 2 in one query. If I have 3 buffer, should I do 3 different queries to fill my table, or is there a way to do it in one time ? * * * The criteria for the spliting is the distance to R. The small grey polygon can be splited in 3 polygons, determined by : - The area before the red line - The area between red and green line - The area after the green line My full query is : -- 5m zone               create table splited_polygons as     select p.id, p.nom, 5 as distance, ST_Intersection(ST_MakeValid(ST_Buffer(h.geom::geography, 5)::geometry), ST_MakeValid(p.geom)) as geom     from polygons p, hydro h;      -- 5m-20m zone               insert into splited_polygons (id, nom, distance, geom)     select p.id, p.nom, 20 as distance, ST_Intersection(ST_MakeValid(p.geom), ST_Difference(ST_Buffer(h.geom::geography, 20)::geometry, ST_Buffer(h.geom::geography, 5)::geometry)) as geom     from polygons p, hydro h;      -- 20m-50m zone               insert into splited_polygons (id, nom, distance, geom)     select p.id, p.nom, 50 as distance, ST_Intersection(ST_MakeValid(p.geom), ST_Difference(ST_Buffer(h.geom::geography, 50)::geometry, ST_Buffer(h.geom::geography, 20)::geometry)) as geom     from polygons p, hydro h;      -- > 50m zone               insert into splited_polygons (id, nom, distance, geom)     select p.id, p.nom, 100 as distance, ST_Difference(ST_MakeValid(p.geom), ST_Buffer(h.geom::geography, 50)::geometry) as geom     from polygons p, hydro h;


title: Hack to change data source of a layer file in ArcGIS 9.3.1 with python?

text: I'm looking for a way to change the source of my layer file using python. Actually I want to do this because I need to re-use a XSL template which is defined under the tap `HTML popup` of the layer properties dialog. As I can't use the `MakeFeatureLayer_management`- command to create a layer file that contains the `HTML popup` information I'm aiming at letting the layer file point to a different data source every time my python code is being executed. I know it is a breeze using `arcpy` but I'm bound to use the `gp`-object. This there a workaround anyone knows of?


title: How to add labels parallel to lines, polylines or multilines using Leaflet?

text: I want to add road name parellel to its line or if the line is curved, then the label should also be curved. How to add these name labels using leaflet? example image


title: How to make a 'Make Table Query' script in ArcGIS?

text: I am trying to get the make table query running in a script. IF I simply export the script from a model, it works without a problem. However, I do have to change the variable names, as this will be part of a bigger script. As soon as I change any variable names, it won't work anymore. See example:               # Import arcpy module     import arcpy          # set outputs to be overwritten     arcpy.env.overwriteOutput = True          #WORKS     # Local variables:     AA_allDomains = "D:\\Student\\DomainsToTables\\featureDomains.gdb\\AA_allDomains"     AB_BusBar_Domains = "D:\\Student\\DomainsToTables\\featureDomains.gdb\\AB_BusBar_Domains"          QueryTable1 = "QueryTable1"     # Process: Make Query Table     inList = [AA_allDomains, AB_BusBar_Domains]     ##fieldList = "AA_allDomains.Code #;AA_allDomains.Desc #;AA_allDomains.DomainName #;AB_BusBar_Domains.dataset #;AB_BusBar_Domains.featureclass #;AB_BusBar_Domains.field #;AB_BusBar_Domains.domainName #"     fieldList = [["AA_allDomains.Code", 'CODE'],["AB_BusBar_Domains.dataset", 'DATASET']]     expression = "AB_BusBar_Domains.domainName = AA_allDomains.DomainName"     arcpy.MakeQueryTable_management(inList, QueryTable1, "USE_KEY_FIELDS", "", fieldList, expression)          #DOESN'T WORK     # Local variables:     in1 = "D:\\Student\\DomainsToTables\\featureDomains.gdb\\AA_allDomains"     in2 = "D:\\Student\\DomainsToTables\\featureDomains.gdb\\AB_BusBar_Domains"          QueryTable1 = "QueryTable1"     # Process: Make Query Table     inList = [in1, in2]     ##fieldList = "in1.Code #; in1.Desc #; in1.DomainName #; in2.dataset #; in2.featureclass #; in2.field #; in2.domainName #"     fieldList = [["in1.Code", 'CODE'],["in2.dataset", 'DATASET']]     expression = "in2.domainName = in1.DomainName"     arcpy.MakeQueryTable_management(inList, QueryTable1, "USE_KEY_FIELDS", "", "fieldList", expression)      I already tried to play around with different DB types, different ways of accessing the fields,... but nothing worked out so far and I am starting to get a bit desperate here. Thanks in advance for any suggestions! Cheers, David


title: Elevation off Road in ArcGIS/Python

text: i'm using the Modelbuilder in ArcGIS 10.1 to calculate pixels depending on their slope and distance from the road. The third necessary task is to find out, if the pixel is upwards the road or downwards. Is there any fast solution to do this. The question sounds simple but in ArcGIS i have no idea to that. My first steps are: Do Cost allocation from roadpoints and slope, getting areas which would be accessable from the roadpoint, then interpolating z value to each area, calculating the mean height and compare it to the height of the streetpoint value! This is a really dirty way to do so and i would be thankful for any help


title: Raster clipping over 1300 km2 orthophotos

text: I have all of Denmark in 25 cm orthophotos added to my ArcMap (mosaic dataset). I've added a polygon of an area covering over 1300 km2. I've used the raster clip tool to clip the data into a new raster dataset. All data is on a network drive. This process has taken over 32 hours so far. Is there a difference in speed and such by doing raster clip or is it better to maybe use export data? Or what is faster? Without moving data locally.


title: data source for worldwide cross-sections of topographic and bathymetric for woodworking art project?

text: i am a decent r programmer and statistician, i am able to work with data sets pretty well. i am less familiar with GIS tools, but if given a shapefile i can certainly plot political borders and differently-colored geographies with the mapping packages in the r language. i am motivated to teach myself another program for this project - like qgis or python - if this is beyond r's capabilities. i have a pretty awesome woodworking project in mind, but i am not sure of the best data source, and i would appreciate some guidance about how to get topographic maps _that do not end at sea level_. i just bought some brand new chisels and i'm going to buy a big rectangular slab of mahogany to start carving a map into. title of the project: **the world without water** i want to print a cross-sectional / overlay that would have been used to make these maps, except a worldwide version. i apologize if that's the wrong terminology. my woodworking idea is to relief carve -- google image search -- a map of the world from the tallest mountains down to the mariana trench. that's 9,000m above sea level to 10,000m below sea level. if i go by 500 meter intervals, that is _exactly_ 39 cross-sections of the topography of earth that i would have to carve. _cross-section_ is the important term here, because for what i am trying to do, i need the entire earth's landmass _at or below_ a certain height. so for example: cross section #1 would be landmasses that round _up_ to 9,000m instead of rounding down to 8,500m. this is _exclusively_ mount everest, since k2 rounds down to the cross-section map at 8,500m. that means i should start carving my block of wood _everywhere except_ the peak of mount everest. according to wikipedia, the second, third, fourth, and fifth highest mountains are all closer to 8,500m than they are to 8,000m -- so they would all be left alone for the second iteration of the carving. this process continues - where i carve one 500m layer of earth at a time - until i hit the bottom of the mariana trench, 37 cross-sections later. to re-phrase: cross-section map #1 should show all points on earth lower than 8,750m, cross-section map #2 should show all points on earth lower than 8,250m, cross-section map #3 should show all points on earth lower than 7,750m, and this should keep going down until the deepest point. i know nothing about what USGS data are available, and there's too much of it (all with fancy names) for me to discern what type of map makes the most sense for my idea. i just want to be able to print these cross-sections out, so i can trace them and carve down layer-by-layer. **as someone with minimal knowledge of gis nomenclature and available data, it's difficult to search around and know what to look for. i would appreciate any advice explaining how to create 39 cross- sectional layers of the earth's surface.** thanks!!


title: I am creating a new layer on Geoserver using curl but it is not working

text: This is my php script               <?php           $xmlStr="<GeoServerLayer>     <id>LayerInfoImpl--570ae188:124761b8d78:-7fc0</id>     <enabled>true</enabled>     <name>topp:states001</name>     <mimeFormats>     <string>image/png</string>     <string>image/jpeg</string>     </mimeFormats>     <gridSubsets>     <gridSubset>     <gridSetName>EPSG:900913</gridSetName>     </gridSubset>     <gridSubset>     <gridSetName>EPSG:4326</gridSetName>     </gridSubset>     </gridSubsets>     <metaWidthHeight>     <int>4</int>     <int>4</int>     </metaWidthHeight>     <parameterFilters>     <styleParameterFilter>     <key>STYLES</key>     <defaultValue/>     </styleParameterFilter>     </parameterFilters>     <gutter>0</gutter>     </GeoServerLayer>";              $url="http://mindcrewgis.com/geoserver/gwc/rest/layers/topp:states001.xml";         $ch = curl_init($url);              curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); //option to return string         curl_setopt($ch, CURLOPT_VERBOSE, true);              curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");         $passwordStr = "admin:12345"; // replace with your username:password         curl_setopt($ch, CURLOPT_USERPWD, $passwordStr);              //POST data         curl_setopt($ch, CURLOPT_HTTPHEADER,                   array("Content-type: application/xml"));         curl_setopt($ch, CURLOPT_POSTFIELDS,'<xml>'. $xmlStr.'</xml>');              //POST return code         $successCode = 201;         $buffer = curl_exec($ch); // Execute the curl request         echo  $buffer;         curl_close($ch); // free resources if curl handle will not be reused     ?>      I am getting error :-xml > com.thoughtworks.xstream.mapper.CannotResolveClassException: xml


title: Check if line crosses a polygon

text: What I'm trying to do is with JSTS to check with `lineGeom.crosses(polygonGeom)` function if a line is crossing completely a polygon. The problem is that both cases from the picture returns true. I don't know why. Is there another way to check only the first case with line **1**. ![example](http://i.stack.imgur.com/c82lc.png)


title: QGIS 2.0 change the raster band from python command

text: Does anyone know how to change the band of a multiband raster from the python command line in QGIS2.0? It used to be done with something like rLayer.setGrayBandName(1) in 1.8, but this is no longer a property of the QgsRasterLayer. Thx.


title: Publishing Oracle View in Geoserver Error

text: I am getting following error while publishing layer in geoserver:               org.apache.wicket.WicketRuntimeException: Failed to add pluggable layer configuration panels             at org.geoserver.web.data.resource.ResourceConfigurationPage$PublishingLayerEditTabPanel$1.populateItem(ResourceConfigurationPage.java:378)             at org.apache.wicket.markup.html.list.ListView.onPopulate(ListView.java:562)             at org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:131)             at org.apache.wicket.Component.internalBeforeRender(Component.java:1071)             at org.apache.wicket.Component.beforeRender(Component.java:1105)             at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1753)             at org.apache.wicket.Component.onBeforeRender(Component.java:3946)             at org.apache.wicket.Component.internalBeforeRender(Component.java:1071)             at org.apache.wicket.Component.beforeRender(Component.java:1105)             at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1753)             at org.apache.wicket.Component.onBeforeRender(Component.java:3946)             at org.apache.wicket.extensions.markup.html.tabs.TabbedPanel.onBeforeRender(TabbedPanel.java:244)             at org.apache.wicket.Component.internalBeforeRender(Component.java:1071)             at org.apache.wicket.Component.beforeRender(Component.java:1105)             at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1753)             at org.apache.wicket.Component.onBeforeRender(Component.java:3946)             at org.apache.wicket.markup.html.form.Form.onBeforeRender(Form.java:2056)             at org.apache.wicket.Component.internalBeforeRender(Component.java:1071)             at org.apache.wicket.Component.beforeRender(Component.java:1105)             at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1753)             at org.apache.wicket.Component.onBeforeRender(Component.java:3946)             at org.apache.wicket.Page.onBeforeRender(Page.java:1531)             at org.apache.wicket.Component.internalBeforeRender(Component.java:1071)             at org.apache.wicket.Component.beforeRender(Component.java:1105)             at org.apache.wicket.Component.prepareForRender(Component.java:2292)             at org.apache.wicket.Page.prepareForRender(Page.java:1521)             at org.apache.wicket.Component.prepareForRender(Component.java:2329)             at org.apache.wicket.Page.renderPage(Page.java:892)             at org.apache.wicket.protocol.http.WebRequestCycle.redirectTo(WebRequestCycle.java:186)             at org.apache.wicket.request.target.component.PageRequestTarget.respond(PageRequestTarget.java:58)             at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)             at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1258)             at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)             at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)             at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)             at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:484)             at org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:160)             at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)             at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)             at org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:158)             at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)             at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)             at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)             at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)             at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)             at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)             at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)             at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)             at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:23)             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)             at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:74)             at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:45)             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)             at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49)             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)             at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)             at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:394)             at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)             at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)             at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)             at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)             at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)             at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)             at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)             at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)             at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)             at org.springframework.security.ui.rememberme.RememberMeProcessingFilter.doFilterHttp(RememberMeProcessingFilter.java:116)             at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)             at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)             at org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)             at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)             at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)             at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:278)             at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)             at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)             at org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)             at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)             at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)             at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)             at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)             at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)             at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:185)             at org.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99)             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)             at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:71)             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)             at org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:183)             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)             at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:41)             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)             at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:46)             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)             at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)             at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)             at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)             at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)             at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)             at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)             at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)             at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)             at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)             at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)             at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1805)             at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)             at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)             at java.lang.Thread.run(Thread.java:722)         Caused by: java.lang.reflect.InvocationTargetException             at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)             at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)             at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)             at java.lang.reflect.Constructor.newInstance(Constructor.java:525)             at org.geoserver.web.data.resource.ResourceConfigurationPage$PublishingLayerEditTabPanel$1.populateItem(ResourceConfigurationPage.java:374)             ... 117 more         Caused by: java.lang.NullPointerException             at java.util.ArrayList.<init>(ArrayList.java:151)             at org.geoserver.web.wicket.LiveCollectionModel$1.getObject(LiveCollectionModel.java:49)             at org.geoserver.wms.web.publish.AuthorityURLListEditor.<init>(AuthorityURLListEditor.java:57)             at org.geoserver.wms.web.publish.LayerAuthoritiesAndIdentifiersPanel.<init>(LayerAuthoritiesAndIdentifiersPanel.java:29)             at org.geoserver.wms.web.publish.WMSLayerConfig.<init>(WMSLayerConfig.java:103)             ... 122 more


title: Accessing graph in ArcMap document using ArcPy?

text: I am trying to access an existing graph in an ArcMap document with arcpy. I know how to create a new graph with arcpy, but I cannot seem to figure out how to access an existing graph in an ArcMap document with a standalone ar