Is there a way to automatically snap loose points of lines to close by vertices with Quantum GIS?

I have a vector layer of lines that were drawn with the snapping option off. I need to have them snapped but, there are hundreds of lines. Is there any solution to do this automatically or semi-automatically? Thanks.


Problems with transformations in ArcMap

I have files projected in British National Grid.   After I have transformed them into WGS_1984.   I noticed that if I were to transform them back to BNG the original would not match the new.   Is there a way to make sure this does not happen especially when moving from BNG to WGS 1984 multiple times?


How can I use Openflights database in QGIS?

I would like to have a shape file with the airports position and the routes of the planes I've found Openfilghts but I can't use it in QGIS. Seems that the format of the DB `.dat` is not supported by QGIS. How can I overcome this problem?


Finding routes in which more than one car passed (gps data)

I'm using ArcGIS 10.1. I have point GPS data of routes of several cars over a few days, and I want to find only the routes where more than one or two different cars passed through (Each GPS points has the car id in it). How can I find a thing like that without going through the data manually ? EDIT: The time interval (and the distance) between points differs - it moves from minutes to hours and from a few meters to tens of kilometers apart. I'm comparing routes right now by viewing the points by the eye (which isn't accurate or useful in any way). I thought about creating routes using network analyst, but as I have a lot of points I kind of hoped to fan out the less popular ways first, and calculating routes for only the popular ones...


Adjusting Z Units on a DEM

I am learning how to use ArcHydro and attempting to change the Z Units because I get a warning message saying the Spatial Reference Doesn't Match. The DEM was in Meters, and I adjusted the Z Unit to 100. My DEM is in a GCS and when I project it to the same PCS my vector data is in, it puts them in two very different places, even though they are in NC State Plane 3200 FIPS (feet). If someone can give me a recommendation to fix this, I would greatly appreciate it.


OpenLayers: Combine multiple OGC filters

I have two _OGC_ filters client side:               <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">         <ogc:PropertyIsEqualTo matchCase="true">             <ogc:PropertyName>code</ogc:PropertyName>             <ogc:Literal>secret</ogc:Literal>         </ogc:PropertyIsEqualTo>     </ogc:Filter>             <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">         <ogc:Intersects>             <ogc:PropertyName>geom</ogc:PropertyName>             <gml:Box xmlns:gml="http://www.opengis.net/gml">                 <gml:coordinates decimal="." cs="," ts=" ">1298543.0367787,7107400.531374 1299312.4070614,7203464.9016567</gml:coordinates>             </gml:Box>         </ogc:Intersects>     </ogc:Filter>      I have both filters represented as strings and I want to combine them into one filter. I can see in the documentation that OpenLayers can create a _Filter Object_ from a string, but it doesn't seem to work for me. **Am I doing something wrong and/or how should I do it?**


How to use for loop to add and calculate new field?

I am trying to use for loop to add and calculate a newfield for 2 shapefiles and a different new field for 2 other shapefiles. When I tried to do these 2 loops as one, it did not work so I separated them into 2 loops and it worked. I am using python 2.7 stand alone (arcmap 10.2). more details: So I want to make a new field and add 'CA' to shapefiles containing _CA.shp (*_CA.shp). I also want to make a new field and add 'AZ' to shapefiles containing _AZ.shp (*_CA.shp). When I created a loop (the first code), I got my roads_CA and railroads_CA to work but roads_AZ and railroads_AZ did not create a new field containing 'AZ'. I did not get an error which means the loop ran through but I guess the elif came out false so it did not create anything. here is my code:                   CAshp = arcpy.ListFiles("*_CA.shp")              for CA in CAshp:             if (CAshp == 'roads_CA.shp', CAshp == 'railroads_CA.shp'):             newField = 'StateAbbre'             arcpy.AddField_management(CA, newField, 'TEXT')             arcpy.CalculateField_management(CA, newField, "'CA'", "PYTHON_9.3")         elif (CAshp != 'roads_AZ.shp', CAshp != 'railroads_AZ.shp'):             AZshp = CAshp.extend(arcpy.ListFiles("*_AZ.shp"))             newField = 'StateAbbre'             arcpy.AddField_management(AZshp, newField, 'TEXT')             arcpy.CalculateField_management(AZshp, newField, "'AZ'", "PYTHON_9.3")


What is the most efficient way to iterate through folders and geodatabases?

I am looking at cataloging some data, and I have code that works, it just seems to take a lot of time to run through all of the items. The way this data is structured is a bit of a hindrance, particularly with the amount of directories I am looking to analyze. The data structure is similar to this:               Working Folder      Property Folder (All with a specific label ogl###)           Geodatabase(all the same name in each different folder)                Feature Dataset                     3 Shapefiles (boundary, parcel, corner)                60 Additional Shapefiles of varying types           Misc. Folders, Tiffs, and geodatabases      Misc. Folders      This may not have been the best structure to set up our data library, but that is above what I am trying to do, and I have no influence over that. My goal is to do some quality control on this data, making sure that each Property Folder, Geodatabase, and Feature Class is structured correctly. To do this I need to check each Property Folder\Geodatabase individually, write to excel the names of the corresponding Feature Classes in each database, and then within each feature class the correct fields. I have written working code to check the existence of the correct feature classes and export to excel the results of that check. To me, however, it seems like it is taking longer than it should. Here is an example of my code to accomplish that (minus the extraneous excel stuff):               import arcpy           arcpy.env.workspace = r'E:\Working'     working_folder_list=arcpy.ListWorkspaces('ogl*','Folder')           ##Generate list of Property                                                                         #Folders      ######This block is cataloging a blank reference folder######          arcpy.env.workspace = r'E:\Working\Reference GDB\OGL.gdb\Admin'     ##looking into the reference      fc_ref_ad=arcpy.ListFeatureClasses('*')                             ##folder Feature Dataset     fc_ref_ad_dic={}     for fc in fc_ref_ad:         fc_ref_ad_dic[fc]=[f.name for f in arcpy.ListFields(fc)]          arcpy.env.workspace = r'E:\Working\Blank DB 4-05-11\SGL.gdb'        ##looking into the reference     fc_ref=arcpy.ListFeatureClasses('*')                                ##geodatabse     fc_ref_dic={}     for fc in fc_ref:         fc_ref_dic[fc]=[f.name for f in arcpy.ListFields(fc)]           ##creating a dictionary of fields                                                                         ##per FC     for fc in fc_ref_ad:                            fc_ref.append(fc)                                               ##Merging both lists and dicts          for fc in fc_ref_ad_dic:         fc_ref_dic[fc]=fc_ref_ad_dic[fc]     fc_ref.sort()     #############################################################               ######This block looops through each Property Folder#########          for folder in working_folder_list:         arcpy.env.workspace = folder + "\\ogl_data0.gdb\\Admin"         ##Listing FC in Feature Dataset         admin_ds=arcpy.ListFeatureClasses('*')          arcpy.env.workspace = folder + "\\sgl_data0.gdb"                    ##Listing FC in Geodatabase     current_gdb=arcpy.ListFeatureClasses('*')     for fc in admin_ds:         current_gdb.append(fc)                                          ##Merge the 2 lists          if len(current_gdb) > len(fc_ref):                                  ##Dealing with uneqaul len(lists)         for j in range(len(current_gdb)-len(fc_ref)):             fc_ref.append('')          ##block of code to write lists to corresponding cells in excel          #############################################################               ######This block goes through each FC and lists fields#######     ######Approximately 4000 directories(66 Property Folders and 60 FCs######          for folder in working_folder_list:          arcpy.env.workspace = folder + "\\sgl_data0.gdb\\Admin"     fc_cur_ad=arcpy.ListFeatureClasses('*')     fc_cur_ad_dic={}     for fc in fc_cur_ad:         fc_cur_ad_dic[fc]=[f.name for f in arcpy.ListFields(fc)]          arcpy.env.workspace = folder + "\\sgl_data0.gdb"     fc_cur=arcpy.ListFeatureClasses('*')     fc_cur_dic={}     for fc in fc_cur:         fc_cur_dic[fc]=[f.name for f in arcpy.ListFields(fc)]          for fc in fc_cur_ad_dic:         fc_cur_dic[fc]=fc_cur_ad_dic[fc]          ##########################################      I know it is a lot to look through, and I may not be the cleanest coder. Truth be told I am still learning this stuff, and most of it I am teaching to my self on the fly. I am just wondering if there is a more efficient way I could be doing this apart from restructuring the data itself. I am aware of the arcpy.da.Walk, but I am unfamiliar with it, and not sure if it would do me any good. Perhaps I am wrong. Either way, I am hoping someone may be able to give me some tips. I want to thank you in advance for looking. Edit: After trying to learn arcpy.da.Walk, I created a sample script that averages the times it takes for each method. I am a bit shocked that after 20 iterations, that the Walk() function took an average of 1 minute longer per run through my data. Here is that script:               import arcpy     import os     import time          worktimes=[]     walktimes=[]          counter=0          while counter <20:     t_start=time.clock()          arcpy.env.workspace = r'E:\Working'     working_folder_list=arcpy.ListWorkspaces('ogl*','Folder')          for folder in working_folder_list:         arcpy.env.workspace = folder + "\\ogl_data0.gdb\\Admin"         admin_ds=arcpy.ListFeatureClasses('*')         for fc in admin_ds:             print fc             fields = arcpy.ListFields(fc)             for f in fields:                 print f.name              arcpy.env.workspace = folder + "\\ogl_data0.gdb"         current_gdb=arcpy.ListFeatureClasses('*')         for fc in current_gdb:             print fc             fields = arcpy.ListFields(fc)             for f in fields:                 print f.name          workspacetime=time.clock()-t_start     worktimes.append(workspacetime)          t_start2=time.clock()     workspace = 'E:\Working'     for dirpath, dirnames, filenames in arcpy.da.Walk(workspace):         for filename in filenames:             fields=arcpy.ListFields(os.path.join(dirpath,filename))             print filename             for f in fields:                 print f.name          walktime = time.clock() - t_start2     walktimes.append(walktime)     counter+=1          worksum = 0     walksum = 0          for time in worktimes:     worksum += time          for time in walktimes:     walksum += time          workavg = worksum/len(worktimes)     walkavg = walksum/len(walktimes)          print 'Average workspace time: '+str(workavg)     print 'Average walk time: '+str(walkavg)      Is there something I'm missing, or is Walk() not as efficient as I assumed. The average times were 104 seconds for changing workspaces, 167 using the Walk() function.


From a shapefile, copy specific rows (defined by a separate table) to a new shapefile

I have a polygon shapefile of origin zones. I also have a polygon shapefile of destination zones. I also have a table that lists origin-destination pairs. I would like to create a multi-part shapefile where each row represents an origin-destination pair. So when you select a single row, two separate polygons would be highlighted (one polygon representing the origin zone, the other representing the destination zone). I don't know how to go about creating the multi-part shapefile. Does anyone have any suggestions?


Geoserver Status Screen

Can anyone tell me what all the information on this Geoserver status this means and if there are any issues with it? I cannot find anything in the documentation that explains what all this is actually telling us. We have figured out the reload button, but not sure if it is required for EVERY configuration change or not, but we generally press it after changing anything, including styles, GeoWebCache changes, layer changes, etc. Thanks in advance Mark ![enter image description here](http://i.stack.imgur.com/m5f20.jpg)


Drawing a map of a country with specific boundaries/zones using postcodes latitude and longitude

I'm quite new in geocoding - it has been fun! My project is to draw Australia with specific boundaries/zones using R program. I was able to successfully upload a shapefile of Australia in R program, which can be seen below. The file can be found in: http://www.abs.gov.au/AUSSTATS/abs@.nsf/DetailsPage/1259.0.30.001July%202011?OpenDocument I want to be able to edit the boundaries/zones in Australia. My question: 1) Can I edit the zones/boundaries in a shapefile? 2) I've got a list of postcodes with latitude and longitudes in Csv format. Is there a way of grouping postcodes to form zone/boundaries (polygon) using R program? If not, is there a freeware software to do this? I haven't had much lucky with QGIS & ArcGIS. Thank you for your help.


Why am I missing the the geometry column (geometry_columns)?

Can anyone tell me what could I be doing wrong? I have installed OpenGeo and started doing the exercises. I noticed that every time I create a database through the pgAdmin, the geometry column (geometry_columns) is not created. Did I missed a step?


Geoserver 2.2.5 and Integrated GeoWebcache caching Defaults not saved over restarts

I am experience an annoying issue with Geoserver 2.2.5 and the integrated GeoWebCache running as a service on Windows. The Caching Defaults Configuration is not retained over GeoServer Restarts or Server Reboots. This is particularly annoying in a production Environment as a server reboot or _GeoServer Service Auto Restart on failure_ ends up with GeoServer running with no cache at all. We have our Service set to restart the service on failure, then reboot the computer automatically on the third failure. The documentation points to a configuration file in the Geoserver data directory named _gwc-gs.xml_ that holds the configuration details. No matter what we do by editing this file, we cannot get the configuration to persist. Interestingly, I noticed that a file named _gwc-gs.xml.tmp_ was also in the same location. When I delete this .tmp file and then restart Geoserver, it appears again, always containing the default values So my assumption is that this _.tmp_ file is being created on Geoserver start up and it is being read by the GeoWebCache code, not the actual _.xml_ file. Question: Has anyone else experienced this or know of this behavior? Question: Does anyone know of a work around or know if this behavior has been corrected in a later version of Geoserver? Thanks in advance Mark


How can you conditionally halt an FME translation?

I have an FME workspace that takes a set of street centerlines and converts it into address points. I have been working my way across the state of Missouri with this translator one county at a time, since each county can take up to an hour to process. I select a county at the start of the translator as a choice parameter. My problem is that I keep having to double check to make sure of what counties I have processed so I do not process a county twice. When I have a file of several million address points, I do not want to be removing duplicates. What I would like to have FME do is take the county I have selected, and check against a shapefile of counties to see if the county has been processed yet. I have a flag attribute, "COMPLETE" that is set to 0 if the county has not been processed and 1 if it has. The county shapefile has nothing to do with any other readers or writers in the translator. Edit: To clarify, the counties are not being processed at all by the translator, only the centerlines. Since there are over 2 million centerlines, I do not want to read the centerlines at all (much less maintain an attribute on the centerlines) if the county has already been processed. Edit: Here is the solution. I moved up the st_county10 reader (the one in the image) to the top of the reader list. This executes before anything else. By using the feature holder, I avoid writing over the st_county10 shapefile if the translation is terminated. One last piece, since I had a python shutdown script, I had to add this line:               import pyfme     if FME_Status == True:      To the front of the shutdown script to stop execution of the shutdown script too. ![If COMPLETE=0, translation proceeds, otherwise it goes to the Terminator](http://i.stack.imgur.com/Ro3XG.gif)


How to create a circular sector in Mapinfo?

I want to build a tool that creates a cell sector from data like that below. The sector diagram should be like the second picture. The first picture shows a Mapinfo tab file with the required fields Antenna beam, Azimuth, Band, (the radius), Latitude, and Longitude. How could I achieve this? I had a look at a link in mapinfo-L but the solution was not conclusive! ![Different Sites](http://i.stack.imgur.com/qoh6D.png) ![Result Cell Sector](http://i.stack.imgur.com/LDukn.png)


GeoNetwork opensource - Geoserver/Google Maps integration

I'm using GeoNetwork 2.6.4 and I would like to change the default base map to Geoserver, adding a Google Maps Satellite Layer. Which is the best way? Any suggestions?


Basic .NET mapping components?

Which .NET mapping components are currently available? Focus is on desktop use and fairly basic mapping of SHP files (thematics etc.), not the more advanced GIS functionality (reprojections, clipping, point-in-polygon etc). Royalty free distribution is needed. I am aware of TatukGIS, AspMap, Map Suite and MapXtreme. I believe ESRI has nothing to offer in this area any longer, now that mapobjects is gone. Other options? Any stable open source offerings available?


How to change the appearance of a Feature.Vector that's already displayed?

I've created a bunch of Feature.Vectors from Point objects and assigned them a Style. Now I want to dynamically change the appearance of one of the features in real time; e.g., change it from red to blue. (I am NOT hovering over the feature.) I've tried changing its Style, then doing refresh() on the layer, or redraw(), etc, and either nothing happens or the feature disappears. Any suggestions? Thanks.


What's wrong with my label formatting?

I have some formatting issues with my labels. I am using a fairly straight forward expression (see below). It sort of works fine but **some formatting is being ignored, namely the ALL CAPS ACP tags**. All owner names are lower case with first letter capitalized. I want to display them as all caps and only SOME labels come out with owners capitalized. I am also using italics tags when a claim number value exists and that works fine. Another issue is that although I am **NOT spreading characters** in Maplex, **some labels but not all have Owner's names spread** , but strangely not the PIN numbers and claims numbers all of which are a part of one single string variable. There are other issues with Stacking Labels in Maplex which doesn't seem to stack properly when using Stacking Separator but let's ignore that for this question. Is there a way to fix this or do i need to export to annotations and fix manually?               Function FindLabel ([Owner], [MNDMF_Active_Mining_Claims_CLAIM_NUM], [PIN], [PIN_Surface], [PIN_Mining] )     FindLabel = ""          if not isnull([Owner]) then     if trim([Owner]) <> "" then     FindLabel = FindLabel & trim("<ACP>" & [Owner] & "</ACP>")     end if     end if          if not isnull([MNDMF_Active_Mining_Claims_CLAIM_NUM]) then     if trim([MNDMF_Active_Mining_Claims_CLAIM_NUM]) <> "" then     if len(FindLabel) > 0 then     FindLabel = FindLabel & vbnewline     end if     FindLabel = "<ITA>" & "Claim: " & [MNDMF_Active_Mining_Claims_CLAIM_NUM] & "</ITA>"      end if     end if            if not isnull([PIN]) then     if trim([PIN]) <> "" then     if len(FindLabel) > 0 then     FindLabel = FindLabel & vbnewline     end if     FindLabel = FindLabel & trim([PIN])     end if     end if          if not isnull([PIN_Surface]) then     if trim([PIN_Surface]) <> "" then     if len(FindLabel) > 0 then     FindLabel = FindLabel & vbnewline     end if     FindLabel = FindLabel & trim([PIN_Surface])& " S"     end if     end if          if not isnull([PIN_Mining]) then     if trim([PIN_Mining]) <> "" then     if len(FindLabel) > 0 then     FindLabel = FindLabel & vbnewline     end if     FindLabel = FindLabel & trim([PIN_Mining])& " M"     end if     end if          End Function


Log file for ArcGIS geoprocessing?

Whenever I run a geoprocess overnight, it seems my computer reboots. Does ArcGIS save some log file information? Where does it save it? For example, when I run a large dataset or image process I need to perform overnight, does it save the logfile that tells you what it performs from start to finish? Thanks. PS Do I make myself clear? If not, perhaps someone in here can help me correct what I am trying to say.


Query for Selecting only Selected Fc's from a GDB

I need to version n number of fc's which start with sde."ENT-QA". I need to select only those feature classes and run versioning for it. Can anyone help me in writing the query for selecting only fc's which start with sde."ENT-QA". Remeber ENT-QA is mentioned has quotes. Thanks in advance.               import arcpy     arcpy.env.workspace= r"xyz.sde"     fdList = arcpy.ListFeatureClasses("","","")          for fc in fdList:         print fc         arcpy.RegisterAsVersioned_management(fc, "NO_EDITS_TO_BASE")         print "fc registered"


QGIS Dev install issues

I need to use some of the new functionality in the Dev build and just can not install it on our windows 7, 64 bit machines. It works fine on my personal windows 8 laptop but I can't get it to work at work. I have tried unistalling / reinstalling many times and Lisboa is fine but Dev won't work. I tried the fix in Why is QGIS not launching? but no luck.               Problem signature:       Problem Event Name:   APPCRASH       Application Name: qgis.exe       Application Version:  0.0.0.0       Application Timestamp:    4fdce845       Fault Module Name:    QtCore4.dll       Fault Module Version: 4.7.1.0       Fault Module Timestamp:   4d530715       Exception Code:   c0000005       Exception Offset: 000ee27b       OS Version:   6.1.7601.2.1.0.256.4       Locale ID:    3081       Additional Information 1: 0a9e       Additional Information 2: 0a9e372d3b4ad19135b953a78882e789       Additional Information 3: 0a9e       Additional Information 4: 0a9e372d3b4ad19135b953a78882e789      This is on multiple machines with Win 7 -64 bit. I have been trying to install qgis-dev but I keep getting qgis_core.dll not found issues and I have looked online but can't find anything that works. You get the Dev screen (image) for a millisecond and then no output. The paths seem to load fine.               OSGEO4W home is C:\OSGeo4W          C:\>path C:\OSGeo4W\apps\grass\grass-6.4.3RC3\bin;C:\OSGeo4W\apps\msys\bin;C:\OS     Geo4W\bin;C:\Program Files (x86)\Common Files\Intergraph\Grid Analysis SDK\1.0\P     rogram;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System     32\WindowsPowerShell\v1.0\;c:\lastools;C:\apps\FME\;C:\Program Files (x86)\Quick     Time\QTSystem\;C:\OSGeo4W\apps\msys\bin;C:\OSGeo4W\apps\Python27\Scripts;C:\OSGe     o4W\apps\qgis-dev\bin;C:\OSGeo4W\apps\grass\grass-6.4.3RC3\lib          C:\>set QGIS_PREFIX_PATH=C:/OSGeo4W/apps/qgis-dev          C:\>rem Set VSI cache to be used as buffer, see #6448          C:\>set VSI_CACHE=TRUE          C:\>set VSI_CACHE_SIZE=1000000          C:\>start "QGIS" "C:\OSGeo4W"\bin\qgis-dev-bin.exe          C:\>pause     Press any key to continue . . .


How draw a Rectangle with INewRectangleFeedback?

I´m developing in ArcGIS Engine and my question is how to draw a rectangle with `INewRectangleFeedback` interface. Here is my code but it does not create the rectangle. If someone could help me it would greatly appreciate it.               Public Sub mousedownFBRectanglePoly(ByVal px As Long, ByVal py As Long)              feedbackStartPoint = New ESRI.ArcGIS.Geometry.Point         feedbackMovePoint = New ESRI.ArcGIS.Geometry.Point         feedbackScreenDisplay = Principal.m_mapControl.ActiveView.ScreenDisplay         feedbackFillSymbol.Color.CMYK = RGB(255, 0, 0)              'Initialize a new RectangleFB object         NewRectangleFeedback = New NewRectangleFeedback         NewRectangleFeedback.Display = feedbackScreenDisplay         NewRectangleFeedback.Symbol = feedbackFillSymbol 'QI              'pass the start point from the mouse position, transforming it to map coordinates.         feedbackStartPoint = feedbackScreenDisplay.DisplayTransformation.ToMapPoint(px, py) 'QI         NewRectangleFeedback.Start(feedbackStartPoint)     End Sub          Public Sub mousemoveFBRectanglePolygon(ByVal px As Long, ByVal py As Long)         '    'pass X and Y to feedbackMovePoint to transfer to NewEnvelopeFeedback         feedbackMovePoint = feedbackScreenDisplay.DisplayTransformation.ToMapPoint(px, py) 'QI         NewRectangleFeedback.SetPonint(feedbackMovePoint)     End Sub          Public Sub DoubleclickFBRectanglePolygon(ByVal px As Long, ByVal py As Long)         'feedbackStopPoint = feedbackScreenDisplay.DisplayTransformation.ToMapPoint(px, py)         'when mouse comes up, end the new envelope and pass it to feedbackEnvelope.         feedbackRectangle = NewRectangleFeedback.Stop(feedbackStopPoint) 'QI         'pass the new rectangle element, the geometry defined by our feedback object         feedbackElement = New RectangleElement         feedbackElement.Geometry = feedbackRectangle         'make sure the element is activated in the current view         feedbackElement.Activate(feedbackScreenDisplay)         'now add the newly created element to the ActiveView with default symbology.         Principal.m_mapControl.ActiveView.GraphicsContainer.AddElement(feedbackElement, 0)         'and refresh the view so we can see the changes.         Principal.m_mapControl.ActiveView.Refresh()     End Sub      And also I have the problem that when I call my methods in the mouse events it does not enter the method; it skips even if all the parameters we pass are good.


Query/find features in ArcPad, hide the rest in map?

Trying to help out another department that does quarterly assessments of field data. Their symbology is all set by the status of the assessment (the only way I could figure out how to hide something was to hide symbology) so that doesn't help much. Their checkouts contain all data for the year but they want to be able to filter/limit what is visible in the map based off the quarter (and potentially other data columns). Been trudging through documentation but can't really find anything. Is this possible?


Distance between GPS coordinates

Given a database of GPS points, a center GPS location, and a radius R (in meters), how can I find all points in the database that are within a distance of R of the center point? Will the distance iso-lines be an ellipse?


How do you merge small gaps into the larger surrounding polygon?

I have a layer which has small rectangular gaps, I need to merge the gaps into the larger polygon that surrounds it, has anyone got any idea of how to do this, I know i can fill in the gaps with a new feature then go to Editor> Merge, but i have hundreds of these. If theres a way of doing this via vba or python, it would be great. I'm using ArcGIS 9.3.1 (ArcEditor) Heres what it looks like ![gaps is layer](http://i.stack.imgur.com/Bx1VZ.jpg)


Label should appear inside the polygon only

I'm working on vectorLayers of OpenLayers and I'm labeling my layer based on some attribute, while the label appear at some certain zoom level. The problem I'm facing is that though label appears at certain zoom in, yet there are some polygons with enough small size that the labels get conjusted there. Well, what I want is that the labels should appear only inside the polygon, if the polygon size is small, the label may not appear. I searched for this context and I found OpenLayers function of "Strategy" and "clusters", but I couldn't find a way for my problem... Any sample code or relevant link...


How to reproject geodatabase (*.gdb) with datasets and featureclass using custom transformation?

I have a file geodatabase in arcMap which in in EVEREST_1830 datum and Modified UTM projection. Now I need to use OpenStreetMap or googlemaps imagery WMS layer as base layer and overlay the datasets. I know that I can Project each feature class in the Gdb to WGS 84 and do Overlay. But I will take time to project each featureclass. So the short-cut might be to bring the WMS imagery layer to local (.gdb) coordinate system or to bring the .gbd to WGS 84. Is it Possible? In Short:   Is it possible to project a whole geodatabase including all datasets and feature class (*.gdb) in ArcMap to a another projection system using a user defined custom transformation? Or is there a tool, python script etc...


is there significance difference between qgis version 1.8.0 & 2 to install plugin?

I am a Qgis learner on widows xp and I want to know whether I can install semiautomatic classification plugin onto Qgis 1.8.0 in the same way for Qgis 2. is there significance difference between the two version in accepting the plugin?


How to extract all lines that do not intersect with buffer?

I am working in ArcGIS Desktop 10.0 and/or 10.1. I have two road network feature classes in a file geodatabase. I have created a 5 meter buffer around the first one, so it is now a polygon feature. The other feature is a line feature. I want to intersect the line feature road network with the buffered one and generate an output feature class that includes only the road lines that fall **outside** of the buffer. When I run Intersect, the output is only the portion of the lines that fall inside the buffer. Is there a process to "clip off" the lines that fall inside the buffer polygons and just output a line feature containing all the lines outside the buffer? I am open to using other software if necessary. Thanks for your help!


alternative to mapClickEvent

I use gwt-openlayers lib in my GWT app. I have added a drawFeature control and now I want to show a radius of circle while I draw a feature. Now it looks like this:               vectorLayer.addVectorFeatureAddedListener(new VectorFeatureAddedListener() {             @Override             public void onFeatureAdded(FeatureAddedEvent eventObject) {                 final VectorFeature feature = eventObject.getVectorFeature();                 if (feature.getGeometry().getClassName().equals("OpenLayers.Geometry.Polygon") && !hasTemplate) {                     if (currentAreaFeature != null) {                         vectorLayer.removeFeature(currentAreaFeature);                     }                     if (templateAreaFeature != null) {                         removeTemplateArea();                     }                     currentAreaFeature = feature;                     Geometry geometry = currentAreaFeature.getGeometry().clone();                     geometry.transform(new Projection(map.getProjection()), DEFAULT_PROJECTION);                     geometry.calculateBounds();                     Bounds bounds = geometry.getBounds();                     currentCenter = bounds.getCenterLonLat();                     currentRadius = calculateDistance(currentCenter, new LonLat(bounds.getUpperRightX(), currentCenter.lat()));                          style.setLabel(currentRadius.intValue() + "m");                     feature.setStyle(style);                     feature.redrawParent();                 }                 hasTemplate = false;             }         });      In this case, a label with radius represents after the feature added. I want to represent a radius always `if(drawFeature.isActive)`. The first idea to realize this - using the MousePosition control. Thus I can take a second LonLat parameter to calculate a radius using my custom method `calulateRadius()`. I hope that I can take the first Lonlat (= future center of circle) using mapMouseClickEvent. But if `drawFeature.isActive` it is impossible to handle this event. So, I am at a deadlock.   This is my solution that doesn't work:                  map.addMapClickListener(new MapClickListener() {                         @Override                         public void onClick(final MapClickEvent mapClickEvent) {                             MousePositionOutput mpOut = new MousePositionOutput() {                                 @Override                                 public String format(LonLat lonLat, Map map) {                                     String out = calculateDistance(mapClickEvent.getLonLat(),lonLat)+"m";                                          return out;                                 }                             };                                  MousePositionOptions mpOptions = new MousePositionOptions();                             mpOptions.setFormatOutput(mpOut); // rename to setFormatOutput                                  map.addControl(new MousePosition(mpOptions));                         }                     });


Where can I get documentation for Netezza Spatial Functions

I am looking for some documentation or manual or reference guide for Netezza Spatial Functions. Any idea where can I get the same. Thank you. Dharmesh


Google Maps for other planets

I have visited, but do not remember where, Google maps for the Moon and Mars (I think). I am wondering if anyone knows what you have to do to generate the necessary GIS data (coordinate system, etc) for a completely new planet complete with aerials? I would like to take other worlds and generate a Google Map complete with topography and draggability and more using the Google Maps API but I cannot find any information on how to do this online. I would like to do this for both planets that are real and for fictional worlds. Think Narnia as a Google Map.


ArcGIS Raster Symbology - Break contour at 0

In ArcGIS 10, how can I break raster symbology (stretched) at a particular value (i.e. 0). For example, I have a DEM representing both topography and bathymetry and I want a break at the 0 m contour line (shoreline) so the green colors represent positive elevation (land) and the blue colors represent values less than 0 (water depths). Similar to what Global Mapper offers.


'Out of bounds' Error in profile51 function of matlab

I am trying to Extract long profile data in Matlab. I have followed the steps of this pdf. Now, in Matlab I passed the function `profile51(‘file_name’, ‘arcmap_directory’, ‘matlab_directory’, ‘n’);` and I am experiencing the error "starting point chosen geographic coordinates, out of bbounds of DEM , aborting". Where is the problem. I am using ARCGIS 10.


Is it possible to put scale(ex; 1:10000) at print composer on QGIS 1.8.0

I would like to display a cartographic scale (e.g. 1:10,000) in the print composer. I can set the scale from map tab. After setting, I can type by myself as Label. Is it possible to put scale automatically??


Is there a way to tell the geodatabase version using Python?

I want to find out if either a file or personal geodatabase is 9.3, 10.0, 10.1, etc Is there a way to do this using Python?


Do I have to transfer gwc-layers from my GEOSERVER_DATA_DIR directory to a production server

I am working with Geoserver and I know that it is possible to transfer the contents to the GEOSERVER_DATA_DIR between servers. I have already moved my GEOWEBCACHE_CACHE_DIR to a different location so that the tiles are not transferred. I am using the embedded geowebcache in Geosserver version 2.2.5. I however have a number of xml files in GEOSERVER_DATA_DIR/gwc-layers:               LayerGroupInfoImpl--570ae188_124761b8d78_-7fab.xml     LayerGroupInfoImpl--570ae188_124761b8d78_-7fac.xml     LayerGroupInfoImpl--570ae188_124761b8d78_-7fad.xml     LayerInfoImpl-18e1ce0d_13ef93f68ce_-7ffd.xml     LayerInfoImpl-1c3a926c_13ef90929b2_-7a75.xml     LayerInfoImpl-2fbcd275_13e632965e7_-7feb.xml     LayerInfoImpl--4a9eec43_132d48aac79_-7fff.xml     LayerInfoImpl--570ae188_124761b8d78_-7fae.xml     LayerInfoImpl--570ae188_124761b8d78_-7fb0.xml     LayerInfoImpl--570ae188_124761b8d78_-7fb4.xml     LayerInfoImpl--570ae188_124761b8d78_-7fb6.xml     LayerInfoImpl--570ae188_124761b8d78_-7fb8.xml      So my question is - are these files generated automatically if I tranfer the contents of GEOSERVER_DATA_DIR or do I have to include them in the transfer?


Prism mobile phone metadata: does it include location?

I've read that Prism collects metadata, but no details of what that metadata includes. Does anyone know if location is part of the metadata?


Can I view the Geoserver zoom level in QGIS

I am creating some sld's using QGIS for use in Geoserver and wanted to view the current zoom level so that I can then define it in the zoom level. Is this possible? For example                   <!-- Local Roads 1787 - 3573-->         <FeatureTypeStyle>             <Rule>                 <ogc:Filter>                     <ogc:PropertyIsEqualTo>                         <ogc:PropertyName>State_cont</ogc:PropertyName>                         <ogc:Literal>Y</ogc:Literal>                     </ogc:PropertyIsEqualTo>                 </ogc:Filter>                 <MinScaleDenominator>1787</MinScaleDenominator>                 <MaxScaleDenominator>3573</MaxScaleDenominator>                 <LineSymbolizer>                     <Stroke>                         <CssParameter name="stroke">#CDAA66</CssParameter>                         <CssParameter name="stroke-width">7</CssParameter>                         <CssParameter name="stroke-linecap">round</CssParameter>                     </Stroke>                 </LineSymbolizer>             </Rule>         </FeatureTypeStyle>         <FeatureTypeStyle>             <Rule>                 <ogc:Filter>                     <ogc:PropertyIsEqualTo>                         <ogc:PropertyName>State_cont</ogc:PropertyName>                         <ogc:Literal>Y</ogc:Literal>                     </ogc:PropertyIsEqualTo>                 </ogc:Filter>                 <MinScaleDenominator>1787</MinScaleDenominator>                 <MaxScaleDenominator>3573</MaxScaleDenominator>                 <LineSymbolizer>                     <Stroke>                         <CssParameter name="stroke">#FFFFFF</CssParameter>                         <CssParameter name="stroke-width">6</CssParameter>                         <CssParameter name="stroke-linecap">round</CssParameter>                     </Stroke>                 </LineSymbolizer>                 <TextSymbolizer>                     <Label>                         <ogc:PropertyName>road_name2</ogc:PropertyName>                     </Label>                     <Font>                         <CssParameter name="font-family">Arial</CssParameter>                         <CssParameter name="font-size">10</CssParameter>                         <CssParameter name="font-style">normal</CssParameter>                     </Font>                     <LabelPlacement>                         <LinePlacement/>                     </LabelPlacement>                     <Halo>                         <Radius>                             <ogc:Literal>1</ogc:Literal>                         </Radius>                         <Fill>                             <CssParameter name="fill">                                 <ogc:Literal>#FFFFFF</ogc:Literal>                             </CssParameter>                             <CssParameter name="fill-opacity">                                 <ogc:Literal>1</ogc:Literal>                             </CssParameter>                         </Fill>                     </Halo>                                             <Fill>                         <CssParameter name="fill">#000000</CssParameter>                     </Fill>                     <VendorOption name="followLine">true</VendorOption>                     <VendorOption name="maxAngleDelta">30</VendorOption>                     <VendorOption name="maxDisplacement">800</VendorOption>                     <VendorOption name="repeat">1000</VendorOption>                 </TextSymbolizer>             </Rule>         </FeatureTypeStyle>              <!-- Local Roads 3573 - 28573-->         <FeatureTypeStyle>             <Rule>                 <ogc:Filter>      where               <!-- Local Roads       and                            <MinScaleDenominator>3573</MinScaleDenominator>                 <MaxScaleDenominator>28573</MaxScaleDenominator>      defines what to do at different zoom levels. I need QGIS to display the above scale denominator values. Over 150k ![over 150k zoom](http://i.stack.imgur.com/XNyMU.jpg) 30k-150k ![enter image description here](http://i.stack.imgur.com/YpAMR.jpg) <30k ![enter image description here](http://i.stack.imgur.com/lQiCF.jpg) TOC ![enter image description here](http://i.stack.imgur.com/Lgwv1.jpg) The idea is to do rapid prototyping of different style options in QGIS and then export the SLD's to Geoserver for production. So people can zoom in out and turn on/off the relevant symbology. This would be easier if you can set zoom levels for different symbology from within the properties-->style tab like in arcgis. What I found for QGIS http://qgis.spatialthoughts.com/2012/02/styling-vector-data-in-qgis-using- size.html doesn't do the job as I want the layer turned on/off at different zoom levels.


Merge Spatially Coincident Features in the Same Feature Class

I need a way to programatically merge grid cells (polygon 15x15m) that are directly on top of each other and add together some of their attributes. I am working in ArcGIS 10.1 with the data stored as a polygon feature class. The data is the result of pedestrian survey across a pre-defined grid. On occasion the folks conducting the pedestrian survey get off course and record something in a column or row adjacent to the one they are working in (or the GPS position wanders). This results in two sets of data being recorded for each cell when the data from multiple GPS units are appended into a single feature class. I need a way to go through each cell, check to see if there are any duplicate features, if there are then merge their attributes (some integer, some text), and then delete the one feature that didn't get the merged data. The 'Delete Identical' and 'Find Identical' tools don't do what I'm looking for - and doing it manually isn't an option as the feature class often has upwards of 10,000 features in it. I know how to iterate through the feature class using python and check to determine if there are any duplicate features in that location. What I don't know how to do is deal with merging the features and updating the attributes. If anyone can offer some direction on how to accomplish this I would greatly appreciate it. EDIT - More Description of Before/After State: In the picture below there are two features selected - identical 15x15 meter square polygons, I need to add together all the integer fields (the ones with TOT_ as a prefix) and append the GPS_UNIT, INITIALS, and REC_DATE string fields. It's difficult to show since the features directly overlap. ![enter image description here](http://i.stack.imgur.com/1TMOA.png) **EDIT 2:** I have found that I can easily identify the duplicated features by calculating their XY centers, concatenating them into a string field as [X] & ',' & [Y] then opening the database in access and using a Find Duplicates query to identify which of the cells have been duplicated. I have not however, been able to figure out a good way to merge the attributes for each of the cells into a single row. Help with how to do that, either in python or in a database environment, would be very welcome!


What are my options for Server side clustering using open source GIS tools?

I need to make a webapp that will show over 40K Points on a map. These points are all across the globe. Using WFS Service and OpenLayers, it is possible to do clustering on small set of points, but it is not really useful to do this clustering on the client side for my case. How can I do server side clustering, in a WMS or tiled WMS service? There are several such options for Google maps. What are the corresponding tools in the OSGeo field?


How can I get a window by clicking on a mapsubject in the QGIS web client?

Is it possible in Qgis-web-client to show a new little window (with custom informations and maybe a little picture) by clicking on a mapsubject? How to modify Qgis-web-client if possible?   Maybe its possible to modify the attribute-window, that i get on the right side by using the identification cursor-mode? Thanks


how to use a particular output from previous code in my next code in matlab

I have written a code in matlab and there are several outputs. I have to use only one of the output(containing latitude, longitude, and one parameter) of these several outputs in my next code. Can anyone help me how to use only that output in my next code......and also it has a large amount of data but i am interested only in some particular range of data. How to select only that range..


World territorial units for statistics

My current assignment required to do research and produce world territorial units for statistics. In Europe it easy thanks to Eurostat. Even non-commercial GIS data is also available here. Now outside Europe I am completely lost. I know there are some regional organizations exist. What i dont know how they organize their territorial units for the member countries. Any ideas???


Why is torque not working with large polygons?

It seems that torque isn't working with a "big" polygon. By "big" I mean the size of a french department. Could you confirm that? I would like to show the evolution of jobless rate during the last 30 years. Thanks a lot.


How to get the distances (shortest path) between all pairs of points in the river network?

I have 2 vector shapefiles (one line, one point), and I have tried at least 4 ways to try to get the distance matrix at one time (and most concern the directions of each river segment)   1. quantum navigator   2. GRASS tool - v.net.allpairs   3. pgrouting   4. roadgraph plugin In the end I think that roadgraph plugin is the one which is the closest to my goal, and it also can set the directions of the river, but I can't modify it to get the distances between all pairs of points(and I want to get this in matrix form). What/How could I do? Is there any other way to get this distance matrix on qgis？


Arcgis Stop Working with my Loop Scrip (Could Be Memory)

I am having issues with my scrip, because it makes my computer very slow after 15 loops arcgis 10.1 and explorer.exe crashes. But instead of this, i can see my 15 pdf files saved correctly and i need to move the cursor to 16 for begin the loop. I am using ddp, dynamic tables (with script), GDB, everything is loaded in memory and then i delete memory every time the cicle begins. Here is my Scrip, can anyone tell me what i am doing wrong?.               import arcpy, os, sys              relpath = os.path.dirname(sys.argv[0])          #Create final output PDF     pdfPath = relpath + "\FinalOutput.pdf"     if os.path.exists(pdfPath):         os.remove(pdfPath)     finalResult = arcpy.mapping.PDFDocumentCreate(relpath + "\FinalOutput.pdf")          #Reference MXD and layers     mxd = arcpy.mapping.MapDocument(relpath + r"\MAPABASE.mxd")     LiderLayer = arcpy.mapping.ListLayers(mxd, "LS2")[0]     queryLayer = arcpy.mapping.ListLayers(mxd, r"SUBSECC_VIC")[0]     BFLayer = arcpy.mapping.ListLayers(mxd, "BF1")[0]     BFquery = arcpy.mapping.ListLayers(mxd, r"BF1")[0]          #Reference page layout elements     for elm in arcpy.mapping.ListLayoutElements(mxd):       if elm.name == "bar1":  bar1 = elm       if elm.name == "bar2":  bar2 = elm       if elm.name == "bar1txt":  bar1txt = elm       if elm.name == "bar2txt":  bar2txt = elm       if elm.name == "NoGrowth": noGrowth = elm       if elm.name == "horzLine": horzLine = elm       if elm.name == "vertLine": vertLine = elm       if elm.name == "cellTxt":  cellTxt = elm       if elm.name == "headerTxt": headerTxt = elm       if elm.name == "bar1b":  bar1b = elm       if elm.name == "bar2b":  bar2b = elm       if elm.name == "bar1txtb":  bar1txtb = elm       if elm.name == "bar2txtb":  bar2txtb = elm       if elm.name == "NoGrowthb": noGrowthb = elm       if elm.name == "horzLineb": horzLineb = elm       if elm.name == "vertLineb": vertLineb = elm       if elm.name == "cellTxtb":  cellTxtb = elm       if elm.name == "headerTxtb": headerTxtb = elm          #Reference DDP object     ddp = mxd.dataDrivenPages     #Loop through each DDP page     for pageNum in range(44, mxd.dataDrivenPages.pageCount+1):       mxd.dataDrivenPages.currentPageID = pageNum            #Graphic table variable values for LS and BF(b)       tableHeight = 3.0       tableWidth = 4.32       headerHeight = 0.16       rowHeight = 0.10       upperX = 11.18       upperY = 7.60            tablebHeight = 3.0       tablebWidth = 4.32       headerbHeight = 0.16       rowbHeight = 0.10       upperbX = 11.18       upperbY = 6.63            #Build selection set       seccnum = ddp.pageRow.seccioncom       arcpy.AddMessage("Processing: " + seccnum)            arcpy.SelectLayerByAttribute_management(LiderLayer, "NEW_SELECTION",                                               "\"seccioncom\" = " + "'" + seccnum + "'")                 #selection       arcpy.Select_analysis(LiderLayer, "in_memory\select", "\"seccioncom\" = " + "'" + seccnum + "'")       numRecords = int(arcpy.GetCount_management(LiderLayer).getOutput(0))       arcpy.Select_analysis(BFLayer, "in_memory\select2", "\"seccioncom\" = " + "'" + seccnum + "'")       numRecordsb = int(arcpy.GetCount_management("in_memory\select2").getOutput(0))            #Show selected features               #Add note if there are no Lider .................................................................       if numRecords == 0:         noGrowth.elementPositionX = 11.20         noGrowth.elementPositionY = 7.50       else:              #if number of rows exceeds page space, resize row height         if ((tableHeight - headerHeight) / numRecords) < rowHeight:           headerHeight = headerHeight * ((tableHeight - headerHeight) / numRecords) / rowHeight           rowHeight = (tableHeight - headerHeight) / numRecords              #Set and clone vertical line work         vertLine.elementHeight = (headerHeight) + (rowHeight * numRecords)         vertLine.elementPositionX = upperX         vertLine.elementPositionY = upperY              temp_vert = vertLine.clone("_clone")         temp_vert.elementPositionX = upperX + 2.00         temp_vert = vertLine.clone("_clone")         temp_vert.elementPositionX = upperX + 4.32              #Set and clone horizontal line work         horzLine.elementWidth = tableWidth         horzLine.elementPositionX = upperX         horzLine.elementPositionY = upperY              horzLine.clone("_clone")         horzLine.elementPositionY = upperY - (headerHeight - 0.01)              y=upperY - headerHeight         for horz in range(1, numRecords+1):           y = y - rowHeight           temp_horz = horzLine.clone("_clone")           temp_horz.elementPositionY = y              #Set header text elements         headerTxt.fontSize = headerHeight / 0.0200         headerTxt.text = "NAME SUPERVISOR"         headerTxt.elementPositionX = upperX + 0.80         headerTxt.elementPositionY = upperY - (headerHeight / 2)              newFieldTxt = headerTxt.clone("_clone")         newFieldTxt.text = "ADDRESS"         newFieldTxt.elementPositionX = upperX + 2.70              #Set and clone cell text elements         cellTxt.fontSize = rowHeight / 0.0200              y = upperY - headerHeight          rows = arcpy.SearchCursor("in_memory\select")         for row in rows:           x = upperX + 0.02           col1CellTxt = cellTxt.clone("_clone")           col1CellTxt.text = row.getValue("NOMBRE_LS")           col1CellTxt.elementPositionX = x           col1CellTxt.elementPositionY = y           col2CellTxt = cellTxt.clone("_clone")           col2CellTxt.text = row.getValue("DOMICILIO")           col2CellTxt.elementPositionX = x + 2.10           col2CellTxt.elementPositionY = y           y = y - rowHeight     #End of Lider Loop.................................................................................     #Add note if there are no Beneficiarios............................................................       if numRecordsb == 0:         noGrowthb.elementPositionX = 11.20         noGrowthb.elementPositionY = 6.30       else:              #if number of rows exceeds page space, resize row height         #if ((tablebHeight - headerbHeight) / numRecordsb) < rowbHeight:         #  headerbHeight = headerbHeight * ((tablebHeight - headerbHeight) / numRecordsb) / rowbHeight         #  rowbHeight = (tablebHeight - headerbHeight) / numRecordsb              #Set and clone vertical line work         vertLineb.elementHeight = (headerbHeight) + (rowbHeight * numRecordsb)         vertLineb.elementPositionX = upperbX         vertLineb.elementPositionY = upperbY              temp_vertb = vertLineb.clone("_clone")         temp_vertb.elementPositionX = upperbX + 2         temp_vertb = vertLineb.clone("_clone")         temp_vertb.elementPositionX = upperbX + 4.32              #Set and clone horizontal line work         horzLineb.elementWidth = tablebWidth         horzLineb.elementPositionX = upperbX         horzLineb.elementPositionY = upperbY              horzLineb.clone("_clone")         horzLineb.elementPositionY = upperbY - (headerbHeight - 0.01)              yb=upperbY - headerbHeight         for horzb in range(1, numRecordsb+1):           yb = yb - rowbHeight           temp_horzb = horzLineb.clone("_clone")           temp_horzb.elementPositionY = yb              #Set header text elements         headerTxtb.fontSize = headerbHeight / 0.0200         headerTxtb.text = "NAME OF BENEFIT"         headerTxtb.elementPositionX = upperbX + 0.80         headerTxtb.elementPositionY = upperbY - (headerbHeight / 2)              newFieldTxtb = headerTxtb.clone("_clone")         newFieldTxtb.text = "ADDRESS"         newFieldTxtb.elementPositionX = upperbX + 2.70              #Set and clone cell text elements         cellTxtb.fontSize = rowbHeight / 0.0200              yb = upperbY - headerbHeight         rowsb = arcpy.SearchCursor("in_memory\select2")         for row in rowsb:           xb = upperbX + 0.02           col1CellTxtb = cellTxtb.clone("_clone")           col1CellTxtb.text = row.getValue("NOMBRE_BF")           col1CellTxtb.elementPositionX = xb           col1CellTxtb.elementPositionY = yb           col2CellTxtb = cellTxtb.clone("_clone")           col2CellTxtb.text = row.getValue("DOMICILIO")           col2CellTxtb.elementPositionX = xb + 2.10           col2CellTxtb.elementPositionY = yb           yb = yb - rowbHeight            #Export to PDF Append Disabled       #ddp.exportToPDF(relpath + r"\temp.pdf", "CURRENT")       #finalResult.appendPages(relpath + r"\temp.pdf")       #os.remove(relpath + r"\temp.pdf")       #Export to Single PDF Document Each       arcpy.mapping.ExportToPDF(mxd, relpath + "\\" + seccnum + ".pdf")             #Clean-up before next page       for elm in arcpy.mapping.ListLayoutElements(mxd, "GRAPHIC_ELEMENT", "*clone*"):         elm.delete()       for elm in arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT", "*clone*"):         elm.delete()       noGrowth.elementPositionX = -6       cellTxt.elementPositionX = -6       headerTxt.elementPositionX = -6       horzLine.elementPositionX = -6       vertLine.elementPositionX = -6       noGrowthb.elementPositionX = -6       cellTxtb.elementPositionX = -6       headerTxtb.elementPositionX = -6       horzLineb.elementPositionX = -6       vertLineb.elementPositionX = -6       del row       del rows       del rowsb       del horz       del horzb       arcpy.SelectLayerByAttribute_management(LiderLayer, "CLEAR_SELECTION")       arcpy.Delete_management("in_memory\select")       arcpy.Delete_management("in_memory\select2")          finalResult.updateDocProperties("MAPABASE", "AREAS", "Esri", "map sheets" , "map book", "USE_THUMBS")     finalResult.saveAndClose()


GeoServer subdomain, where to place a html file

i would like to host a website, which is addressable as a subdomain of my GeoServer. For example http://mygeoserver.com:8080/geoserver/web/my_website.html. My question is: where do i have to place the html file in my folder structure so that i can access and run it with the http request above? How can i make the web page available in the web directory of GeoServer? The GeoServer is installed under Ubuntu. Thanks in advance * * * Edit (1): Thanks for your comment BradHards. Background: The background to my question is that i want to have an html file with an OpenLayers WMS map, which shows my GeoServer data. In this map i need WFS as an overlay to the WMS map. Up to now, i can run the html file with WMS fine, but i cant get the WFS overlay to work. In this forum thread (WFS layer not showing?) someone mentioned a hint according to which the OpenLayers/WMS/WFS html file must be located within the GeoServer web directory in order to get it to work. My steps: First i installed Tomcat6 under Ubuntu 12.04 LTS (sudo apt-get install tomcat6). After that, i installed the GeoServer version 2.2-SNAPSHOT (apt-get install opengeo-geoserver). It is running well. My tries: I tried a bit for myself and i am close to a solution. In the folder "var/lib/tomcat6/webapps/geoserver/data/www" are two html demo files, ol- demo.html as demo for openlayers and wfs-t.html as demo for wfs. I can successfully call these files in the browser (localhost and from remote) by (http://myaddress.com/geoserver/www/ol-demo.html). But when i additionaly place my html file in this folder i can't reach them from the browser in an analogous way. Instead: HTTP 404 the requested resource() is not available. Hope this helps to be able to better answer my question. Thanks in advance


Fiona: get each feature extent (bounds)

I was looking in Fiona to get for each feature its extent but I didn't find how. I have try to far to do something like below               import fiona          with fiona.open('countries/ne_10m_admin_0_countries.shp', 'r') as source:         for f in source:             geom = f['geometry']             print geom      I was expecting to get a method for this at the f variable level. After some documentation reading, I've seen that f is a pure python record. So at the end, how with Fiona can I get the extent (or bounding box) of each feature geometry? PS: I already know the pure GDAL/OGR python solution so I expect a Fiona solution please


How to avoid creating corrupt Shapefiles during Editing?

I have one of my GIS technicians digitizing some lines in QGIS in shapefile format. I don't know how he did it (and neither does he), but somehow the shapefile became corrupt. It was creating random lines or some of the lines he created would just disappear. I went in into ArcCatalogue to see how it looked in ArcGIS and this is what I saw: ![enter image description here](http://i.stack.imgur.com/NItlM.jpg) Notice the question mark icon where I should see a shapefile 'line' icon. Obviously ArcCatalogue cannot read this file. Also, a second dbf file seemed to have been created with the '_packed' attached to the end. When I look at the shapefile using Windows explorer, I see that there already is a .dbf for the shapefile 'M3_PRE_SMU_lines_10Apr13_SMC.dbf', so I don't know where this _packed shapefile came from and I can't seem to find anything online that speaks to it. I tried to add this file into ArcMap and I receieved the following error: ![enter image description here](http://i.stack.imgur.com/Ljbhm.jpg) The error is pretty self explanatory...number of shapes does not match the number of records. I just don't know why that is occuring. There doesn't seem to be anything online that explains how this is occurring in QGIS, but I do see a couple repair tools. I actually repaired this myself by just opening QGIS, adding the layer, and then right clicking on the layer and 'saving as' another shapefile. So, I've figured a work around, but I'm hoping to find a solution that will stop this from occurring in the first place. Thanks, Mike


QGIS Equivalent of MapInfo's 'Combine Objects using Column'

MapInfo has a function that takes a table, and creates a new table populated combines them by a specified value. So, combining on the name field, and specifying that the Area field should be summed...               Name                  Area     Ben's Field           100     Ben's Field           50     Tom's Field           25      Becomes               Name                  Area     Ben's Field           150     Tom's Field           25      How can one achieve this in QGIS?


How to combine (join?) two overlapping polygons to determine combined area they cover?

How do I combine (join?) two overlapping polygons to determine the combined area they cover in ArcGIS 10? I am sure the Geoprocessing tools can do it, but just how eludes me.


Grid registration issue converting from GeoTIFF to ARC ASCII Grid

I've got a 3 arc second digital terrain model represented as a 32-bit GeoTIFF that looks like this:               $ gdal_info gom03_v1_0.tif          Driver: GTiff/GeoTIFF     Files: gom03_v1_0.tif     Size is 10200, 7800     Coordinate System is:     GEOGCS["WGS 84",         DATUM["WGS_1984",             SPHEROID["WGS 84",6378137,298.257223563,                 AUTHORITY["EPSG","7030"]],             AUTHORITY["EPSG","6326"]],         PRIMEM["Greenwich",0],         UNIT["degree",0.0174532925199433],         AUTHORITY["EPSG","4326"]]     Origin = (-71.499580383300781,45.999583333330001)     Pixel Size = (0.000833333333333,-0.000833333333332)     Metadata:       TIFFTAG_SOFTWARE=nc2geotiff       AREA_OR_POINT=Area     Image Structure Metadata:       INTERLEAVE=BAND     Corner Coordinates:     Upper Left  ( -71.4995804,  45.9995833) ( 71d29'58.49"W, 45d59'58.50"N)     Lower Left  ( -71.4995804,  39.4995833) ( 71d29'58.49"W, 39d29'58.50"N)     Upper Right ( -62.9995804,  45.9995833) ( 62d59'58.49"W, 45d59'58.50"N)     Lower Right ( -62.9995804,  39.4995833) ( 62d59'58.49"W, 39d29'58.50"N)     Center      ( -67.2495804,  42.7495833) ( 67d14'58.49"W, 42d44'58.50"N)     Band 1 Block=10200x1 Type=Float32, ColorInterp=Gray      Note that the `AREA_OR_POINT` attribute is set to `AREA`. When I convert this to ARC ASCII Grid format using GDAL:               gdal_translate gom03_v1_0.tif -of AAIGrid test.asc      and look at the top of the resulting ASCII file, I see:               $ more test.asc          ncols        10200     nrows        7800     xllcorner    -71.499580383301     yllcorner    39.499583333335     cellsize     0.000833333333      315.814208984375 314.712371826171875 ...      These `xllcorner`,`yllcorner` values are the same as the GeoTIFF `Lower Left` values above. From the official description of the ESRI ASCII Raster Format, however, either `xllcorner`,`yllcorner` or `xllcenter`,`yllcenter` can be specified. Since the GeoTIFF values represented AREA (not POINT), isn't the specification of `xllcorner` and `yllcorner` incorrect? Shouldn't the ASCII file in this case really read as below?               $ more test.asc          ncols        10200     nrows        7800     xllcenter    -71.499580383301     yllcenter    39.499583333335     cellsize     0.000833333333      315.814208984375 314.712371826171875 ...


Should point data be equidistant projected when using ArcGIS IDW spatial interpolation?

I am wondering if anyone can clarify whether point data should be projected to an equidistant projection when using ArcGIS IDW spatial interpolation? I am working on a dataset from Western North America spanning about 30 degrees of latitude. The data are currently in Lat/Long (NAD83). Does ArcGIS "project on the fly" or somehow adjust for latitude when calculating distances to my sample points during the interpolation procedure or should I be supplying everything in a projection that preserves distances?


esri.tasks.PrintTask won't print WMS layers hosted by non-ESRI servers

I'm using the ESRI Javascript API. My esri.Map is successfully displaying WMS layers via esri.layers.WMSLayer. Some of the WMS layers are hosted by an ArcGIS Server and some are hosted by non-ESRI servers. But when I print using esri.tasks.PrintTask, only the WMS layers hosted by ArcGIS Server are visible. The WMS layers hosted by non-ESRI servers don't show up. Has anyone succeeded in printing a WMS layer which is hosted by a non-ESRI server? -Rick


Syntax in Qgis "Rule properties?

I struggle with Qgis and some drawings of water pipes for a water company. According to the program it is possible to place different signatures for different components (stopcocks, T-pieces, etc.) From the various data located in the file "attribute table" I have to define that: the symbol is used if the value in column UNDERKLASS is equal to U22 thank you in advance Uffe


Has ESRI made any definitive announcements about 10.1 SP2?

My organization is awaiting SP2 before we can move our primary GIS team from 9.3.1 to 10.1. I have been testing 10.1 and have found a particularly bad bug that we've been told will be addressed in 10.1 SP2. However, when I look at it on ESRI's site, the bug is set to be resolved in 10.2. When is that coming out? Will there be a 10.1 SP2 in the meantime?


How do I make an icon with some text to popup when I hover over it and for it not to be slow?

I would like to make an icon on the screen and have hover popup text. Ideally the text will be black with a white background. Right now my icon is a bitmap created like this               GraphicTrackerClass incidentIcons = new GraphicTrackerClass();     incidentIcons.Initialize(mapControl.Map as IBasicMap);     int graphicID = incidentIcons.Add(thisIncident.point, alertIcon);      Then I set up a hit test and would like a text popup when I hover over the GraphicTracker (should I use a different class for displaying the icon?). `AxMapControl.DrawText` is fast, but I can't figure out how to customize the text and background MapTips look really cool but I can't find a function to plot a maptip with a point and text - I've only found `layer.ShowTips = true;` I tried creating a balloon callout and activating my IElement like this (but it is really slow about 2 seconds for the popup to appear) :               pGraphicsContainer = activeView as IGraphicsContainer;      pGraphicsContainer.AddElement(pElement, 0);     pElement.Activate(activeView.ScreenDisplay);     activeView.PartialRefresh(esriViewDrawPhase.esriViewGraphics, pElement, null);      I also had a bad experience experimenting with dynamicdisplay. _**Below I've left the original post in case anybody wants to read it:_** What are the main steps to use to improve performance for an arcengine hosted in WPF with C#. It's super slow. I made a bunch of layer invisible which helped but its still no where near being snappy / usable. Edit: I load DataMaps10/streets_na/StreetMap North America.mxd and turn make the following layers invisible CanadaBoundaries, CoastalWater, Parks, Airports, Landmarks, UrbanAreas, USBoundaries(World-25m), USBoundaries(25-1.5m), USBoundaries(1.5m-0), CanadaBoundaries, CanadaCoastlineandProvinces(World-25m), CanadaCoastline(25m-0), CanadaProvinces(25-1.5m), CanadaProvinces(1.5m-0), Exits(Numbers)(15k-0) I haven't tried switching to Winforms, I don't exactly know how to do that. Edit 3: SO the problem is DynamicDisplayEnabled = true ruins EVERYTHING! so I turn it off... but now I want text that pops up when you hover over something... I was going to use dyanmic display for that, but dynamic display turns everything to crap ! I'm super frustrated.


How to drag a point and then use savestrategy in OpenLayers

Im trying to use the wfs-t in openayers using the savestrategy. I have created a savestrategy and it works when I for example uses the DrawFeature Control to add a point. A new point is added to the database. However, when I use the DragFeature control to move a point (in the same vector layer as I have added using DrawFeature) it doesnt work. The response from Geoserver is               <wfs:InsertResult>        <ogc:FeatureId fid="none"/>     </wfs:InsertResult>     <wfs:TransactionResult>        <wfs:Status>          <wfs:SUCCESS/>        </wfs:Status>      </wfs:TransactionResult>      And to me that looks like for some reasons no information sent regarding the fid that should have been moved. What could I havce done wrong? BR Mike


osm2pgrouting connection failed

I'm importing data from my OSM file to a postgresql database using osm2pgrouting. I followed everything in from here and it went smoothly, until I try using osm2pgrouting. This is what happens:               root@niceroute:/opt/osm2pgrouting# ./osm2pgrouting -file ncr.osm -conf mapconfig.xml -dbname niceroute -user postgres -host localhost     host=localhost user=postgres dbname=niceroute port=5432     connection failed      I looked in many forums but still I don't have the answer I'm looking for. Please help me. Thanks! UPDATE: My pg_hba.conf file:               # PostgreSQL Client Authentication Configuration File     # ===================================================     #     # Refer to the "Client Authentication" section in the     # PostgreSQL documentation for a complete description     # of this file.  A short synopsis follows.     #     # This file controls: which hosts are allowed to connect, how clients     # are authenticated, which PostgreSQL user names they can use, which     # databases they can access.  Records take one of these forms:     #     # local      DATABASE  USER  METHOD  [OPTION]     # host       DATABASE  USER  CIDR-ADDRESS  METHOD  [OPTION]     # hostssl    DATABASE  USER  CIDR-ADDRESS  METHOD  [OPTION]     # hostnossl  DATABASE  USER  CIDR-ADDRESS  METHOD  [OPTION]     #     # (The uppercase items must be replaced by actual values.)     #     # The first field is the connection type: "local" is a Unix-domain socket,     # "host" is either a plain or SSL-encrypted TCP/IP socket, "hostssl" is an     # SSL-encrypted TCP/IP socket, and "hostnossl" is a plain TCP/IP socket.     #     # DATABASE can be "all", "sameuser", "samerole", a database name, or     # a comma-separated list thereof.     #     # USER can be "all", a user name, a group name prefixed with "+", or     # a comma-separated list thereof.  In both the DATABASE and USER fields     # you can also write a file name prefixed with "@" to include names from     # a separate file.     #     # CIDR-ADDRESS specifies the set of hosts the record matches.     # It is made up of an IP address and a CIDR mask that is an integer     # (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that specifies     # the number of significant bits in the mask.  Alternatively, you can write     # an IP address and netmask in separate columns to specify the set of hosts.     #     # METHOD can be "trust", "reject", "md5", "crypt", "password", "gss", "sspi",     # "krb5", "ident", "pam" or "ldap".  Note that "password" sends passwords     # in clear text; "md5" is preferred since it sends encrypted passwords.     #     # OPTION is the ident map or the name of the PAM service, depending on METHOD.     #     # Database and user names containing spaces, commas, quotes and other special     # characters must be quoted. Quoting one of the keywords "all", "sameuser" or     # "samerole" makes the name lose its special character, and just match a     # database or username with that name.     #     # This file is read on server startup and when the postmaster receives     # a SIGHUP signal.  If you edit the file on a running system, you have     # to SIGHUP the postmaster for the changes to take effect.  You can use     # "pg_ctl reload" to do that.          # Put your actual configuration here     # ----------------------------------     #     # If you want to allow non-local connections, you need to add more     # "host" records. In that case you will also need to make PostgreSQL listen     # on a non-local interface via the listen_addresses configuration parameter,     # or via the -i or -h command line switches.     #                         # DO NOT DISABLE!     # If you change this first entry you will need to make sure that the     # database     # super user can access the database using some other method.     # Noninteractive     # access to all databases is required during automatic maintenance     # (custom daily cronjobs, replication, and similar tasks).     #     # Database administrative login by UNIX sockets          # JA: Set local database connections to "trust" in "pg_hba.conf" to be able to work with PostgreSQL as user "postgres".      #local   all         postgres                          ident sameuser     local   all postgres    trust          # TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD          # "local" is for Unix domain socket connections only     # JA: change to solve isssue on osm2pgrouting      #local   all         all                               ident sameuser     local   all         all                               trust     # IPv4 local connections:     host    all         all         127.0.0.1/32          md5     # IPv6 local connections:     host    all         all         ::1/128               md5           I hope this will make things clearer. :D


QGIS plugin WORKS under Windows but NOT under Linux. How to get fîle path properly under Linux?

I am currently working on a QGIS plugin which depits node to node discreet flows. Let' say adaption of Tobler's Flow Mapper to QGIS. **Plugin currently tested and working under Windows. But not under Linux or MacOS X.** As far as I can figure, this is due to a path problem where user chooses the output shapefile location. Here is what code look likes:               def OutputShp(self):         dlg = FlowMapperDialog()         fd = QtGui.QFileDialog(dlg)         global SaveShpName         global SaveShpDirectory         SaveShpName = fd.getSaveFileName(None, 'Shapefile(*.shp)', 'Type output shapefile name', '*.shp')     ...     ...some code...     ...          SaveDirectory = os.path.realpath(SaveShpName)     flowpyv07.shapefilemaker(FlowType,str(SaveDirectory), str(SaveShpName),str(InputMatrixName),str(InputNodesName),str(combotext))      **When I run it I get the following error:** Traceback (most recent call last): File "/home/user/.qgis//python/plugins/FlowMapper/flowmapper.py", line 1346, in run SaveDirectory = os.path.realpath(SaveShpName) File "/usr/lib/python2.7/posixpath.py", line 358, in realpath if isabs(filename): File "/usr/lib/python2.7/posixpath.py", line 53, in isabs return s.startswith('/') AttributeError: 'QString' object has no attribute 'startswith' Python version: 2.7.3 (default, Aug 1 2012, 05:27:35) [GCC 4.6.3] QGIS version: 1.8.0-Lisboa Lisboa, exported **However, if I enter the "SaveDirectory" path manually in the code such as "/home/user/Documents/" it works like charm. Thus I think I cannot get the path correctly.** Any suggestion is valuable since users regret if it does not work under Linux. If needed, full source code and plugin is avaliable from the QGIS repo: http://plugins.qgis.org/plugins/FlowMapper/


Mapnik Style Filter on River/Lakes Shapefile attributes (from Natural Earth Data)

As a followup to this question, I downloaded the vector data here:   * http://www.naturalearthdata.com/downloads/10m-physical-vectors/ and I successfully created the rasterized water/land mask I wanted: ![](http://dl.dropbox.com/u/143480/land-water-level-2.png) However, there are too many rivers at this level. ### Question Can I/how do I make use of the scale information in the 10m_rivers_lake_centerlines_scale_ranks.dbf file? ### Details (Part of this dataset) Note I can open the .dbf file in a text editor and see loads of interesting and hopefully useful data:               ...     River              0.300000012     River              Pivd. Buh     8       670670     River              0.349999994     River              Pivd. Buh     8       670670     River              0.200000003     Lake Centerline    Klarlven      8       677677     Lake Centerline    0.250000000     Lake Centerline    Klarlven           ...      (this is a random chunk of binary formatted by removing spaces and adding newlines) Using Nik2Img.py I run the following XML and get the overrun-with-rivers- results:               <?xml version="1.0" encoding="utf-8"?>     <!DOCTYPE Map>     <Map bgcolor="black" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs +over">            <Style name="landstyle">         <Rule>           <LineSymbolizer>             <CssParameter name="stroke">white</CssParameter>             <CssParameter name="stroke-width">0.0</CssParameter>           </LineSymbolizer>                <PolygonSymbolizer>             <CssParameter name="fill">white</CssParameter>             <CssParameter name="gamma">0.65</CssParameter>           </PolygonSymbolizer>         </Rule>       </Style>            <Style name="waterstyle">         <Rule>           <LineSymbolizer>             <CssParameter name="stroke">black</CssParameter>             <CssParameter name="stroke-width">0.0</CssParameter>           </LineSymbolizer>                <PolygonSymbolizer>             <CssParameter name="fill">black</CssParameter>             <CssParameter name="gamma">0.8</CssParameter>           </PolygonSymbolizer>         </Rule>       </Style>            <Style name="riverstyle">         <Rule>               <LineSymbolizer>             <CssParameter name="stroke">black</CssParameter>             <CssParameter name="stroke-width">0.15</CssParameter>           </LineSymbolizer>                <PolygonSymbolizer>             <CssParameter name="fill-opacity">0</CssParameter>             <CssParameter name="fill">black</CssParameter>           </PolygonSymbolizer>         </Rule>       </Style>            <Layer name="world" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">         <StyleName>landstyle</StyleName>         <Datasource>           <Parameter name="type">shape</Parameter>           <Parameter name="file">../10m/10m_land</Parameter>         </Datasource>       </Layer>            <Layer name="world" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">         <StyleName>landstyle</StyleName>         <Datasource>           <Parameter name="type">shape</Parameter>           <Parameter name="file">../10m/10m_minor_islands</Parameter>         </Datasource>       </Layer>               <!--       <Layer name="world" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">         <StyleName>waterstyle</StyleName>         <Datasource>           <Parameter name="type">shape</Parameter>           <Parameter name="file">../10m/10m_lakes</Parameter>         </Datasource>       </Layer>     -->            <Layer name="world" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">         <StyleName>riverstyle</StyleName>         <Datasource>           <Parameter name="type">shape</Parameter>           <Parameter name="file">../10m/10m_rivers_lake_centerlines_scale_ranks</Parameter>         </Datasource>       </Layer>          </Map>      Changing the appropriate riverstyle section to the following eliminates all rivers/lake centerlines instead of filtering anything by type (River vs. Lake Centerline) or scale/rank/thickness:                 <Style name="riverstyle">         <Rule>           <Filter>[River] >= 0</Filter>                <LineSymbolizer>             <CssParameter name="stroke">black</CssParameter>             <CssParameter name="stroke-width">0.15</CssParameter>           </LineSymbolizer>                <PolygonSymbolizer>             <CssParameter name="fill-opacity">0</CssParameter>             <CssParameter name="fill">black</CssParameter>           </PolygonSymbolizer>         </Rule>       </Style>      How do I/can I make some filter(s) for this?                     <Filter>[River] >= 0</Filter>           <Filter>[River] > 0</Filter>      I'm new to Mapnik and Natural Earth Shapefiles. I'm an experienced programmer so I'm willing to write code (Python, C#, etc.) if I need to but I'd like to use the tools available if possible.


ArcGIS local server using javascript api still does http gets to services.arcgisonline.com (internet)

We have setup a local server hosting the ArcGIS server software (10.1). We installed the ArcGIS JavaScript API on the same local server. Our goal is to supply maps when the client has no internet connection, only a local area connection. When we run the client (i.e. using the JavaScript API from the local server), we can see that all of the java script files are pulled from the local server. However, once our java script code calls new esri.Map, we see that the javascript code starts to pull map data from http://services.arcgisonline.com. I looked at the C:\ArcGIS\JavaScriptAPI33\arcgis_js_v33_api\library\3.3\jsapicompact\init.js code (this is where it resides on our local ArcGIS server) and I see many occurrences of http://services.arcgisonline.com. I am thinking I need to change all of these occurrences to be the local server but this was not a step in the installation instructions. Does anyone have any advice on how we can prevent the javascript from going to the internet for any files (map data, javascript data, css, etc). I understand that the javascript is the controlling code that makes this happen but I thought that esri would have handled that in their javascript logic. ### Edit Thanks for the input. I did follow only the steps given in the readme (I have changed nothing else). As I said, all the java script files come from the local server. Once I call "new esri.Map" in our java script code, I see the following "http gets" to services.arcgisonline.com:                1. services.arcgisonline.com/ArcGIS/rest/info?f=json      2. services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer?f=json&callback=dojo.io.script.jsonp_dojoIoScript1._jsonpCallback      3. services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer?f=json&callback=dojo.io.script.jsonp_dojoIoScript2._jsonpCallback      Also, you asked me "do we have any basemap or anything else in our map that comes from ArcGIS online?" My answer is no. But clearly (unless there is an ArcGIS bug) something is not working as we want it to because it ends up going to services.arcgisonline.com. Thanks again for the response, we really appreciate the help. As your response is implying, it seems I do not understand the basemap values since I am using hybrid for the local server. Sounds like I need a different value there. Once again, thank you very much for the help. Here is the code snippet:               var l_Options =     {     zoom: 10,     sliderStyle: "small",     basemap: "hybrid",     infoWindow: g_Popup,     nav: true     };          map = new esri.Map("map_canvas", l_Options);     dojo.connect(map, "onLoad",     function()     {         var l_ArcGISTiledMapServiceLayer = null;              switch (g_strMappingEngine)         {         case 'esriLocalServer':             /* ????             l_ArcGISTiledMapServiceLayer =             new esri.layers.ArcGISTiledMapServiceLayer(             l_strMappingDataAddress             );             ???? */             l_ArcGISTiledMapServiceLayer =             new esri.layers.ArcGISDynamicMapServiceLayer(             l_strMappingDataAddress             );             break;         case 'esriInternet':         default:             l_ArcGISTiledMapServiceLayer =             new esri.layers.ArcGISTiledMapServiceLayer(             l_strMappingDataAddress             );             break;         }              map.addLayer(l_ArcGISTiledMapServiceLayer);         ...


How to georeference a dxf?

I have got myself a dxf which is built with units in the wrong scale. How do I upscale that in QGIS? Note it does open in QGIS, just in the wrong map units and location.


How to rescale vector data?

I've got some old maps in dxf format. QGIS imports them correctly but with a nonsense scale. It can export the data it gets to shp of course. Does anyone know how to rescale vector data so it can be related to other maps? It doesn't have to be done in QGIS as long as the method is open source and it works on a format QGIS can handle (SHP is best, of course). Note that there seem to be two scales in SHP: the data I hand-imported using WKT shows the correct scale on the mouse, but the map scale indicated is nonsense, and print composer is affected the same way. I'd like to correct both types of problem.


Import shp to Postgis using Python and ogr

I just export a Postgis Table to shp using this tips but I'm not able to import a shp to Postgis using the same library(ogr). Any idea? Thanks a lot f.


Is there a good qml or sld file available for QGIS + Openstreetmap data?

I'm looking for a qml file (or equivalent e.g. sld) to allow me to use QGIS to take Openstreetmap data and produce paper maps. I'm re-asking this question (it was asked once or twice over a couple of years by other people) because I'm really surprised not to easily find such a thing already (I looked hard). I have found Anita Graser's styles \- which are good, but only style basic data like roads (and do so simply). I've successfully followed the directions for getting OSM data to work with. I've carried out some basic style editing successfully. I realise I could create my own styles for this purpose - but this seems like a very big job. I want a visually pleasing map taking into account most of the data available on OSM (i.e. not just streets, but tracks, paths, rivers, woods, lakes, buildings and so on). I'd have thought that there would be other people out there already doing the same... It seems odd to have to re-invent the wheel when both OSM and QGIS are open source / open data projects. I feel like maybe I've just missed the obvious repository of OSM qml files which resides out there on the internet somewhere if you know where to look... Thank you for any suggestions. Additional notes in response to query below... Ideally I'm looking for a Mapnik style rendering of the OSM data, but any equivalent properly developed and complete style would be good. At the moment the objective is to use this data to produce paper mapping, but simple use of the mapping as base data on which other geographic data can be displayed also requires a decent rendering. At work I use Ordnance Survey data completely styled to produce a full and very detailed UK map (the point being that I didn't have to design this styling, it came with the data). I realise that other tools exist for paper mapping, but the same issues tend to arise at one stage or another... I'm more or less successful in making the tool work for me in really basic terms, but to get to something visually useful I end up back with me either needing to re-invent a complete rendering style from scratch (beyond my skill), or encountering such a complex set of requirements for database setups or whatever that the process crashes and burns before I get anywhere useful. With a few more years of GIS experience I'll maybe be a database, CartoCSS (or whatever else) wizz... but until then I'm prevented from using the amazing resource that OSM provides by this one barrier.


How to connect points to line in Mapinfo?

I am using Mapinfo and Mapbasic. I have all the points stored in a DBMS. I have four columns with four points longitude and latitude. Is there any way to connect the points? I am using Mapinfo 10.5 with MySql as database.


Panning the map to certain extent javascript API

I want to limit map extent to the initial extent of the map and limit user from panning more than certain extent. I tried following but nothing has changed:               map = new Map( "map" , {             basemap: "gray",                 center: [-85.416, 49.000],             zoom : 6,             logo: false,             sliderStyle: "small"         });         var imageParameters = new ImageParameters();             imageParameters.format = "PNG";              dojo.connect(map,"onLoad",function(){             var initExtent = map.extent;                  dojo.create("div",{               className: "esriSimpleSliderHomeButton",               onclick: function(){                 map.setExtent(initExtent);               }             },dojo.query(".esriSimpleSliderIncrementButton")[0], "after");           });              dojo.connect(map, "onExtentChange", function (){         var initExtent = map.extent;         var extent = map.extent.getCenter();         if(initExtent.contains(extent)){}         else{map.setExtent(initExtent)}         });


Finding the closest Geometry in PostGIS

I've been looking over the PostGIS "API" of functions, and I notice that most of them take two elements to compare. For example, the ST_Distance function takes two geometry/geography elements to find the distance. There is no function to do something like: "Given a geometry G, give me the closest geometry GClosest in Table T where G.id <> GClosest.id" I realize I could write a PL/PgSQL function to iterate over the table and call ST_Distance on each element, but I'm hoping there's a better, more efficient, solution.


Populating a Dojo widget with country names based on an ESRI hosted layer

Wow, Javascript is not that easy - can someone help me make a simple breakthrough just to understand some basic concepts. Does anyone know how to populate a filteringSelect Dojo dijit with the names of countries from: http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/6 I have the following code to make a featureLayer:               countryLayer = new esri.layers.FeatureLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/6",{                               mode:esri.layers.FeatureLayer.MODE_SELECTION,                               setMaxAllowableOffset:maxOffset(map,1),                               outFields:["NAME"]                             });      I think the next step is to somehow loop through all the country names and populate the dijit - but I'm struggling with this. I have my HTML for the dijit something like this, but I'm not even sure if thats right:               <div dojotype="dijit.layout.ContentPane" title="Test" >                 <input id="filteringSelect" jsid="filteringSelect" data-dojo-type="dijit.form.FilteringSelect" data-dojo-props="                                                     placeHolder:'Country',                                                     store:countryStore,                                                     searchAttr:'NAME',                                                     name:'NAME'">             </div>


How to make smaller ArcMap PDF for use in InDesign?

I frequently build reports that incorporate ArcMap maps. The maps are all exported in PDF format. I am finding that there are so many line segments in the map that importing them at times is almost impossible. They also bulk up the report file, ballooning its size. What can the technician do to make the map file smaller since multiple layers are unnecessary in a print document?


How to style beautiful road maps with QGIS?

I am trying to design a beautiful map using Qgis. As I'm a software developer not a designer, I was hoping that this will be easy, but it isn't! There is a similar question here Qgis tutorials and resources but I would like to focus from "applications using Qgis" to "designing a map using Qgis". I was looking for some tools, style database or tutorials to guide me, but had no luck so far. New Advanced labeling in QGIS helped me a lot and OSM seems to look great: 1, 2. However I need to use my own shapefiles. Also there is Quantumnik. It could be a great help, however it prints map on another tab and I need it to be on the same with my Qgis project. So basically I am looking for a way to design a beautiful looking map using basic Qgis tools, any resources on that? Thanks


Unique Identifier for a POI

I'm collecting POIs data from several sources and plotting them on map, i'm having difficulties merging the POIs because some of them are redundant between the data sources i'm using. How can i assign a unique identifier for each POI in a ways that the implementation logic can figure out the redundancy, e.g. I have a starbucks in two of the sources each for the same branch, and there is slight difference in the long/lat value due to accuracy, how can i automatically identify th redundancy. Street names are not enough as they are not unique and might get updated from different sources, i was thinking of using the lat/long in addition to the first three letters of the POI, something like STA-31,444-30,122 but again the long/lat are not always the same between the different sources because of the accuracy, they might be off for a few meters. Thanks Yehia


Can arcserver be used to populate jquery autocomplete?

I would like to set up autocomplete on a text box using jquery autocomplete with data from an arcserver service. I'm wondering if this is possible and if so how i would implement it. I'm using the esri javascript api v3.3 and arcserver 10.1.


How to deal with versioning in OpenStreetMap?

The topic of managing geospatial data in a more general sense has come up before here. The topic of versioning was mentioned there as well, but not really dealt with. Traditional geospatial data collection and maintenance only need to deal with versioning internally, as the database is only updated from within the organization. This is not the case in crowdsourced geodatabases like OpenStreetMap. There, anyone can come along and add, modify or delete objects. In OpenStreetMap this is dealt with in a rudimentary way: each object has an integer version number, and only the object with the highest version is exposed in the live database. The database uses optimistic locking, so users must resolve all conflicts that occur when uploading contributions manually. This all works reasonably well as long as human contributions through the editors (JOSM, Potlatch) are the only mode of contribution - but they aren't. Increasingly, imports of open public sector data are conducted. These make for more complex versioning issues. Consider the following scenario:   1. A building object is being imported from an open public sector dataset   2. The building receives some modifications by human contributors (attributes, geometry, or both)   3. A new version of the public sector data becomes available and is imported. Currently, in step 3. the human contributions would be lost, unless each building that received community modifications is manually merged with the new import. How can OpenStreetMap deal with this situation? Do we need to look at distributed version control in software development? How can methods of DVC be adapted to deal with distributed spatial data maintenance?


QGIS Python Intro Text

After reading replies regarding starting a mapping business, I think I'd better read a Python book. Any intro-level Python books to recommend? Mila


How do I develop my GIS programming skills?

I would like to develop my GIS programming skills, where do I start? People say learn C++ or Python but where can I learn this in a geographic context? Tutorials or anything would be very helpful, as would any information on languages/programmes to use.


How do I access versioned spatial data in SDE with SQL queries?

We're running SDE and have several featuresets with versioning turned on. When I query those layers via ArcGIS Engine or ArcGIS Server, all expected features are returned. We have numerous non-GIS applications that use SQL queries to access information from the spatial data. However, we don't get all the features that I'm expecting to be returned. How do I access the features that have been added/deleted (and are, therefore, "hidden" from a straight SQL query)?