title: Editing Feature Class using ArcObjects

text: I have a problem with editing feature class using arc Objects.Indeed I am working on it for a while and cant find any solution into doing it..I asked a question before about how to connect to database and I thought the problem is with it but I find another problem..Here is my code:                          // getLayerFromGeoDatabase();             // Create the workspace factory.             Type factoryType = Type.GetTypeFromProgID("esriDataSourcesGDB.SdeWorkspaceFactory");             IWorkspaceFactory workspaceFactory = (IWorkspaceFactory)Activator.CreateInstance(factoryType);             IWorkspaceFactory2 workspaceFactory2 = workspaceFactory as IWorkspaceFactory2;             // Build a connection string.             String[] connectionProps =      {         "dbclient=SQLServer", "serverinstance=CRAZYVIRUS-HP",              "database=test", "authentication_mode=OSA"      };             String connString = String.Join(";", connectionProps);             IPropertySet propertySet = new PropertySetClass();             propertySet.SetProperty("SERVER", "CRAZYVIRUS-HP");             //propertySet.SetProperty("INSTANCE", "CRAZYVIRUS-HP");             propertySet.SetProperty("DATABASE", "land_gis");             propertySet.SetProperty("authentication_mode", "OSA");             //propertySet.SetProperty("PASSWORD", "123456");             //propertySet.SetProperty("VERSION", "sde.DEFAULT");                  //IWorkspace workspace = workspaceFactory2.OpenFromString(propertySet, 0);             IWorkspace workspace = workspaceFactory2.Open(propertySet, 0);             ESRI.ArcGIS.Geodatabase.IFeatureWorkspace featureWorkspace = (ESRI.ArcGIS.Geodatabase.IFeatureWorkspace)workspace; // Explict Cast             ESRI.ArcGIS.Geodatabase.IFeatureClass featureClass = featureWorkspace.OpenFeatureClass("test.DBO.test");                  ESRI.ArcGIS.Carto.IFeatureLayer featureLayer = new ESRI.ArcGIS.Carto.FeatureLayerClass();                       featureLayer.FeatureClass = featureClass;                            featureLayer.Name = featureClass.AliasName;             featureLayer.Visible = true;                  IWorkspaceEdit workspaceEdit = (IWorkspaceEdit)workspace;                  // Start an edit session. An undo/redo stack isn't necessary in this case.             workspaceEdit.StartEditing(false);                  // Start an edit operation.             workspaceEdit.StartEditOperation();                  // Create a row. The row's attribute values should be set here and if             // a feature is being created, the shape should be set as well.             IFeature feature = featureClass.CreateFeature();             feature.Store();                  // Save the edit operation. To cancel an edit operation, the AbortEditOperation             // method can be used.             workspaceEdit.StopEditOperation();                  // Stop the edit session. The saveEdits parameter indicates the edit session             // will be committed.             workspaceEdit.StopEditing(true);      I can connect to database but cant add features in it.I got a error in this line               IFeature feature = featureClass.CreateFeature();      it says               enter code hereUnderlying DBMS error[[Microsoft][SQL Server Native Client 11.0][SQL Server]Violation of PRIMARY KEY constraint 'R7_pk'. Cannot insert duplicate key in object 'dbo.TEST'. The duplicate key value is (0).]      I can connect to database using arc catalog and also I have enabaled versioning for featureclass in ArcCatalog..I am really confused with this problem..I have already used Create Enterprise Geodatabase for this database and also my feature class is empty some times I got this error on the same line I think there is sth wrong with code..Some how this code creates a new feature but is says this new one is duplicated:( **Update** I managed to make this code work               Type factoryType = Type.GetTypeFromProgID("esriDataSourcesGDB.SdeWorkspaceFactory");             IWorkspaceFactory workspaceFactory = (IWorkspaceFactory)Activator.CreateInstance(factoryType);             IWorkspaceFactory2 workspaceFactory2 = workspaceFactory as IWorkspaceFactory2;                  IPropertySet propertySet = new PropertySetClass();             propertySet.SetProperty("dbclient", "SQLServer");                  propertySet.SetProperty("DATABASE", "land_gis");             propertySet.SetProperty("authentication_mode", "OSA");                  IWorkspace workspace = workspaceFactory2.Open(propertySet, 0);             ESRI.ArcGIS.Geodatabase.IFeatureWorkspace featureWorkspace = (ESRI.ArcGIS.Geodatabase.IFeatureWorkspace)workspace; // Explict Cast             ESRI.ArcGIS.Geodatabase.IFeatureClass featureClass = featureWorkspace.OpenFeatureClass("test.DBO.test");                  ESRI.ArcGIS.Carto.IFeatureLayer featureLayer = new ESRI.ArcGIS.Carto.FeatureLayerClass();                       featureLayer.FeatureClass = featureClass;                            featureLayer.Name = featureClass.AliasName;             featureLayer.Visible = true;                  IWorkspaceEdit workspaceEdit = (IWorkspaceEdit)workspace;                  workspaceEdit.StartEditing(false);                  workspaceEdit.StartEditOperation();                  IFeature feature = featureClass.CreateFeature();                  feature.Shape = polygon;                  ISubtypes subtypes = (ISubtypes)featureClass;             IRowSubtypes rowSubtypes = (IRowSubtypes)feature;                  rowSubtypes.InitDefaultValues();                  int EnergyFieldIndex = featureClass.FindField("Energy");             feature.set_Value(EnergyFieldIndex, property_info[1]);                  int corp_typeFieldIndex = featureClass.FindField("corp_type");             feature.set_Value(corp_typeFieldIndex, property_info[2]);                  int PoolFieldIndex = featureClass.FindField("Pool");             feature.set_Value(PoolFieldIndex, property_info[3]);                  int irrigationFieldIndex = featureClass.FindField("irrigation");             feature.set_Value(irrigationFieldIndex, property_info[4]);                  int varietyFieldIndex = featureClass.FindField("variety");             feature.set_Value(varietyFieldIndex, property_info[5]);                  int treesFieldIndex = featureClass.FindField("trees");             feature.set_Value(treesFieldIndex, Convert.ToInt16(property_info[6]));                       int utilizatFieldIndex = featureClass.FindField("utilizat");             feature.set_Value(utilizatFieldIndex, property_info[7]);                       int addressFieldIndex = featureClass.FindField("address");             feature.set_Value(addressFieldIndex, property_info[9]);                  int water_hourFieldIndex = featureClass.FindField("water_hour");             feature.set_Value(water_hourFieldIndex, Convert.ToDecimal(property_info[10]));                  int owner_IDFieldIndex = featureClass.FindField("owner_ID");             feature.set_Value(owner_IDFieldIndex, Convert.ToInt16(property_info[11]));                  int w_sourceFieldIndex = featureClass.FindField("w_source");             feature.set_Value(w_sourceFieldIndex, property_info[12]);                  int w_incheFieldIndex = featureClass.FindField("w_inche");             feature.set_Value(w_incheFieldIndex, Convert.ToDecimal(property_info[13]));                       feature.Store();             workspaceEdit.StopEditOperation();             workspaceEdit.StopEditing(true);      I set feature.Shape = polygon; using this piece of code                   ESRI.ArcGIS.Geodatabase.IWorkspaceFactory workspaceFactory = new ESRI.ArcGIS.DataSourcesFile.ShapefileWorkspaceFactoryClass();     ESRI.ArcGIS.Geodatabase.IWorkspace workspace = workspaceFactory.OpenFromFile(string_ShapefileDirectory, 0);     ESRI.ArcGIS.Geodatabase.IFeatureWorkspace featureWorkspace = (ESRI.ArcGIS.Geodatabase.IFeatureWorkspace)workspace; // Explict Cast     ESRI.ArcGIS.Geodatabase.IFeatureClass featureClass = featureWorkspace.OpenFeatureClass(string_ShapefileName);     Polygon p2 = featureClass.GetFeature(0).Shape as Polygon;     SelectedFeature = p2 as IPolygon;      I get an error that says `Arithmetic overflow error converting expression to numeric` I think the problem is with one of myfields..How can I find which one makes this problem..I know that this error says that a field in the database is attempted to insert or update larger data of the same type or other data type but cant manage to find which one is it


title: Moving object of fixed dimension without distortion

text: I am trying to move a polygon object in a shapefile to a new location. I will perform an offset so that the process can be automated by shifting the object to a new geographic coordinate or moved by some defined distance from the current position. If the methods are different, let's focus on the shifting my rigid box to a new coordinate. The object has defined dimensions (say 10m x 10m) but the reference coordinate system is a geographic coordinate system. As such the dimensions change when I move it far from its current location. Facts to consider in the solution:   * ArcPy solutions will work   * Using ArcGIS Desktop 10.1   * A movement of the centroid would be acceptable, because it is the offset from the initial position that the object will be moved; alternatively it could be moved from any arbitrary point as long as the point is known   * The coordinate system is also arbitrary. The solutions can specify or be general in that regard.   * The process needs to be repeated 100s of times


title: Mapnik - Weird tiles rendering when used with spatialite

text: I use Mapnik in an GeoDjango App with Spatialite 4.0 as backend. There is something weird with the tiles that I suspect might be related with a bad handling of mbr with spatialite. If you look at those two images, the first is the tiles rendered in OpenLayers with a map.zoomToExtent on the features. If you look at the triangle in atlantic ocean you will see that the feature is not rendered entirely by Mapnik. The second image show the entire feature not tiled. ![enter image description here](http://i.stack.imgur.com/SpgkP.png)![enter image description here](http://i.stack.imgur.com/xHc0o.png) If I zoom in, the triangle continue to not be tiled correctly. If I zoom out a lot it finally appears. I use this query in Mapnik:               query = '(select ' + geometryField + ', "id" from "shapefile_feature" where' + ' shapefile_id=' + str(shapefile.id) + ') as geom'     datasource = mapnik.SQLite(file='C:\mygeosite\sqlite3\sql3.db',                                     table=query,                                     srid=4326,                                     geometry_field=geometryField)          featureLayer = mapnik.Layer("featureLayer")     featureLayer.datasource = datasource


title: Identify parcels that have two types of land use

text: I have two polygon layers in a geodatabase. One layer is land parcels. The other layer is land use. I want to identify the six largest parcels that contain both "upland forests" and "wetlands" (i.e. WHERE landuse = 4 AND 6 in a single parcels). How do I proceed???


title: How to move a value from field1 to field2 using Field Calculator?

text: Hi I would like to move value in field1 to field2. Purpose is to after that delete the column 'field1' to get a better column naming standard /Jan


title: Import garmin Topo map to QGIS

text: I would like to import my Garmin Topo Maps to QGIS. I want to use the Topo Map as a Layer to create Shapefiles. Can anybody tell me if it is possible to import the Garmin maps including waypoints as a vector layer in QGIS?


title: How to copy data from one table to another using cursors?

text: I'm going to be as descriptive as possible. I have a table (TA) with values which are null for some rows, filled out for others. I have a table (TB) with the null values filled out. Dec in TA is the shared value in TB (called Nulled in that table) I can't do a table join because this would duplicate the amount of nulled columns in the first table. The gist of what I want it to do is this: if CURR_TYPE (one of the columns) is null in TA, lookup its Dec value, go to TB, look for the same value under Nulled, copy TB's CURR_TYPE, and paste it onto TA's CURR_TYPE. This is what I have so far, and I've tried variations on things I've found here, but I get lost with how to tell python to LOOKUP in another field, copy and               # Import arcpy module     import arcpy               # Local variables:     TA = "F:...\\TA"     TB = "F:...\\TB"     TLDisNull = arcpy.AddFieldDelimiters(TA, "SponsorOrganization") + " IS NULL"          #Update rows     with arcpy.da.UpdateCursor(TA, "CURR_TYPE", TLDisNull) as u_cursor:             with arcpy.da.SearchCursor(TA, "Dec") as s_cursor1:                     for s_row in s_cursor1:                             with arcpy.da.SearchCursor(TB, "Nulled") as s_cursor2:                                     for s_row in s_cursor2


title: WFS Filter Buffer around a point

text: I'm trying to make a buffer around a geometry (point/s,linestring,etc) using **WFS** queries without luck. This is what I've been doing:                  <ogc:Filter>          ...                  <ogc:Function name="buffer">            <gml:Point>                 <gml:coordinates cs="," ts=""> x,y </gml:coordinates>                    </gml:Point>             <ogc:Literal>300</ogc:Literal>          </ogc:Function>                  ...           </ogc:Filter>      I read I could do it using Dwithin, but is it possible with the buffer? I'm pretty new with all this. Appreciate any help.


title: Is there a way to write single bands raster from multi-band layer faster in r?

text: I have 1000 multi-layer rasters and have to export each separate layer to a tif. Some friends recommended R to do the job. I used the following code:               library(raster)          namesVector<- c("layer1", "layer2", etc) #contain layer names          stack <- stack("multiLayerRaster.tif") #20 layers, total 2 GB          s <- unstack(stack)          for(i in seq_along(s)){writeRaster(s[[i]], file=namesVector[i])}      The code works fine, but it is very slow, it takes about 20 min to export layers from one multiLayerRaster. Is there anyway to make the process faster? Any advice is highly welcomed!


title: kml to kml conversion with XSL

text: I have a simple KML file witch I get with ogr2ogr where all placemark are 2D polygon like this one :               <Placemark>     <Style>     <LineStyle><color>ff0000ff</color></LineStyle>  <PolyStyle><fill>0</fill></PolyStyle>     </Style>     <ExtendedData><SchemaData schemaUrl="#BATI">     <SimpleData name="HAUTEUR">5</SimpleData>     </SchemaData></ExtendedData>     <Polygon>     <altitudeMode>relativeToGround</altitudeMode>     <outerBoundaryIs>     <LinearRing>     <altitudeMode>relativeToGround</altitudeMode>     <coordinates>     5.210274804171726,45.193994541274471,0 5.210273193448314,45.193992448578285,0 5.210244307501982,45.194002928913058,0 5.210153551080012,45.193930862320109,0 5.209984563035429,45.194038696922476,0 5.210076592373608,45.194110738456011,0 5.210146416870383,45.194072424624984,0 5.210176223631215,45.194092352007594,0 5.210274804171726,45.193994541274471,0     </coordinates>     </LinearRing>     </outerBoundaryIs>     </Polygon>     </Placemark>      I would like to convert all of them to polygon with extrusion. The value of z coordinates is define by the value of "HAUTEUR" extended data. Heres it's 5 meters :               <Placemark>     <Style>     <LineStyle><color>ff0000ff</color></LineStyle>  <PolyStyle><fill>0</fill></PolyStyle>     </Style>     <ExtendedData>     <SchemaData schemaUrl="#BATI">     <SimpleData name="HAUTEUR">5</SimpleData>     </SchemaData>     </ExtendedData>     <Polygon>     <extrude>1</extrude>     <altitudeMode>relativeToGround</altitudeMode>     <outerBoundaryIs>     <LinearRing>     <altitudeMode>relativeToGround</altitudeMode>     <coordinates>     5.210274804171726,45.19399454127447,5 5.210273193448314,45.19399244857829,5 5.210244307501982,45.19400292891305,5 5.210153551080012,45.19393086232011,5 5.209984563035429,45.19403869692248,55.210076592373608,45.194110738456,5 5.210146416870383,45.19407242462499,5 5.210176223631215,45.19409235200759,5 5.210274804171726,45.19399454127447,5      </coordinates>     </LinearRing>     </outerBoundaryIs>     </Polygon>     </Placemark>      I tought that a XSL Stylesheet is the best and the easiest way to process but I don't figure how to start. Does someone as ever manage it?


title: Clipping Rasters from Mosaic Dataset in their Original Coordinate System

text: I am building a large mosaic dataset that contains several hundred rasters, which are spread across three UTM zones. My goal is to be build a tool in ArcMap (most likely within model builder) that will clip the mosaic dataset by a user-selected shapefile, which would then be exported for use in another software program. The secondary software utilizes 8 digit UTM coordinate systems (i.e., has the UTM zone number in front of the easting). As such, I've made custom coordinate systems covering the study area which have the UTM zone number included in front of the false easting (e.g., UTM zone 14N would have a false easting of 14500000m and so on). The rasters in the mosaic dataset are already projected in these custom coordinate systems, but the mosaic dataset itself is in WGS84 World Mercator, although that could be changed if it would help. Whenever I clip the mosaic dataset via feature class, the output raster is in the coordinate system of the mosaic dataset (WGS84 World Mercator), while I would like it to be in the orginal coordinate system of the source raster. I'm looking for a way to either retain the coordinate system of the source raster(s) when clipping or automate a tool to project them in the correct coordinate system based on their location or UTM zone. I have added the correct UTM zone of each source raster in the mosaic dataset's attribute table, but don't know where to go from here. I'm not very familiar with Python or programming in general, so I would prefer to create a tool in model builder, but I am not opposed to making a python script if that's the only potential method. Thank you in advance for any ideas. Edited to add: One idea, although I'm not sure how to execute it, would be to run an If Then type statement on the location of the feature class used for clipping. I.e., if the feature class is within a shapefile representing Zone 15, then use 'X' projection. If the clipping feature class is within a shapefile representing Zone 14, then use 'Y' projection, etc. Edited in response to Michael's comments: Great, thank you, I'll work on integrating that script. Looking at this link http://resources.arcgis.com/en/help/main/10.1/index.html#//002w00000022000000, I am eventually trying to build a similar true/false type logic. The goal would be to run a script testing which UTM zone the clipping shapefile is in, and then using the results of that statement to set the coordinate system for the extraction process. Any thoughts on how to accomplish that? I was thinking testing whether the extraction shapefile's centroid is contained within a shapefile representing an entire UTM zone. IF I had 3 shapefiles (one for each UTM zone in the study area), the extraction shapefile could be tested somehow to see in which shapefile it is contained, thus providing a "true" response in that instance. Something along the lines of "if the extraction shapefile's centroid is within the zone 14 shapefile, use coordinate system A. If the extraction shapefile's centroid is within the zone 15 shapefile, use coordinate system B" etc. I hope that makes sense.


title: Determining homogenous blocks of individual tree species in a woodland, and creating a new shapefile without blocks/polygons of < minimum area?

text: I'm working on a project attempting to identify suitable woodland habitat for red squirrel translocation wherein conservation efforts could be focused. Below is a small section of the map showing where individual tree species polygons have been dissolved, using a 100m buffer dissolve, to appear as larger "wooded area" polygons. For the purpose of my project, I want to identify suitable forest areas over 200ha in size, with a suitable make up of tree species. To do this I need to determine homogenous blocks as seperate from those they are not in contact with, and then determine the size and make up of these blocks. There are ~150,000 polygons in the shapefile, so manually selecting each is not a possibility. I think some form of spatial dissolve would be most suitable, Identifying one homogenous block as "Block 1" for example, and then using Select by Attributes to create a new shapefile with only polygons ("Blocks") with an area greater than 200ha. I am, however, unsure in how to do this. (I am very limited in my knowledge of GIS, and had the help of a phd student as well as some on here in getting this far). Thank you for any help you can give. EDIT: USing ArcGIS/ArcMap for Desktop 9.3, with ArcInfo licence type. ![Individual tree species polygons dissolved \(with 100m buffer dissolve\) to appear as larger "wooded area" polygon](http://i.stack.imgur.com/ExNmL.png)


title: How to get the maximum value from a multiple values output (list of numbers) using calculate value in ModelBuilder

text: I have an output from a sub model that iterates through feature classes, each with a row count. The row counts are passed to a collect values, which is a model parameter and is used outside the sub model. My question is how can i use simple code in a "calculate value" tool to get the maximum value from this list of numbers. I wish to then use this as a precondition to subsequent analysis so that if the sub model does not produce results then the subsequent analysis will not run. This is similar to a previous question that wished to use the actual list of numbers. The answer suggested an export to .csv file. I only need to use a simple output so that I can use it as a pre condition on subsequent analysis. I have tried to calculate the Max(list), but it has not worked. I would be very grateful for any tips on how to write this into the Expression and Code block.


title: Python: best practise to ceate a large shapefile

text: What is the best approach to create a create a very large shapefile (close to the max of 2GB) using python? Best approach means: robust and fast. Above all fast.


title: How can a truck network be built / extracted using osm2po?

text: Is it possible to adjust the config of osm2po to build a truck / lorry (in German: LKW) network?


title: If Then Else in ArcGIS model builder

text: I have a model which iterates through feature classes in a geodatabase. For each feature class, it runs the check Geometry tool. I then use the "Get Count" tool to count the number of rows in the output table. I then want to add an expression where if the number of rows is greater than 0 it should keep running the rest of the model, otherwise it should go on to the next feature class. I thought this could be achieved by using the Calculate Value tool using the following code. Expression               CountMe(%Row Count%)      Code Block                def CountMe(n):          import arcpy          if n > 0:           return "true"          else:           return "false"      Where %Row Count% is the output from the "Get Count" tool. This returns True and False values, and I have the output from this set as a precondition to the next steps in the model. However, I assumed that only "true" data would go through, but all the data seems to go through i.e. the model will push through an empty table from the Check Geometry tool all the way to the end. I've had a read online and I think that using the Calculate Value tool is the wrong way to go about this. Am I right in assuming that what I need is a python script that will give me 2 outputs (True and False) and then I can connect the "True" as a precondition to the rest of the model, and leave the "False" disconnected, so the model stops and the iterator goes on to the next feature class? If so, would anybody be able to give me some help with this? ![Model structure](http://i.stack.imgur.com/2ieyp.jpg)


title: How do I sort polygons by their latitude?

text: We have a set of polygons which we would like to sort and number according to their latitude. This will make it easier for local authorities to relate to the numbers of the objects. I have looked around and not found any "out-of-the-box" solutions. Any suggestions for how to solve this using ESRI tools or open source tools are interesting.


title: Critera for geometry or geography

text: What criteria do you need to take account to before you choose geometry or geography map? Is there a book or page about it?


title: Output of QGIS raster clipper not as expected?

text: My goal is to clip a raster with a polygon in QGIS 1.8. Based on an article I read, this should be a pretty straightforward task. However, the output appears to be empty. The raster produced is the same size as the original. The metadata for the output raster shows that it is the same extent as the original, with the same pixel size, same number of bands, but there is no information about the content of the bands. I've attached a screenshot of the parameters I am using for the clip. I have done this two other ways, all with similar results. The first is with the NoData value set to 32767, which is the same as the NoData value of the input raster. The second is with 'Create an output alpha band' checked, which creates a 2-band raster that is otherwise identical to the output described above. I would very much appreciate it if someone could critique my parameters, and suggest what I might be doing wrong. My OS, if that is important, is Ubuntu 12.04, and I'm using the KDE desktop. ![enter image description here](http://i.stack.imgur.com/dP7FS.png)


title: Ordnance Survey TOIDS: converting from strings to integers

text: I'm planning to load a number of OS datasets into Postgres/PostGIS. In order to save space and speed up queries, I'd like to strip the 'osgb' off the front of the TOID strings and then store the remaining number as a bigint. Are there risks (or outright problems) with this? I'm guessing that the numeric part of the TOID string is itself unique, but I know that some TOIDs have 13 numeric digits and some 16, and I'd like to be sure that any leading zeroes that follow 'osgb' aren't material to the number- part. This would be an issue if, e.g., there were two TOIDs in the same dataset as follows, where stripping off the 'osgb' would result in the same number:               osgb0000123412341234     osgb0123412341234       Thank you.


title: ArcGIS Geoprocessing: Join multiple fields to a table and export new table as join field name

text: I am bit new to geoprocessing and ModelBuilder. I am using join field tool to join table (info tables/.dbf) to one a shape file. I am trying to use ModelBuilder, as there are around 100 tables (each with 5 columns X 50-150 rows), each has to be joined with one shape file (3 column X ~2 million rows). After the join new shape file has to be saved as respective field table’s name. Any help will be much appreciated. Thanks in advance, Ankit


title: Displaying .gdb content(Feature classes) in winidows forms

text: I am having a .gdb file(World.gdb). I want to display or i want to see the content of this gdb file in winForms programmatically(C#). How can i do it? I dont want to view via ArcCatalog. Please help soon. Regards, Arun


title: Displaying QGIS layer after loading with Python

text: I'm successfully loading several layers with Python, but can only get to see them in the map window if I manually zoom to extent afterwards. Once the last layer is loaded I call zoom to extent in the code on the layer, but it seems not to have an effect. Ending the loading with iface.mapCanvas().refresh() similarly have no effect. I've looked at these two related forum posts 1 and 2 respectively, but not found an answer to why I can't see the layer. What am I missing?


title: How to add event listener to many markers on the map?

text: How can I add an event listener to many markers on the map? I know how to add an event listener to a single marker say:               var marker = L.marker(...);     marker.on('dragend',function(){...});      So, how can I add an event listener to many markers on the map? In jQuery, you can select objects like this (example):               $(".marker").on("click",function(){...});      So this code applies it to all things with class marker. Is there something similar to this with Leaflet?


title: How to convert shapefile to mapinfo file preserving special characters?

text: I have to convert a bunch of shapefiles to mapinfo files on a machine without a MapInfo license, so I am using ogr2ogr to perform this task. The problem is that when opening the mapinfo files in MapInfo Professional, the table's Portuguese characters like Ã are not there any longer. E.g.:   * SÃO PAOLO = SÃfO PAULO    * BRASÍLIA = BRASÃLIA    * GOIÂNIA = GOIÃ,NIA When opening the same input shapefile through MapInfo Professional (File|Open|Choosing Windows US & Western Europe (ANSI)), I do get the correct result. I tried lots of different combinations in ogr2ogr using:   * SHAPE_ENCODING   * -lco ENCODING   * intermediate formats (conversion in 2 go's)   * etc. I cannot seem to get it right. Does anyone have **THE** solution? :-)


title: How can I take a large netcdf and convert it to interpolated values in a different set of coordinates?

text: I've got a large netcdf (a small portion of the data is here) with the data in an even grid associated with an Albers Equal Area Conic projection. I've got the corresponding latitudes and longitudes here and here. I want to take the information in this netcdf, and get interpolated values along a regular lat/lon grid, from 18.2W to 53E and 32.8S to 20N. For output, I'd like a 3-dimensional array with the x, y, and z axes being lon, lat, and time. Or a set of rasters that I can coerce to a 3d array in R. How can this be done? I know that I could write an R script where for each point in my regular lat/lon grid I identify the four nearest surrounding Albers points and take their inverse-euclidian-distance-weighted average. But this will be painfully slow to compute and difficult to program. Are there any programs or tools that can help me to batch-interpolate a netcdf with a deep time dimension? I'll have >100 of these to do, and each grid is 1152x1152. I'd really appreciate solutions in R, or anything that can be run in some sort of batch mode. **EDIT** Thanks all for the comments and the answer. This was a case where I simply didn't know the names of the tools to use. Apparently, the "projectRaster" function in the `raster` package (which relies on gdal) does what I need once I coerce my netcdf slices into raster objects. I had to do a bit of digging in metadata and obscure documentation to figure out proj4 syntax, but that was the extent of the difficulties.


title: Unique Natural Area Code (NAC) for a building

text: NAC is a geocode system for identifying an object anywhere on the Earth. I am going to assign a unique NAC address for each building in Detroit. But different NAC addressed can be assigned to each building, because the building is an area with a different range of latitude and longitude and so it can be assigned a range of NAC, not just a unique one. Does any one knows how can I choose a single unique NAC for a building? Or what software I can use to assign NAC addresses to buildings? I have read somewhere that you can assign the NAC of the centroid of a building as a NAC of that building. But I do not know how much this is true. (You can see a house here with different NAC addresses) ![enter image description here](http://i.stack.imgur.com/mFLPA.jpg)


title: label vector line with multiple attributes in QGIS

text: I have a line with two 2 attributes. I would like to display both information along with the line in frequent interval, one info above the line and the other is below the line. I am working in QGIS 1.8.0-Lisboa software.


title: wastewater utility web app

text: I'm trying to create a web-based GIS wastewater utility application integrated with with some maintenance system in the same interface so that for example any problem in the wastewater utility network can be located and a work order will be created for this problem. How can I start creating such an application and what tools do I need? thanks


title: Vector Layer Label is truncating/rounding value

text: I cannot figure out how to keep OpenLayers from truncating my vector layer label. For example, I have a value of 0.00 and want to show both significant digits, but it always makes it an integer 0. Is there a way to do this? ![enter image description here](http://i.stack.imgur.com/98iuY.png)


title: database using arcgis

text: i want to know, can arcgis software do the database such as oracle or ms access?? for example, create own database and form?? and can the database in arcgis read the programmer program such as from matlab or visual basic. i want to create component maintenance in this software and the component link each other. but i want to use arcgis because i want to show database with the image when we click on the object. so, it is compatible to choose arcgis software to complete my project.


title: Read height data from Meridian 2

text: I'm having difficulties reading the Gridded height data (OS Meridian 2). I'm loading with OSGB 1936 reference system but have trouble finding the lat/lon data for each point. i.e.I open the attribute table to see three columns FEATURE_SE, FEATURE_CO, and HEIGHT. I know the data loads correctly, as it produces the right shape map but don't know how to query the height at a position as I can't figure out how the Feature_se and feature_co link to lat/lon, or OSGB references. Thanks if more information is needed please ask and I'll try and find it.


title: Sharing a Folium Interactive Map w/ Embedded Markers

text: I have been experimenting with a few Python packages that have great potential for my dissertation research. Since I use pandas for pretty much everything, geopandas was a natural choice for working with spatial data (within the range of capability of the package), and the interactive properties of folium are ... sweet. In any case, I want to be able to share the maps that I have made with other folks who are not using or even familiar with IPython Notebook. My test case is plotting the location of traffic cameras in DC. (The shapefile is provided to the public by DCGIS via opendatadc.org, a new and growing source for District info.) The Notebook Viewer seemed like an obvious choice, but as can be seen from my rendered gist, the maps are 1) static, and 2) displayed only in their final form. (Markers were not added until the last map, even though they appear in the first one.) I then thought I could leverage Mike Bostock's awesome viewer for interactive graphics, bl.ocks.org. I am missing something, however, because while my map is now interactive, the markers have disappeared. Has anyone run into this problem? Any help would certainly be appreciated.


title: Is a Country/State/City Database available?

text: I asked this question Stack Overflow but I was informed that I would get a better to this question here because it's not related to programming. I am creating a directory which uses locations to categorize all listings. Instead of relying on user input, I'd like to provide a list of locations which the user can select. I have already tried GeoWorldMap which is provided by GeoBytes but it has certain issues. For example, it lists 275 countries. Other than that, their database is updated on a regular basis so that means if I maintain a local database, I'll need to update it every now and then to make sure it's up to date. I want to know what developers use for this? Instead of a database, do they use some service to fetch a list of locations? I am afraid manual user input is not an open option because categorization by location is going to be essential so I cannot trust or rely on what the user enters manually. I have seen few sites doing this so I am sure there is a practical solution out there.


title: Getting OpenLayers Working in jsFiddle

text: Has anyone else noticed a problem getting OpenLayers to work within jsFiddle? I can't see what's wrong with http://jsfiddle.net/dPdhZ/ or the others I've mentioned here: http://stackoverflow.com/questions/10075862/trouble-getting-openlayers- examples-with-jquery-working-in-jsfiddle But it's frustrating when they work fine as a static HTML document but not in a social, sharable format like jsFiddle. EDIT: Don't assume that works and be cautious with using 100% widths/height on CSS for the map in jsFiddle.


title: How to convert Grid North & Grid East into latitude and longitude?

text: We have grid north and grid east data that we have received for address information. How can this be converted into latitude and longitude? I am not sure what format this grid_east and grid_north data is in, but it seems to uniquily identify a record. The numbers are integers. (large) Here are some examples: (They are in Upstate New York) 6 HERON WAY NORTH 14450 GRID EAST: 803160 GRID NORTH: 1122110 16 CROSSWINDS CIR 14450 GRID EAST: 819252 GRID NORTH: 1123388


title: getting scratch and current workspace ArcGIS10 using Java

text: I'm trying to get the scratch and current workspaces returned as path names (Strings) using java in ArcGIS10. however I can't seem to get anything returned. I'm guessing it's to do with accessing the environments in Arc but the API is woeful.


title: OpenLayers & GeoJSON files

text: After some hunting, it seems that if I have an a geojson file, I NEED the data and map to be on a server in order to view this in OpenLayers because of the protocol class. I saw an example where I can basically read the file as a javascript object by inserting it into my code. But there must be a way to simple throw my .json file without a server - right? I was able to do it with leaflet... I'm a newbie at this so any help would be much appreciated!


title: Comparing printed nautical charts to GPS coordinates

text: I'm just getting my head wrapped around the various geodesic systems. I have some (printed) Finnish nautical charts I'm trying to match to GPS coordinates. Given the number of underwater obstacles, I'm trying to make sure I'm doing this correctly. The charts simply state "Longitude from Greenwich" for East- West and are published in 2002, but otherwise have no technical information on the coordinate system used. According to this post (http://www.kolumbus.fi/eino.uikkanen/geodocsgb/ficoords.htm) I'm suspecting that the maps are in fact using a "KKJ" system which is based on ED50. So, just to sanity check my understanding, the fact that I'm looking at a map with deg Lat/Long does not mean that these actually match up to GPS coordinates? Of course I can buy a complete new set of maps for 39euros to find out, but wanted to at least see if I got all this right ...


title: OpenLayers getFeature loading indicator

text: I need to set up loadMask for OpenLayers.Control.GetFeature. I know i should hide the mask on featureselected event or on protocol callback but when should i show the mask? Here is code (assume i have _mask global variable with show and hide methods):               var selectionControl = new OpenLayers.Control.GetFeature({                 protocol: this.map.layerUtils.createWFSProtocol({featureType:featureType, srsName:'EPSG:'+ this.map.projectionCode}),                 clickout:true,                 box: true,                 toggleKey: "ctrlKey"             });          selectionControl.events.register("featureselected", this, function(e) {                 _mask.hide();             });


title: Create road speed limit segments with linear referencing

text: I have a route-feature class and a point feature class with speed limit signs. In ArcMap I am capable to reference the signs on the route with help of a reference field and using the locate features along a route tool . So now I have the signs referencend on the routes and these referenced signs have a measure-field. Now I am trying to create a line or route feature class with speed limit information on it but I can not find out how? The goal is that I have route segments that say: on route 1, from 0m to 1000m speed limit is 50kmh, from 1000m to 1337m speed limit is 80kmh and so on... Any help is appreciated!


title: python script in modelbuilder: get field value and return boolean expressions

text: I have problems integrating a python script in a modelbuilder tool. I'm a absolute beginner with python. Maybe there's also an easier way to solve this problem in modelbuilder without using a python code, but I haven't found it yet so here's my problem: my modelbuilder tool's flow of control needs to evaluate a situation and decide on one of two courses of action: If the value in the field "Building" in my feature class is 1, it should follow one path, if the value is greater than one it should follow another path. Here's my python code that I tried so far, but didn't work.               # Load the arcpy module     import sys, os, arcpy          # Get the input feature class from the model     InputFC = arcpy.GetParameterAsText(0)     field = "Building"     cursor = arcpy.SearchCursor(InputFC)          # check if one or more than one building footprint exist     for row in cursor:         Building =(row.getValue(field))         if Building == 1:             arcpy.SetParameterAsText(1, "True")             arcpy.SetParameterAsText(1, "False")         else:             arcpy.SetParameterAsText(1, "False")             arcpy.SetParameterAsText(2, "True")      any help on this problem is much appreciated regards nicolas


title: need help with Legend in ArcGis JS Api 3.4

text:
I've been told to write up a small site which displays data from our ArcGis server. As a first time user of the ArcGis Api I instantly ran into a serious problem. I am creating a map with a datagrid below just like in this code sample. Afterwards I want to implement a legend on the right hand side, but the div- container stays empty and does not display a legend. Following the code sample for the stand alone legend it works just fine. Besides this crucial problem, there is a minor question which popped up while trying to solve this issue: I am using dojo.require() und require() alongside. Eliminating dojo.require() _or_ require() results in js. errors in my code. Please point me to my errors and tell me where I went wrong. Thanky you in advance Code:               <!DOCTYPE html>                 <meta charset="utf-8">       <title>Map with a Dojo dGrid</title>            <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/js/dojo/dojo/resources/dojo.css">       <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/js/dgrid/css/dgrid.css">       <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/js/dgrid/css/skins/tundra.css">       <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/js/dojo/dijit/themes/tundra/tundra.css">       <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/js/esri/css/esri.css">

                 This pane could contain tools or additional content


title: GeoServer - change Master Password - masterpw.info missing

text: I'm using GeoServer 2.5.1 and I want to change my default Master Password as is suggested by GeoServer itself when I log in: > The master password for this server has not been changed from the default. > It is highly recommended that you change it now. Change it The `Change it` link leads me to the Change password form, though I need the default Master Password for this. According to this doc, I'm supposed to find it it at `security/masterpw.info`, however the only files I find there are `masterpw.digest` and `masterpw.xml`. I've tried a bunch of sequences that looked like pws from these files and a file `passwd` in `security/masterpw/default` but all I am ever getting is > org.geoserver.security.validation.MasterPasswordChangeException: Current > master password invalid This is reproducible on two different servers and plenty of fresh installations. Am I overseeing something? How can I change my masterpw without `masterpw.info`?


title: Orthographic reprojection with mapnik

text: I am trying to create a google earth like wep application. **My problem is that I can't get to render a full view of the earth.** The `zoom_all()` function generates the following error :               RuntimeError: could not zoom to combined layer extents using zoom_all because proj4 could not back project any layer extents into the map srs (set map 'maximum-extent' to override layer extents)      And if I define an envelope, I can only manage to have a cropped view of the earth with               mapnik.Envelope(-4500000, -4500000, 4500000, 4500000)      or a blank image with               mapnik.Envelope(-4600000, -4600000, 4600000, 4600000)      **EDIT** : I also tried specifying `maximum-extent` in the xml file but the result was the same as specifying the envelope in the python script. **What am I doing wrong ? Any hint will be appreciated :)** My configuration is :   * WGS84 shapefile coastlines-split-4326.zip (http://openstreetmapdata.com/data/coastlines)   * mapnik 2.2.0-pre   * archlinux This is the python script that renders the image :               #!/usr/bin/python2          import mapnik          image = 'world-xml.png'     map_config = 'world.xml'     m = mapnik.Map(1000, 1000)     mapnik.load_map(m, map_config)     bbox = mapnik.Envelope(-4500000, -4500000, 4500000, 4500000)     m.zoom_to_box(bbox)     mapnik.render_to_file(m, image)      And this is the xml config file :               <Map background-color="#ffffff" srs="+proj=ortho +lat_0=0 +lon_0=0 +ellps=WGS84 +units=m +x_0=0 +y_0=0 +no_defs">             <Style name="projet-carte">                     <Rule>                             <PolygonSymbolizer fill="#ffffff" />                             <LineSymbolizer stroke="#000000" stroke-width="0.1" />                     </Rule>             </Style>             <Layer name="world" srs="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs">                     <StyleName>projet-carte</StyleName>                     <Datasource>                             <Parameter name="type">shape</Parameter>                             <Parameter name="file">lines.shp</Parameter>                     </Datasource>             </Layer>         </Map>


title: How to interpret a Raw AIS data sample

text: I found a file that contains about 85,000 messages (3 minute live AISHub feed), but I can't make heads or tails of it. http://www.aishub.net/nmea-sample.html               !AIVDM,1,1,,A,13aEOK?P00PD2wVMdLDRhgvL289?,0*26     !AIVDM,1,1,,B,16S`2cPP00a3UF6EKT@2:?vOr0S2,0*00     !AIVDM,2,1,9,B,53nFBv01SJ<thHp6220H4heHTf2222222222221?50:454o<`9QSlUDp,0*09     !AIVDM,2,2,9,B,888888888888880,2*2E      Q: Is there a schema somewhere?


title: ST_Line_Locate_Point between two spatial relations with PostGIS

text: I am trying to calculate the closest edge and its offset for a relation of points. If using only one point that approach works fine, but if I have several points in the relation I do not know how to do that, because it always return all the edges within the range i specify (here 100). By setting the limit this does not give me the correct answer. What i need is the following: join each tuple of the vertex relation with each tuple of edge relation and return the closest edge to the current vertex. Any idea how to solve this problem? thanks for any suggestion. Markus               SELECT L.ID, ST_Line_Locate_Point(L.EDGE_GEO,L.POINT_GEO)*L.LENGTH AS OFFSET,   l.node_id     FROM (     SELECT E.ID, E.GEOMETRY EDGE_GEO, E.LENGTH, N.GEOMETRY POINT_GEO, n.id node_id        FROM      BZ_EDGES E, BZ_VERTEX N     WHERE E.EDGE_MODE=0     AND st_dwithin(E.GEOMETRY,N.GEOMETRY, 100)     ORDER BY node_id, st_distance(E.GEOMETRY,N.GEOMETRY)) L      In Oracle Spatial this approach works fine:               SELECT id, dist, offset, node_id     FROM (     SELECT sdo_nn_distance(1) dist,     SDO_LRS.get_measure(SDO_LRS.PROJECT_PT(     SDO_LRS.CONVERT_TO_LRS_GEOM(e.geometry), v.geometry)) offset,     e.*, v.id node_id     FROM BZ_EDGES E,BZ_VERTEX V     WHERE      sdo_nn(v.geometry,e.geometry, 'SDO_NUM_RES=1', 1 )='TRUE')


title: calculate slope for a road network

text: I am working on a road network for routing operations using postgis and QGIS. I am new to both of these tools and need to calculate the slope for each edge (by retrieving the Z value for the start and end node for the edge from a raster). Any ideas of the best approach to this? I know postgis can dump points and get the value from a raster, but can I get the slope attribute to the edge without breaking the network topology (with edges that have corresponding start/end nodes) using this method? thanks


title: Rasterize a vector layer in PostGIS

text: Related to this question asked here on gis.se and this thread on postgis-user, has anyone worked out a good solution for in-database rasterization of a vector layer using PostGIS? It sounds like the necessary functions are available and it is possible to get a valid output, but not one that is readable by GDAL et al. because it has irregular tiles. To be more specific, I would like to rasterize two distinct vector maps of the US, counties and NBCD mapping zones, to a particular resolution and both aligned with an existing raster. It is possible to do this with gdal_rasterize, but with some trial and error as I recall -- mainly because the extents of the three inputs do not match, I expect. Any thoughts?


title: Is 'Shortest Route/Distance' analysis is possible in Geoserver using Openlayers 2.8...?

text: I have configured a web based GIS Map using Geoserver & Openlayers controls.Now I want to add 'Shortest Route' analysis in the same... Any solution....??? Thanks In advance Regads Sandipan


title: Python script: Access data from databases

text: I need to access data that is inside an oracle database using a python script. Its a Unix server running oracle 10g. I dont have much access to the database server. It works fine on model builder when the connection is open and I add my data, but exporting it to python means all the connection properties are gone (they are just "TABLE NAME" etc.) Bascially the script grabs this information based on a query, lets say "SELECT id WHERE Status = 0", and it writes it to a new table in a filegeodatabase. I need to do it through python as I am processing it further, but thats not my issue. I just cant get it to connect. I've tried to use pyodbc plugin using the syntax below:               cnxn = pyodbc.connect('DRIVER={SQL Server};SERVER=rtsprod;DATABASE=DBNAME;UID=USERID;PWD=PASSWORD')      Now i know its an oracle database but cant find any doco on how exactly to connect using the pyodbc plugin. Is there a better way? Thanks for any help!


title: Create an ArcCatalog OLE DB Connection using Python

text: Is it possible to create an OLE DB connection (*.odc) to a database in ArcGIS 10 , but using Python instead of the ArcCatalog GUI wizard? I don't need to necessarily create a file on disk, just make the connection to the database. I am trying to automate a procedure that many users may use, and do not want to rely on every user remembering to create the OLE DB connection manually through ArcCatalog. The Python code provided by @blord-castillo in a similar question shows How to create an SDE Connection using Python, so I am looking for something similar that creates an OLE DB connection. I cannot seem to find any reference to any Python code for this task. Eventually, the python code sample using Make Query Table is basically what I want to do, but it assumes you already have your *.odc connection built. Anyone have suggestions or pointers for places to look for sample code? I am working against a SQL Server database, in case that matters.


title: How to export a layer to DXF from QGIS?

text: How do I export layers as a dxf? When I go to Layer > save selection as vector file the resulting dxf file is empty.


title: QGIS 2.0.1 MMQGIS Plugin (Search result map refresh issue) on Windows XP

text: I am running QGIS Dufour on Windows XP and using the MMQGIS plugin set. When using the Search tool (on the import/export menu item), once a search has been done and the results pane has been populated the map centre is supposed to refresh to the location of the selected record and update on change of selection. This is not happening in Windows XP (I have to click the map refresh button), but I am informed that it does work as it should on a Linux installation. I don't have the means to test against Windows 7 etc can anybody replicate the issue and/or advise whether this is build related or potentially something that I can resolve locally? Many thanks UPDATE - I should mention that it did work when tested in one of the weekly releases at version 1.9 on XP


title: csv to kml converter

text: Does anyone know a workable and stable program which converts csv extension files to kml? There are many tools available online but none of them worked for me. I tried many including   1. kmlcsv   2. Choon-Chern Lim I will be grateful if someone can direct me to something working.


title: SLD layer style colour ranging from x -> y

text: I am new to web mapping. I would like to create a SLD style that colours the points if they fall between certain numbers for example 0-500. I know I could manually create each colour for each value and assign it. However this is not practical when you reach high numbers of values that need colouring. One option is to group them into small groups of 10, but that still gives me 50 colours to do. I have a few hundred points, served from GeoServer via WMS, that rance from 0-500. How would I go about doing this with SLD? The image below shows an example of what I would expect in a desktop client. ![Layer styling](http://i.stack.imgur.com/8pDXY.png)


title: Mathematics behind converting scale to resolution?

text: I have a ArcGIS service configured as shown in this pastbin. Specifically, the first LOD looks like this:               {       "level": 0,       "resolution": 222.2222222222222,       "scale": 256000     }      I determined how to convert from the scale of 256000 to arrive at a resolution of 222.222:               var dotsPerInch = 96.0;     var inchesPerFoot = 12.0;        var dotsPerUnit = dotsPerInch * inchesPerFoot;     var scale = 256000;     var resolution = scale / dotsPerUnit;      But the associated WMTS service reports a "ScaleDenominator" value of 241904.7619047619:               <TileMatrix>       <ows:Identifier>0</ows:Identifier>       <ScaleDenominator>241904.7619047619</ScaleDenominator>       <TopLeftCorner>-1.77905E7 4.643889999999999E7</TopLeftCorner>       <TileWidth>256</TileWidth>       <TileHeight>256</TileHeight>       <MatrixWidth>3</MatrixWidth>       <MatrixHeight>3</MatrixHeight>     </TileMatrix>      What are the mathematics behind this value? That is, given a scale of 256000 how did ESRI arrive at a ScaleDenominator of 241904.7619?


title: Need help translating small code block from VBA to Python

text: I need help from someone to translate a small piece of code from VBA to Python, due to the fact that the company I am working for has upgraded from ArcGIS 9.3.1 to 10.0 and VBA is no longer supported. The code block is as follows:               static x0 as double, y0 as double       dim pPoint as IPoint       set pPoint = [Shape]       x = pPoint.X        y = pPoint.Y       d = sqr((x-x0)^2 + (y-y0)^2)         x0 = x        y0= y      This is used with the calculate field tool inside model builder and as far as I can tell retrieves info about two points and calculates the difference in distance between them. I have attempted a few translations on my own with little success using `!shape.firstpoint.x!`, `!shape.firstpoint.y!` Unfortunately my knowledge is lacking and I need some assistance. If you are able to help, that would be greatly appreciated!


title: How do you explain that band width and relative spectral response of MODIS band do not match?

text: To define relative spectral response, I referred to EFFECT OF RELATIVE SPECTRAL RESPONSE ON MULTI-SPECTRAL MEASUREMENTS AND NDVI FROM DIFFERENT REMOTE SENSING SYSTEMS by David James Fleming, 2006. > One factor that is often overlooked is the effect of a sensor’s relative > spectral response (RSR), or spectral response function (SRF), on broadband > spectral measurements. The RSR describes the quantum efficiency of a sensor > at specific wavelengths over the range of a spectral band. Currently, > general descriptors, such as bandwidth and average bandpass, are often the > only spectral characteristics considered in analysis of sensor spectral > measurements. However, cross-sensor wavelength variations in RSR can lead to > measurement discrepancies between sensor measurements that make them not > directly comparable (Teillet et al., 1997). In order to provide consistent > quantitative spectral measurements of vegetation land cover and derived > metrics, such as spectral vegetation indices, the effect of a sensor’s SRF > must be considered and understood. > > [...] > > Spectral bands are often generalized (Pagnutti et al., 2003) in terms of > full width at half maximum bandwidth and central wavelength corresponding to > the maximum value of the response function (Liang, 2004) as shown in Figure > 11. ![enter image description here](http://i.stack.imgur.com/LU9Gx.jpg) In view of this, I was a little bit surprise that, for example the bandwidth of MODIS band 7 (dotted line) as defined here, seems to do not match with the relative spectral response in the way defined above. ![enter image description here](http://i.stack.imgur.com/xhNAa.jpg) Is there something that I did not correctly understand in those concepts?


title: What are AGF Files, how do we put them in PostGIS?

text: I came across term which says AGF, after Googling I found its Autodesk Geo Files, But some other say, Atlas Geo Files, Which one of them is right. I also came to know that It is an extension to WKT format supported by PostGIS. Is there a way where we could make POSTGIS consume the AGF Files.


title: US unemployment data by zip (or aggregating data up to county level)

text: I am trying to find unemployment rate data for the US that is:   * at 5 digit zip code level   * monthly, or quarterly, or even annually, for 2008-2012   * free That seems to be impossible as far as I can tell. It looks like the lowest level of aggregation is county and annual (the county data at http://www.bls.gov/lau/#tables). However, you can get monthly data from http://www.melissadata.com/lookups/bls.asp, which cites the BLS as source, which leads me to believe that it is available. Could someone point me where it can be downloaded? Second, I will also need to aggregate my outcome data from zip to county FIPS code. Since zips change all the time and counties stay stable, is there a dataset that will allow me to translate from zip at some point in time to county? EDIT: I was able to locate several option for crosswalk files between zip codes and counties. The most up-to-date versions were the USPS ones. The city state product links each 5 digit zip to the main county (the one that has the majority of the deliveries). The zip+4 product has a one-to-one mapping between them which is more precise, but also more expensive. These are subscription products that need to be updated, and are either monthly, bimonthly or quarterly. The best free version is the HUD one. It has quarterly 5 digit zip to the main county using an allocation method based on residential addresses and postal vacancy data rather than by area or by population. It uses 2000 census geography. Another one is from the Missouri Census Data Center. Judging by the date it is from September of 2010.


title: Visualization of satellite image - directly in python

text: Is there any way (a package or what not), to visualize a geotiff image directly in Python? I don't want to use ENVI or ArcGIS or anything else. Thank you in advance.


title: Set QGIS vector layer custom properties

text: I'm trying to set some labels and styles for some vector layers that are loaded programatically from a Spatialite database. I have the following code, which returns no error, and includes the changes in the .qgis file, but yet doesn't show on the canvas:               uri = QgsDataSourceURI()       uri.setDatabase(database_path)     uri.setDataSource('', table_name, 'geometry')     layer = QgsVectorLayer(uri.uri(), display_name, 'spatialite')     QgsMapLayerRegistry.instance().addMapLayer(layer)          layer.setCustomProperty("labeling/enabled", "true")       layer.setCustomProperty("labeling/fontFamily", "Arial")     layer.setCustomProperty("labeling/fontSize", "10")     layer.setCustomProperty("labeling/fieldName", "source_id")     layer.setCustomProperty("labeling/placement", "2")      Can someone please point me in the direction of a working example? Examples of setting colors/widths etc. would be even more appreciated. Thanks in advance for any help. Dan


title: Lock file on shapefile persisting with arcpy.ImportMetadata_conversion

text: I've got a script that does a number of things to two shapefiles, and it appears that the metadata import step is creating a lock file on only one of the shapefiles that persists even after `del arcpy`. The code is very simple, and as I said, the lock only exists on one of the two files processed by the script. Processes that are run before this step include `arcpy.FeatureClassToFeatureClass_conversion` and `arcpy.JoinField_management` but I've gone through the script taking out a step at a time and determined it's left by `arcpy.ImportMetadata_conversion`.               arcpy.ImportMetadata_conversion (metadatatemplate, "FROM_ARCGIS", polyfilefull, "ENABLED")          del arcpy      I run the same code with a different target and no persistent lock is created. I've tried the garbage collection module `import gc --> gc.collect()` as suggested here but it didn't fix the issue either. I'm new to Python and am not sure how to go about troubleshooting this, and am not seeing much dealing with non-cursor locks. Any help would be much appreciated!


title: Coordinate conversion - Lat Long to State Plane, ArcServer-Silverlight

text: I am trying to project a Lat/Long value I get from a table to a x/y value that I can use to plot a graphic. I have seen one way to do this may be to use something like this:               feature.Geometry = mercator.FromGeographic(new MapPoint(lat, lon));     feature.Symbol = LayoutRoot.Resources["TRUCK"] as ESRI.ArcGIS.Client.Symbols.Symbol;     graphicsLayer.Graphics.Add(feature);      However my graphics aren't showing up overlapping my tiled basemap service. I tried the mercator.FromGeographic and Mercator.ToGeographic with unsuccessful results.               My Lat/Long value: 37.1223133333333,-93.27893     Mercator.FromGeographic converted value: X=-10382795.4374339, Y=4469266.40579955, WKID=102100     Mercator.ToGeographic converted value: X=-0.000837860806483038, Y=0.000334317600035687, WKID=4326      Neither of these coordinates put my graphics in the correct location. It should be closer to something like this: X=1424565.77, Y=501970.98. I am trying to learn more about coordinate systems, conversions between systems, etc. Any thoughts on what I can try next? I am still in the beginner phase of learning programming so thanks for your help. Would you have this as a standalone class in your project? Here is the code I have so far:               C#          using System;     using System.Collections.Generic;     using System.Linq;     using System.Net;     using System.Windows;     using System.Windows.Controls;     using System.Windows.Documents;     using System.Windows.Input;     using System.Windows.Media;     using System.Windows.Media.Animation;     using System.Windows.Shapes;     using ESRI.ArcGIS.Client;     using ESRI.ArcGIS.Client.Geometry;     using ESRI.ArcGIS.Client.Symbols;     using System.Runtime.Serialization;     using ESRI.ArcGIS.Client.Tasks;     using System.Windows.Threading;     using ESRI.ArcGIS.Client.Bing;          namespace TruckGPS_Test     {         public partial class MainPage : UserControl         {             //private static ESRI.ArcGIS.Client.Projection.WebMercator mercator = new ESRI.ArcGIS.Client.Projection.WebMercator();                  public MainPage()             {                 InitializeComponent();                 //AddMarkerGraphics();                      QueryTask queryTaskTruckGPS = new QueryTask("http://gisaprd/ArcGIS/rest/services/TruckGPS/MapServer/8");                 queryTaskTruckGPS.ExecuteCompleted += QueryTask_ExecuteCompletedTruckGPS;                 ESRI.ArcGIS.Client.Tasks.Query queryTruckGPS = new ESRI.ArcGIS.Client.Tasks.Query();                 queryTruckGPS.OutFields.Add("*");                 queryTruckGPS.ReturnGeometry = false;                 queryTruckGPS.Where = "1=1";                 queryTaskTruckGPS.ExecuteAsync(queryTruckGPS, "initial");                      //This timer updates the outage feature count after a 30 second wait                 System.Windows.Threading.DispatcherTimer myDispatcherTimer = new System.Windows.Threading.DispatcherTimer();                 myDispatcherTimer.Interval = new TimeSpan(0, 0, 0, 10, 0);                 myDispatcherTimer.Tick += new EventHandler(Each_Tick);                 myDispatcherTimer.Start();             }                  public void Each_Tick(object o, EventArgs sender)             {                 QueryTask queryTaskTruckGPS = new QueryTask("http://gisaprd/ArcGIS/rest/services/TruckGPS/MapServer/8");                 queryTaskTruckGPS.ExecuteCompleted += QueryTask_ExecuteCompletedTruckGPS;                 ESRI.ArcGIS.Client.Tasks.Query queryTruckGPS = new ESRI.ArcGIS.Client.Tasks.Query();                 queryTruckGPS.OutFields.Add("*");                 queryTruckGPS.ReturnGeometry = false;                 queryTruckGPS.Where = "1=1";                 queryTaskTruckGPS.ExecuteAsync(queryTruckGPS, "initial");             }                  private void QueryTask_ExecuteCompletedTruckGPS(object sender, ESRI.ArcGIS.Client.Tasks.QueryEventArgs args)             {                 //If Counter isn't working check the web service, make sure the table is added to the map service                      FeatureSet featureSet = args.FeatureSet;                 GraphicsLayer graphicsLayer = MyMap.Layers["TruckGPS"] as GraphicsLayer;                 graphicsLayer.ClearGraphics();                 if (featureSet != null && featureSet.Features.Count > 0)                 {                     ////Check the system time and subtract the time amount wanted from the last gps systime read for movement or idle truck                     //System.DateTime dTime = DateTime.Now;                     //// tSpan is 0 days, 0 hours, 0 minutes, and 0 seconds.                     //System.TimeSpan tSpan = new System.TimeSpan(0, 1, 0, 0);                     //System.DateTime result = dTime - tSpan;                     foreach (ESRI.ArcGIS.Client.Graphic feature in featureSet.Features)                     {                         if ((feature.Attributes["LONGITUDE"] != null) && (feature.Attributes["LATITUDE"] != null))                         //&& (feature.Attributes["S"])                         {                             var Machine_Name = feature.Attributes["MACHINE_NAME"].ToString();                             var User_Name = feature.Attributes["USER_NAME"].ToString();                             double lat = Convert.ToDouble(feature.Attributes["LONGITUDE"]);                             double lon = Convert.ToDouble(feature.Attributes["LATITUDE"]);                                  feature.Geometry = new MapPoint(lat, lon);                             //if (User_Name == "CU656")                             //{                             //feature.Geometry = mercator.ToGeographic(new MapPoint(lat, lon));                             feature.Symbol = LayoutRoot.Resources["TRUCK"] as ESRI.ArcGIS.Client.Symbols.Symbol;                             graphicsLayer.Graphics.Add(feature);                             //}                             //else                             //{                             //    feature.Symbol = LayoutRoot.Resources["RedMarkerSymbol"] as ESRI.ArcGIS.Client.Symbols.Symbol;                             //    graphicsLayer.Graphics.Add(feature);                             //}                         }                     }                     { (MyMap.Layers["TruckGPS"] as GraphicsLayer).Refresh(); };                 }                 else                 {                     graphicsLayer.ClearGraphics();                     //MessageBox.Show("No features returned from query");                 }             }             private void MyMap_MouseMove(object sender, System.Windows.Input.MouseEventArgs args)             {                 if (MyMap.Extent != null)                 {                     System.Windows.Point screenPoint = args.GetPosition(MyMap);                     ScreenCoordsTextBlock.Text = string.Format("Screen Coords: X = {0}, Y = {1}",                         screenPoint.X, screenPoint.Y);                          ESRI.ArcGIS.Client.Geometry.MapPoint mapPoint = MyMap.ScreenToMap(screenPoint);                     if (MyMap.WrapAroundIsActive)                         mapPoint = ESRI.ArcGIS.Client.Geometry.Geometry.NormalizeCentralMeridian(mapPoint) as ESRI.ArcGIS.Client.Geometry.MapPoint;                     MapCoordsTextBlock.Text = string.Format("Map Coords: X = {0}, Y = {1}",                         Math.Round(mapPoint.X, 4), Math.Round(mapPoint.Y, 4));                 }             }          }     }      At what point would I use the geometry service or call the class you stubbed out?


title: How to extract common outline of multiple polygons with code?

text: I'm not really asking for a chunk of code to do this, but more of an algorithm I can work with myself. ![](http://i.stack.imgur.com/DqKEM.jpg) For example, this is the state of Maine, obviously, and I have the points of each county stored as an individual polygon. I am looking to process all of those points in whatever way possible to end up with only the outer outline. Does having islands outside of the outline complicate things? Note: I know this is easy in QGIS but I need to be able to do it on the fly with a PHP script. Note2: Maine is just an example, I know state outlines are available elsewhere...I could have any number of counties from potentially more than one state. Any help is greatly appreciated! - Brandon EDIT: This question differs from others in that it is absolutely necessary for it to be done in PHP code, and not in GIS editing programs. In addition, this problem is more complicated than simply generating a convex hull as concave contours are a definite possibility. I honestly have no idea where to even begin and am looking for someone with a little more experience with problems like this than I have.


title: LineString in OpenLayers: Is it possible to draw segments in different colors?

text: I'm a newbie in OpenLayers. Can you help me with this: Is it possible to assign color not to the whole linestring, but to different segments?


title: ReportLab integration into QGIS returns error message "no module named reportlab"

text: I want to use ReportLab in my own plugin which I have written for QGIS. I have installed ReportLab for the python versions 2.4, 2.5 and 2.6. The package is respectively installed into the site-packages folder (e.g. C:/Python24/Lib/site-packages/reportLab). If I want to use the tool in my plugin, the plugin returns the error "ImportError: no module named reportLab". I have set the path to the modul into the environment variables, but this doesn´t help. I try to import the module by "from reportLab.pdfgen import *". Do youhave any other suggestions or ideas? Best


title: When Zooming Personal Geodatabase Feature Class Error came

text: When i joined two different feature class attribute table while i have to zooming the PGDB feature class , drawing error will come. I have attached an example image to show the problem. Thanks to Advance any type of tips. ![enter image description here](http://i.stack.imgur.com/KX1UU.png)


title: How to control which Fields are exported in ArcObjects? (via Field Mapping)

text: In ArcMap 10.x, if you use the Export Data command on a layer that has hidden/disabled fields, those fields will not be present in the created feature class/table. My question is simple: how do you duplicate this functionality using ArcObjects and C#? The `IField` interface seems to have no property or method for defining this aspect of table data. Can it be done? I am seeking to do this so I can extract a subset of fields from a table and keep it for later use (as opposed to having to deal with all the unnecessary data bloat present in many standardized data releases). **UPDATE** : I am currently attempting to use the `IFieldInfo` option suggested in the comments below, but I find myself unable to perform the conversion from an `IFeatureClass` to an `IFeatureLayer` that seems necessary to access `ITableFields`. Am I missing something? I am doing this in a WinForms app, so there is no parent ArcMap instance open to obtain layer information from. I wish to only work with feature classes and tables, if possible. **UPDATE 2** : It would seem that, because this winforms is detached from any instance of ArcMap, I cannot make use of `IFeatureLayer` to turn fields on and off before exporting. Does anyone know how to properly create a field map object in C#?


title: Could someone suggest a good GeoExt Tutorial?

text: In my research I've found these two, which are only explaining the basics.   * Developing OGC Compliant Web Applications with GeoExt   * GeoExt Workshop (Pdf) And of course the native (but short) tutorials and examples on the GeoExt website. Can anyone know about other resources?


title: OpenStreetMap Toolbox (ArcGIS 10.0); Microsoft Jet Database Engine Error

text: I am using OSM toolbox in my ArcGIS 10.0 to download OSM data, but whenever I want to do so, it throws an error saying: "Unable to create a relation table (The Microsoft Jet database engine cannot find the input table or query 'LundA_osm_revision'. Make sure it exists and that its name is spelled correctly.). Failed to execute (OSMGPDownload)" However, I downloaded part of data just yesterday but today I can't.... I don't think it is because of data volume, cause I chose only one parcel to download but the same thing happened...


title: Newbie, I want to make a map that shows something along the lines of the following:

text: What is the average income for housing units (middle, mixed, family, etc.) within a 2 mile radius of parks for the City of Anaheim? or What is the average number of parks within the 1/2 mile radius of schools within the City of Anaheim? WHat is the average income of areas with least parks and most parks?


title: Converting GDB to shapefiles in ArcGIS

text: So I'm attempting to convert a GDB database into a shapefile. I found the help for ArcGIS 10.1 (my version) and it tells me 2.On the main menu, click Customize > Toolbars > Production Mapping. But when I follow this menu, production mapping doesnt exist. Can anyone help me out here ? I feel like I'm misisng something very obvious.


title: Whats wrong with my code? Any reference missing?

text: I have been trying to add the navigation tool that will simply zoom in and zoom out. Push left and right using the click of the mouse. I'm using in the Silverlight, Visual Studio 2010. The XAML file contains the following:               <esri:Navigation Margin="5" HorizontalAlignment="Right" VerticalAlignment="Bottom"      Map="{Binding ElementName=MyMap}">      </esri:Navigation>      The C# file contains the following:               private void MyMap(object sender, RoutedEventArgs e)         {             MyMap.Focus();         }      I have added the reference dll file : ESRI.ArcGIS.Client.Toolkit Though the navigator is visible on the map. But unable to function. Please assist the same.


title: Using ModeBuilder to populate a table with the feature count of multiple feature classes

text: Specs: I'm using ArcInfo 10.1 and have all extensions available to me. I have a folder with many file geodatabases. Each file geodatabase contains 2 feature classes. One is a point fc and the other is a polygon fc. I'm trying to figure out how to calculate the total number of polygons stored in all geodatabases in this folder. I'm happy for this number to go anywhere i.e .txt, .csv, .xls, even just a box somewhere so I can write it down. I think I'm nearly there with ModelBuilder, but I'm stuck at what I believe is the last step. My logic: 1 - Use an iterator to iterate through all the fgdb's in the folder. 2 - Use an iterator to iterate through the feature classes in the fgdb looking only at the polygon feature type. 3 - Use the Get Count tool to count the number of rows in the feature class. 4 - This is where I'm stuck. I think I want to be using the Collect Values tool to collect all off the returned polygon counts, but I can't figure out how to extract and sum the values from here. Am I thinking about this in completely the wrong way? ![Iterate Workspace](http://i.stack.imgur.com/LUeqz.jpg) ![Iterate Feature class](http://i.stack.imgur.com/KMga0.jpg)


title: Is there a way to visualize a convexhull in qgis 1.8 lisboa?

text: There is no way to visualize a convexhull in qgis 1.8 lisboa? I have tried following views in Postgis 1.5 I was told to use an id column to publish it in Qgis. If you not use an id column, u cannot load it anyway because of an error. 1.               create or replace view con_hull_baeume3(bid) as     select '0', ST_ConvexHull(ST_Collect(geom)) FROM baeume;      2.               create or replace view con_hull_baeume4(bid) as     select bid, ST_ConvexHull(ST_Collect(geom)) FROM baeume group by bid;      but this one make a convexhull on each of the geometrypoints. I mean just use 'select ST_ConvexHull(ST_Collect(geom)) FROM baeume;' works as sql perfectly. But i must define it as a view to load it into a postgis layer of QGIS.


title: ESRI file coordinate confusion

text: I have a batch of (binary) ESRI files containing 25m resolution raster data. I need to check my interpretation of the OSGB coordinates therein. `gdalinfo` reports the following for a file containing a 3578 x 3833 raster:               Pixel Size = (25.000000000000000,-25.000000000000000)     Corner Coordinates:     Upper Left  (  486425.000,  222650.000) (  0d44'37.94"W, 51d53'42.91"N)     Lower Left  (  486425.000,  126825.000) (  0d46' 2.31"W, 51d 2' 1.48"N)     Upper Right (  575875.000,  222650.000) (  0d33'18.65"E, 51d52'27.15"N)     Lower Right (  575875.000,  126825.000) (  0d30'27.19"E, 51d 0'48.00"N)     Center      (  531150.000,  174737.500) (  0d 6'43.71"W, 51d27'21.30"N)      The clarification I need (given the negative Y pixel size) is whether the upper left coordinate given corresponds to the NW corner of the top-left-most cell, or the SW corner.


title: Shapefile PRJ to PostGIS SRID lookup table?

text: I was wondering if there is such a thing as an shapefile PRJ to PostGIS SRID lookup table? Something that can translate the most standard shapefile PRJ definitions into the likely SRID. When using PostGIS and pgAdminIII, if you use the postgisgui to import your shapefiles, the SRID is left as "-1". It seems like the tool should be able to parse the Esri PRJ and determine the correct (or at least a couple of options) that are the likely SRID, rather than just leave the default. Or does the importer have the capability to reproject on the fly if you choose another SRID? It may seem lazy on my part, but to me it seems curious that this function hasn't already been put in place. Does anyone know if this concept is in the works, or good reason's why it has been left out?


title: Determining the SRID of a dataset in PostGIS

text: Sometimes the dataset provides some information about its projection. For example, it can mention `Horizontal_Datum_Name: North American Datum of 1983`, `Ellipsoid_Name: GRS1980`, `Geographic_Coordinate_Units: Decimal degrees`. How do you determine the SRID? Doing the following query does not seem to work all the time (like this query itself returns no result)               SELECT srid, srtext,proj4text     FROM spatial_ref_sys     WHERE proj4text ILIKE '%nad83%'     AND proj4text ILIKE '%grs80%' AND proj4text ILIKE '%longlat%';


title: How to go from .prj into geoserver EPSG entry

text: I'm working on adding a new SRS into geoserver, and I have the .prj file for the data that I am working with, and have added it to SpatialReference.org http://www.spatialreference.org/ref/sr-org/7912/ And have clicked the "geoserver" link and attempted to paste this into the EPSG file. I have been successful at adding it to the PostGIS database, and when I add a layer in geoserver, and "detect" the SRID, it is successful - (and test conversions into Lat/Long are successful and confirmed in GoogleMaps) However, when go to the publishing tab, I get this message: Field 'latLonBoundingBox' is required. Field 'Declared SRS' is required. CRS doesn't pull anything up in the "find" dialogue, my SRID is not in the system. I have restarted geoserver. I believe that there may be something wrong with the EPSG entry, but am not sure what it could be: 7912=PROJCS["NAD_1983_StatePlane_Iowa_South_FIPS_1402_Feet",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",1640416.666666667],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-93.5],PARAMETER["Standard_Parallel_1",40.61666666666667],PARAMETER["Standard_Parallel_2",41.78333333333333],PARAMETER["Latitude_Of_Origin",40.0],UNIT["Foot_US",0.3048006096012192]] Any references to aid me?


title: how to identify EPSG of any shapefile

text: I have a shape file, imported in PostgreSQL using PostGIS when this shape-file is published in Geo-server it didn't show any layer. I had used EPSG:4326..thanks


title: Getting SRID from prj file?

text: I've seen varying questions relating to this question. Except mine revolves around **_C#_**. I'm trying to validate that the projection I'm expecting matches what is in all the .shp files I'm reading.               GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]      For example I have this prj file, is there anyway to verify that is the SRID that I'm looking for ( ** _In the .Net library_** )? **I'm looking for an answer relating to the .Net Framework:** I don't have ArcObjects or any Esri Libraries. Any chance there is something baked in to the .Net Framework?


title: Is this possible with ArcGIS using replication?

text: I work for a telecom company dealing with fiber management. We have a sister company south of us who we share some fiber and fiber equipment with. Both of us will be using ArcSDE databases. We want to be able to share this area with each other, but we don't want to share our entire system. We want to be able to make changes in this area where we share fiber/equipment and sync the changes back and forth, but only for these areas. Please see this image to have a visual:![Image](http://i.imgur.com/EiAtW7v.png) We only want to sync changes made in the red area. The problem I'm having with using something such as the two-way replica is that if I save the replica into the database where the data currently exists it doesn't merge with the current data, it creates new data with an _1, like instead of appending to the points feature class it makes a new one called points_1. This is a problem because it also does it for the geometric network which is being used by our fiber management software to track the fiber. Is there anyway to get the replicated data into our original data and still only be able to sync that data? I'm not sure if this made sense. It's kind of hard to explain.


title: Assign symbology to multiple layers in one operation?

text: Is it possible to assign the same symbol to multiple layers of the same geometry type within an ArcMap document in one operation? For example, I was hoping to:   1. Select multiple layers in the TOC   2. Click on the symbol "patch" or right-click an get to the "Symbol Selector".   3. Apply the same symbol to all selected layers. Obviously that doesn't work, or I wouldn't be asking. I found an old 2003 posting that talks about how to do this with VBA code. Can this type of operation be done from the GUI in 10.x, or am I just out of luck?


title: Where to acquire free elevation data for Thailand/Bangkok?

text: I am in the process of writing my thesis on flood hazard preparedness and forecasting in South East Asia, specifically Thailand. My analysis requires a medium resolution (even better, high resolution) digital elevation model for Bangkok and vicinity areas. I really appreciate if anyone can point me out where I can find such data? My internet search so far returns not DEM data but only finished maps from different organizations.


title: MapServer Clustering GetFeatureInfo

text: I'm having a bit of a problem with clustering in map server the clustering itself works fine and the GetFeatureInfo works fine most of the time. However some times when I click on a cluster point it some times gives a different number to how many points are meant to be in the cluster. See this example cluster should contain 171 points but clicking on it gives 173. ![Cluster Incorrect](http://i.stack.imgur.com/dtx80.png) Here is my mapfile I've removed the classes as its ridiculously long with them and I don't think its relevant               MAP       FONTSET "fonts.list"       IMAGETYPE "png"       MAXSIZE 3000       NAME "TEST"       SIZE 1000 1000       STATUS ON       UNITS DD            OUTPUTFORMAT         NAME "png"         MIMETYPE "image/png"         DRIVER "AGG/PNG"         EXTENSION "png"         IMAGEMODE RGB         TRANSPARENT FALSE       END # OUTPUTFORMAT            SYMBOL         NAME "circle"         TYPE ELLIPSE         FILLED TRUE         POINTS           1 1         END       END            PROJECTION         "init=epsg:4326"       END # PROJECTION       LEGEND         KEYSIZE 20 10         KEYSPACING 5 5         LABEL           SIZE MEDIUM           OFFSET 0 0           SHADOWSIZE 1 1           TYPE BITMAP         END # LABEL         STATUS OFF       END # LEGEND            QUERYMAP         SIZE -1 -1         STATUS OFF         STYLE HILITE       END # QUERYMAP            SCALEBAR         INTERVALS 4         LABEL           SIZE MEDIUM           OFFSET 0 0           SHADOWSIZE 1 1           TYPE BITMAP         END # LABEL         SIZE 200 3         STATUS OFF         UNITS MILES       END # SCALEBAR            WEB         METADATA           "wms_srs" "EPSG:900913"           "ows_enable_request"  "*"           "wms_title"   "Testing"         END # METADATA       END # WEB            LAYER         CLASSITEM "Cluster:FeatureCount"         CLUSTER           BUFFER 10           REGION "ellipse"         END # CLUSTER         CONNECTION ""         CONNECTIONTYPE POSTGIS         DATA "position from data"         LABELCACHE OFF         LABELITEM "Cluster:FeatureCount"         METADATA           "wms_include_items"   "all"           "wms_timeitem"    "datetime"           "wms_timeextent"  "1910-01-01/2050-02-01"           "gml_include_items"   "all"           "gml_geometries"  "none"           "wms_title"   "Data"         END # METADATA         NAME "test1"         PROCESSING "GETSHAPE_STYLE_ITEMS=all"         PROCESSING "LABEL_NO_CLIP=True"         PROCESSING "CLUSTER_GET_ALL_SHAPES=ON"         PROCESSING "ITEMS=id"         STATUS OFF         TEMPLATE "blank.html"         TILEITEM "location"         TOLERANCE 10         TYPE POINT         UNITS METERS                   CLASSES_HERE       END # LAYER          END # MAP      I hope that provides enough for some suggestions on the issues if any more information is required please do let me know, any suggestions would be highly appreciated.


title: Where does Google get updated data about postal codes?

text: I have been searching for the most recent list of Postal Codes in US but I most of them are two or three years old. I did cross check them with the Google Maps, though most of them them were correct but I can say 5% of them were not. Then it made me thinking from where does Google update it's data about Postal Codes? Any leads?


title: Calculate optimal paths between different points

text: How can I calculate all the possible paths between a group of points, taking into consideration the SRTM and the Slope ? I am trying to do this in ArcGIS, my dataset is a group of points (shape format) and I have the SRTM and the Slope. I've seen the Path distance tools but I have some doubts. My idea is to have a raster with all the possible paths between the different points, considering that someone would move by foot (and the time needed is not important), I just want to have an overview of all possible paths and the dificulty for now is not important. Is it correct to use the Path distance tool giving only the STRM for both the in_surface_raster and in_vertical_raster ??


title: OS Vectormap GML files into PostGIS

text: I am having difficulty in efficiently dealing with OS Vectormap data that comes in GML format. In the past I used the Plugin for QGIS (OS GML Tools) to batch convert folders of compressed GML (.GZ) to shapefiles which are then merged and added to the QGIS as a layer. As I now have a lot more data (~150 GML files) and using Shapefiles directly loaded into QGIS is a very slow and inefficient way of displaying/editing the data I have decided to get the data loaded into a PostGIS database. The first issue is that the plugin doesn't seem to work. When I choose an input folder with only .GZ files (For Example - Vectormap/SP) and then pick the output as an empty folder I created (Vectormap/SP Shapefiles) the process runs and completes but fills the folder with shapefiles only a 1kb in size. When loaded into QGIS these shapefiles appear to do nothing. I have uninstalled the plugin and re-installed to no avail. If anyone has a better or alternative suggestion for getting GML files into a PostGIS database then I would appreciate it. Surely there musty be an easier way for people using Open Source GIS software to load in Ordnance Survey Vector data? Thanks for your time.


title: Does QGIS have WMS-T (WMS with time) support?

text: Does anyone know if there's support for WMS-T in QGIS? Through the app I can add WMS layers, but I can't work with WMS-T (there's no place to set the time parameter). I been going through the the Python plugins and although there are some that do work with time (Time Manager, Multi temporal and Multivariate data visualisation) they do not support the WMS protocol (they work directly with databases). Regards, Micaela


title: Using PostGIS for a large trajectory dataset

text: I have a spatial trajectory dataset which basically contains about 10E6 (lat,lon,time)-tuples, grouped together by an identifier so they form trajectories. Currently, SQLite is used to store the raw data. Lat/Lon are in WGS84 but span only small areas (i.e. European country size). I would like to store it in a geodatabase for easy descriptive & exploratory analysis, eg. calculating the overall and average distance for trajectories, and basic data preprocessing, eg. dismissing all tuples that are outside a polygon, for example. Thus, I thought PostGIS would be optimal since I have worked with it before. Some questions arise though: Should I just store the tuples as POINTS with GEOMETRY data type, or should I use MULTIPOINTS for whole trajectories? And what about _performance_? Performance is not critical since the data is used for a research project and not for a production application, but I don't want to wait 5 hours to calculate distances between a million point-pairs. What about _indexing_? What type of indices should I use and on what type of data? I know this question is kind of general but I would like to see if people have experience with storing trajectory data and maybe they can give me some advice.


title: How to make a routable graph from a Point and a Line shapefile, using Networkx?

text: I have one shapefile which consists of all the streets in the study area, and another shapefile which has points representing origins and destinations. I would like to know if it's possible to find shortest path between all origins and destinations, using the links in the link shapefile? I primarily use Python, Networkx and QGIS for my work, so it would be great to use these tools for this task. Code snippets are much appreciated!![enter image description here](http://i.stack.imgur.com/ci7Cr.jpg)


title: Need steps to print a Map in ArcGIS Silveright

text: I want to know how to print a map in ArcGIS Silverlight application. Thank You in advance.


title: How to 'highlight' a selected country?

text: All, Over the past several days I've read as much as possible regarding the OpenLayers API (within a JavaScript/jQuery environment), yet I'm still having trouble in getting my head around what I believe to be basic features. I can successfully place maps on my page, set bounds, etc, etc, but I'm having an incredibly hard time in the following: My requriements are extremely simple, I want a 'file' (KML, JS, I don't know) of each country and it's borders so that I can simply (as an example) select a country from a dropdown list and OpenLayers highlight that country! I did think it would be a simple task, have gone through all 220 examples of the OpenLayers website and can't see anything remotely close. I've been here: http://thematicmapping.org/downloads/world_borders.php Downloaded the WorldData which I thought would have the vector co-ordinates for the worlds countries borders, it looks to be a database file but haven't a clue what to do with this! If someone can break down the basics, I'd be incredibly grateful and better still show a basic example of what I'm after, I should be able to learn from it. Many thanks,


title: Calculating Area of Raster Classes

text: I have a raster in a GRID format that was created by Image Classification. The GRID is projected in StatePlane meters, but I would like the area in square feet. I'm assuming I will need to use the Field Calculator for this, but I'm not sure what to input. Any help is appreciated. I've already created a new field int he GRID's attribute table for area. I'm running ArcGIS 10.1. ![enter image description here](http://i.stack.imgur.com/pY9lC.jpg)


title: 3D maps on web application

text: 1) Is there any web API which can show 3D trajectory below earth surface and can consume the ArcGIS feature service which can work closely with ArcGIS web platform. 2) Is there any way to publish 3D feature service in ArcGIS Server 10.1 and can be consumed in web application and can be displayed on map.


title: Options for displaying 3D data using ESRI web APIs

text: I've been looking through the documentation of the various ESRI web APIs to see if there is any support for displaying 3D data, but haven't found anything useful. Is there any support for this - or do any other web APIs (Google, Bing, OpenLayers, etc) offer anything extra? I'm assuming what's on offer is probably quite limited considering the need to purchase ArcGIS 3D Analyst for the desktop side of things. I'm interesting in displaying either raster or vector data - or ideally both if that's possible. Any examples of what is possible would be extremely useful.


title: What are my options for 3D web Maps?

text: I wish to have a Online 3D Map, which would show my Data, i.e both Raster and Vector, draped on a DEM that I have. Due to the requirements of using my own DEM & Raster data, Google Earth API is pretty much out of the running. Are there any projects which can do this?


title: Using GDAL inside MATLAB in Ubuntu

text: I'm trying to use `gdal_rasterize` inside MATLAB via UNIX or system MATLAB command               system('gdal_rasterize').      Despite this command working in my console terminal, I get the following error inside MATLAB: > gdal_rasterize: symbol lookup error: /usr/lib/libgdal.so.1: undefined > symbol: pj_ctx_alloc Any help will be very appreciated.


title: arcpy pantoselected error

text: I am trying to get an user input for getting a parcel name and pan the map to that selection. What am I doing wrong in the code below?               import arcpy          #Msg box to get parcel Name     parcel_Name = str(arcpy.GetParameterAsText(0))     arcpy.AddMessage ("Loading parcel " + parcel_Name)          try:              mxd = arcpy.mapping.MapDocument('CURRENT')         df = arcpy.mapping.ListDataFrames(mxd, "Layers") [0]         ssparcel = arcpy.mapping.ListLayers(mapDoc, "ssparcel", df)[0]              whereClause = "Name ='%s'" % parcel_Name         arcpy.SelectLayerByAttribute_management(ssparcel, "NEW_SELECTION", whereClause)         df.extent = df.panToExtent(ssparcel.getSelectedExtent())             #df.scale *= 1.5         arcpy.RefreshActiveView()          except:              arcpy.AddWarning ("Error")          ...      Removed the "try" and got the following error: Executing: Script "0002" Start Time: Thu Jun 05 11:32:14 2014 Running script Script... IndentationError: unexpected indent (abcd.py, line 9) Failed to execute (Script). Failed at Thu Jun 05 11:32:14 2014 (Elapsed Time: 0.00 seconds)


title: Extracting outtermost points from a irregular grid of points

text: Good day to all, I am using Arcmap 9.3, and would like to remove all points inside an irregularly placed grid, except the outermost (boundary) points. For example, I would like to keep the black dots, while removing the gray dots. I have over a million points, therefore manually editing the shapefile won't be very efficient. Can I get any pointers/suggestions? Regards Kurt ![enter image description here](http://i.stack.imgur.com/EsB1v.png)