title: Shapely unable to tell if polygon contains point

text: For an application I want to determine under which constituency a given coordinate falls. After looking at the various options, I decided upon shapely and fiona as the easiest way to implement this. Here is what I wrote for testing if a given coordinate is within a given constituency.               import fiona      import shapely.geometry          fc = fiona.open("shapefile.shp")     shapefile_record = fc.next()     shape = shapely.geometry.asShape(shapefile_record['geometry'])     def is_constituency(lat,lng):         point = shapely.geometry.Point(lat,lng)         print shape.contains(point)      This yields false for all tests, even when I am sure the coordinate falls within said constituency. To give an example, the first record               >>> shapefile_record['properties']     OrderedDict([(u'DIST_NAME', u'Uttarkashi'), (u'Assem_No', 2), (u'AREA', 0.003), (u'PERIMETER', 0.381), (u'INDIAASSEM', 2802.0), (u'INDIAASS', 0.0), (u'NO', 0.0), (u'ST_CODE', u'S28'), (u'AC_NAME', u'GANGOTRI'), (u'AC_TYPE', u'GEN'), (u'PC_NO', 0.0), (u'AC_NO', 2.0), (u'AC_HNAME', u'\x90\xd6\xd3\x90\xd6\xd6\xea\xa1\xd6\xdf'), (u'PARTY', u'INC'), (u'CODE_NO', u'S282'), (u'Longitude', 78.8900584624), (u'Latitude', 30.9787742252), (u'State', u'Uttaranchal'), (u'PC_NAME', u'Tehri Garhwal'), (u'PC_TYPE', u'GEN'), (u'PC_CODE', u'S2801'), (u'PC_NO_1', 1)])      Choosing the point right at the center of the constituency as described in the shapefile gives me false               >>>is_constituency(30.9787, 78.8900)     False      To make it even clearer that this is wrong, consider this:               >>> shape.contains(shapely.geometry.Point(shapefile_record['properties']['Latitude'],shapefile_record['properties']['Longitude']))     False      This means that latitude and longitude that define a polygon in its shapefile are not in the polygon? What am I doing wrong? The whole geometry of this particular record is here:               >>> shapefile_record['geometry']     {'type': 'Polygon', 'coordinates': [[(78.38236181915738, 31.26909614048731), (78.37916181915745, 31.268796140487385), (78.3822618191574, 31.267896140487327), (78.3863618191574, 31.25889614048731), (78.38236181915738, 31.26909614048731), (78.39066181915734, 31.27209614048735), (78.39166181915749, 31.26569614048737), (78.39476181915734, 31.261196140487364), (78.40206181915738, 31.253896140487317), (78.40136181915733, 31.247396140487414), (78.40616181915749, 31.242696140487347), (78.40616181915749, 31.23999614048722), (78.42386181915737, 31.242196140487348), (78.42906181915743, 31.251396140487262), (78.43636181915747, 31.24869614048731), (78.43946181915743, 31.241396140487275), (78.45286181915736, 31.236896140487264), (78.46626181915747, 31.219596140487393), (78.47446181915734, 31.213196140487415), (78.47546181915749, 31.203196140487254), (78.47896181915735, 31.201496140487286), (78.47846181915736, 31.194996140487323), (78.47896181915735, 31.19249614048727), (78.48206181915737, 31.184496140487397), (78.47876181915751, 31.19379614048734), (78.4857618191574, 31.196796140487265), (78.52196181915735, 31.195196140487383), (78.54586181915738, 31.198096140487337), (78.55736181915728, 31.210896140487364), (78.5636618191574, 31.219196140487334), (78.5688618191574, 31.22109614048736), (78.57406181915741, 31.225696140487283), (78.58656181915745, 31.227596140487265), (78.59066181915745, 31.226696140487267), (78.59438800139878, 31.2276993433984), (78.59466544240831, 31.215214497963416), (78.59476181915738, 31.21519614048731), (78.59136181915744, 31.17679614048729), (78.59196181915752, 31.172796140487268), (78.59266181915734, 31.164396140487323), (78.59336181915734, 31.16029614048739), (78.59396181915747, 31.155696140487294), (78.59476181915738, 31.15239614048727), (78.59456181915738, 31.14619614048729), (78.59436181915748, 31.141196140487295), (78.5928618191574, 31.133996140487348), (78.5905618191573, 31.12569614048732), (78.58506181915737, 31.11289614048735), (78.5836618191575, 31.10639614048739), (78.58076181915737, 31.096596140487296), (78.58046181915745, 31.09129614048732), (78.57956181915739, 31.08559614048733), (78.57696181915736, 31.076796140487325), (78.57396181915749, 31.071496140487405), (78.56966181915732, 31.06689614048731), (78.56486181915739, 31.060396140487345), (78.56036181915738, 31.055896140487338), (78.55746181915742, 31.052096140487386), (78.55496181915748, 31.046596140487395), (78.5543618191574, 31.041796140487406), (78.5548618191574, 31.038396140487293), (78.55676181915737, 31.034696140487252), (78.55856181915749, 31.0320961404874), (78.56126181915738, 31.02909614048736), (78.56596181915745, 31.02629614048732), (78.5732618191575, 31.023096140487386), (78.57816181915734, 31.02039614048727), (78.58316181915734, 31.016896140487408), (78.58716181915736, 31.012596140487236), (78.58916181915748, 31.00639614048726), (78.58886181915733, 31.001996140487396), (78.58746181915751, 30.995996140487247), (78.58346181915749, 30.986896140487318), (78.57896181915748, 30.980196140487354), (78.57056181915738, 30.972696140487248), (78.56596181915745, 30.96759614048733), (78.56176181915737, 30.968296140487386), (78.55476181915748, 30.971496140487265), (78.5496618191574, 30.974296140487304), (78.54546181915731, 30.976396140487346), (78.53686181915737, 30.98029614048727), (78.52476181915739, 30.983996140487363), (78.51606181915747, 30.986996140487406), (78.50816181915735, 30.990596140487355), (78.50236181915744, 30.992896140487236), (78.49326181915751, 30.995196140487277), (78.48246181915738, 30.999296140487274), (78.47446181915734, 31.0025961404873), (78.46366181915744, 31.005896140487263), (78.45626181915748, 31.007296140487316), (78.44656181915747, 31.007196140487395), (78.4316618191574, 31.004596140487365), (78.41926181915744, 31.001396140487266), (78.4112618191574, 30.99869614048737), (78.38606181915742, 30.98579614048726), (78.37846181915745, 30.981396140487337), (78.37416181915745, 30.9783961404873), (78.36956181915735, 30.973696140487395), (78.36226181915748, 30.9683961404873), (78.35336181915739, 30.962196140487322), (78.34116181915743, 30.953296140487396), (78.33196181915741, 30.947096140487254), (78.32336181915747, 30.94129614048734), (78.31436181915745, 30.93129614048735), (78.30736181915734, 30.92489614048736), (78.30266181915749, 30.92099614048726), (78.30016181915744, 30.919296140487294), (78.30116181915736, 30.91489614048737), (78.3021618191575, 30.90809614048732), (78.30356181915738, 30.901896140487345), (78.30516181915738, 30.89799614048741), (78.30666181915751, 30.89399614048739), (78.30926181915737, 30.89179614048726), (78.3134618191574, 30.888796140487333), (78.3177618191574, 30.887196140487337), (78.3229618191574, 30.88539614048722), (78.33026181915744, 30.884896140487236), (78.33486181915737, 30.88459614048731), (78.33986181915736, 30.884696140487396), (78.34626181915735, 30.88499614048738), (78.35076181915736, 30.88479614048731), (78.35426181915744, 30.88459614048731), (78.35746181915732, 30.881596140487257), (78.35656181915749, 30.87819614048732), (78.3564618191574, 30.872696140487342), (78.35476181915743, 30.86789614048735), (78.35346181915747, 30.864896140487307), (78.34546181915744, 30.864996140487396), (78.33756181915749, 30.864596140487325), (78.33196181915741, 30.86419614048731), (78.32406181915746, 30.863896140487327), (78.31806181915732, 30.86529614048738), (78.3147618191573, 30.865196140487235), (78.30956181915747, 30.864696140487297), (78.3039618191574, 30.86399614048725), (78.30076181915751, 30.863496140487253), (78.2982618191574, 30.861796140487286), (78.29416181915747, 30.859296140487405), (78.29186181915742, 30.85379614048725), (78.28946181915745, 30.848196140487346), (78.2874618191575, 30.84429614048725), (78.28206181915743, 30.842096140487282), (78.27806181915741, 30.838696140487343), (78.27956181915738, 30.83389614048741), (78.28066181915744, 30.829396140487404), (78.28196181915735, 30.825696140487317), (78.28436181915731, 30.819196140487414), (78.28906181915738, 30.80999614048733), (78.28686181915742, 30.80739614048736), (78.27936181915737, 30.803196140487277), (78.27506181915737, 30.800396140487237), (78.2684618191575, 30.797696140487343), (78.26506181915738, 30.795996140487375), (78.26056181915737, 30.79379614048742), (78.25076181915745, 30.78969614048725), (78.24396181915739, 30.786496140487372), (78.23526181915747, 30.783296140487273), (78.23076181915746, 30.78189614048722), (78.22346181915742, 30.78129614048732), (78.21266181915735, 30.78209614048729), (78.20646181915737, 30.77979614048741), (78.2034618191575, 30.7765961404873), (78.19866181915734, 30.771996140487378), (78.1982618191575, 30.76849614048735), (78.19496181915747, 30.7657961404874), (78.1941618191575, 30.76849614048735), (78.1882618191575, 30.768696140487354), (78.18196181915744, 30.76849614048735), (78.17716181915745, 30.767596140487285), (78.1705618191574, 30.766796140487372), (78.1655618191574, 30.765196140487326), (78.1571618191573, 30.761596140487317), (78.15196181915746, 30.75959614048725), (78.14906181915751, 30.762696140487215), (78.1449618191574, 30.76359614048727), (78.14086181915746, 30.763296140487288), (78.13816181915752, 30.766696140487227), (78.13466181915749, 30.768696140487354), (78.13146181915738, 30.76999614048725), (78.12666181915739, 30.772496140487362), (78.12206181915747, 30.775196140487314), (78.11796181915736, 30.77759614048728), (78.11526181915741, 30.778296140487267), (78.1120618191573, 30.77909614048741), (78.11366181915736, 30.775796140487387), (78.11616181915747, 30.77089614048731), (78.11956181915741, 30.766796140487372), (78.1216618191574, 30.764196140487346), (78.12206181915747, 30.760596140487394), (78.1222618191573, 30.757596140487294), (78.11986181915734, 30.753796140487342), (78.10956181915742, 30.744096140487272), (78.09856181915728, 30.73499614048734), (78.0910618191574, 30.72659614048741), (78.0867618191574, 30.720396140487257), (78.08396181915737, 30.714796140487355), (78.0828618191573, 30.711096140487314), (78.08126181915748, 30.713696140487283), (78.07856181915736, 30.716596140487248), (78.07536181915742, 30.719296140487362), (78.07366181915745, 30.7217961404873), (78.07096181915733, 30.725196140487412), (78.06776181915745, 30.729996140487348), (78.06386181915735, 30.733296140487372), (78.06136181915741, 30.735496140487328), (78.05796181915747, 30.738896140487274), (78.05526181915735, 30.742196140487298), (78.05156181915748, 30.745096140487252), (78.04776181915747, 30.749396140487423), (78.0451618191575, 30.751496140487234), (78.04296181915737, 30.75349614048736), (78.04036181915751, 30.755596140487402), (78.03636181915749, 30.75919614048735), (78.03486181915736, 30.763696140487358), (78.03276181915732, 30.766496140487398), (78.03016181915734, 30.77049614048741), (78.02776181915738, 30.7733961404872), (78.02516181915735, 30.77759614048728), (78.02266181915746, 30.78209614048729), (78.0192618191573, 30.7867961404873), (78.01706181915739, 30.790296140487335), (78.01516181915736, 30.792396140487376), (78.01106181915742, 30.79529614048733), (78.0072618191574, 30.796896140487373), (78.0034618191574, 30.797596140487197), (77.99986181915745, 30.79909614048734), (77.99666181915734, 30.80249614048728), (77.99416181915745, 30.806196140487376), (77.99146181915751, 30.812796140487194), (77.99096181915752, 30.816196140487303), (77.98916181915746, 30.82399614048734), (77.98846181915746, 30.8274961404872), (77.98816181915748, 30.831296140487385), (77.98656181915743, 30.83749614048736), (77.98476181915737, 30.842296140487353), (77.98466181915745, 30.845896140487305), (77.98466181915745, 30.852896140487413), (77.98386181915737, 30.859296140487405), (77.98486181915729, 30.862696140487344), (77.9843618191573, 30.869096140487333), (77.98516181915744, 30.872996140487267), (77.98586181915744, 30.876396140487206), (77.98866181915747, 30.879696140487404), (77.99156181915743, 30.88219614048734), (77.99446181915738, 30.883896140487312), (78.00446181915737, 30.885996140487293), (78.00946181915737, 30.886796140487263), (78.01196181915748, 30.888896140487304), (78.0159618191575, 30.892996140487416), (78.0159618191575, 30.896796140487254), (78.01586181915735, 30.89899614048739), (78.01346181915738, 30.90429614048731), (78.01216181915748, 30.908696140487397), (78.01176181915741, 30.912696140487416), (78.00856181915731, 30.91729614048734), (78.00436181915745, 30.921996140487348), (78.00016181915743, 30.924996140487284), (77.99526181915735, 30.928796140487236), (77.99296181915747, 30.931096140487348), (77.99036181915744, 30.932896140487404), (77.9867618191575, 30.936096140487283), (77.98506181915735, 30.93869614048731), (77.98446181915745, 30.942096140487248), (77.98466181915745, 30.94429614048739), (77.98326181915746, 30.947596140487413), (77.97936181915736, 30.949896140487283), (77.97596181915742, 30.950196140487208), (77.97236181915741, 30.950696140487192), (77.96776181915749, 30.950596140487278), (77.96436181915738, 30.950296140487353), (77.96046181915744, 30.95039614048728), (77.95586181915735, 30.950196140487208), (77.95066181915752, 30.94969614048728), (77.94546181915729, 30.949396140487295), (77.94016181915737, 30.948096140487397), (77.93406181915748, 30.94589614048727), (77.92546181915736, 30.941996140487333), (77.92026181915736, 30.938396140487384), (77.91686181915742, 30.93569614048727), (77.91336181915733, 30.93229614048733), (77.91036181915746, 30.929896140487305), (77.90596181915737, 30.927796140487324), (77.90036181915747, 30.926196140487267), (77.89326181915749, 30.924996140487284), (77.8890618191574, 30.925396140487297), (77.88546181915746, 30.926896140487266), (77.88296181915734, 30.9285961404874), (77.87966181915732, 30.931596140487276), (77.87726181915735, 30.93339614048739), (77.87466181915738, 30.93549614048721), (77.8723618191575, 30.938896140487323), (77.8680618191575, 30.94229614048726), (77.86506181915746, 30.945196140487273), (77.86316181915743, 30.94849614048724), (77.85956181915748, 30.95529614048735), (77.85616181915736, 30.963096140487323), (77.85386181915749, 30.9677961404874), (77.85236181915735, 30.971696140487325), (77.85136181915738, 30.977696140487243), (77.85026181915748, 30.98859614048729), (77.84996181915739, 30.994996140487277), (77.84926181915733, 31.001196140487256), (77.84846181915742, 31.007996140487304), (77.84626181915746, 31.017496140487317), (77.84636181915738, 31.02079614048734), (77.84596181915737, 31.025396140487263), (77.84626181915746, 31.02989614048727), (77.84626181915746, 31.03359614048737), (77.84556181915747, 31.04029614048733), (77.84476181915733, 31.045796140487255), (77.84596181915737, 31.0517961404874), (77.84546938751679, 31.055538620956156), (77.84517669242553, 31.055412360328493), (77.84517526714767, 31.055467946167376), (77.84503312325421, 31.061011558012634), (77.85036181915738, 31.061096140487333), (77.85656181915738, 31.064796140487278), (77.86386181915739, 31.079496140487276), (77.86486181915738, 31.08949614048727), (77.86586181915737, 31.094896140487307), (77.87106181915738, 31.100496140487337), (77.88666181915741, 31.107896140487316), (77.89296181915745, 31.10979614048731), (77.89296181915745, 31.117096140487327), (77.89396181915743, 31.122496140487275), (77.9032618191574, 31.133596140487274), (77.90116181915737, 31.139896140487284), (77.90636181915737, 31.142696140487285), (77.91476181915738, 31.143696140487275), (77.92206181915738, 31.140996140487285), (77.92836181915737, 31.141996140487276), (77.94716181915737, 31.153096140487285), (77.95136181915737, 31.153196140487275), (77.95336181915737, 31.156796140487273), (77.95856181915737, 31.162396140487285), (77.96796181915737, 31.164296140487277), (77.98266181915737, 31.15079614048728), (77.99936181915737, 31.15369614048728), (78.00566181915737, 31.152796140487283), (78.01926181915736, 31.143796140487275), (78.02756181915737, 31.141196140487278), (78.03066181915744, 31.1453961404873), (78.03266181915738, 31.137896140487282), (78.03166181915748, 31.14599614048723), (78.03166181915748, 31.151296140487382), (78.03066181915744, 31.1453961404873), (78.02866181915738, 31.152096140487295), (78.02856181915746, 31.15849614048733), (78.04006181915736, 31.166796140487293), (78.04316181915738, 31.17229614048728), (78.05156181915748, 31.174196140487254), (78.0661618191574, 31.17979614048733), (78.08706181915738, 31.17999614048739), (78.09226181915739, 31.178196140487334), (78.09856181915728, 31.178296140487422), (78.10586181915733, 31.181096140487284), (78.11416181915752, 31.18849614048742), (78.12046181915741, 31.191296140487285), (78.12256181915745, 31.1939961404874), (78.12566181915747, 31.194996140487323), (78.13196181915737, 31.20229614048736), (78.14656181915745, 31.20519614048737), (78.14866181915744, 31.21159614048736), (78.15756181915737, 31.2143961404874), (78.16006181915748, 31.21989614048738), (78.16736181915735, 31.21909614048741), (78.17266181915744, 31.2208961404873), (78.17786181915744, 31.220096140487392), (78.18206181915735, 31.220996140487273), (78.18726181915736, 31.219296140487305), (78.19876181915743, 31.212096140487347), (78.20396181915748, 31.21119614048729), (78.21126181915736, 31.214896140487387), (78.21436181915749, 31.223096140487257), (78.2185618191574, 31.226796140487355), (78.2237618191574, 31.227796140487325), (78.2289618191574, 31.228796140487248), (78.24256181915734, 31.2251961404873), (78.24886181915741, 31.229796140487394), (78.24886181915741, 31.234396140487327), (78.25406181915747, 31.23349614048732), (78.25926181915747, 31.237196140487356), (78.26026181915745, 31.24089614048728), (78.26346181915733, 31.243696140487316), (78.26556181915737, 31.24729614048727), (78.27286181915741, 31.255596140487285), (78.28016181915746, 31.262096140487422), (78.28846181915748, 31.25759614048741), (78.29786181915733, 31.25489614048729), (78.30416181915746, 31.25679614048727), (78.30626181915744, 31.264996140487373), (78.30626181915744, 31.275096140487285), (78.30946181915738, 31.277896140487314), (78.31566181915736, 31.276996140487256), (78.32606181915742, 31.276196140487347), (78.33656181915751, 31.278996140487383), (78.34486181915736, 31.277296140487415), (78.3573618191574, 31.28099614048728), (78.36576181915734, 31.28199614048725), (78.37826181915739, 31.279396140487226), (78.38236181915738, 31.26909614048731)]]}      The data I am using can be found here.


title: QGIS 2.0, SpatiaLite: labels disappear after setting data defined position (x,y)

text: I added to my SpatiaLite table (.osm-import with the "standard" QGIS-OSM- Plugin) two empty columns x and y (double) to define manually the position of my labels (data defined labeling). But after telling the layer about the x and y-column, all labels just disapears! I tested it in different CRS and with different data types and lengths. I created the columns in QGIS (When I create them in DB-Manager or Qspatialite, they wont appear in the QGIS attribute table) Im absolutely new to SQL databases! Thats my table: ![enter image description here](http://i.stack.imgur.com/HQrkG.png) ![enter image description here](http://i.stack.imgur.com/b2392.png) UPDATE: Creating a column with               ALTER TABLE "pelepo_300114_place" ADD COLUMN label_x integer      works but is NOT displayed in Qgis. (I tryed it with integer, numeric, float...)


title: Programming a Tessellation in MATLAB and Using Map Data As Input

text: First of all, I hope this question isn't too basic, obvious or inappropriate for this forum. I'm very new to using map data. I'm working on a project on locating service terminals in a geographic region. Abstractly, given a simply connected region in the plane (for the purposes of what I'm doing, a contiguous map, say a map of the contiguous United States), I want to approximately cover this map with non-overlapping circles that lie completely in the boundary. (This is only part of what I'm doing, but it's the relevant part). I'm working on programming an algorithm for this in MATLAB. My question related to this is: I have map data in I've downloaded from TIGER (http://www.census.gov/geo/www/tiger/tgrshp2009/tgrshp2009.html) I've successfully opened this map data in MATLAB using the Mapping toolbox Map Viewer. What I want to do is to take this nice looking map data and store it in format I can use. A crucial part of the algorithm I'm implementing has a step that is: Given a point (x,y), calculate the distance from this point to the boundary of the region. For my purposes, this is Euclidean distance, i.e., the length of the shortest straight line from (x,y) to the boundary. What would be a way to go from the TIGER data (which gives me a nice picture of the map) to a format that I can easily calculate the above step? Thank you!


title: Best place for (structured) ArcGIS tutorials

text: I've been through University for a Geography degree and am now working on a PhD in Remote Sensing. As part of my undergraduate degree I did a couple of GIS courses, but they concentrated mainly on the theory and techniques of GIS rather than the practical side. We did have some practicals using ArcGIS and Idrisi, but they stayed very much in the basics. What I'm looking for now is a good way to learn some more ArcGIS techniques to really use the power of the software. Browsing around and asking questions on this site has helped quite a bit: for example, I never realised (until I saw my supervisor do it) that you could link dataframes together, or even that you could have multiple data frames (see this question). Similarly, I suspect there are lots of ArcGIS features that could really make my life easier, but that I just don't know about. For example, I don't have the foggiest idea about geodatabases, but I suspect that they're really handy. What I'm really looking for are tutorial recommendations, in any medium (books, videos, websites, whatever). Obviously free or cheap are better, but I do have a budget for books as part of my PhD. As I probably hinted at above, I'm more interested in general usage of ArcGIS rather than specific tools (like DEM processing or route-finding), and something that is relatively structured would be good, so that I can work through it in a sensible order. I know this is a bit of a tall order, but any ideas?


title: How to sum an attribute of a feature in a network along a route? (ArcGIS Network Analyst)

text: In the walking network that a friend and I are creating, we want to calculate an overall safety rating for each route. Each segment of our walking network has a certain safety value. We have calculated a "total safety" rating of each segment by multiplying the length of the segment by the safety value of the segment (1 to 5). When creating walking routes using Network Analyst, we want to be given the sum of all the "total safety" ratings for all the segments along the route. Using this, we can normalize this value by the total distance, giving us an overall safety value for the entire route. Does anyone know how to do this? Thanks


title: How does GIS intervene in ports and coastal areas?

text: I guess my question is pretty clear and yet broad, but what I was kind of hoping for is some insight on how GIS would be helpful in managing the ports or coastal areas. I can imagine it could serve monitoring the environnement surrounding the port, it could for example use satellite imagery for exploring the bathymetry of the coasts, etc. So, how does GIS and marine geographical information rhyme ? P.S : would be great if every poster used her/his answer for one application.


title: How to ask the Interpolate function with CQL in Geoserver?

text: I like to display my own picture on Geoserver. But I want to use the geoserver's dynamic feature to color my picture. As explain in the documentation, I tried the purposed solutions :   * create a font    * build Geoserver from source to make a plug-in But, it's hard and it will take to much time. The final solution, I retain is to create a little servlet which generate my SVG picture on the fly with a input color parameter. This is done and works well. I want to use the geoserver's Interpolate function (http://docs.geoserver.org/latest/en/user/styling/sld- tipstricks/transformation-func.html#interpolate). The only solution I found to do this is calling the function in the URL (http://blog.geoserver.org/2008/12/08/dynamic-symbolizers-part-1/). But I don't know the syntax I have to write. I tried this :                <sld:Graphic>         <sld:ExternalGraphic>            <OnlineResource xlink:type="simple" xlink:href="http://localhost/svggenerate?color=${Interpolate(my_value,'0','#fefeee','1000','#ff0000','color')}" />"/>             <sld:Format>image/png</sld:Format>         </sld:ExternalGraphic>         <sld:Size><ogc:Literal>40</ogc:Literal></sld:Size>      But It's doesn't work. I really appreciate if somebody have an idea about the right syntax to make it work.


title: Checking if python script is run from ArcGIS (arcmap or on server) or a stand alone python script

text: For debugging purposes I have created a hardcoded conditional that checks it the script is run as stand alone or as an ArcGIS tool. Is there anyway to fugure this out at run time? e.g. some environment variable, global variable, etc. e.g.               dryRun= 1     if dryRun:         par= 'Hello'     else:         par= arcpy.GetParameterAsText(0)     # Do something


title: Using more than one graphics layer with a FeatureDataGrid

text: I am wanting to use the FeatureDataGrid to display data. The problem is I have more than one layer that contains data that needs to be displayed. This is how you use the DataGrid for one layer:               private void MyMap_Loaded(object sender, RoutedEventArgs e)             {                 MyDataGrid.Map = MyMap;                 MyDataGrid.GraphicsLayer = MyMap.Layers[1] as ESRI.ArcGIS.Client.GraphicsLayer;                 MyFeatureDataForm.FeatureLayer = MyMap.Layers[1] as ESRI.ArcGIS.Client.FeatureLayer;             }      This is the XAML for my map:               <esri:Map.Layers>                         <esri:ArcGISTiledMapServiceLayer ID="MyLayer" Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>                              <esri:FeatureLayer ID="Hydrant"                                             Url="http://localhost:6080/arcgis/rest/services/CalvertCity_Test_Server/FeatureServer/0"                                             Renderer="{StaticResource Renderer_Hydrant}"                                            MouseLeftButtonUp="FeatureLayer_MouseLeftButtonUp"                                             DisableClientCaching="True"                                            OnDemandCacheSize="0"                                            Mode="OnDemand"                                            AutoSave="False"                                            OutFields="*" />                         <esri:FeatureLayer ID="WaterValves"                                             Url="http://localhost:6080/arcgis/rest/services/CalvertCity_Test_Server/FeatureServer/1"                                             Renderer="{StaticResource Renderer_WaterValves}"                                            MouseLeftButtonUp="FeatureLayer_MouseLeftButtonUp"                                             DisableClientCaching="True"                                            OnDemandCacheSize="0"                                            Mode="OnDemand"                                            AutoSave="False"                                            OutFields="*" />                         <esri:GraphicsLayer ID="CandidateGraphicsLayer">                             <esri:GraphicsLayer.MapTip>                                 <Grid>                                     <Rectangle Stroke="Gray"  RadiusX="10" RadiusY="10" Fill="#77FF0000" Margin="0,0,0,5" >                                         <Rectangle.Effect>                                             <DropShadowEffect/>                                         </Rectangle.Effect>                                     </Rectangle>                                     <Rectangle Fill="#DDFFFFFF" Stroke="DarkGray" RadiusX="5" RadiusY="5" Margin="10,10,10,15" />                                     <StackPanel Orientation="Vertical" HorizontalAlignment="Center" Margin="30,20,30,30">                                         <TextBlock Text="{Binding [Address]}" HorizontalAlignment="Left" Foreground="Black" />                                     </StackPanel>                                 </Grid>                             </esri:GraphicsLayer.MapTip>                         </esri:GraphicsLayer>                     </esri:Map.Layers>                                 </esri:Map>      I thought about trying to pull the layer for the selected graphic, but I am not sure as to how to do that. If you need any more information or want me to explain further, let me know.


title: How to save a copy of the current data driven page to a new map file?

text: I need to copy the current data driven page to a new ArcMap Document using arcpy so that I can make sure the file name follows the naming schema that we have defined and the user cannot change. Is it possible to do this with arcpy?


title: Can I share ArcGlobe bookmarks with ArcScene and vice versa?

text: I am working on a flyover animation and would like to be able to seamlessly go between ArcGlobe and ArcScene and the other way around. I tried saving and using the bookmarks in but this does not seem to work. Is there another way to synchronize a specific location in ArcGlobe and ArcScene?


title: shortest_path is not working on large source/target

text: I tried to find a route using shortest_path function of pgrouting, and it took to the server (postgres) a lot time to process my query (more then 5 minutes!) even I have only 10 rows in my table. After playing with my table I found out that the IDs of source & target must be short (up to 6-7 digits) in order to get the query results fast. But these IDs I get them from the map so I don't want to change them. For Example, this is the table:               id   source     target   cost     --   -------    -------  -----     1    123456     2        1     2    3          2        2     3    3          4        3     4    4          5        4     5    5          6        3.3      This query takes ~30ms:               SELECT * FROM shortest_path('SELECT * FROM temp_table_2',123456, 3, false, false);      But the same query when I change the source 123456 to 1234567 I get the result after ~400ms! (and of course, If I try to increase the source to 12345678 it will take more than few seconds...) How can I use pgrouting to **get** the shortest path (and not just wait...) from my table? Thanks!


title: How to draw a custom map on top of base layer

text: I'm looking for the easiest way to draw a custom layer and export it as a tile cache. Basically what I would like to be able to do is load a base layer, and then draw objects and annotations on top of it and export these objects and annotations as a raster (GeoTIFF) than I can them run through MapTiler. I'd like my custom map to include both polygons, circles, and text, sort of like using a georeferenced Adobe Illustrator. What's the best process to do this? I'm thinking QGis since I have experience there, but maybe there are other tools where this is more straightforward


title: sometimes a white, square dialogue appears in the middle of the screen: Map Data ... Google maps

text: I have this code and some of the time,(not always!!), i have a dialogue that get displayed in the middle of the map: Google Maps Map data (c)2012 Google                  var map;        var vectors;        var epsg900913 = new OpenLayers.Projection('EPSG:900913');        var epsg4326 = new OpenLayers.Projection('EPSG:4326');                  function initialize() {            var control, renderer=OpenLayers.Util.getParameters(window.location.href).renderer;            renderer= (renderer) ? [renderer] : OpenLayers.Layer.Vector.prototype.renderers;            // Create the map object            map = new OpenLayers.Map('map');             //Create a Google layer            var gmap = new OpenLayers.Layer.Google(                "Google Streets", // the default                  {numZoomLevels: 20}            );            var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",                     "http://vmap0.tiles.osgeo.org/wms/vmap0?", {layers: 'basic'});                      vectors= new OpenLayers.Layer.Vector(               "Vector Layer",                {                    renderers:renderer                }            );                 map.addLayers([gmap,vectors]);                 map.addControl(new OpenLayers.Control.LayerSwitcher());            map.addControl(new OpenLayers.Control.MousePosition());                 control=new OpenLayers.Control.DrawFeature(vectors,OpenLayers.Handler.Path);            map.addControl(control);            control.activate();            // Zoom to Vancouver, BC            map.setCenter(new OpenLayers.LonLat(-123.12, 49.28).transform(epsg4326, epsg900913), 13);                }      Does anyone know where is this coming from? Thanks in advance.


title: Delimitate an area - google map

text: I tried to find tools to delimitates a specific region area of a map When the mouse is on a specific area, there is the region delimition which appears. Like this website : http://www.police.act.gov.au/crime-and-safety/crime- statistics.aspx or even livelovely maps I try use google api Fusion Tables, but it seems it can't do what i want... http://code.google.com/apis/maps/documentation/javascript/examples/layer- fusiontables-styling.html Maybe do you have some advices ? Thanks


title: How can I determine whether a feature class is a 3D feature class (HasZ)?

text: I would like to be able to determine whether a feature class passed to a procedure is a 3D feature class (hasZ) or not. How can I do this in VB .Net & ArcObjects?


title: Custom Dynamic Layer draws below annotations

text: My custom dynamic layer (moving vehicles) is at position 0, specified by this code:               mapControl.Map.MoveLayer(customDynamicLayer, 0); //smaller numbers draw later      But the annotations of the layer at position 1 (my map) still draw over my dynamic layer. Is this normal? Is there a workaround? I'm guessing there isn't a workaround because the non-dynamic layers get tiled, but I thought I'd ask anyway.


title: Get heading from 2 IPoints

text: I am moving an object from one point to another and would like to update the heading of the dynamic display properties. I am using this code:               m_dynamicSymbolProperties.set_Heading(esriDynamicSymbolType.esriDSymbolMarker, heading);      But I am having trouble getting my heading right. Does anyone know how to calculate a heading based on two IPoints which have standard esriSRGeoCS_WGS1984 spatial references?


title: Local Copy of Data for a project

text: We have an internal GIS library which has a very wide range of data from numerous sources. We use this to supplement information provided by a client. Our internal GIS files have coverage for the country, however for specific projects I only need a small subsection of the data. At the start of a project I like to consolidate all of the information togethor. Is there a method to quickly copy an extract of the data to the project directory - to minimise the data set and speed up the work and also to make a copy for the records.


title: Accuracies of various GNSS systems

text: I was looking for a comparitive statement of the accuracies achived by various GNSS systems such as QNSS, COMPASS, GLONASS, GPS..etc. however i find only discriptions of only GPS everywhere


title: US Census API - data by census tract

text: Using the US Census Tract API I can search for the age population in different parts of the country               http://api.census.gov/data/2010/sf1?key=[key]&get=PCT0120125&for=county:*      returns list of women aged 18 by county and `PCT0120021` for men.               [     ["PCT0120125","state","county"],     ["405","01","001"],     ["1153","01","003"],     ["163","01","005"],     ["137","01","007"],     ["361","01","009"],     ["56","01","011"],     ["137","01","013"],     ...      How could I look up the corresponding information by Census tract?   Something like `for=tract:*` but that gives me error messages `error: unknown/unsupported geography heirarchy`.


title: Is there a standard data model for storing traffic volumes, layout, lanes, timing and phasing information?

text: I am at a crossroads where I want to store more than a scenarios worth of project data from a Synchro study, but do not want to keep this data in a series of text files. The data output by Synchro is standardized to a tab delimeted text file. The raw text files are useless when organizing a GIS analysis or visualizing (map) the study area. They require much more then some simple manipulation. I want to know if there exists a spatial data model for storing traffic volumes, layout, lanes, timing and phasing information that is included in the UTDF specification used by many traffic analysis software. By storing data in a spatial database, I would be able to hold many time periods worth of data, visualize subsets of said data, and perform temporal analysis. However, most beneficial would be the ability to export a selection of data at any given intersection(s) into a UTDF that can be consumed by Synchro or any other traffic analysis software. * * * Typically: `Traffic Analysis Software (e.g. Synchro) <--> UTDF` What I want to do: `Spatial Database <--UTDF--> Synchro` Essentially, the UTDF becomes the standard format in which data is transferred between the spatial database and traffic analysis software. * * * Does the `Spatial Database <--UTDF` part already exist?


title: Can I Start and End an OSM2PO route in the middle of a road segment?

text: I need to be able to start and end a route in the middle of a road segment as opposed to a vertex/intersection. I know that you can disable snapping when stating your start/end but the route still shows the start and end snapping to a vertex.


title: Tilemill grey border on mbtiles export

text: I've got my final raster tile map (via vrt) into tilemill and am trying different mbtiles export options. No matter what boundary I specify for export - I always end up with the beige top and bottom bands. Hope my description makes sense - not sure how to get rid of them! Thank you kindly -


title: How to reorder fields (permanently) in a file geodatabase

text: Using ArcGIS 10.0, is it possible to reorder the fields in a file geodatabase, and have the order persisted to the database? We considered exporting to XML, and writing a parser to change the field order, then re-creating a new database from the XML. This seems like a laborious process. Another idea is to import the existing field definitionss into Excel, re-order them, export to CSV, then write a Python script to create these fields in a new Geodatabase. Does a script like this exist, before we write it from scratch? Unfortunately the ArcGIS Diagrammer doesn't seem to support field re-ordering. Are there any scripts or hacks we could use to simplify this process? Thanks


title: Basemap Widgets

text: ![enter image description here](http://i.stack.imgur.com/wFCK7.png) I am looking for a fancy Basemap plugin to use with the ArcGIS Javascript API. Something along the lines of the Basemap Widget (see image below) available in the Flex Viewer would be great. Anyone have any ideas/suggestions?


title: Geoserver SLD style - double dashed line

text: Is it possible to make SLD style for Geoserver maps to represent street that has 3 tracks (or more) with something like this ![enter image description here](http://i.stack.imgur.com/ydwAJ.png) I know that it is possible to make single dashed line ------ so the street will apear to have 2 tracks, but I was unable to make double dashed or triple dashed line. I just need to represent each track on street. I think it might be possible with using custom shape along with textsymbolizer and then making it appear as double dashed line, but I cannot use that because of all vendor options for displacement cause I will have street name, street direction etc. also with textsymbolizer.... I was wondering is it possbile with some line displacement or something similar? Thx :)


title: How do I append PostGIS commands to the system path?

text: I'd like to be able to call psql instead of having to put in the full path everytime. I went into Environment Variables through My Computer and added the path to the semi-colon separated list, but still no luck. I'm sure this is easy, just haven't dealt much with Windows commands.


title: Broadband coverage GIF image layer needs to be selectable (ArcGIS)

text: I am working on a project on Arcmap where I have 80,000 co-ordinates of postcodes and a broadband coverage map. I need to know which of the co- ordinates intersect with the coverage map. I have added the coverage map in GIF format and it is a non-selectable layer. I need this layer to be selectable so that I can use 'select by location' and figure out which co-ordinates intersect it. My project is very similar to this. I just need the Broadband coverage GIF layer to be selectable. Does anyone know how to do this? or can you explain a better way to go about solving this project.


title: Batch process of GDALWARP in FWtools

text: I am using FWtools for pre processing of time-series MODIS data, I want to mosaic series of two scenes. But I don't know the batch code for gdalwarp. I am using windows. Kindly help me out.


title: Geotools: Efficiently writing a GeoJSON stream into a Shapefile

text: I've been trying a few solutions to efficiently convert GeoJSON into a shapefile without having to store all features in memory. I'm using GeoTools 9.2. The problem is not so much in how to stream the JSON but how to efficiently write the features into the shapefile. I use FeatureJSON#streamFeatureCollection to obtain an iterator. After some googling, I found 3 different ways of writing a shapefile, namely: **Option 1** : Repeatedly calling FeatureStore#addFeatures with a collection containing say 1000 features, within a transaction.                 ListFeatureCollection coll = new ListFeatureCollection(type, features);       Transaction transaction = new DefaultTransaction("create");       featureStore.setTransaction(transaction);       try {         featureStore.addFeatures(coll);         transaction.commit();       } catch (IOException e) {         transaction.rollback();         throw new IllegalStateException(             "Could not write some features to shapefile. Aborting process", e);       } finally {         transaction.close();       }      This option is extremely slow. By profiling a few runs, I noticed that about 50% of CPU time is spent on the method ContentFeatureStore#getWriterAppend, presumably in order to reach the end of the file before each transaction commit. **Option 2** : Obtaining an append writer directly from ShapefileDataStore, and write 1000 features at a time within a transaction. This option suffers from the same problems as number one. **Option 3** : Obtaining a feature writer from ShapefileDataStore, and write one feature at a time using Transaction.AUTO_COMMIT.                FeatureWriter<SimpleFeatureType, SimpleFeature> writer = shpDataStore         .getFeatureWriter(shpDataStore.getTypeNames()[0],             Transaction.AUTO_COMMIT);           while (jsonIt.hasNext()) {            SimpleFeature feature = jsonIt.next();       SimpleFeature toWrite = writer.next();       for (int i = 0; i < toWrite.getType().getAttributeCount(); i++) {         String name = toWrite.getType().getDescriptor(i).getLocalName();         toWrite.setAttribute(name, feature.getAttribute(name));       }       writer.write();     }     writer.close();      Option 3 is the fastest, but I feel there would a way of efficiently adding a greater number of features at a time to the shapefile within a transaction. On the other hand, a previous comment in the GeoTools mailing list noted: > The above would work for mid-sized data transfers, for massive ones against > databases it's better to adopt some sort of batching to avoid having a > single transaction with one million inserts, e.g., insert 1000, commit the > transaction, insert another 1000, and so on. This would work better against > databases and against WFS servers, but not against **shapefiles** , which > instead work better with the massive insert... to each his own. Does this mean that the most efficient way of writing to a shapefile is having all features in memory, rather than being able to append features? I appreciate if someone could suggest a better way of achieving this or point to any documentation that would help me.


title: Help me convert this US Lambert Conformal Conic Google Maps Projection to Australia

text: Following on from this question: Identify what projection this Australian map uses? <\- this is the sort of map i want to load in I need help changing the bits necessary in this example of Lambert Projection in Google Maps to make it work with Australian tiles instead: Lambert equal area azimuthal projection Google Map which apparently uses these formulae: Lambert Conformal Conic Projection -- from Wolfram MathWorld **Here is my attempts so far, changing what i think needs changing, but it must not be enough**   * its a bit confusing for me, im a web developer   * i will be adding the tiles at a later stage   * in my version i made it so when you click around it shows the coords, but as you do this the ones it shows are not in australia, so thus my problem   * in the original demo it centers and loads tiles 001 & 101, in mine it does not   * in my version i made it try to load all tiles so you can see which ones in the error console **Thanks for your time.** Heres is the original javascript it uses as seen at that site: (you may notice it uses google maps api v2, not the latest v3 available due to its age)               var phi0 = 10*Math.PI/180;     var phi1 = 20*Math.PI/180;     var phi2 = 70*Math.PI/180;     var n = (Math.log(Math.cos(phi1)) - Math.log(Math.cos(phi2)))/         (-Math.log(Math.tan(phi1/2 + Math.PI/4)) + Math.log(Math.tan(phi2/2 + Math.PI/4)));     var rho0 = (Math.cos(phi1)*Math.pow(Math.tan(phi1/2 + Math.PI/4),n))/         (n*Math.pow(Math.tan(phi0/2 + Math.PI/4),n));          function ConformalConicLambertProjection() {};     ConformalConicLambertProjection.prototype = new GProjection();     ConformalConicLambertProjection.prototype.fromPixelToLatLng = function(pixel, z) {         var x1 = (-0.0034375*(Math.pow(2,7 + z) - pixel.x))/Math.pow(2,z);         var y1 = -0.0017254901960784311*Math.pow(2,1 - z)*             (pixel.y - 405.68181818181824*Math.pow(2,-1 + z));         var rho = Math.sqrt(2.143305952697287 + Math.pow(x1,2) -              2.9280067982826044*y1 + Math.pow(y1,2));         var t = Math.asin(x1/rho);         var lng = 78.17779218926289*t-100;         var lat = 28.64788975654*(-3.141592653589793 +              4*Math.atan(2.004758218840869/Math.pow(rho,1.3644598756425434575)));         return new GLatLng(lat, lng);     };     ConformalConicLambertProjection.prototype.fromLatLngToPixel = function(latLng, z) {         var t = Math.PI/180*(100 + latLng.lng())*n;         var rho = (Math.cos(phi1)*Math.pow(Math.tan(phi1/2. + Math.PI/4.),n))/             (n*Math.pow(Math.tan((Math.PI/180*latLng.lat())/2. + Math.PI/4.),n));         var x1 = rho*Math.sin(t);         var y1 = rho0 - rho*Math.cos(t);         x = Math.round(Math.pow(2,z)*(128 + 290.9090909090909*x1));         y = Math.round(Math.pow(2,-1 + z)*(405.68181818181824 - 579.5454545454546*y1));         return new GPoint(x,y);     };     ConformalConicLambertProjection.prototype.tileCheckRange = function(tileIndex, zoom, bs) {         if(0 <= tileIndex.x && tileIndex.x < Math.pow(2,zoom) &&            0 <= tileIndex.y && tileIndex.y < Math.pow(2,zoom-1)) {              return true;}         else { return false; };     };          function load() {       if (GBrowserIsCompatible()) {              var lambertTileLayer = new GTileLayer(             new GCopyrightCollection(), 1, 4);         lambertTileLayer.getTileUrl = function(tile, zoom) {             return "Tiles/ConformalConicLambertTile_" + tile.x + "_" + tile.y + "_" + zoom + ".png";         };         var lambertMap = new GMapType([lambertTileLayer],             new ConformalConicLambertProjection(), "ConformalConicLambert",             {tileSize:256});              var map = new GMap2(document.getElementById("map"), {mapTypes:[lambertMap]});              // Add the controls         map.addControl(new GSmallZoomControl());         map.setCenter(new GLatLng(37.9251,-100), 1);                 } else {         document.getElementById('map').style.backgroundColor = '#DDDDDD';         document.getElementById('map').innerHTML = 'Sorry, your browser does not appear to be compatible with Google maps.';       }     }


title: Raster Catalog to Raster Dataset ERROR

text: I have a problem converting my Raster Catalog to Raster Dataset. I have an error (see below) after 4-5 hours of process - all rasters have ~21Gb. Is there something wrong with data? ![enter image description here](http://i.stack.imgur.com/Gwsyf.png) I will be really grateful for your help :) ==> Sure, here it is: ![enter image description here](http://i.stack.imgur.com/gxnCU.png)


title: How to extract raster values and create new raster in Qgis?

text: I want to extract certain values of a raster image in order to create a new raster which then should only contain the extracted/chosen values. How to do this in QGis?


title: Load multi point shapefiles into postgresql

text: I am so curious to know how I can change the constraint to accept multipoint when I try to use pgsql to load shap files. I searched a lot, but I could not find the answer. My command line is:               C:\Program Files\PostgreSQL\9.0\bin>shp2pgsql -p -c -s 2400 -W LATIN1 C:\Projects\Mandana\OBO\Oversiktskartans_texter.shp | psql -U postgres -d postgis      I would appreciate if you tell me how we can add constraint here to accept multipoint.


title: Are there any free administrative boundaries available as shapefiles?

text: After learning about the US Census's TIGERLines datasets I'm addicted to GIS :) I've working with the following layers, from the USA data   * Country boundaries   * State boundaries   * County boundaries   * City boundaries   * ZipCode boundaries What I'm trying to find is the equivalent (where appropriate) of the same data for the following countries.   * United Kingdom (hello Ordinance Survey :( )   * New Zealand   * Canada   * Italy ... but i'm struggling to find _any_ data available. Can anyone help me? edit: I can't tag this correctly because I don't have enough points .. yet.


title: Administrative boundaries worldwide

text: I am searching for a downloadable database of administrative boundary shapes, best would be worldwide data. I have found GADM but it seems a bit outdated, also the OSM site defining the administrative boundaries seems interesting but I haven't found any exports based on this definition. The detail level of the shapes is not that important as it would be used to let a user select the city/region (if not in a city or no data for that city available). A hierachical representation like Country > Region > City would be great.


title: Where can I find a dataset for international borders that includes national waters?

text: I'm trying to find a `.shp` file that not only includes international land boundaries, but also the water boundaries, extending out to international waters. Does such a thing exist? I'm not even sure of what terms to search for. Currently, I'm operating using a world borders map which is mostly good, but when our mobile users approach the ocean and their GPS flakes out a bit, our system can't place them within a country. I figure the best way to fix this is to used a dataset that will always place the national border well away from dry land (and cell towers for their phone). This project isn't making any money, so I'm hoping for free :-)


title: ArcMap Framework - Scroll bars in Layout View went missing. How to bring them back?

text: I have encountered a minor yet very annoying layout view change. All of a sudden my scroll bars in Layout View bars have disappeared. I also no longer have the small layout view, data view, refresh and pause buttons which are normally a part of the the scroll bars. I now have to go to the main menu to switch my view from layout to data. However the scroll bars appear in data view. I probably toggled something off accidentally but where? There must be a simple way to bring them back. Anyone? ![enter image description here](http://i.stack.imgur.com/EIPpT.jpg)


title: Incorrect spatial extent for imported hdf image on ArcGIS

text: I imported an hdf image onto ArcGIS but I cannot make correct projection of it. Also, it does not have correct spatial extent (please see the enclosed figure, the small one is projected under WGS84). I try to define the projection of the hdf raster but the tool just simply doesn't run. The hdf raster has 7200 columns and 3600 rows while the small one has 3600 columns and 1800 rows. Do you have any ideas how I can fix this? Thanks.![enter image description here](http://i.stack.imgur.com/wKkyN.png)


title: Getting print statements in Python script to print through a batch file

text: I'm starting to learn Python and batch files. I have a Python script which selects data by location and exports the selection to a new feature class. The script runs just fine - included in this script I have the following lines: matchCount = int(arcpy.GetCount_management(featureLayer).getOutput(0)) print str(matchCount) + " rows exported" When I run this script in PythonWin the print statement above is produced in the Interactive Window. When I run this script through a batch file the print statement isn't produced. At the end of my batch file I have written PAUSE so the screen doesn't disappear after running my script. Anyone have ideas on how to produce my print statement in command line? Regards, Patty


title: Generate WFS-T requests

text: I want to create WFS-T update/insert/delete requests in my java application. As a result I want to save the requests in XML encoding, as specified by the OGC standard. Does someone know a library (prefarably Java) which helps to create the WFS-T update/insert/delete requests?..


title: how to calculate the basin length - which point to which point and how in arcgis 9.3?

text: ![this is the image of my study rea](http://i.stack.imgur.com/y21kV.jpg) This is the area of my research.I have calculated area using area and perimeter using arcgis 9.3 for doing morphometric analysis of the area.but i dont know how to calculate the length of the basin that is which start and end point i have to take to calculate using arcgis 9.3. please help.


title: Can not make qgis.db private copy

text: I've just installed Qgis 2.0.1 and the above error message appears. Does anyone know how to resolve this problem? I think I need to change the permissions of the relevant folder, but I'm not certain. Thanks in anticipation, Neil


title: will ogr get coordinates in geographic coordinate system or projected coordinate system when using getPoint(int,OGRPoint*)

text: Consider the code that I have written in the stackoverflow question How to extract vertexes of geometries in ESRI shapefiles using ogr library with c++, I have used the code to show shapefiles on an OpenGL window and my problem is it seems the layer is stretched comparing to what is shown when we render it in ArcGIS, QGIS and etc that I think it is maybe because of not using the correct projection. for a layer, like this: ![enter image description here](http://i.stack.imgur.com/AdiIe.jpg)   ![enter image description here](http://i.stack.imgur.com/hXcoV.jpg)   are the vertex coordinates stored in Geographic coordinate system or projected coordinate system when we use functions like:               OGRLineString::getPoint(int,OGRPoint*);     OGRPoint::getX();     OGRPoint::getY();        when I debug my code and see the vectors stored:   ![enter image description here](http://i.stack.imgur.com/QZlw5.jpg)   I come to the point that coordinates are stored in the PCS not GCS, but why my layer is stretched.   In fact I'm not sure what's the problem to start to solve. So just tell me:   * Are the coordinates fetched when we use the above functions in geographic coordinate system or in projected coordinate system?  * * * **Edited section based on the Andre Joost's comment**   I have downloaded `Country Regions` dataset here, you see its coordinate system and bounding box here:   ![enter image description here](http://i.stack.imgur.com/El9Go.jpg) and the data stored is:   ![enter image description here](http://i.stack.imgur.com/wnKSD.jpg)   that you see is in decimal degrees. Now in ArcCatalog I change the coordinate system:   As you see the bounding box is not projected to the new coordinate system and they are the same number just their unit is in meters. Which is obviously not true:   ![enter image description here](http://i.stack.imgur.com/A0A0D.jpg)   and the data stored with for the same point in my program is:   ![enter image description here](http://i.stack.imgur.com/gJW3A.jpg)   **So I think the projection is not done automatically and I should do the calculations with PROJ.4 library!**


title: Using IRelationshipClass

text: I have three feature classes [CircuitSource( **A** ),CircuitBreaker( **B** ),Sub-Station( **C** )]. In the Geodatabase A and B has a **1:1** relationship based on a primary field namely 'FEEDERID'. C and B has a **1:many** relationship based on a field namely 'STATIONID'. I have created a new feature in A(pFeatA) and related this feature to an existing feature(pFeatB) in B feature class so that the value of 'FEEDERID' in pFeatA gets populated in pFeatB. I used the following code. **IRelationshipClass relClass = null;** **relClass.CreateRelationship(pFeatA as IObject, pFeatB as IObject);** But the value of 'FEEDERID' in pFeatA is getting populated in all features in B feature class which has 'FEEDERID' = null and the similar value of 'STATIONID' as that of pFeatB.


title: Can I view a Google Maps map by bounding latitude and longitude coordinates

text: With Google Maps I can enter a single lat/lng coordinate and the map is drawn with that lat/lng in the center. What I'd like to be able to do is enter two coordinate pairs, say the southwest coordinate and the northeast coordinate, and have a Google Map displayed with the appropriate zoom so that the map fills the bounds defined by those coordinates. Is this possible? If so, how? Thanks ## And the Answer is... Go to Google Maps Code Playground! Per Taylor's suggestion, I went to the Google Maps Code Playground and entered the following code and was able to get a centered map with the appropriate zoom level bounded by the coordinate pair.               function initialize() {       var mapDiv = document.getElementById('map-canvas');       var map = new google.maps.Map(mapDiv, {         mapTypeId: google.maps.MapTypeId.ROADMAP       });            var southWest = new google.maps.LatLng(..., ...);       var northEast = new google.maps.LatLng(..., ...);       var bounds = new google.maps.LatLngBounds(southWest,northEast);       map.fitBounds(bounds);     }


title: Additional Parameters for PrintTask?

text: Hi Guys I'm writing a custom GP tool for printing with 10.1. I need to pass some additional parameters into GP tool. I'm using printTask from jsapi and I couldn't add more parameters just by adding to PrintParameters.               ptemplate.preserveScale = false;     params.template = ptemplate;     params.MyNewParameter = 'testing';       printTask.execute(params, printComplete);      I already have a workaround by adding it as URL parameter. gpurl?MyNewParameter='testing'. In reality my parameters are much complex than this. Seeking for better solution. technologies Arcgis server geo processing Esri JSAPI Arcpy


title: GeoExt and Mapfish print on other domain: can't get how to proxy

text: I have OpenLayers ProxyHost configured               OpenLayers.ProxyHost= "form/proxy?url=";      , the `url` config of Mapfish Print Provider is configured as `http://path/to/mapfish/print`, and the doc tells that I can do that as it is accessible throug the proxy `This property requires that the print service is at the same origin as the application (or accessible via proxy).` , but the lib still tries to go to other origin directly and fails. I cannot find where to configure GeoExt or ExtJS to go there through proxy. The Mapfish Print doc tells to set some parameter of a `mapfish` variable, I did that but obviously with no success. Please, help! (Actually, it's GeoExt 2 for ExtJS 4, where the PrintProvider seems being renamed as GeoExt.data.MapfishPrintProvider)


title: gdalwarp with -srcwin

text: I am trying to cut a window (in pixels) from a geotiff file and output in a different size. gdal_translate allows that but gives no option to set resampling, while gdalwarp allows resampling while it requires the src window to be in georeferenced coords. Is there away to get the best of both. i.e. (src in pixels and using resampling)? Thanks.


title: Create a polygon shapefile using point as boundary

text: Following have two problems:   1. I am now have 4 point in a shapefile and I want to set the point's coordinate for boundary of a polygon The points are xmin, xmax, ymin, ymax that can just be a rectangular polygon.   2. I want to make it to create a shapefile to make difference with another polygon shapefile  above problems i want to do it with python script any ideas? I use QGIS 1.8.0 and python 2.7.3


title: WPSExecute Format Issue

text: I have:               function createWPSExecuteRequest(namespace, layerName, popFilter) {         var request = OpenLayers.Format.XML.prototype.write(new OpenLayers.Format.WPSExecute().writeNode('wps:Execute', {             identifier: 'gs:Aggregate',             dataInputs: [{                 identifier: 'features',                 reference: {                     mimeType: 'text/xml',                     href: WFS_HOST,                     method: 'POST',                     body: {                         wfs: {                             featureType: layerName,                             version: '1.1.0',                             featureNS: namespace,                             srsName: 'EPSG:4326',                             defaultFilter: popFilter                         }                     }                 },                  input: {                     identifier: 'aggregationAttribute',                     data: {                         literalData: 'grid_code'                     }                 },                 input: {                     identifier: 'function',                     data: {                         literalData: 'Sum'                     }                 },                 input: {                     identifier: 'singlePass',                     data: {                         literalData: 'Yes'                     }                 }                  }],             responseForm: {                 rawDataOutput: {                     identifier: 'result'                 }             }         }));              return request;     }      but the generated GML is shown below:               <wps:Execute xmlns:wps="http://www.opengis.net/wps/1.0.0" version="1.0.0" service="WPS">         <ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">gs:Aggregate</ows:Identifier>         <wps:DataInputs><wps:Input>             <ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">features</ows:Identifier>             <wps:Reference mimeType="text/xml" xlink:href="/geoserver/wfs" xmlns:xlink="http://www.w3.org/1999/xlink" method="POST">                 <wps:Body>                     <wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.0.0">                         <wfs:Query typeName="p_layer" srsName="EPSG:4326" xmlns:undefined="http://pe.example.com/nig"/>                     </wfs:GetFeature>                 </wps:Body>             </wps:Reference>             </wps:Input>         </wps:DataInputs>         <wps:ResponseForm>         <wps:RawDataOutput>         <ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">result</ows:Identifier>         </wps:RawDataOutput>         </wps:ResponseForm>     </wps:Execute>      Any idea what I may be doing wrong? **UPDATE:** I figured part of this out. Its the braces. A revised version that generates everything except the filter is shown below:               function createWPSExecuteRequest(namespace, layerName, popFilter) {         var request = OpenLayers.Format.XML.prototype.write(new OpenLayers.Format.WPSExecute().writeNode('wps:Execute', {             identifier: 'gs:Aggregate',             dataInputs: [{                 identifier: 'features',                 reference: {                     mimeType: 'text/xml',                     href: WFS_HOST,                     method: 'POST',                     body: {                         wfs: {                             featureType: layerName,                             version: '1.0.0',                             featureNS: namespace,                             srsName: 'EPSG:4326',                             defaultFilter: popFilter                         }                     }                 }},                 { identifier: 'aggregationAttribute',                 data: {                     literalData: {                         value: 'grid_code'                     }                  }},                 {identifier: 'function',                 data: {                     literalData: {                         value: 'Sum'                     }                 }},                 {identifier: 'singlePass',                 data: {                     literalData: {                         value: 'Yes'                     }                 }}             ],             responseForm: {                 rawDataOutput: {                     identifier: 'result'                 }             }         }));              return request;     }      The filter is not generated yet. Any idea will be appreciated.


title: Using PostgreSQL with QGIS and ArcGIS?

text: Is it possible to use PostgreSQL with QGIS and ArcGIS? i.e. one database for different clients. Is it anything that I have worry or any problems to use the DBMS from two different software? I know that I need PostGIS and ArcSDE and I can't manipulate or store raster data with PostGIS 1.5 in PostgreSQL from QGIS. What would you recommend or what to avoid?


title: Convert spatial Geographic data from sql server 2008 to Json

text: Is there any example to convert spatial data (point,line,polygon) stored as geographic in sql server 2008 into Json and display data using Arcgis Javascript Api 3.0.I have tried converting geographic data into Json given Geometry to Json but as my data stored in geographic data format it failed.Thank you in advance.


title: Analysis of lines in a point in QGIS

text: I have 33 layers, 1 with points and 32 with lines. I want to extract/highlight the points where more than **one** line is intersecting. I have tried with buffers but I'm not getting anywhere.


title: Underwater terrain modeling

text: My task is to model the surface of a lake bed, calculate volume of it and visualize it as 3D a surface. I have acquired depth measurements in a small lake using echosounder. The precision should be pretty high (<5 cm for depths and 3-5 cm for RTK GPS position). Points are placed regularly with 2.5 m intervals between them. I also have digitized shoreline from high resolution orthomosaic. Which would be the best interpolation algorithm for such tasks? (QGIS, GRASS, SAGA, maybe some other free software does such things?). The biggest challenge has been to find an algorithm, in which I can define the shoreline as 0 value which has to be taken in account.


title: Create a Leaflet custom checkbox control

text: I want to create a custom checkbox control which will simply set a flag in jquery/javascript: if checked the flag = 'clustered' or if unchecked flag = 'unclustered'. So far I have a control on the map but its not a checkbox and how do i get the state of the checkbox - if its checked/unchecked. code:               function MapShowCommand() {       alert("checked / unchecked"); //set flag     }          L.Control.Command = L.Control.extend({         options: {             position: 'topleft',         },              onAdd: function (map) {             var controlDiv = L.DomUtil.create('div', 'leaflet-control-command');             L.DomEvent                 .addListener(controlDiv, 'click', L.DomEvent.stopPropagation)                 .addListener(controlDiv, 'click', L.DomEvent.preventDefault)             .addListener(controlDiv, 'click', function () { MapShowCommand(); });                  var controlUI = L.DomUtil.create('div', 'leaflet-control-command-interior', controlDiv);             controlUI.title = 'Map Commands';             return controlDiv;                 }         });     var test = new L.Control.Command();     map.addControl(test);


title: Caching layers on the fly and seeding combination

text: I have created a map in geoserver Im am using geoserver 2.5.1 with the intergrated geowebcache. The map seems to be working fine and the seeding also seems to be working fine provided I don't use a bounding box for some strange reason. But also want it to cache on the fly as well so I can seed the main sections of the map that would be used and have on the fly caching in the areas that arn't being used as much. Am I mistaken in thinking that it saves those certain tiles like the seeding does or does it do it virtually or save in a temp tile folder and then goes away instantly tht person either closes the map program. I have set everything that I could set but for some reason on the fly caching does not seem to work. Am i missing something in the settings? Or am misunder standing something with regards to it as in the geoserver documention states that it can combine both on the fly caching as well as seeding the layers.


title: Update row with another not None row

text: I'm working with an attribute table in ArcMap 10.2 where there are some 30 fields mainly consisting of NULL values. I don't want to display to users a table full of NULL values as it'll be difficult to read. See below image: ![enter image description here](http://i.stack.imgur.com/x3lvQ.png) So the result I'd like to create is a Field called **SUMMARY** that includes the " _field name_ : _Value_. _field name_ : _Value_ " of any row that is NOT NULL **e.g. A: T. D: 10/01/2011** In this way a user can select a feature with the identify tool and see what values there are rather than scrolling through loads of NULL values. Does anyone have suggestion on the general construct of the script? Including the da.SearchCursor, da.UpdateCursor, and I guess by way of row index if statements to query if not none add to SUMMARY field with delimators ":" after field name and "." after row value.


title: How to programmatically add an algorithm from external plugin to QGIS processing toolbox?

text: I'm writing a python plugin for QGIS and I'd like to know if it's possible to provide an interface to it from the processing toolbox. I can see how the existing algorithms are loaded into processing via providers, but I don't see any obvious way of loading an algorithm without modifying the module. Perhaps it isn't possible and I need to submit a feature request, or attempt at coding it myself. I was expecting something like:               import processing     from myplugin import mysweetalgorithm     processing.load_algorithm(mysweetalgorithm)


title: Software for opening .img files

text: I have some cpc precipitation data stored in IMG format.Could anyone suggest a software beside ERDAS imagine or Arcgis which can be freely downloaded?


title: D3.js with dynamic geojson data (SQL server/.NET)

text: I have a $.ajax function which returns the geojson data from the asp.net mvc server method. I want to know how I could send that as a parameter to d3.json() function. Better if anyone shared code snippet to proceed. I have already tried as below but no success. d3.json(returnedGeojsonObject, function(error, json) {} Exact code snippet $(document).ready(function () { $('#btnGetMap').click(function () { getShopsFrom(1, 1); }); });               function getShopsFrom(mallID, floorID) {         var params = { MallID: mallID, FloorID: floorID };              $.ajax(         {             url: '<%:Url.Action("GetShops") %>',             dataType: 'html',             data: params,             type: "POST",             success: function (result) {                 alert("Got the details..voila");                 parseResultShopDetails(result);             },             error: function (req, status, error) {                 alert("Unable to get shop details : " + error);             }         });     }          function parseResultShopDetails(data) {         var width = 960, height = 1160;              var projection = d3.geo.albers()                         .center([0, 55.4])                         .rotate([4.4, 0])                         .parallels([50, 60])                         .scale(1200 * 5)                         .translate([width / 2, height / 2]);              var path = d3.geo.path()                     .projection(projection);              var svg = d3.select("body").append("svg")                         .attr("width", width)                         .attr("height", height);                 d3.json(data, function (error, uk) {             svg.append("path")                     .datum(topojson.feature(uk, uk.objects.subunits))                     .attr("d", path);                     });             }


title: Where is the Merge selected features button in QGIS 2.2?

text: Ever since I updated to QGIS 2.2 I've been a bit lost with the new menu layout (I was running on Wroclaw until then). I can't seem to find the "Merge selected features" button. I need to merge several polygons inside a shapefile and can't find how to do it in this version. Is the Merge selected features button still included on QGIS 2.2? Where can I find it? What's the current icon for it?


title: How to generate TFW files for a list of images?

text: I have a few digital images that are not georeferenced. E.g.:               Img01.tif       Img02.tif       ...     Img99.tif        On the other hand, I have a text file, which contains georeferencing information for these images. E.g., I have a file `c:\tfws\list.txt` which contains the following information:               Img01.tfw 0.25 0 0 - 0.25 456258,125 4569852,125       Img02.tfw 0.25 0 0 - 0.25 456586,125 4570001,125        Img03.tfw 0.25 0 0 - 0.25 456952,125 4570300,125       ...     Img99.tfw 0.25 0 0 - 0.25 458412,125 4575123,125        I need to generate a TFW file for each image in the text file. E.g. create a file named `C:\tfws\img??.tfw` containing the following information:               0.25       0       0       -0.25       456258,125       4569852,125        Does anyone know of a tool able to generate these TFW files automatically?


title: What are open data sources about current sea state?

text: I wonder where (links/APIs) can be obtained data that is related to current (alike realtime - no past) sea state data (worldwide, but regional is good two, salt\waves length etc)? I am only interested in dynamically changing data as close to realtime as possible.


title: How to increase resolution of 3D image in GRASS NVIZ

text: I am trying to make 3D visualization of terrain data and orthophoto using GRASS NVIZ via QGIS. I have been able to import both the DTM and the orthophoto in NVIZ window and successfully draped the image over DTM. But the resolution looks very poor. Is there any way to increase the resolution ? It seems like NVIZ GUI is not so user-friendly. For example, in Arcscene, there is a option to optimize the rendering that can increase the resolution of the 3D draped image. Here is the screeshot from GRASS NVIZ:![enter image description here](http://i.stack.imgur.com/QFU07.jpg)


title: Creating batch file from ERDAS IMAGINE Spatial Modeler?

text: How to create batch file from the ERDAS IMAGINE Spatial Modeler? I want to do the same process to different input images, something similar which we can do by batch processing of the existing programs in Erdas. If there is no inbuilt function then one can use model maker to make *.gmd (graphical model) file but how to batch it?


title: SQL query to have a complete geojson feature from PostGIS

text: I would like to get a geojson feature with properties from PostGIS. I have found an example to have a feature collection but I can't make it works for just a feature. so far I tryed to modify the feature collection query of the example. but the output is not valid.


title: QGIS Intersection problem

text: The QGIS Intersection tool is not working for two shapefiles in Version 2.2 or 2.4 (haven't tried earlier versions). I get a new shapefile with all the attributes, but no features. However, when I use ArcMap with the two shapefiles, the intersection happens correctly. The shapefiles are both in the same coordinate system. I have used the QGIS tool with success with other shapefiles that I got from a QGIS tutorial. The shapefiles that I'm using are all from the Data BC website. I've uploaded two samples to http://vulnerablevancouver.ca/qgis_intersection/ if anyone wants to have a look. I put the zip files there that include the metadata.


title: Making 'persistent' ArcMap tool without creating Python add-in?

text: I want to make an addon that, while editing in ArcMap, will track where I pan and move the viewport. I have the pieces together, but I don't like debugging with the Python Add-In wizard, because I have to recompile and restart ArcMap each time I modify the code. Is there another way to create this type of 'persistent' script without using an add-in? If I make a toolbox tool and run it, will it run in the background, and how would I stop it? All the toolbox tools I've ever created have a certain task they perform and, once completed, the tool stops running. Same with ModelBuilder.


title: QGIS WEB Cliente para windows 7

text: Bom dia, estou com alguma dúvidas a respeito do QGIS WEB Cliente que não consigo achar uma solução. Eu sei que tenho que fazer a instalação do Qgis Serve como esta escrito neste tutorial Anita Graser QGIS Server on Windows 7 I also know that I have low ZIP QGIS Web Client, but where should I put it in Windows? After that should follow this documentation In my attempt put the contents of the ZIP file into C: \ OSGeo4W \ apache \ htdocs \ The map model HelloWorld works But I have no idea where to go, my project is stopped.


title: How to create a rainfall raster from rainfall contours?

text: I downloaded a free rainfall data from the Philippine GIS Data Clearinghouse (PhilGIS) which are vector lines. How can I extract the data points from this? I want to extract it because i will be using these points to make a raster file for the rainfall data that i downloaded. I'm using QGIS and global mapper for this.


title: Is there an equivalent to arcpy.ImportToolbox() in 9.3.1?

text: Is there an equivalent to `arcpy.ImportToolbox()` using `ArcGIS 9.3.1`? I'm assuming it would use `arcgisscripting` instead of `arcpy` but I can't find any documentation.


title: QGIS 2.2 crashes with custom SVG fill

text: This may be a bug, but I am not sure how or if I should submit it. I wasn't able to find much with a Google search. I developed a custom SVG fill and implemented it. When I go to change the style settings again QGIS crashes. I had this happen on two different machines, both using Windows 7 and QGIS 2.2. You can see the custom fill and the error in the following screenshot:![QGIS Crash using custom SVG fill.](http://i.stack.imgur.com/EkiU5.png) I also have the .dmp file, not sure how to view these, didn't want to open with Notepad and I don't see a way to attach the file here. **Has anyone experienced this type of crash?** **EDIT:** I have gotten this a number of times doing various task in different map projects.


title: Can I set individual scale levels for an ArcGISDynamicMapServiceLayer?

text: I have a map service that contains 6 layers. I turned one layer into a feature layer. I used this layer in a query and show the result. I then would like to just show the other 5 layers as a ArcGISDynamicMapServiceLayer, but I didn't set any min/max scale levels for the layers when I published the MXD. I figured it'd be best to do this programmatically, but I can't figure out how. Can I set the min/max scale levels independently for each layer in the ArcGISDynamicMapServiceLayer? If not, what's the best way to approach this? Thanks! EDIT Can someone explain to me how this question isn't clear? I don't believe it could get any more clear.


title: How to remove ArcGISTiledMapServiceLayer completely

text: I have a problem related to "ArcGISTiledMapServiceLayer". I have an ArcGISTiledMapServiceLayer map service, which I have added to Map object. This service work as BaseMap. Now I want to add another ArcGISTiledMapServiceLayer map service layer to the same Map object. Before adding the new layer, I just removed the previous tiled map service layer by using method `objMap.removeAllLayers()`. But this method only removes the layer not the extent and it create problem when I add a new layer. So I want to remove completely the ArcGISTiledMapServiceLayer (layer, extent, scale etc.). I have tried all the below methods   1. `objMap.removeAllLayers();`   2. `objMap.removeLayer(objMap.getLayer('myLayerID'));` Any solution?


title: Correct WFS URL Format (Gaia WFS-T Extender)

text: I am trying to add a GeoServer WFS layer to Gaia WFS-T Extender for editing. The available layers are available alright but I am unable to load them into Gaia. Using the same URL I was able to add and edit the layer in both Quantum GIS and UDig. Any hints on where I could be missing it with Gaia? [ why Gaia: It is light-weight and packs functionality I'm looking for]


title: Draw polygon with gradient color in Geoserver

text: I have polygon like sector. I want to fill it with gradient color. Is it possible to do this in Geoserver? Thanks. **UPDATE** I found some code with filling image               <FeatureTypeStyle>      <Rule>        <PolygonSymbolizer>          <Fill>            <GraphicFill>              <Graphic>                <ExternalGraphic>                  <OnlineResource                    xlink:type="simple"                    xlink:href="colorblocks.png" />                  <Format>image/png</Format>                </ExternalGraphic>              <Size>93</Size>              </Graphic>            </GraphicFill>          </Fill>        </PolygonSymbolizer>      </Rule>      i can put here big circle which is gradient, but does it has rotation or position of image?


title: CQL Filter in Geoserver very slow?

text: I am experimenting with CQL filtering in Geoserver. I have two layers, one (A) has 8000 features, the other one (B) has 3000 features or so. I would like to search of layer A for intersection with layer B's features. Not all of Layer B's features, just a few based on their feature ID. I've been searching around and I can't find a way yet to do the **feature ID + geometry filter** , I hope someone can suggest me how to do that. So in the meantime, I have tried with another attribute I've put in, though, and the CQL Filter is currently like this with WMS:               layers=A     CQL_FILTER=INTERSECTS(the_geom,querySingle('B','the_geom','OBJECTID=6139'))      When I run this in my browser , the query goes forever and timed out. There is an error in the jetty : **org.geoserver.platform.ServiceException: This requested used more time than allowed and has been forcefully stopped. Max rendering time is 60.0s** The example from Geoserver (the one using restricted layer vs bug sites) doesn't have this problem. I'm wondering if I'm writing the query wrong, whether my PC's just not up to it, or something else. Should I be doing this in WFS instead?


title: Uploading unprojected shape files using GeoServer REST API

text: I have a number of shapefiles that lack the `.prj` file. I'm able to upload them to geoserver using the rest api. However, I'm unable to serve them after upload. Which brings me to the question as to whether I need to reproject before uploading to geoserver. If I need to reproject, then which options are available? Thanks all in advance. I'm using GeoServer 2.1.3. UPDATE: Layers created from the shapefile lack projection information. When I update the `Declared SRS` field, the layers are served without issues.


title: Geocode adress with appartments

text: I have a table with addresses which I try to geocode in ArcGIS 10.1 with a single field locator. The problem is that some of the addresses includes an apartment number which I do not have in my locators address list. Logically that would be easy to solve when comparing the two address-fields, one could just compare the table addresses with the locators where the address 'BEGINS WITH' but ArcGIS seems to match the two rather with 'IS' thus giving all the addresses with appartment numbers a score of 0. Is it possible to get around this in any other way than removing all apartment numbers from the table I want to code?


title: Error when opening attribute table of a feature layer with a programmatically generated join

text: I'm creating a query table with IQueryDef and then using MemoryRelationshipClassFactory to create an inner join between a feature layer and the query table. Both the query table and the join are created without incident and work correctly in ArcMap, (only the features with matching records in the query table are displayed on the map). However, when I attempt to open the attribute table for the feature layer in ArcMap I get the following error: _Could not load data from the data source. If you can correct the problem, press the refresh button to reload data. Possible problems can include bad network connection, invalid field, etc. Field is not editable._ The table then opens with empty rows. I'm not sure what the "Field is not editable" message is telling me. I thought perhaps there was something wrong with the query table, but I can create the table and add it to ArcMap as a stand alone table and it opens correctly. It seems there is something in the way I am doing the join that is causing trouble with the feature layers Display Table. Below is the relevant code:                   Dim qd As IQueryDef = ftrWksp.CreateQueryDef         qd.Tables = "swCBCleaning"         qd.SubFields = "*"         qd.WhereClause = pre & "CompletedDate" & suf & " >= date '2012-11-08 00:00:00'"              Dim qn2 As IQueryName2 = CType(New TableQueryName, IQueryName2)         qn2.QueryDef = qd         qn2.PrimaryKey = "swCBCleaning.OBJECTID"         qn2.CopyLocally = False         Dim dsName As IDatasetName = CType(qn2, IDatasetName)         Dim dataSet As IDataset = CType(ds.Workspace, IDataset)         dsName.WorkspaceName = CType(dataSet.FullName, IWorkspaceName)         dsName.Name = "swCBCleaning"         Dim name As IName = CType(qn2, IName)         Dim tblJoin As ITable = CType(name.Open, ITable)              Dim memRelClassFactoryType As Type = Type.GetTypeFromProgID("esriGeodatabase.MemoryRelationshipClassFactory")         Dim memRelClassFactory As IMemoryRelationshipClassFactory = CType(Activator.CreateInstance(memRelClassFactoryType), IMemoryRelationshipClassFactory)              Dim relClass As IRelationshipClass         Dim dispRelClass As IDisplayRelationshipClass              relClass = memRelClassFactory.Open("Join", geoFtrLayer.DisplayFeatureClass, "GlobalID", CType(tblJoin, IObjectClass), "FeatureGlobalID", "forward", "backward", esriRelCardinality.esriRelCardinalityOneToMany)         dispRelClass = CType(geoFtrLayer, IDisplayRelationshipClass)         dispRelClass.DisplayRelationshipClass(relClass, esriJoinType.esriLeftInnerJoin)


title: How to enable tilestache-seed logging?

text: We're migrating from a working 'tilecache' server to a new 'tilestache' server. I have been chasing my tail for 2 days now trying to figure out how to get tilestache-seed to cache some tiles. I'm failing miserably and neither the tilestache docs nor google are helping at all. It must be me. I have a configuration that looks like this:               {         "cache": {             "name": "Disk",             "path": "/opt/tiles",             "umask": "0000",             "dirs": "safe"         },         "logging": "debug",         "layers": {             "staging": {                 "provider": {                     "name": "url template",                     "template": "http://example.com/common/services/imagegen/?mapservice=cities&cs=102113&crs=102113&layers=6&format=png&bbox=$xmin,$ymin,$xmax,$ymax"                 }             }         }     }      A typical tilestache-seed command line looks like this               ./seed -c tilestache.json -l staging -b -65.167510000 47.589390000 -65.167490000 47.589410000      Note: `seed` is a symlink to `tilecache-seed.py` \- PIA to type the full path so much :) Note also that 'imagegen' is a proprietary application that sits in front of ArcIMS to manage other things about the image generation. Nothing magic, just additional capability that is irrelevant in this particular case. Running the command line and _nothing_ at all happens. No output at all from tilestache-seed. It is not making a call to the URL in the config file - I can see that because imagegen writes the generated image to an output directory on the web server, and there's nothing being written in response to seed being run. If I manually massage the seed command line and substituting the -b parameters into the proper spots in the URL and paste that in a browser, I generate an image just fine. So why isn't seed doing what I think it should be doing? I figure there must be a way to see what's going on inside seed. Well, no command line option to turn on "verbose" mode. Ah, I can use the Test cache and turn on verbose there. No, that changes nothing - no output of any sort. Note that the example in the tilestache docs for the Test cache appears to be in error:               "verbose": True      throws an error when running seed.               "verbose": true      fixes the error, but doesn't generate any additional output. Can someone provide me guidance, please, on a) what might be wrong with my configuration and/or b) how to turn on some sort of diagnostic mode so that I can debug this further? I'm not a python guy, though that's a skill I probably ought to acquire. Thanks! Bo PS: Any reference to 'tilecache' should read 'tilestache' - been typing the former for too many years :)


title: To Use or Not to Use Relationship Classes?

text: I am building a government database from a massive amount of data. Now I am following the standard approach of the ESRI Local Government Data Model, but modified to fits the needs and wants of a specific government. I've noticed that in the Local Government Data Model ESRI uses a lot of relationship classes. I've used relationship classes in the past, but tend to steer clear of them. This is because I usually don't see a reason why I would want attributes about a shape in a separate table from the feature class. For almost all of the data I am assembling I still cannot see a reason for this. For Parcel Fabric I can see some reasons where it would be helpful, but still I believe it would be best to still keep the attributes directly in the feature class. Now to be clear I am going to use relationship classes to reference feature classes to feature classes, this question is more specified to why I would store data in a non-spatial table that could just as easily be store in a feature class. Anyways thanks for any input folks!


title: Is it possible to do a conversion and add layers with command prompt in ArcGIS 9.3?

text: Is it possible to operate ArcGIS 9.3 from command prompt? I want to convert an ascii file to raster format and adding layers to the obtained raster file. How can this be done ? Thanks .


title: onSelect sometimes firing before onUnselect

text: I have a map that displays satellite coverage zones. Some of these coverages overlap. I am using the SelectFeature functionality to fire off **onSelect** and **onUnselect** events. However, when moving from one feature to another (without moving on the map itself first), the onSelect method sometimes fires before the onUnselect method. As the onUnselect method is being used to clear a popup created as part of the onSelect method, this means that sometimes the popup is created and then destroyed, rather than destroyed and then created. Any ideas? Below is a snippet of the relevant portion of code (in CoffeeScript):               beams = JSON.parse localStorage.getItem("beams")     $.each beams, (i, item) ->         beamTrendData = getTrendData4Beam item.ShortName         beamStatus = getBeamStatus beamTrendData         switch beamStatus             when "green"                 style = styleMapGreen             when "orange"                 style = styleMapOrange             when "red"                 style = styleMapRed         #if (item.ShortName is "G17") or (item.ShortName is "T14R") or (item.ShortName is "A5") or (item.ShortName is "YAM") or (item.ShortName is "IS14") or (item.ShortName is "W7")         #   visible = true         #else         visible = true         coverageLayer = new OpenLayers.Layer.Vector(item.ShortName,             strategies: [ new OpenLayers.Strategy.Fixed() ]             visibility: visible             protocol: new OpenLayers.Protocol.HTTP(                 url: "resources/satelliteFootprints/" + item.OuterBeamEIRPKML                 format: new OpenLayers.Format.KML(                     extractStyles: false                     extractAttributes: false                     maxDepth: 2                 )             )             styleMap: style         )         Application.map.addLayer coverageLayer         Application.hoverControl = new OpenLayers.Control.SelectFeature coverageLayer,             multiple: false             hover: true             toggle: true             clickout: false             onSelect: beamSelect             onUnselect: beamUnselect             callbacks:                 click: (feature) -> beamClick feature         Application.map.addControl Application.hoverControl         Application.hoverControl.activate()      I'm basically adding several KML layers, and for each one associating a SelectFeature object that in theory triggers events for both hover over and click (as I want to add different functionality to the hover and click events). In IE9 (other than unselect and select sometimes firing in the wrong order) it all seems to work just fine. Strangely though for any other browser the events only fire on the topmost layer. EDIT: I fixed the cross browser issue, by taking the adding of the hoverControl out of the loop and simply adding it an array containing the vector layers all at once. So:               beams = JSON.parse localStorage.getItem("beams")     beamFeatures = [];    # <------------     $.each beams, (i, item) ->         beamTrendData = getTrendData4Beam item.ShortName         beamStatus = getBeamStatus beamTrendData         switch beamStatus             when "green"                 style = styleMapGreen             when "orange"                 style = styleMapOrange             when "red"                 style = styleMapRed         #if (item.ShortName is "G17") or (item.ShortName is "T14R") or (item.ShortName is "A5") or (item.ShortName is "YAM") or (item.ShortName is "IS14") or (item.ShortName is "W7")         #   visible = true         #else         visible = true         coverageLayer = new OpenLayers.Layer.Vector(item.ShortName,             strategies: [ new OpenLayers.Strategy.Fixed() ]             visibility: visible             protocol: new OpenLayers.Protocol.HTTP(                 url: "resources/satelliteFootprints/" + item.OuterBeamEIRPKML                 format: new OpenLayers.Format.KML(                     extractStyles: false                     extractAttributes: false                     maxDepth: 2                 )             )             styleMap: style         )         Application.map.addLayer coverageLayer         beamFeatures.push coverageLayer    # <------------          Application.hoverControl = new OpenLayers.Control.SelectFeature beamFeatures,         multiple: false         hover: true         toggle: true         clickout: false         onSelect: beamSelect         onUnselect: beamUnselect         callbacks:             click: (feature) -> beamClick feature     Application.map.addControl Application.hoverControl     Application.hoverControl.activate()      I haven't checked yet whether the select and unselect events fire in the right order all the time yet. Thanks, Kurt


title: Extract Values to Point from Raster Issue

text: I am trying to use the tool Extract Values to Points on a File Geodatabase raster, but I am getting some weird errors. I've used this tool multiple times before with no issue, but not since I upgraded to 10.1, so I'm wondering if there is an issue with it. The errors I got back so far have been:   1. This error happened when I specified a shapefile as the output: _The specified geodataset is invalid for the conversion. The syntax help for the tool you are using should indicate the supported types of input data. For example, for the particular conversion, a rasterlayer may be an invalid type of geodataset._   2. Next I have an error about it needed at least one band in the raster, the raster does has one band. This occurred when I specified a File Geodatabase as the output.   3. Finally I had the good ole Error: 999999 for no apparent reason. The raster is a DEM derived from LiDAR that was not created by a different company. It's too large to be made available for testing, but here are its specs:               Raster_Information          ColumnsandRows  5119,8241     NumberofBands   1     CellSizeXY      1, 1     UncompressedSize    160.93 MB     Format      FGDBR     Source_Type     Generic     Pixel_Type  floating point     Pixel_Depth     32 Bit     Colormap    absent