title: Using Drop Markers and MarkerClusterer together?

text: I want to create a rather visually appealing representation of time-series data (Costco Store Locations w/ opening dates). My idea was to plot them on a map, in time-series, but it seems that the amount of markers on the map detracts from the image I want to present. Building the map in Google Maps API v3, I was able to get THIS far.. I want to be able to cluster the markers as they drop down onto the map. Ie, The clusters would grow dynamically as the markers drop down on the map. www.spatialanalysis.ca code:               <!DOCTYPE html>     <html>     <head>     <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>     <title>Locations</title>     <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>     <script type="text/javascript">          //**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//     //**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//     //**//  Author: Michael Markieta     //**//  Project: Costco Store Locations     //**//  Data retreived from: http://locationscomplete.com/store-list/costco     //**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//     //**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//              var locations = [             new google.maps.LatLng(32.822417,-117.226902),             new google.maps.LatLng(32.841335,-116.988465),             new google.maps.LatLng(32.250858,-110.859283),             new google.maps.LatLng(33.920861,-118.103543),             new google.maps.LatLng(33.703509,-117.93436),             new google.maps.LatLng(38.967291,-77.380416),             new google.maps.LatLng(34.133397,-117.925548),             new google.maps.LatLng(37.416397,-122.025055),             new google.maps.LatLng(38.597956,-121.454481),             new google.maps.LatLng(37.423109,-122.085598),             new google.maps.LatLng(61.144519,-149.885575),             new google.maps.LatLng(36.851743,-76.200459),             new google.maps.LatLng(33.862557,-117.924201),             new google.maps.LatLng(47.68024,-122.180759),             new google.maps.LatLng(36.808488,-119.874039),             new google.maps.LatLng(45.507928,-122.841526),             new google.maps.LatLng(39.196935,-76.597044),             new google.maps.LatLng(34.223773,-119.149583),             new google.maps.LatLng(37.37238,-121.996132),             new google.maps.LatLng(38.020717,-121.29218),             new google.maps.LatLng(38.420028,-122.713355),             new google.maps.LatLng(33.804266,-118.165351),             new google.maps.LatLng(47.655552,-122.682094),             new google.maps.LatLng(38.850486,-77.372628),             new google.maps.LatLng(34.219763,-118.595655),             new google.maps.LatLng(37.641433,-122.402387),             new google.maps.LatLng(33.624013,-111.901843),             new google.maps.LatLng(40.8621,-73.129359),             new google.maps.LatLng(34.088012,-118.148593),             new google.maps.LatLng(33.46946,-117.675789),             new google.maps.LatLng(39.35896,-76.447271),             new google.maps.LatLng(33.890187,-117.52134),             new google.maps.LatLng(39.50374,-119.785627),             new google.maps.LatLng(34.936738,-120.419455),             new google.maps.LatLng(26.274314,-80.148639),             new google.maps.LatLng(47.287206,-122.313341),             new google.maps.LatLng(37.781645,-121.972368),             new google.maps.LatLng(32.32717,-111.048009),             new google.maps.LatLng(26.808186,-80.086313),             new google.maps.LatLng(37.700208,-121.066252),             new google.maps.LatLng(26.096656,-80.250899),             new google.maps.LatLng(34.230202,-118.55338),             new google.maps.LatLng(25.77357,-80.331057),             new google.maps.LatLng(34.181322,-118.466013),             new google.maps.LatLng(44.089963,-123.065602),             new google.maps.LatLng(33.348897,-111.961343),             new google.maps.LatLng(36.616944,-121.846916),             new google.maps.LatLng(38.132065,-122.215414),             new google.maps.LatLng(33.556837,-117.678726),             new google.maps.LatLng(40.585787,-122.347285),             new google.maps.LatLng(39.03295,-76.909902),             new google.maps.LatLng(38.589837,-121.263124),             new google.maps.LatLng(39.156746,-77.212555),             new google.maps.LatLng(39.863305,-105.052659),             new google.maps.LatLng(39.68992,-104.866135),             new google.maps.LatLng(37.439169,-77.586471),             new google.maps.LatLng(42.132446,-72.621441),             new google.maps.LatLng(39.023253,-77.401456),             new google.maps.LatLng(36.793828,-119.717378),             new google.maps.LatLng(42.556851,-70.978901),             new google.maps.LatLng(33.80191,-116.392599),             new google.maps.LatLng(39.638525,-105.085107),             new google.maps.LatLng(26.587311,-80.066511),             new google.maps.LatLng(42.13492,-71.067637),             new google.maps.LatLng(40.888214,-74.251656),             new google.maps.LatLng(42.368551,-122.856221),             new google.maps.LatLng(48.797345,-122.486206),             new google.maps.LatLng(46.997635,-122.916983),             new google.maps.LatLng(41.443278,-73.404945),             new google.maps.LatLng(33.875629,-117.741348),             new google.maps.LatLng(37.641354,-77.561749),             new google.maps.LatLng(46.894147,-114.038041),             new google.maps.LatLng(45.754881,-108.572195),             new google.maps.LatLng(40.417196,-74.170446),             new google.maps.LatLng(38.086469,-122.55158),             new google.maps.LatLng(42.702728,-71.441137),             new google.maps.LatLng(44.919399,-122.996699),             new google.maps.LatLng(32.812356,-115.570156),             new google.maps.LatLng(34.403704,-118.461784),             new google.maps.LatLng(38.786793,-77.515824),             new google.maps.LatLng(41.108241,-74.024575),             new google.maps.LatLng(40.830526,-74.136122),             new google.maps.LatLng(21.285071,-157.709152),             new google.maps.LatLng(33.936088,-117.278572),             new google.maps.LatLng(33.726996,-117.796391),             new google.maps.LatLng(33.121825,-117.316232),             new google.maps.LatLng(47.727333,-117.411637),             new google.maps.LatLng(32.987666,-117.075735),             new google.maps.LatLng(40.745925,-73.598311),             new google.maps.LatLng(38.216167,-122.144283),             new google.maps.LatLng(61.209959,-149.803451),             new google.maps.LatLng(38.739149,-77.199815),             new google.maps.LatLng(33.661029,-117.743726),             new google.maps.LatLng(32.775455,-117.021689),             new google.maps.LatLng(37.421165,-122.093806),             new google.maps.LatLng(25.910043,-80.157258),             new google.maps.LatLng(25.92298,-80.297432),             new google.maps.LatLng(41.24892,-73.023836),             new google.maps.LatLng(42.592077,-114.46631),             new google.maps.LatLng(46.422715,-117.04411),             new google.maps.LatLng(40.631301,-73.738599),             new google.maps.LatLng(40.77439,-73.051809),             new google.maps.LatLng(44.055074,-121.267478),             new google.maps.LatLng(44.505697,-73.177127),             new google.maps.LatLng(41.542686,-72.970623),             new google.maps.LatLng(37.560999,-122.274638),             new google.maps.LatLng(58.357995,-134.482846),             new google.maps.LatLng(34.032386,-118.096374),             new google.maps.LatLng(40.905708,-74.569428),             new google.maps.LatLng(42.395813,-71.264451),             new google.maps.LatLng(37.702424,-121.810955),             new google.maps.LatLng(37.770893,-122.41051),             new google.maps.LatLng(19.68068,-155.970539),             new google.maps.LatLng(33.187411,-117.276257),             new google.maps.LatLng(37.301965,-120.494167),             new google.maps.LatLng(32.636082,-117.021628),             new google.maps.LatLng(38.46757,-121.415189),             new google.maps.LatLng(38.861636,-77.056645),             new google.maps.LatLng(37.31117,-121.851166),             new google.maps.LatLng(47.777699,-122.345098),             new google.maps.LatLng(40.876576,-74.040934),             new google.maps.LatLng(36.985153,-122.034642),             new google.maps.LatLng(33.773942,-117.940854),             new google.maps.LatLng(47.550821,-122.050053),             new google.maps.LatLng(45.436253,-122.755998),             new google.maps.LatLng(40.791618,-124.179356),             new google.maps.LatLng(40.757788,-73.421855),             new google.maps.LatLng(33.473027,-111.984675),             new google.maps.LatLng(38.427968,-78.855609),             new google.maps.LatLng(39.157818,-78.158418),             new google.maps.LatLng(20.887769,-156.450074),             new google.maps.LatLng(47.401048,-120.281529),             new google.maps.LatLng(37.357603,-121.93734),             new google.maps.LatLng(40.806725,-73.287038),             new google.maps.LatLng(38.781704,-121.265819),             new google.maps.LatLng(40.730929,-111.899854),             new google.maps.LatLng(40.572586,-74.169714),             new google.maps.LatLng(37.718264,-122.18078),             new google.maps.LatLng(40.051412,-76.256757),             new google.maps.LatLng(34.548389,-112.399255),             new google.maps.LatLng(34.153649,-118.797152),             new google.maps.LatLng(47.905194,-122.207193),             new google.maps.LatLng(28.661677,-81.415355),             new google.maps.LatLng(47.825577,-122.311067),             new google.maps.LatLng(37.254105,-121.875958),             new google.maps.LatLng(35.137247,-106.614491),             new google.maps.LatLng(33.928213,-84.352148),             new google.maps.LatLng(33.949619,-84.142316),             new google.maps.LatLng(34.126467,-118.263035),             new google.maps.LatLng(40.767484,-73.937002),             new google.maps.LatLng(40.654872,-74.00756),             new google.maps.LatLng(45.428407,-122.576749),             new google.maps.LatLng(40.898331,-73.793974),             new google.maps.LatLng(45.712363,-111.07094),             new google.maps.LatLng(36.702667,-121.667128),             new google.maps.LatLng(34.007139,-84.571921),             new google.maps.LatLng(40.091081,-75.384748),             new google.maps.LatLng(40.809582,-74.380725),             new google.maps.LatLng(34.016404,-117.745675),             new google.maps.LatLng(39.560526,-104.878803),             new google.maps.LatLng(37.66744,-122.104099),             new google.maps.LatLng(42.230514,-71.174234),             new google.maps.LatLng(42.43392,-83.433469),             new google.maps.LatLng(42.382483,-83.33346),             new google.maps.LatLng(42.516911,-83.118907),             new google.maps.LatLng(42.495813,-82.93712),             new google.maps.LatLng(33.804532,-118.335322),             new google.maps.LatLng(39.675355,-75.649503),             new google.maps.LatLng(41.846382,-87.963099),             new google.maps.LatLng(42.052922,-88.044838),             new google.maps.LatLng(40.692763,-74.289724),             new google.maps.LatLng(34.068725,-117.261947),             new google.maps.LatLng(34.42962,-119.873689),             new google.maps.LatLng(39.956253,-105.170194),             new google.maps.LatLng(37.106101,-76.494961),             new google.maps.LatLng(33.991326,-118.446364),             new google.maps.LatLng(33.375356,-111.842161),             new google.maps.LatLng(40.238003,-75.236919),             new google.maps.LatLng(37.897246,-122.321344),             new google.maps.LatLng(40.564115,-74.555633),             new google.maps.LatLng(28.403203,-81.405062),             new google.maps.LatLng(35.963419,-86.818468),             new google.maps.LatLng(33.57141,-84.335858),             new google.maps.LatLng(26.546005,-81.875282),             new google.maps.LatLng(40.973733,-73.863199),             new google.maps.LatLng(35.046012,-89.796084),             new google.maps.LatLng(35.192179,-89.79275),             new google.maps.LatLng(32.71236,-117.114354),             new google.maps.LatLng(40.282201,-111.679691),             new google.maps.LatLng(46.226998,-119.235272),             new google.maps.LatLng(26.219107,-81.773686),             new google.maps.LatLng(28.597577,-81.301403),             new google.maps.LatLng(39.296319,-84.301904),             new google.maps.LatLng(42.013786,-87.781621),             new google.maps.LatLng(40.550855,-111.89371),             new google.maps.LatLng(33.658689,-112.117178),             new google.maps.LatLng(32.780284,-117.13018),             new google.maps.LatLng(21.427172,-158.00155),             new google.maps.LatLng(48.453175,-122.335701),             new google.maps.LatLng(33.520186,-117.156275),             new google.maps.LatLng(41.760071,-87.741809),             new google.maps.LatLng(32.676352,-97.408266),             new google.maps.LatLng(33.044072,-96.700355),             new google.maps.LatLng(47.223413,-122.467227),             new google.maps.LatLng(35.068043,-106.532446),             new google.maps.LatLng(37.664858,-122.449199),             new google.maps.LatLng(34.742669,-86.601244),             new google.maps.LatLng(39.115947,-119.777222),             new google.maps.LatLng(47.154983,-122.30702),             new google.maps.LatLng(37.125031,-113.521696),             new google.maps.LatLng(44.967468,-93.353326),             new google.maps.LatLng(36.028378,-78.915437),             new google.maps.LatLng(33.519729,-112.094211),             new google.maps.LatLng(42.707191,-83.297431),             new google.maps.LatLng(27.922846,-82.331124),             new google.maps.LatLng(30.25236,-81.535804),             new google.maps.LatLng(33.90001,-118.372202),             new google.maps.LatLng(39.28649,-84.451219),             new google.maps.LatLng(39.068216,-94.582549),             new google.maps.LatLng(47.657268,-117.330015),             new google.maps.LatLng(42.185105,-88.092255),             new google.maps.LatLng(32.794571,-80.036554),             new google.maps.LatLng(32.942661,-97.110469),             new google.maps.LatLng(32.684559,-97.113638),             new google.maps.LatLng(41.930943,-87.676806),             new google.maps.LatLng(38.796488,-90.608341),             new google.maps.LatLng(41.092622,-73.452316),             new google.maps.LatLng(29.954002,-95.546737),             new google.maps.LatLng(29.788435,-95.531183),             new google.maps.LatLng(35.162874,-80.887396),             new google.maps.LatLng(33.645081,-112.230561),             new google.maps.LatLng(40.312316,-76.800169),             new google.maps.LatLng(30.396054,-97.745655),             new google.maps.LatLng(36.070122,-115.036699),             new google.maps.LatLng(39.790939,-105.081649),             new google.maps.LatLng(33.023078,-96.830359),             new google.maps.LatLng(36.067453,-80.323023),             new google.maps.LatLng(34.183768,-118.323671),             new google.maps.LatLng(36.165778,-115.332924),             new google.maps.LatLng(44.639019,-123.065464),             new google.maps.LatLng(42.63044,-82.980614),             new google.maps.LatLng(39.035979,-94.356003),             new google.maps.LatLng(45.198562,-93.349994),             new google.maps.LatLng(41.473655,-87.321449),             new google.maps.LatLng(29.575246,-98.596546),             new google.maps.LatLng(40.531706,-74.379424),             new google.maps.LatLng(33.49178,-112.129797),             new google.maps.LatLng(33.995244,-117.922243),             new google.maps.LatLng(38.958674,-94.73147),             new google.maps.LatLng(40.689848,-80.106352),             new google.maps.LatLng(35.127159,-80.703785),             new google.maps.LatLng(39.404509,-77.393326),             new google.maps.LatLng(39.15481,-76.729967),             new google.maps.LatLng(41.939714,-88.131311),             new google.maps.LatLng(34.083127,-117.689806),             new google.maps.LatLng(38.907086,-94.672973),             new google.maps.LatLng(34.077372,-117.546831),             new google.maps.LatLng(33.568688,-117.712047),             new google.maps.LatLng(21.317909,-157.873394),             new google.maps.LatLng(40.457991,-80.166641),             new google.maps.LatLng(38.294858,-77.51617),             new google.maps.LatLng(29.610805,-98.475742),             new google.maps.LatLng(35.383491,-119.049454),             new google.maps.LatLng(40.999739,-73.660939),             new google.maps.LatLng(37.753916,-121.475571),             new google.maps.LatLng(38.352436,-122.715129),             new google.maps.LatLng(38.51109,-90.339926),             new google.maps.LatLng(39.917047,-86.22549),             new google.maps.LatLng(39.912608,-86.065837),             new google.maps.LatLng(33.464901,-112.274875),             new google.maps.LatLng(42.106635,-87.822397),             new google.maps.LatLng(41.522089,-81.449314),             new google.maps.LatLng(26.412456,-80.101781),             new google.maps.LatLng(42.401444,-71.070587),             new google.maps.LatLng(36.838893,-119.789619),             new google.maps.LatLng(38.350077,-121.980576),             new google.maps.LatLng(41.458234,-82.015592),             new google.maps.LatLng(40.658202,-111.890538),             new google.maps.LatLng(34.660534,-118.149209),             new google.maps.LatLng(43.584851,-116.274274),             new google.maps.LatLng(37.008603,-121.554591),             new google.maps.LatLng(27.960343,-82.728112),             new google.maps.LatLng(38.646312,-121.110872),             new google.maps.LatLng(41.745816,-88.20577),             new google.maps.LatLng(45.333068,-122.766024),             new google.maps.LatLng(42.534843,-83.445182),             new google.maps.LatLng(38.897609,-77.444741),             new google.maps.LatLng(33.945388,-118.334279),             new google.maps.LatLng(47.238878,-122.37487),             new google.maps.LatLng(31.781987,-106.41123),             new google.maps.LatLng(41.19692,-111.979252),             new google.maps.LatLng(33.378987,-86.811577),             new google.maps.LatLng(36.058741,-79.885653),             new google.maps.LatLng(38.692255,-121.296886),             new google.maps.LatLng(33.70696,-78.915668),             new google.maps.LatLng(47.708143,-116.782242),             new google.maps.LatLng(32.937502,-117.036298),             new google.maps.LatLng(42.179031,-88.336518),             new google.maps.LatLng(39.114,-77.533714),             new google.maps.LatLng(41.992351,-72.576558),             new google.maps.LatLng(32.997327,-96.963311),             new google.maps.LatLng(37.520063,-120.887469),             new google.maps.LatLng(45.683986,-122.603726),             new google.maps.LatLng(32.608973,-117.081104),             new google.maps.LatLng(42.083184,-87.9368),             new google.maps.LatLng(41.561496,-93.806554),             new google.maps.LatLng(44.862014,-93.434655),             new google.maps.LatLng(42.504143,-83.759308),             new google.maps.LatLng(42.912576,-85.542381),             new google.maps.LatLng(39.971278,-74.911687),             new google.maps.LatLng(37.502574,-121.971735),             new google.maps.LatLng(34.090726,-84.277166),             new google.maps.LatLng(42.876094,-85.762732),             new google.maps.LatLng(33.803196,-118.038469),             new google.maps.LatLng(47.779498,-122.146637),             new google.maps.LatLng(35.251888,-120.689035),             new google.maps.LatLng(26.00789,-80.359657),             new google.maps.LatLng(48.234407,-114.330752),             new google.maps.LatLng(33.932086,-117.968113),             new google.maps.LatLng(36.277486,-115.206714),             new google.maps.LatLng(33.669623,-112.03004),             new google.maps.LatLng(45.534479,-122.933932),             new google.maps.LatLng(33.294576,-111.899032),             new google.maps.LatLng(35.29596,-119.056737),             new google.maps.LatLng(34.061614,-83.995316),             new google.maps.LatLng(33.296984,-111.74859),             new google.maps.LatLng(33.694977,-117.334477),             new google.maps.LatLng(47.05993,-122.764472),             new google.maps.LatLng(48.078633,-123.126156),             new google.maps.LatLng(48.078633,-123.126156),             new google.maps.LatLng(43.614052,-116.59131),             new google.maps.LatLng(40.389885,-111.826691),             new google.maps.LatLng(39.582488,-119.7368),             new google.maps.LatLng(48.147071,-122.188728),             new google.maps.LatLng(21.966207,-159.379784),             new google.maps.LatLng(39.64345,-106.888929),             new google.maps.LatLng(35.819171,-78.624095),             new google.maps.LatLng(38.314966,-85.575074),             new google.maps.LatLng(45.091701,-93.424209),             new google.maps.LatLng(36.137384,-86.882867),             new google.maps.LatLng(33.881385,-84.467067),             new google.maps.LatLng(34.138521,-117.443747),             new google.maps.LatLng(33.707108,-116.272281),             new google.maps.LatLng(46.61659,-111.997627),             new google.maps.LatLng(40.148544,-82.977471),             new google.maps.LatLng(41.601098,-87.8602),             new google.maps.LatLng(39.993388,-104.978402),             new google.maps.LatLng(40.403823,-79.920262),             new google.maps.LatLng(26.488717,-81.786306),             new google.maps.LatLng(26.681125,-80.218562),             new google.maps.LatLng(33.698181,-117.824643),             new google.maps.LatLng(34.939252,-81.991329),             new google.maps.LatLng(34.83597,-82.312969),             new google.maps.LatLng(37.389239,-121.883251),             new google.maps.LatLng(41.677196,-83.626067),             new google.maps.LatLng(43.31041,-87.924802),             new google.maps.LatLng(39.72291,-121.810157),             new google.maps.LatLng(34.515393,-117.319573),             new google.maps.LatLng(32.364332,-86.140767),             new google.maps.LatLng(39.18673,-76.794937),             new google.maps.LatLng(29.577884,-98.318589),             new google.maps.LatLng(41.263559,-96.104773),             new google.maps.LatLng(46.561741,-120.49665),             new google.maps.LatLng(36.294138,-119.318548),             new google.maps.LatLng(47.358133,-122.601163),             new google.maps.LatLng(35.194554,-106.65748),             new google.maps.LatLng(38.893358,-104.718057),             new google.maps.LatLng(38.669984,-121.724059),             new google.maps.LatLng(30.462738,-84.214734),             new google.maps.LatLng(34.112427,-117.828694),             new google.maps.LatLng(39.709654,-74.286927),             new google.maps.LatLng(25.6562,-80.412506),             new google.maps.LatLng(33.389225,-111.667683),             new google.maps.LatLng(40.056345,-74.155005),             new google.maps.LatLng(38.009856,-121.83862),             new google.maps.LatLng(37.78634,-121.256909),             new google.maps.LatLng(43.097724,-89.523653),             new google.maps.LatLng(39.645129,-105.008454),             new google.maps.LatLng(39.558634,-104.776266),             new google.maps.LatLng(45.028178,-93.040949),             new google.maps.LatLng(29.732819,-95.438941),             new google.maps.LatLng(42.905718,-112.45512),             new google.maps.LatLng(47.353816,-122.12213),             new google.maps.LatLng(38.668558,-76.87579),             new google.maps.LatLng(42.605107,-83.293988),             new google.maps.LatLng(41.908953,-88.340137),             new google.maps.LatLng(36.171045,-115.16097),             new google.maps.LatLng(33.850288,-118.141792),             new google.maps.LatLng(21.327791,-158.088361),             new google.maps.LatLng(33.918792,-118.343717),             new google.maps.LatLng(32.907041,-96.444231),             new google.maps.LatLng(33.994864,-118.143066),             new google.maps.LatLng(33.59978,-111.98313),             new google.maps.LatLng(37.479969,-122.216984),             new google.maps.LatLng(38.903972,-104.81736),             new google.maps.LatLng(40.795707,-73.932252),             new google.maps.LatLng(38.596055,-90.505135),             new google.maps.LatLng(41.313165,-81.817003),             new google.maps.LatLng(37.61726,-122.088419),             new google.maps.LatLng(46.14725,-123.917569),             new google.maps.LatLng(34.272487,-118.427676),             new google.maps.LatLng(40.733389,-73.86409),             new google.maps.LatLng(43.259394,-123.351215),             new google.maps.LatLng(32.817013,-117.154214),             new google.maps.LatLng(38.96407,-76.851827),             new google.maps.LatLng(34.946448,-85.249178),             new google.maps.LatLng(33.872015,-84.330505),             new google.maps.LatLng(41.908543,-87.835255),             new google.maps.LatLng(41.723497,-88.038493),             new google.maps.LatLng(42.21935,-87.905949),             new google.maps.LatLng(44.748879,-93.293251),             new google.maps.LatLng(45.621461,-122.471505),             new google.maps.LatLng(34.247276,-77.874103),             new google.maps.LatLng(32.621279,-96.911471),             new google.maps.LatLng(40.690524,-111.957864),             new google.maps.LatLng(40.890332,-111.894004),             new google.maps.LatLng(38.645195,-77.299368)         ];              var markers = [];         var iterator = 0;              function initialize() {              drop();             var mapOptions = {                 zoom: 3,                 panControl: false,                 zoomControl: false,                 scaleControl: false,                 streetViewControl: false,                 overviewMapControl: false,                 mapTypeId: google.maps.MapTypeId.ROADMAP,                 center: new google.maps.LatLng(49.645,-95.315),             };             map = new google.maps.Map(document.getElementById("map_canvas"),             mapOptions);         }              function drop() {             for (var i = 0; i < locations.length; i++) {                 setTimeout(function() {                 addMarker();                 }, i * 50);             }         }          //**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//     //**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//     //**//  Custom map markers created with:     //**//  Google Map Custom Marker Maker 2011     //**//  http://www.powerhut.co.uk/googlemaps/custom_markers.php     //**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//     //**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//**//              function addMarker() {             var image = new google.maps.MarkerImage('markers/costco_image.png',             new google.maps.Size(12, 12),             new google.maps.Point(0,0),             new google.maps.Point(6, 12));             var shadow = new google.maps.MarkerImage('markers/costco_shadow.png',             new google.maps.Size(22, 12),             new google.maps.Point(0,0),             new google.maps.Point(6, 12));             markers.push(new google.maps.Marker({                 position: locations[iterator],                 map: map,                 draggable: false,                 animation: google.maps.Animation.DROP,                 shadow: shadow,                 icon: image,             }));             iterator++;         }     </script>     </head>     <div id="map_canvas" style=         "position: absolute;         top: 50%;         margin-top: -300px;         left: 50%;         margin-left: -500px;         width: 1000px;         height: 600px;         border-style: solid;         border-width: 1px;         border-color: darkgray;">         </div>     <body onload="initialize()">     </body>     </html>


title: How to reference vector based data to raster data that already has spatial reference in MAPublisher?

text: I have been able to load in raster data into MAPublisher and properly registered it, however I have been having trouble with a further step. I am trying to reference vector data that has no GCS or projection to the the raster data's spatial information. The vector data is in pdf format, and I would like to be able to reference it and export it as an ESRI supported format. I have been able to size the vector data to match the raster data, but every time I try to register it to the raster data, it makes it incredibly large and goes off the canvas. Is what I want to do possible?


title: Live KML from PostGIS to Google Earth

text: I was wondering if anyone knew a way to bring data from a postGIS database into Google earth to view live. I know of the `asKml` function in PostGIS, but I'm interested to know if anyone had managed to hook up a kml so that it is live against the database and not just a static kml.


title: How to render tiles from kml file

text: I'm trying to render tiles out of a KML file. Normally, I'd render tiles out of an planet.osm extract. For example, I'd select a tag using osmosis and then process it with osm2pgsql. Then I'd generate the tiles using Mapnik's python script and I'd serve them with OpenLayers. Maintaining this structure, i.e. PostgreSQL (with PostGIS) and OpenLayers, I'd like to know what's the best way to do this starting from a kml file, rather than an osm one. An option would be to transform the kml file into an osm file. Another option would be to find something like kml2pgsql. I haven't found any questions nor ways to do this (I'm specially surprised this is not a duplicated question). Do you know how to do this? (might be using something else, as far as it's supported in Linux and uses Postgresql - Openlayers). Answer: I marked Andre answer as the final one because while I'm not using exactly what he said it put me in the right path. I ended up using TileMill rather than QGIS, but the process is practically the same...


title: arcpy: changing lyr data source (raster layers)

text: I am trying to create a lyr file for each raster file in a folder. To get exact same display settings I thought I would create a lyr file, then, using arcpy copy-paste it for each file in folder and change the data sources. The script generates new lyr files but does not change data sources - and gives no error. So, what am I doing wrong?               import arcpy     lyrFile = arcpy.mapping.Layer(r"C:\temp\rst\sample.lyr")     arcpy.env.workspace=r"C:\temp\rst"     for i in arcpy.ListDatasets():      lyrFile.replaceDataSource(lyrFile.workspacePath,"RASTER_WORKSPACE",i)     lyrFile.saveACopy(lyrFile.workspacePath+i)


title: How to get accurate coordinates from google geocoding services?

text: Can I write my address in a better way to increase the odds of getting better coordinates from google geocoding services. If someone has insights about how GIS parse addresses or experinces with geocoding services, please share


title: How do I get basic statistics on a field in a joined table?

text: I have a shapefile to which I've joined a table, matching with an ID field. All the fields of the table show up correctly when I open the shapefile's attribute table. But when I go into vector/analysis tools/basic statistics I can only choose one of the fields in the shapefile itself; those I have joined are missing.


title: HCS resolution merge (artifacts and dead pixels)

text: I try to use ATCOR and HCS resolution merge to preprocess urban Worldview-2 data. Applying the HCS algorithm without initial atmospheric/radiometric correction works just fine, but if I apply ATCOR beforehand, results get severely damaged. This happens: ![enter image description here](http://i.stack.imgur.com/dlkgQ.png) Also, after using ATCOR the data also looks alright, and I can't seem to find the source for these distortions. If needed, I can deliver further information on the input data, histograms or whatever might help.


title: How to truncate extension off in-line variable %name% in ModelBuilder?

text: I have seen similar questions but no clear answer and I am afraid that this can't be done in ModelBuilder alone. Is there a way to truncate the extension off the %name% variable? I am working with .tif and .asc files that I use to resample and do zonal statistics but since they have file extensions the tools throw an error when using %name% and I am forced to use %n% and then rename the files using R. I have tried "%name%"[x:y] as suggested in another question but doesn't work. Any suggestions? This is ArcMap 10.2 but had the same problem in 10.0


title: Compiling MySQL and Sqlite drivers for GDAL/OGR 1.10.1

text: **IF YOU WANT SHORT QUESTION GOTO QUESTION SECTION** I have builded GDAL 1.10.1 with the instructions in BuildingOnWindow. By the default OGR drivers dont support MySQL, PostgreSQL/PostGIS, Sqlite, ESRI FileGDB connections. So users modify options in nmake.opt file before compiling. I have modified options for that four drives and compiled the source code without error. After i copied neccessary .DLL files (libmysql.dll, libpq.dll, FileGDBAPI.dll etc.) to the bin folder. And than i listed OGR drivers with `ogrinfo.exe --formats`. But only new ESRI FileGDB driver listed, other new drivers(MySQL, PostgreSQL/PostGIS, Sqlite) dont. After all i have noticed an explanation about OGR drivers like FileGDB Build GDAL with FileGDB Support. It says if you want to install FileGDB driver firstly compile it in source code dir with `nmake /f makefile.vc plugin` command. After that ogr_FileGDB.dll generated. Copy it to gdalplugins folder and generate an environment variable named GDAL_DRIVER_PATH. This variable points to gdalplugins folder. I applied this solution for FileGDB (really interesting because FileGDB works without this) and PostgreSQL. So i got these drivers :) But MySQL and Sqlite drivers source code dont understand `nmake /f makefile.vc plugin` command **SHORT QUESTION** I want to build MySQL and Sqlite/Spatialite driver for GDAL 1.10.1. **INFO:**   1. OS = Win7x64   2. Visual Studio ver. = 2012


title: Cannot spatially select from Oracle view based featurelayer in ArcMap

text: I'm hoping someone has seen this before and has a solution. I've exhausted all my ideas. I having problems with the selection and identify tool in ArcMap. I have a point feature class, zlevels, and an Oracle spatial view, sv_zlevels, created from zlevels. I've created a new map in ArcMap 9.3 and added both of them in. When I use the Identify tool and Select Feature tool on the original feature class layer, it works fine. When I try to do the same on the view layer, I get no results. I've checked that it is selectable, and that it can Identify from All Layers. The layer draws fine. I can change its symbology and labeling. I can Select By Attribute under the Selection menu but I get no results back when I do a Select By Location. Its like its not there. If I do the same Select By Location on the original feature class, it works fine. I have the same set up with a polyline feature class, streets, and I don't have any problems with it. Streets and zlevels came from the same place - NAVTEQ. The weird thing is the zlevels had been working. I can't pinpoint exactly when it stopped since I'm not always working directly in ArcMaps. And I've had this happen before with zlevels. I restarted my machine and it seemed to work after that but that may have been a coincidence. Other have the same problem on their machine when trying to select from sv_zlevels. What I've tried with no success: *Dropping and recreating the view in Oracle *Restarting my machine  *Restarting the server and re-registering the spatial views Has anyone ever experienced something like this before? We are running ArcSDE 9.3.1 with Service Pack 1 and ArcGIS Server 9.3.1 with Service Pack 1. Our version of Oracle is Oracle 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production. At the end of the week we are going to be updating everything.


title: Using the Proj4js library to convert from Google Maps to projected values

text: I'm using the proj4s javascript library (based on advice from this question I asked previously) to convert lat/long values on my webpage. This page receives the lat/long values from google maps and converts them to the British National Grid (ORD SURV GB), which wikipedia tells me has the following code: EPSG:27700. I want to calculate the maximum and minimum values of both the latitude and longitude, so I can query a database. My code is as follows:               var source = new Proj4js.Proj('WGS84');         var dest = new Proj4js.Proj('EPSG:27700');          bounds = map.getBounds()  // Get bounds of map after user pans around        zoom = map.getZoom()      // Get zoom level          xMax = bounds.getNorthEast().lat()  //get max and min values for lat/long     yMax = bounds.getNorthEast().lng()       xMin = bounds.getSouthWest().lat()     yMin = bounds.getSouthWest().lng()          alert('xMin: ' + xMin + '\nxMax: ' + xMax)     alert('yMin: ' + yMin + '\nyMax: ' + yMax)                    // transforming point coordinates        var latXNew = new Proj4js.Point( xMin, xMax );        var latYNew = new Proj4js.Point( yMin, yMax );           Proj4js.transform(source, dest, latXNew);           Proj4js.transform(source, dest, latYNew);            However, I'm not getting the correct results from my webpage. I've loaded in a kml file that has a rectangle with boundaries that I know, and the values don't match up. They appear to be off by at least a factor of approximately 8.               NE Lat: 52.25635981528854     NE Lng: 1.3534606328125243          Expected Lat: 500000.0     Expected Lng: 150000.0          Returned Lat: -5527596.989640327 (incorrect)     Returned Lng: 622727.1071581601 (incorrect)      What am I doing incorrectly?


title: Where can I get UnitedStates.gdb file

text: I am doing this tutorial http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/How_to_geocode_a_single_address/00010000038r000000/ but it requires the following file: UnitedStates.gdb I downloaded DataMaps10 from ESRI but I do not see any .gdb files.


title: what is the fastest way to plot a list of Canadian Addresses?

text: I have a list of roughly 500 addresses that I'd like to plot on a map either as a point layer or as a kml/placemarks. The addresses are in form 123 QGis Street, Province, Canada, A1A 1A1


title: How to use QGIS to fix an invalid geometry without it telling me I'm not allowed?

text: I have a shapefile, and it's got a self-intersecting geometry in it. I'd like to fix the self-intersection, but it will require a few moves. When I attempt to move a point using the QGIS edit tools, I am warned that the resulting geometry is invalid (I know this already) and that my last change has been reverted. What do I do here? Is there a way to suppress these warnings in QGIS so I can make the change, and only have it enforce validity when I'm done?


title: Converting MDB File With Unicode Characters

text: I'm using C# wrapper of GDAL and I'm having a problem converting MDB file that contains unicode characters. Lets take for example conversion to KML file, non-English characters are replaced by '?' How do I solve it?


title: ArcObjects - IGraphicsContainerEvents_ElementAddedEventHandler Unregisters After a Few Fires

text: I am using IGraphicsContainerEvents_ElementAddedEventHandler to do stuff with graphics added by users in an ArcMap session using the standard drawing toolbar. As the code snippet below shows, its a pretty straight-forward process, and works perfect for the first few (2-3) graphics added. However, eventually 'ElementAdded' stops firing for no apparent reason (i.e no errors that I can catch). Does anyone have any idea of what would be unregistering the listener (OnElementAdded) and/or preventing the ElementAdded event to be fired?               ICompositeGraphicsLayer activeGraphicsLayer = (ICompositeGraphicsLayer)mxDoc.ActiveView.FocusMap.ActiveGraphicsLayer;     IGraphicsContainerEvents_Event containerEvents = (IGraphicsContainerEvents_Event)activeGraphicsLayer;     containerEvents.ElementAdded += new IGraphicsContainerEvents_ElementAddedEventHandler(OnElementAdded);          private void OnElementAdded(IElement Element)     {     // do stuff     }


title: How to remove ESRI basemap credits?

text: As you can see from the attached sample map, the ESRI basemap credits are overpowering and reduce the cartographic design of the entire map. These credits appear to be new to 10.1 and essentially make these maps unusable in any sort of publication. Are we stuck with the credits, or is there a way to remove them? ![enter image description here](http://i.stack.imgur.com/CoiBy.png)


title: Calulate distance between two points

text: If I have two coordinate points of (lat, lon), how would I calculate the distance between the two?


title: ArcGIS Length and Area Calculation Scenarios

text: Trying to get a handle on how length and area are calculated in different scenarios in ArcGIS. I don't know why I can't find a answer on the feature class fields, but I can't find a precise answer, unless I'm not understanding something and I know there is some history. Can you help me fill in the question marks? Or tell me why I'm going about this all wrong ; ) GCS = Geographic coordinate system PCS = Projected coordinate system   All links are to 10.1 help docs --   1. Feature Class shape_length and shape_area fields   a. GCS - ?   b. PCS - Using simple planar   c. Is it always auto-updated, except for shapefiles? yes   2. ArcMap Measurment Tool   a. GCS - default geodesic, alternatives are Loxodrome and Great Elliptic, but not planar. Area calculation not available!   b. PCS - default planar, alternatives Geodesic, Loxodrome, and Great Elliptic   http://resources.arcgis.com/en/help/main/10.1/index.html#//00s500000022000000   3. Attribute Table Calculator   a. GCS - not available   b. PCS - planar   http://resources.arcgis.com/en/help/main/10.1/index.html#//005s00000027000000   4. Calculate Field Tool (Data Management toolbox)   a. GCS - geodesic linear, area available but questionable   b. PCS - planar   http://resources.arcgis.com/en/help/main/10.1/index.html#//00170000004m000000   5. Buffering Tool (and other tools coming)   a. GCS - geodesic   b. PCS - planar or specify GCS output http://resources.arcgis.com/en/help/main/10.1/index.html#//000800000019000000   6. Javascript API Clientside   a. GCS - geodesic area and length functions   b. PCS - can convert from web mercator to geographic (or use geometry service) http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/namespace_geometry.htm   7. Flex API Clientside   a. GCS - geodesic area and length functions, "The length [or area] will be calculated using a custom cylindrical equal-area projection". This is not mentioned in the javascript api!!   b. PCS - can convert from web mercator to geographic http://resources.arcgis.com/en/help/flex- api/apiref/com/esri/ags/utils/GeometryUtil.html   8. ArcGIS Server REST API - Geometry Service   a. GCS - geodesic   b. PCS - planar   http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/geometryservice.htm Another question, what exactly is a geodesic measurement? I thought it meant a 3D trig formula on a spheroid (haversine?). And is it too slow to use in calculating an area and that is why equal area projections are used? Another question, when determining length and area -- is an equal area projection more accurate than a geodesic calculation using the same datum, spheroid? And briefly why?


title: Multiple leader lines on one annotation (non feature-linked)

text: Is it possible to link multiple leaders lines to one piece of annotation? I'm working in ArcGIS 10.2 Desktop Advanced with non-feature linked geodatabase annotation. I have hundreds of numbers labeling various polygons, but some polygons share a number. Instead of creating multiple numbers/annotations for each polygon I'd like to have one number with multiple lines pointing to each polygon. So, in the image below, the number 5 corresponds to multiple polygons. Here I've moved 5 from it's ideal location to show that the second leader line is not connected to the number annotation. My workaround has been to create another piece of geodatabase annotation with a blank text string to serve as a placeholder for a leader line. The other option was to use map/graphic annotation to create the second leader line, but with the multiple disadvantages of not being in the same annotation feature class as the number annotation. ![A blank piece of annotation holding the leader line](http://i.stack.imgur.com/s59ln.png) My goal would be for each piece of number annotation to be connected to multiple leader lines like appears below. ![Numbers correspond to multiple polygons](http://i.stack.imgur.com/3A35t.jpg) Thanks for asking for clarification. Apologies for the delay.


title: Changing infoWindow style in ArcGIS JavaScript API (v3.2)

text: See below a screenshot of the `infoWindow`'s appearance in my ArcGIS JavaScript API (v3.2) application. ![default style](http://i.stack.imgur.com/40mMh.png) As you can see the transparent title bar with the white buttons doesn't work too well against a background map with white areas. I've used Chrome's developer tools to test changing the CSS of every element associated with the infoWindow but still haven't managed to stop it having a transparent background. The closest I've come gave it a coloured background - by adding a `background-color` to the `title` class - but this extended way outside the infoWindow and out of the map. ![altered title style](http://i.stack.imgur.com/RYkgl.png) How do I style this differently? Do I need to choose a new (non-claro) theme for the whole page? What are the other theme options? Any input much appreciated.


title: Combining shape files and exporting

text: I am new to QGIS and I need to know if if is possible to merge 2 shapefiles that do not have a common field and then export to Excel. Example of shapefiles:   * Countries broken up in to Municipality sections (not on a suburb level)   * Company active client base by suburb Thank You


title: Python metes and bounds automation in ArcMap

text: We are using the metes and bounds in old pipeline alignment sheets, when in an edit session in ArcMap, to plug in the "direction/length" values to generate the line segments. Does anyone have any idea how I could explore further on how would this be done in Python. For example if I used an insert cursor and some how mangled that with some trigonometry...(grasping for straws here). All I have is an alignment sheet giving a string of these... S-34-47-00-E 567'. Any ideas. Other gis systems welcome or ArcObjects Thanks.


title: Logging incoming request HTTP headers in GeoServer

text: I have a _GeoServer 2.0.2_ and I send _POST_ requests using mobile devices. I would like to see how the incoming _POST_ request _HTTP headers_ are formatted, especially what kind of character encoding and response type are provided by the client. **How can I setup _GeoServer_ and/or _Jetty_ to provide me with these informations?**


title: Get part of polyline based on 2 points in Arc Engine

text: Currently I have a layer with polylines; in another layer, I allowed the user to create 2 points on the polyline. I want to know if there is a function for the polyline feature that I can use to get the clipped portion of the polyline based on the 2 user-added points. Thanks.


title: convert SDE table to polygon feature class with Arcobjects

text: I figure there's a few ways to convert a table to **polygon** feature class, but what's the fatest and cleanest way to do it? My table has lat, long, azimuth, and beam width and based on all this info I can create polygons. Couple of methods I am thinking of right now:   1. Could I just add an OID field and 'shape' field to my existing table and create polygons    2. Create an empty polygon fc, generate polygons and then copy all table rows to fc. The problem is, I don't really want attribute redundancy by having data in both the table and polygon fc. Thanks!


title: Query results feature set to a brand new Features set

text: Here what I am trying to do: 1) My overall goal is to query an extent and to extract data by this extent. I can successfully achieve the first part. 2) Here is my issue: The Dynamic layer queried has a schema that wont work with the GP "Extract data" params. Here are the default fields I need, these fields are the default for any feature set created:                Fields: FID ( type: esriFieldTypeOID , alias: FID ),      Id ( type: esriFieldTypeInteger , alias: Id )         Shape_Length ( type: esriFieldTypeDouble , alias: Shape_Length )         Shape_Area ( type: esriFieldTypeDouble , alias: Shape_Area )         Features: None.      3) The solution that I am trying to implement is very close to what this person was trying to implement on this threadenter link description here. My basic understanding of this is to gather all graphics, push them into a brand new feature set and then use it as an AOI. 4) My code that works but return an empty shapefile or values:               function executeQueryTask(county) {           var county = document.getElementById("sel_county").value                   var queryTask = new QueryTask("http://webgisdevint1/arcgis/rest/services/Alex_Try/Counties/MapServer/0");           var query = new Query();           query.returnGeometry = true;           query.outFields = ["FMNAME_UC"];           query.where = "FMNAME_UC = '" + county + "'";           query.outSpatialReference = map.spatialReference;           queryTask.execute(query);           var clipLayers = [];            if (registry.byId("layer1").get("checked")) {                clipLayers.push("Counties");             }             if (registry.byId("layer2").get("checked")) {                clipLayers.push("SRA");             }             if (registry.byId("layer3").get("checked")) {                clipLayers.push("Burn");             }             if (clipLayers.length === 0) {                alert("No layers to clip, please select a layer you would like to clip...");                return;          }                   graphic = new Graphic();               graphic.geometry = esri.graphicsExtent(map.graphics.graphics);               var clipFeatureSet = new FeatureSet();               clipFeature = [];               dojo.forEach(map.graphics.graphics, function(graphic){               //if (graphic.geometry.type ="polygon")               clipFeature.push (graphic);               });               clipFeatureSet.features = clipFeature;                          var params = {                "Layers_to_Clip": clipLayers,                "Area_of_Interest": clipFeatureSet,                "Feature_Format": registry.byId("formatBox").get("value")         };                            domStyle.set(loading, "display", "inline-block");             gp.submitJob(params, completeCallback, statusCallback, function (error) {                alert(error);                domStyle.set(loading, "display", "none");             });          };      Any idea is more than welcome!


title: Summing Attributes from a Related Table?

text: I have a line feature class representing road segments, with each road segment having a unique ID. This feature class has an attribute of average observed daily traffic counts. I have another table which contains more information about each road segment, but each road segment ID in the table has 8 entries (each of which corresponds to a 3-hour period). I've set up a Relate between the feature class and the table, and have added a new field to the feature class that I would like to populate with the sum of 8 values from the table that share the same road segment ID (i.e. one attribute, represented by 8 measurements from different times-of-day). I'd like to do this using the Field Calculator or Model Builder. Python would be preferred over VBScript.


title: OBIA following connected components segmentation in Monteverdi2

text: New to Monteverdi2 and OTB. I just finished a connected components segmentation using the Segmentation module and the large-scale vector output mode for large datasets. How can I filter the output (now a shp file) using an OBIA Expression like that available in the Connected Components module? Do I rasterize the shp? I don't see an OBIA module that starts from such a raster-- only the integrated CC segmentation and OBIA tool that I couldn't use because my dataset is too large. Maybe I'm missing something. Thanks for any help.


title: When creating XY Feature in Arcpy, null values resulting in field being text not numeric

text: I'm trying to create a feature class from a csv / tab delimited file. All the fields in the file are numeric, but some have null values, and those fields are being coerced into "text" types. (actually, only the SECOND time I run the create XY layer. The first time it's fine, and it's fine if I delete Scheme.ini). Any advice for a workaround?


title: Set Default Transparent Pixels in QGIS?

text: Is there a way to set QGIS to automatically load in images with no data values of (0,0,0) as transparent instead of black? I've looked through the forums, tried saving a .qml file out, looked through all the settings, and I can't find a way to do it. We process thousands of images, and we need to be able to look at them without black no-data areas covering up the images underneath. I can manually set it by going in to the properties of a raster layer, putting 0 in as a no data value and hitting apply, but I need a way to do this automatically when the images load in. In ERDAS Imagine or ArcGIS this is an easy thing to set. Can it be done in QGIS?


title: Label Selected Features Only

text: OK, I've been labeling using the LabelEngine and simple expressions and it is working for every layer. I want to offer the option of labeling only selected features and thought it would be this simple:               annotateLayerProperties.LabelWhichFeatures = esriLabelWhichFeatures.esriSelectedFeatures;      Unfortunately that doesn't do it. Every polygon is still labeled. I verified that the features were selected (I have a routine that just returns the selected keys.) I also tried replacing the Engine labeling with a:               annotateLayerProperties.WhereClause = BuildWhere( keyName, selected );      using both my keys and the features OIDs - that does not label at all. Does anyone know how to label only the selected features?


title: How to download the entire ASTER GDEMv2 dataset?

text: On October, NASA released the new ASTER GDEM global dataset (30m) and I have been wanting to get my hands on it. The only problem is that it takes forever to download and I do not feel like drawing tiny little boxes for the entire world. Is there are any place I can download the whole thing from? Scripts are welcomed :) PS: If you know of a better worldwide (royalty free) elevation dataset, I would love to hear about it, too.


title: Elevation color ramps for DEMs in QGIS

text: I need to color a DEM that I have loaded in QGIS 2.2. I'd like the DEM colors to represent different elevations, something like: https://dl.dropboxusercontent.com/u/26086662/color_ramp.jpg None of the color ramps that come with QGIS are related to elevation, so can anyone point me to pre-existing ramps that I can load in to QGIS? Thanks!


title: isolated polygons selection (not donuts)

text: I'm exploring a few different options for this process and I'm unsure what would be most effective. I'm trying to find all isolated, non-intercepting polygons in the same layer (not to merge). Most share boundaries, and a few overlap. Area varies so it unfortunately cannot be the deciding factor for selection (e.g. selecting by max area). I'm using ArcMap 9.3.1. I created a 10 meter buffer around the polygons, erased the center of my buffer features, then select all polygons that intersect the buffer, thinking I'll just do a switch selection. The problem is that all polygons get selected, I guess because the selection is too tolerant. I don't want merely tangent/touching boundaries, I need them to overlap within the buffer (in effect, avoiding selection of those polygons each buffered feature is created from). The "are within" of course selected nothing. I wonder if dissolve can be used. edit: as per request, here's a pic representing what I mean by isolated - no other polygons border it from any side.![pic](http://i.stack.imgur.com/TqACT.png)


title: How to batch run an FME workspace on a feature basis?

text: Not sure about the title of my question... My point is to run an entire workspace for each feature contained in a reader. In python this would look like:               for s in bus_stops:         run_workspace(s)      Basically my workspace works as following :   * reads 1 bus stop   * reads a road network   * computes network cost for the input bus stop (NetworkCostCalculator)   * outputs contours The workspace works if input is limited to 1 bus stop (une source only for NetworkCostCalculator). By now I have split my input bus stops in as many feature types and I batch run my workspace on them but I'm sure there's a more efficient way to achieve that.


title: How do I save a polygon once I have created it in editor?

text: I am attempting to create a new polygon. I go to ArcCatolog>New>Shapefile and make sure Feature type is set to polygon. I create the polygon and if I click save edits or stop editing, it disappears. What am I doing wrong?


title: Sending commands into FGDB

text: I have a large `.gdb` of all blocks in the United States, available from Census. I would like to create a point shape file of all census tract centroids in the US. I have QGIS with FileGDB enabled, as well as R with `rgdal`, so reading the data is not a technical problem. My issue is that reading the layer into `R` has taken 2 hours and used up 56 Gb (I have 64) of memory, and it's not done. I know exactly what I want to do:   1. Create a tract field by pulling the first 7 characters out of the GEOID field   2. Dissolve the blocks on this field   3. Calculate the centroids of the new geographies   4. Export as a points shape file, or even as another layer in the database. QGIS shows the data, but the field calculations take just about as long. It seems that I should be able to send these commands _into_ the database rather than load the database and try to do it interactively. I might need some hand holding to do this, or at least good pointers to the right manuals. On the other hand, is there a way to pull the database out in chunks? I am running Ubuntu 14.04 on a 12-core machine, so parallelization is always a good option...


title: How to create a polygon buffer from a line?

text: I have connected a series of points into a line in ArcMap 10 with the Points to Line tool in the ArcToolbox. The line is, of course, in its own layer, and I added a 5 meter buffer around the line. It appears that this buffer is in the layer/feature class as the original line. Is there a way for me to turn this buffer into an independent polygon, in its own layer? Once I achieve that, I would like to be able to slice the polygon (buffer) into pieces. Thanks for your answers.


title: Using Mapscript to create a mapfile from scratch

text: Following a few online tutorials I have seen, I am trying to create a mapfile from scratch using mapscript. However, when I try to create the layer object, I get an error in the **init** of mapscript.py; NameError: global name 'args' is not defined. Does anyone see something obvious? When I use a mapfile that already exists on disk, everything works as expected.                       # create a new mapfile from scratch             self.map = mapscript.mapObj()             self.map.save('temp.map')             self.map.setSize(256,256)             self.map.setExtent(-180.0,-90.0,180.0,90.0)             self.map.units= mapscript.MS_DD             self.map.imagecolor.setRGB(255,255,255)                  # create a layer for the raster             self.layer = mapscript.layerObj(self.map) ----> ERROR HAPPENS HERE             self.layer.name= 'tilesource'             self.layer.type= mapscript.MS_RASTER             self.layer.status = mapscript.MS_ON             self.layer.data= rasterpath


title: Taudem Resources

text: As I frequently deal with hydrology, I've heard Taudem mentioned quite a few times. I'm finding all sorts of information, but much of it is dated for use with previous versions. In addition, the current build doesn't support gui interaction with Arc10, which might not be a hindrance to many of you, but certainly raises the barrier of entry for many others. Given that it seems like such a powerful tool, I would have imagined seeing some more social resources dedicated to it. But I haven't. Is my search-foo bad, and is there some sort of Taudem enclave out there that I just can't find? Or is it just that something of this sort doesn't exist yet? The reason I'm looking to use taudem is that Arc10 and ArcHydro still seem a bit hairy at times. Any suggestions are appreciated! Thanks again.


title: Linear referencing in Geographic Coordinate System (GCS) using ArcGIS for Desktop?

text: I want to make a new line segment in event table with linear referencing ArcGIS 10.2 for Desktop. I'm using two tools:   1. Create Route with input line feature in Geographic coordinates system and tool    2. Make Route Event Layer with input table event with decimal degree unit.  But when I trying running them, the result is that only half of the events are in the segmentation. Why are all lines not segmented based on table events? in segment with low risk i give blue color and high risk in red color, but only low risk display in segment ![enter image description here](http://i.stack.imgur.com/QH9qr.png)


title: Why do my geowebcache tiles not work in openlayers client?

text: var options = {             resrictedExtent: restrictedBounds,             maxExtent: restrictedBounds,             units: "m",             projection: "EPSG:31467",            resolutions:[305.74872463815512,152.87436231907702,76.437181159538511,38.218590579769391,19.109295289884642,9.554647644942321,4.7773238224711605, 2.3886619112355802, 1.1943309556178034, 0.59716547780890172],            maxResolution: "auto",             controls: []         };          map = new OpenLayers.Map( 'map', options );      These are the map options which work with geoserver wms fine. I want to serve geowebcache layers using geoserver 2.5 with the integrated GWC. I have created a cached layer using the resolutions as they are defined above. In GWC the layer preview works OK and displays the layer as expected, but when I integrate the layer into the openlayers client, pink tiles are displayed. The resolutions seem indeed to differ from those defined by the normal wms layers. Have I forgotten something? Why don´t the resolutions match? The DPI is 96 by the way. The URL of a wms tile which displays fine in zoomlevel 8 is:               SRS=EPSG%3A31467&BBOX=3542676.9162395,5865437.4059784,3563009.2064279,5885769.6961669       If I change the URL to point to the GWC layer but keep the BBOX extents the same I get the following error:               400: Unable to match requested SRS EPSG:31467 to those supported by layer


title: Displaying Shapefiles using Python?

text: I have some shapefiles, which I want to display in Python. Is there any code for that?


title: QGIS: Why do I get permission denied when saving style to postgres

text: In QGIS I am trying to save a style to a postgres database but I always get the error "Unable to save layer style. It's not possible to insert a new record into the style table. Maybe this is due to table permissions (user=rful011). Please contact your database administrator." The user has all rights on the database.


title: How does one install QGIS from previously downloaded OSGeo packages

text: I have downloaded the OSGeo Installer (on Windows 7 x64) and run it, selecting the Desktop Express Install option. All of the files were downloaded and the installer reported a successful install, however whilst I could find the downloaded files, I could not find the installed instance. An OSGeo4W directory was created but contained only a few MB of files. I have tried to rerun the installer and it only confirmed that the previous installation was successful and that no files needed downloading. All the downloaded files were still in tarballs so it appears that the installation process after downloading had not taken place. QGIS has previously been on my system but all previous and development versions were uninstalled using the provided uninstallers. How to I bring about an installation process that installs desktop QGIS using the files downloaded by the OSGeo Installer?


title: point shape file problem

text: I have a point shapefile which was created from a text file in Excel using the delimited text layer plugin in QGIS. My problem is that I am getting a point shapefile but when i try to insert this in an India shapefile, the points do not overlay this shapefile. The projections are the same.


title: How to Smooth Polygons after converting DEM using Raster to Polygon?

text: I have a DEM SRTM that I classify using Spatial Analyst Tools > Reclass > Reclassify. The result is box shaped so I go to Layer Properties > Display and choose cubic convolution. The result is smooth (not box shaped). Next I convert to polygon using Conversion Tools > From Raster > Raster to Polygon choosing Simplify polygon. Then the polygon output is boxshaped. So how do I create smooth polygons like from cubic display raster ?


title: Why do I suddenly get 'ERROR' as elements in my attribute table after doing a query in QGIS?

text: I was looking at an .osm file in QGIS using the OSM plugin; I was specifically looking at a country's lines layer. When I checked the attribute table just after opening the .osm, everything looked okay. After I did an advanced search using the search query builder, the system was able to highlight all matches. Good. But, when I reordered the entire table by moving all selections to the top of the table, most table elements were converted to 'ERROR' (from their original values). Has anyone here encountered something like this before? Thank you.


title: Any solution to mosaic Modis MOD13Q1 using batch file?

text: I have a Modis MOD13Q1 product for Pakistan, four tiles cover my complete area and I have data consisting of 14 years, after every 16-day interval. I want to mosaic them using a batch file which will be most useful rather than manually processing one by one using MRT tool. Kindly let me know some useful methods of mosaicing which automates my whole data by running just one script for the whole data or one script for one-year data. I am new with programming so will be thankful if someone can provide some documents depicting how to run the script.


title: Determine PostGIS geography polygon orientation

text: How can you determine the orientation of a PostGIS `geography` polygon? I'm looking/hoping for a function that would tell me which side is the interior (left or right) as you traverse the vertices of the outer shell in order. I have seen the `ST_Orientation` function, but it only works for `geometry`. I have also seen the `ST_ForceRHR` and `ST_ForceLHR` functions. But again, they only work for `geometry`. I have data that wraps around the poles, so naive casting to `geometry` won't work for me. (Or at least I don't think so. Maybe this isn't true.) I'm a reasonably good programmer, so if no such function exists then an algorithm outline would be fine too.


title: Query PostGIS database without creating primary key

text: I'm trying to query PostGIS database from QGIS DB Manager:               select row_number() OVER(ORDER BY idx DESC) as id, p.*, * from table_1     join table_2 as p     on "name" = "name"      where `row_number() OVER(ORDER BY idx DESC) as id` is created because QGIS asks for unique integer: ![screenshot](http://i.imgur.com/h7TlaiH.png) But that doesn't seem enough - the layer is not created with error message: > PostgreSQL layer has no primary key. I wonder if querying is really this limited or I miss something obvious? So I'm interested if there is reasonable solution to query PostGIS database without creating table with PRIMARY KEY?


title: Working with different source WMS data

text: I have a geoserver and WMS services on it. For example my **water valve** layer is point data and published from geoserver. (I am using postgis to saving data.) An external WMS service publishes polygon data that can include my **water valves**. For example towns, villages. I want to calculate that a polygon included my **water valves**. I can calculate it if polygon in postgis. I can write ST_* query. But polygon data is coming another server with WMS


title: Cause of Error 000308: Invalid Field Type when batch running ArcPy script?

text: This is my first post on this site. I am using ArcGIS 10.2 for Desktop. I wrote a simple script in the form of a python toolbox to calculate the speed of travel between consecutive entries of a point shapefile. The script works perfectly on single files. However, as soon as I try to run it as a batch, I get an error: > Error 000308: Invalid Field Type. **EDIT: By running in batch, I mean I am right-clicking on the tool in ArcMap and selecting "batch", and then loading in several shapefiles at once.** I suspect that the error comes from something about how I defined the parameters:                   inFileParam = arcpy.Parameter(                                  displayName="Input Feature",                                  name="in_feature",                                  datatype="GPFeatureLayer",                                  parameterType="Required",                                  direction="Input",                                  )              indivName = arcpy.Parameter(                                  displayName="indivName",                                  name="indivName",                                  datatype="Field",                                  parameterType="Required",                                  direction="Input",                                  )         indivName.parameterDependencies = [inFileParam.name]         indivName.filter.list = ["Text"]              dateField = arcpy.Parameter(                                  displayName="dateField",                                  name="dateField",                                  datatype="Field",                                  parameterType="Required",                                  direction="Input",                                  )         dateField.parameterDependencies = [inFileParam.name]         dateField.filter.list = ["Date"]      The `indivName` and `dateField` parameters are what gives the error when I click on the "check values" button in the batch window. Removing the filter seems to fix the error, but I would really like to have the filter. As I said above, it works just fine when I input them in a non-batch run of the tool. Also of note, this same problem has happened from pretty much every (but strangely not all) tools I have made. As of now, my workaround is to modify the tool to explicitly code the field names when I need to do a batch run, but this is not ideal, since I am hoping to distribute this tool to other researchers.


title: How to make OpengeoSuite 4.0.1 available for other users of the same computer?

text: I have installed the 4.0.1 version of OpenGeoSuite in a machine as an administrator, and I cannot find the way to make the software available for other users on the same computer, as it could be done in previous versions. Can you please help me with that? Thanks in advance


title: lat/lon of intersection between line of sight from a given lat/lon and altitude above ground

text: **Given a starting latitude, longitude and altitude, and a line of sight defined by azimuth and elevation, I want to find the latitude and longitude (assuming spherical Earth, WGS84 or other) where the line of sight pierces a given altitude.** Background: I have a set of data points from an all-sky camera (i.e. a wide-angle lens pointing at the sky). The data show auroral emissions. I have elevation and azimuth for each pixel (each array element), and I know the coordinates (latitude, longitude, altitude) of the camera. Based on the assumption that the auroral emissions are coming from a given altitude above ground (e.g. 150 km), I want to show the data on a map. I aim to implement the calculation in Python (using numpy), and would like an efficient way of doing this (i.e. preferably not element-by-element), since the data arrays contain upwards of 200k pixels. The distance between pixels are on the order of a few km, which should give an idea of the precision needed.


title: How to include checkbox or radio button in python script for arcgis tool?

text: I created an arcgis custom tool for converting an excel file to both kml and shapefile . Now I want to include radio button or checkbox to select according user interest for either kml or shapefile.


title: Annotation boxes not drawing correctly in ArcMap 10.0 SP2

text: I have about 400 annotation features in ArcMap 10. The style is a simple text box with an arrow. The annotation draws correctly when viewed up close on screen but the arrow detaches from the text box when printing or when zoomed out to view the entire 30x42" page. I switched from labels to annotation to avoid problems like this. Any ideas on fixing the printing issue?


title: Batch convert ipaddress to coordinates

text: > **Possible Duplicate:**   >  Advice on geocoding IP addresses I am wondering if there are any applications that will batch convert ipaddress to geographic coordinates? Some background on the project. My friend wants to know where fans of hockey teams live throughout the US/Canada/World. He made a simple online survey and apparently it captures each person's ipaddress. All we want to do is translate the ipaddress into a semi-accurate geo-location and tie that data point to a team. The part I'm not familiar with is converting the ipaddress to coordinates. We don't need that much accuracy, within 2-3 miles is plenty accurate for this for-fun project. I have found a few applications that will convert ipaddress to coordinates, but they're all manually intensive. So far the survey has 2000+ replies, so that's a lot of manual data entry. Any ideas? Thanks a lot!


title: Having download/latency issues with ESRI JS-API recently?

text: Is anyone using the ESRI JS-API having issues over the last week or two with either latency or performance in the client download and operation? Since about 7/12/2011 we have seen across numerous ISPs and Browser/OS platforms in WA state issues with users getting the application to load and operate normally.      The only workaround I have had is to switch my app to using the compact api, to reduce the download footprint.


title: Is there a QGIS alternative to the ArcGIS Bearing Distance to Line tool?

text: I'm using QGIS 2.0.1   My data is in a .csv file. Each row contains: x value, y value and bearing. I am looking to transform each row from representing a point to representing a short line pointing in the direction of the bearing value. I have already tried doing this by rendering the points as dashes and assigning the bearing value to the angle of the icon. This works, but does not take into account the angular distortion from the map projection. The ArcGIS **Bearing Distance to Line** tool is what I need, but I do not have that software. Is there an equivalent to the Bearing Distance to Line tool in QGIS, or does anyone know of a workaround method I could use? Thank you for your help.


title: How Do You Autopopulate Attribute Based on Spatial Location of Underlying Grid?? ArcGIS Mobile

text: User drops a point, then Attribute Table Autopopulates based on Underlying (Polygon)Grids Spatial Location. I want to do this for field editors using ArcGIS Mobile. Does anyone have an idea on how to do this?


title: ArcGIS Desktop 10.0 -- layout Data Frame Grid color inversion on export or print when other rasters are active

text: Having a problem with ArcMap 10.0 SP1 Data Frame Grid of graticule inverting color on export or when printing. Occuring on multiple classroom PCs all working with the same datasets. Exporting to raster formats (PNG, JPEG) with resolution set under 149 dpi layout renders correctly. But with any higher resolution, or for export to a mixed vector raster mode (PDF, AI) the Data Frame Grid inverts color (gradicule goes white--remainder of grid layer is solid black). As this is the top layer of the map layout it renders the map useless. Also, it does not occur when raster layers in the MXD are all turned off, just when one raster is active. I assume the Data Frame Grid from the layout is converted to a raster layer as part of the print or export by some library. Does anyone have a good grasp of where this occurs and how the conversion can be adjusted to prevent inversion for reliable printing and export results?


title: Auto-calculate field (area or formula)

text: I'm wondering if anyone has any insight into the potential to auto-calculate the value of a field, either area or distance (ideally) or a formula (based on the values of say 2 other fields, or an existing field and another value). Perhaps this is a plugin that presents a dialogue asking to what layer you want the auto-calculation to apply, and what formula or combination of fields you would like included in the calculation. These tools are of great use to planners who are using a GIS as a drawing/design tool. Thoughts?


title: Where can I download a map of the world for kids

text: I would like to download and plot some kind of fun (large) illustrated map of the world or Canada (with animals/ dinosaurs / points of interest, etc.) for my son's preschool cartography class. Anyone has a good link or map they can share? Thanks


title: .net Geoprocessing Tool Grid Control

text: Does anyone know if grid control used within the batch mode of ArcToolbox available via ArcObjects (see image 1)? I have used the IGPValueTable control (as used in the Union tool, image 2), however, this does not appear to allow you to add domains such as the field type drop down comboBox shown in the attached image. ![Image 1: Grid control in 'Batch' mode](http://i.stack.imgur.com/H1bfz.jpg) ![Image 2: IGPValueTable Table control, no domains](http://i.stack.imgur.com/qsoUN.jpg)


title: How to use bbox in long/lat with google/bing/etc... using mapserver

text: The bbox of OpenLayers.Control.GetFeature works in utm when the baselayer is 900913 ie. google/bing/etc) and in long/lat when the baselayer is 4326 (ie. my postgis layers served by mapserver), no matter what overlays them. This is what openlayers says. So, how can I force bbox to be in long/lat when I use one of my layers over google for example? I do want the bbox being in long/lat rather than 900913 (ie. using baselayer projection). I've read many webs about this but with geoserver, some posts about mapserver say that both EPSG:900913 and EPSG:4326 must be set in METADATA, I changed that and also assigned "srs" and "projection" (with the appropriate expression) in my layers (and in protocols) but with no effect in bbox at all. What else could I try? Any idea will be appreciated, thanks in advance, Gery


title: What is quickest way to select polygon by point in ArcGIS 10 using ArcPy?

text: I keep thinking that I must be missing something, but there does not seem to be a tool in ArcGIS 10 to select features (in particular polygons) from a layer at a point (X,Y) location via ArcPy. The parameters for such a tool would just be a layer name and an XY location. At the moment I workaround this by creating a point featureclass containing the point and performing a SelectLayerByLocation on it. However, when the polygon feature class is in Oracle (accessed via ArcSDE 9.x) and contains 3.5 million polygons the time taken to make the selection can be more than 5 mins when I think a second or two (with less code) would be more appropriate. The feature class has a spatial index and I've tried using arcpy.env.extent (which SelectLayerByLocation appears to ignore) to restrict the geographic area accessed but the performance remains very poor. Is there a quicker way to do this using ArcGIS Desktop 10 and ArcPy?


title: How to connect door nodes using a polyline

text: I am working on an indoor positioning project which need to transform CAD drawings to GIS shape files. I have transformed the file from CAD to ArcMap 10.1 already. My current problem is that how could I transform the doors in CAD to a set of polyline to as an independent layer. Currently, a door is consisted of a arc and a line but the connected line (door sill) is actually what I want. I want to know is there any simple geo-spatial method to do that. Hopefully it will not use programming because of limited deadline. I am sorry I cannot upload the picture at this stage.


title: Only Interpolating within a polygon feature in ArcMap 10.1

text: I have sample points within a single polygon feature class that I would like to interpolate, likely using kriging. The problem is the sample points and polygon boundaries are many miles apart and therefore the kriging interpolates across these many miles. Is there anyway I could force the kriging to only interpolate within the polygons and not across what looks to be extents of the polygons. Another way of saying this is let's assume I have sample data points in Missouri and Ohio and I want to compare across these two states so any chance I could merge the 2 states in single feature class and interpolate them together? It just creates a big rectangle to the extents when I try kriging this data.


title: CostPath gives error for specific points?

text: I am using the tool CostPath. As an input feature destination data I've entered several points (no specific value, just distributed geographically), and as the cost distance raster I've entered the cost distance raster previously done with CostDistance. My question is that I can draw the CostPath line from all the points except for three and I cannot figure out why.   * I've been able to draw to CostPath lines from all the points with other CostDistance rasters, however it is not possible to draw the CostPath line for this specific CostDistance raster and for the same three points.   * I've run CostPath with those signle three points, but still nothing happens to them. On the contrary, I used the same points with previous CostDistance rasters and worked.    * I've checked in my CostDistance raster/Layer Properties/Source/NoData Value, and is empty. As the other CostDistance rasters that didn't give problems.    * I've checked the BackLink produced in CostDistance and has a NoData Value of 255. Does anybody think that NoData values may be the problem? If not, which it is? Could you be so kind as to figure out the possible problem and solution? (I've re-drawn that particular CostDistance raster several times and nothing happens, that's why I need your help to figure out which problem there could be).


title: How to log into ArcGIS Online for organization from ArcMap?

text: I am using ArcGIS 10.2.1 for Desktop and have access to ArcGIS Online for organization. Is there any way I can log into AGO for organization from ArcMap?


title: Help with scripts for processing raster files with the raster calculator in QGIS

text: I am trying to process some raster files using python scripts in Qgis 2.20, and I have been having trouble finding any documentation on using raster calculator in scripts being run in the processing toolbox. I am trying to use scripts to process weather data. I will need to recalculate values of cells in order to represent projected wind speeds at different heights and probable gusting speed. I am trying to use the raster calculator for this but have been having trouble. I was not able to easily find a function for the script, and after some digging through the python console I was able to find the saga:rastercalculator function. Documentation in the python console (obtained through alhelp()), say that the parameters are as follows. algorithm: raster calculator Grids formula Raster I am trying to run a basic formula through the raster calculator to get it working, but am having no luck. Is this even the right approach to recalculating grid values in a python script? Here is the code:               #load and symbolize tiff          ##[User scripts]=group     ##input_raster=raster          #Imports     #=======     from qgis.core import *     from PyQt4.QtGui import *     from PyQt4.QtCore import *     from qgis.analysis import  *     import processing     from processing.core.Processing import Processing          #import Tiff          fileName = input_raster     fileInfo = QFileInfo(fileName)     baseName = fileInfo.baseName()     raster = QgsRasterLayer(fileName, baseName)     raster.loadNamedStyle(r"C:\Users\Maximilian\Documents\School\AGRG\test.qml")     # add map to display     QgsMapLayerRegistry.instance().addMapLayer(raster)          #recalculate values     processing.Saga:RasterCalculator(raster, "(raster)*2/2",outraster)      Here is the error:               Uncaught error while executing algorithm     Traceback (most recent call last):     Traceback (most recent call last):       File "C:/PROGRA~2/QGISVA~1/apps/qgis/./python/plugins\processing  \core\GeoAlgorithm.py", line 202, in execute         self.processAlgorithm(progress)       File "C:/PROGRA~2/QGISVA~1/apps/qgis/./python/plugins\processing\script\ScriptAlgorithm.py", line 252, in processAlgorithm         exec script in ns       File "<string>", line 65         processing.Saga:RasterCalculator(raster, "(raster)*2/2",outraster)                    ^     SyntaxError: invalid syntax


title: Do I still have to use a template DB for PostGIS?

text: createdb mydb -T template_postgis      Is this `-T template_postgis` still necessary in new versions of PostGIS? I never saw this db being different, it always has those 3 sql files you run there. Is this still necessary?


title: How to create a shortcut (a button) for "Make this the only selectable layer" in Python 2.6?

text: I'm trying to create a script in Python 2.6 to make a button or a keyboard shortcut for "Make This The Only Selectable Layer". I came across the following VBA scripts on the net, but the problem is it's not working in ArcGIS 10. Can anyone help me with a Python script to do that?               Public Sub MakeLayerSelectable_Click()            Dim pMxDocument As IMxDocument       Dim pMap As IMap       Dim pEnumLayer As IEnumLayer       Dim pLayer As ILayer       Dim pId As New UID       Dim pFLayer As IFeatureLayer            Set pMxDocument = Application.Document       Set pMap = pMxDocument.FocusMap       pId = "{6CA416B1-E160-11D2-9F4E-00C04F6BC78E}"       Set pEnumLayer = pMap.Layers(pId, True)       pEnumLayer.Reset       Set pLayer = pEnumLayer.Next       Do While Not pLayer Is Nothing         If TypeOf pLayer Is IFeatureLayer Then             Set pFLayer = pLayer             pFLayer.Selectable = False         End If         Set pLayer = pEnumLayer.Next       Loop          Set pLayer = pMxDocument.SelectedLayer          If TypeOf pLayer Is IFeatureLayer Then       Set pFLayer = pLayer         pFLayer.Selectable = True     End If          End Sub


title: How to choose a language for web map development?

text: I am building a web map application using:   * GeoServer    * OpenLayers    * Tomcat I would like to build a web application, where the user can log in and **have the map arranged according to their profile**. As I am already using tomcat, I would like to stick with java. However, I have found that python is more suitable to web programming, so is _jython_ an alternative? This thread provided some light, but is not complete. Are there any examples? `I have thought of using JSF and implementing wms service from geoserver.` Any ideas and suggestions to get started. I am ready to learn new technologies. Features: >   1. User Should be able to log in to an application. >   2. User Should be able to only view maps that their role/user permits. >   3. The application should only make use of the technology listed above, if > possible. >


title: ArcGIS Server Publishing Geoprocessing Service

text: I'm modeling this ESRI tutorial for creating geoprocessing service with ArcServer and I'm getting this error when trying to publish the service: > Service was published but cannot be started due to: Server object instance > creation failed on all SOC machines. Server Object instance creation failed > on machine MyServer. Cannot load tool: BufferAndClip: Geoprocessing service > initialization failed. I'm using ArcGIS 10 against ArcGIS Server 9.3. My mxd that has the model in it has been saved out as version 9.3. Also my geodatabase is a 9.3 version. The model works fine within the mxd. The mxd and geodatabases and lyr files are located all in the same folder on the server (e.g. \\MyServer\ArcGIS Resources\Test\Test.mxd). I have published map services before to this server with no issues, why I'm I getting this error? Thank You


title: With arcpy, how do I detect relationship classes in a file GDB (or can't I)?

text: I would like to be able to detect relationship classes in a file GDB. Because users of my script might have only an ArcView level license, they would not be able to manipulate the schema of a feature class (specifically to add a field) that is in a workspace that has relationship classes. **How do I detect the presence of relationship classes, so that I can document them, avoid them programatically, and allow the script to continue?**


title: Seeding Tilecache with gdal2tiles output

text: Very simple question. I've executed gdal2tiles against a GeoTIFF coverage, composed by several TIFF files. I want to serve the resulting tiles using TileCache. In the TileCache documentation, I see how to create new layers, using as sources JPG images, WMS layers, MapServer layers, etc (examples here). But the point is I want to directly provide the tiles generated by gdal2tiles as source. So, I want to access my tiles with something like: http://example.com/yourdir/tilecache.cgi?LAYERS=basic&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG:4326&BBOX=-180,-90,0,90 &WIDTH=256&HEIGHT=256 Or http://example.com/yourdir/tilecache.cgi/1.0.0/basic/0/0/0.png Using any TMS client. Now I'm using the Google Maps viewer generated by gdal2tiles, based on GTileLayer Any tips on TileLayer configuration to achieve this goal are welcome. Or any suggestion to serve gdal2tiles output (tiles following the TMS spec) in a different way. I know, gdal2tiles was built following the TMS specs, before the WMTS standard. So, there're probably better ways to serve the gdal2tiles output today. Many thanks in advance!


title: Problems with Multipatches

text: I have some polygonal features that have minimum and maximum z values. I'm trying to calculate the difference between a fixed extruded polygons and the sum of extruded related polygons. Here's how I'm doing it: Notes: the cursor is non recycling. IExtrude extrude = new GeometryEnvironmentClass();                       while ((tempFeature = cursor.NextFeature()) != null)             {                 var lower = Classifier.GetNamedLevelValue(tempFeature.get_Value(lowerIdx).ToString());                 var upper = Classifier.GetNamedLevelValue(tempFeature.get_Value(upperIdx).ToString());                 var geometry = extrude.ExtrudeFromTo(lower, upper, tempFeature.ShapeCopy);                 geometries.Add(geometry);             }                  IGeometryFactory fact = new GeometryEnvironmentClass();             IGeometry unioned = null;             fact.CreateEmptyGeometryByType(esriGeometryType.esriGeometryMultiPatch, out unioned);                  for (int i = 0; i <= geometries.Count - 1; i++)             {                 var topo = (ITopologicalOperator)unioned;                 var tempGeom = topo.Union(geometries[i]);                 unioned = (IGeometry)((IClone)tempGeom).Clone();             }                  var extrudedParent = extrude.ExtrudeFromTo(0, 999, feature.ShapeCopy);             var topoParent = (ITopologicalOperator)extrudedParent;             var remaining = topoParent.Difference((IGeometry)unioned);      I get a COM Exception in topoParent.Difference. I'm not sure what is the problem. Can anyone help me? Any other ways to do it? This is the COMException: - "Exceção de HRESULT: 0x80040229"} System.Exception {System.Runtime.InteropServices.COMException} I even whipped up a little unit test to check if it was my code or if the operation is illegal. Still crashes in the same spot.                   [TestMethod]         public void VolumeTest()         {             object missing = Type.Missing;                  var p1 = PointHelper.ConstructPoint(0, 0);             var p2 = PointHelper.ConstructPoint(0, 1);             var p3 = PointHelper.ConstructPoint(1, 1);             var p4 = PointHelper.ConstructPoint(1, 0);                  var p5 = PointHelper.ConstructPoint(0, 2);             var p6 = PointHelper.ConstructPoint(2, 2);             var p7 = PointHelper.ConstructPoint(2, 0);                  IPointCollection pointCol = new PolygonClass();             pointCol.AddPoint(p1, ref missing, ref missing);             pointCol.AddPoint(p2, ref missing, ref missing);             pointCol.AddPoint(p3, ref missing, ref missing);             pointCol.AddPoint(p4, ref missing, ref missing);             pointCol.AddPoint(p1, ref missing, ref missing);                  IPointCollection pointCol2 = new PolygonClass();             pointCol2.AddPoint(p1, ref missing, ref missing);             pointCol2.AddPoint(p5, ref missing, ref missing);             pointCol2.AddPoint(p6, ref missing, ref missing);             pointCol2.AddPoint(p7, ref missing, ref missing);             pointCol2.AddPoint(p1, ref missing, ref missing);                  IExtrude ext = new GeometryEnvironmentClass();             IGeometry extruded = ext.ExtrudeFromTo(0, 1, (IPolygon)pointCol);             IGeometry extruded2 = ext.ExtrudeFromTo(0, 2, (IPolygon)pointCol2);                  ITopologicalOperator topo = (ITopologicalOperator)extruded2;             IGeometry result = topo.Difference(extruded);         }      Thanks


title: Nested "if" statements in ArcGIS Field Calculator

text: The solution in VB for the base process is @ "If then" VB Script code (or Python) equivalent to SQL's IN ('x','y',z') expression in ArcGIS Field Calculator question? works great but I was trying to nest 'if' statements and can't. So pre-logic code of               if [grid_code] = 1 then      f2= 2     end if     if [grid_code] = 2 then     f2=3.5     end if      ...etc. but this doesn't work? what am I doing wrong? I tried the second 'if' before the 'end if' and also tried 'elif' but these give script errors. Also any idea why I get a warning message about "The calculated value is invalid for the row with objectID=1" and when you click click 'yes' to continue it works fine? Can I suppress this? Best,


title: ArcGIS Javascript API 3.3 - Changing Layer Definitions / Refresh Not Behaving

text: I have an ArcGISDynamicMapService layer in my application that points to a fairly simple (6 layers) map service. In the application, there is a GUI/widget that allows the user to pick various options - which then dynamically changes the layer's layerDefinitions property to re-render the layer based on their selection. After I define and set the layerDefinitions of the layer, I call the layer.refresh method to re-render the layer. However, the re-rendered layer is always wrong - either the wrong layers are rendered, or wrong features are rendered, and there doesn't appear to be any pattern in these errors that I can determine. However, once the map is panned or zoomed, the re-rendered layer is drawn exactly as expected. Below is the relevant javascript code. The "format" function is a .NET-like string formatting function I've added to the script.               var layerDefinitions = [];     layerDefinitions[1] = "TransmitterId IN ({0})".format(visibleTransmitterIds.join(","));     layerDefinitions[2] = "TransmitterId IN ({0})".format(visibleTransmitterIds.join(","));     analysisResultLyr.setLayerDefinitions(layerDefinitions);     analysisResultLyr.refresh();      Using various http sniffing tools (Google Developer tools is preferred choice), I can see that the outgoing http request for my layer of interest is exactly the same between the refresh call - and the pan/zoom call. I have also verified the sql contained in the layer definitions, and am positive the layers/features returned in the refresh call are definitely wrong. Anyone have any ideas as what may be causing this? Better yet, does anyone know an alternate way to refresh a layer without panning/zooming the map? A couple of other notes:   1. I have disabled cacheing at the client via setDisableClientCaching   2. My sql where clauses make use of IN statement. Is this a bad idea with file geodatabases?