title: Using "Merge Divided Roads" tool with lesser parallel lines

text: When using the "Merge Divided Roads" tool, it merges roads that "trend generally parallel to one another". This means that from figure one.. It will merge the beginning, where the roads are close to each other (so the result is like figure 2), but not the entire length like I want it to (figure 3). I believe this is because the lines are not parallel enough (the angle between some of the lines are too big). Because even if I extend the merging distance to 300m (which is more than how far the roads are apart), I still don't get the result from figure 3. Anybody know how to decrease how parallel the lines have to be to get merged? ![enter image description here](http://i.stack.imgur.com/cBczK.png)


title: ArcGIS 9 doesn't recognize ArcGIS 10 .lyr files

text: I symbolized a parcel shapefile in ArcGIS 10 with about 2 dozen different colors. I need to use this in ArcGIS 9.3 as well, so I saved it as a .lyr file. This works fine in 10. But when I go to 9.3, I can add the shapefile, but not the .lyr file, or import it for symbolization (geometry doesn't match error). Is there a way to make a .lyr file in 10 so that 9 will recognize it? The .lyr file comes from the same shapefile, so I don't know why it wouldn't recognize it. I want to use this symbolization for a half dozen shapefiles a/o feature classes, so really don't want to manually recreate it. Thanks.


title: keeping track of edited features QGIS

text: Does anyone know of a way to keep track of last added or edited features in QGIS? A kind of Editor Tracking tool.


title: Creating flat end type polylineline buffer in model without ArcGIS advanced

text: I have a polyline split into many short segments and would like to create a flat end buffer for each individual segment (not "dissolve" them all into one feature). Is there any way to do this in an ArcGIS 10.2 model **without purchasing ArcGIS Advanced** licence? Arcpy script, paid 3rd party extension, or open source extension etc? Thanks! Update: I ended up modifying the code found in this Q/A to create a custom script tool which:   * creates an empty feature class for output   * Iterates though every line of a different input feature class with many short polylines   * at both the start and end of each line create a set of points which form a perpendicular line   * connect those two "lines" (2 sets of 2 points) and feed them into the "shape" attribute of polygon   * write those polygons to the empty feature class


title: Change the Name,Tooltip of builtin Commands

text: When I change the name of a builtin command using the following code, I get the error, "this method cannot run on builtin commands".               ICommandItem BuiltinCMD = FeatureLayerContextMenu.Find(BuiltinCMD_UID, false);     BuiltinCMD.Name = "NewName";      However changing the name of a command in Arcmap customization mode is vary easy. My question is that, is there a way to change the name of a builtin command programmatically through arcobject? Thank you in advanced


title: Qgis 2.0 and conection with Postgres 9.3.2

text: I tried conection with Qgis 2.0 with Postgres 9.3.2 but I was unable to do it. Is there anyone that help me Tks


title: How to identify township range and section from longitude and latitude

text: I have several hundred coordinates in an Excel file. I would like to identify the township range and section they are located--what is the easiest way to do this? I have you QGIS and basic GIS skills (i.e. digitizing). I googled my question and came across the following website: http://www.esg.montana.edu/gl/trs-data.html. This allows you to go from TRS to longitude and latitude. I'm thinking GIS would provide the best solution but I'm not sure where to start. I would like to identify actual legal descriptions.


title: Unable to retrieve custom extension state from a document in ArcEngine

text: I created a custom extension in ArcMap 10.1 which implements the IPersistVariant interface. State related to the extension features is persisted and retrieved via the Load and Save methods. Everything works fine in ArcMap. I am now building an ArcEngine app which needs to load documents which have been modified with the custom extension in ArcMap. I need to be able to load in the extension, so that when I load the document, the extension specific state is retrieved. I have no problem loading the extension in ArcEngine as follows:                       Type extensionManagerType = Type.GetTypeFromProgID("esriSystem.ExtensionManager");             System.Object extensionManagerObject = Activator.CreateInstance(extensionManagerType);             this.comReleaser = new ComReleaser();             comReleaser.ManageLifetime(extensionManagerObject);             this.extensionManager = extensionManagerObject as IExtensionManager;             IExtensionManagerAdmin extensionManagerAdmin = this.extensionManager as IExtensionManagerAdmin;                  // Add the PirsaExtension to the extension manager to load it.             UID uID = new UIDClass();             uID.Value = "PirsaX.Extension.PirsaToolsExtension";             extensionManagerAdmin.AddExtension(uID, this as IBatchApplication);             IExtension extension = this.extensionManager.FindExtension("PirsaMappingToolsExtension");             // Remember the extension manager as a PirsaExtension so that later we can use it to load             // a document.             PirsaToolsExtension pirsaExtension = extension as PirsaToolsExtension;             this.batchMapGenerator = pirsaExtension.BatchMapGenerator;             // Enable the extension.             IExtensionConfig extensionConfig = extension as IExtensionConfig;             extensionConfig.State = esriExtensionState.esriESEnabled;      Doing this loads the extension properly. In the debugger I see its Startup method being called and see the extension being enabled. The problem arises when I open the document. The extension's Load(IVariantStream stream) method never gets called. Here is how I open the document.                       mapDocument = new MapDocumentClass();                     if (mapDocument.get_IsMapDocument(filePath))                     {                         mapDocument.Open(filePath, String.Empty);             }      There is a pause when the mapDocument loads, and then I can access its details, but none of the custom state is there. How do I tie opening the document into the extension? Any advice or insights would be greatly appreciated. Tom Cuthill


title: Increased memory usage while zooming and dragging

text: I have a problem that deals with memory. When I run my GIS program, it uses 495K from my memory after 1 minute. And it continues to work with same value. ![enter image description here](http://i.stack.imgur.com/fSGrA.jpg) But when I zoom in / zoom out / drag the map to other sides, the memory usage of my programme increases to 500-600K. and it does not decrease back to old value, it becomes constant value after the zooming and dragging stops. ![enter image description here](http://i.stack.imgur.com/lhKd8.jpg) I am clearing the unused memory all 1 second with:               GC.AddMemoryPressure(GC.GetTotalMemory(true));          GC.Collect(GC.MaxGeneration, GCCollectionMode.Forced);          GC.Collect();      How can I resolve this problem?


title: How to render from Mapnik at a specific scale?

text: I'm trying to render a map to paper using Mapnik at a specific scale (such as 1:50k), but can't yet figure out how. So far I'm just using `map.zoom_to_box`:               map.zoom_to_box (mapnik.Envelope (101.5,3.2,102,3.3))      and play with `MaxScaleDenominator` and `MinScaleDenominator` in the styling rules.. But when done this way, I can only guess-work the map scale by adjusting the bounding box over and over, which is hard to obtain the exact 1:50k scale that I wanted.. I've also found this: `map.scale_denominator()` and `map.scale()`, but I think these are used only to display the map scale - not setting it.. Is there anyone here who can help me?


title: How to split a Polyline Geometry at a certain point in ArcObjects?

text: I have a polyline geometry and wish to split it into two different geometries, based on a given point on that line, in ArcObjects. I have tried to find out how to do this, but to no avail. I found that there are three methods which are sort of related to what I want.   1. IFeatureEdit.Split Method This seems to do exactly what I want, but it Works on a Feature, and not on a Geometry. I Do not want to edit existing features, but copy the geometry from an existing feature, split it in two parts, and then process those parts.   2. IPolycurve.SplitAtPoint Method I though that this method would be useful, but it just adds a new vertex at the point, and does not split the polyline   3. ITopologicalOperator.Cut Method This would also work, but when I use it, giving a perpendicular line as the input paramter, I am getting an error which says 'An Internal error has occured in the geometry system.' Is there some way of achieving what I want to do?


title: using arcpy outside arcmap

text: There may be something I'm missing, but is it possible to use the arcpy module outside arcmap? My situation is that we have one license on a computer which is shared over a network. I need to do some basic processing and I'd like to do it via python without having to log on to the GIS computer. Is this possible? Is it as simple as copying the location of the arcpy module into another instance of python? Or, can I just direct python to the directory arcpy is living in? Pardon my naivety if I'm out to lunch.


title: How can I relocate a georeferenced image, shapefiles and grid using Spatial Adjustment tool?

text: I somehow georeferenced an image about 120 miles east of where I should have georeferenced it. This should be a simple fix, except that I then proceeded to digitize that extremely detailed image (read: time consuming) into two shapefiles and also gridded that data all based on the incorrect location. A friend recommended to just re-georeference the original image and use the Spatial Adjustment tool to simply move the shapefiles and grid over to the right location. The problem is: I've never used the Spatial Adjustment tool and I'm having trouble figuring out how to do this properly. There are three options: edge snap, rubbersheet and transform. Can anyone help or suggest an easier way to achieve this without having to re-digitize everything? I sincerely thank you for any help you can offer me!


title: How can I export a shapefile to netCDF?

text: I have a shapefile of the worlds biomes   * Terrestrial Ecoregional Boundaries Shapefile (TNC), 12/14/09, 50MB download from available from http://conserveonline.org/workspaces/ecoregional.shapefile I would like to export it as a raster file; preferably a netCDF file with the MsTMIP format standard. Ultimately, I could work with a netCDF that keeps metadata from the shapefile, or even a csv with no metadata. I can generate the .csv myself, but I expect that existing tools will do much of the work for me. Do they exist?


title: best bluetooth gps for marine applications

text: What is the best gps to get as an add on for an android (asus tf300)? This is for a marine application I am writing.   1. I need sub 5 meter accuracy.   2. Would like decent accuracy at moderate speeds.   3. I dont want to spend more than 120 USD.   4. Must be bluetooth since device doesn't have usb Battery life is important since Ill be on a boat for 12+ hours at a time - the gps will be in standby mode some of this time - battery should be able to run at least 6 hours in active mode without charging Im assuming that most of the devices on the market today are waas enabled (this is what I want right?). Ive looked at some globalsat and dual models but not sure what is the best. Please be gentle as Im a noob when it comes to GPS techology. Thanks.


title: Python - Check for number of shapefiles in a directory

text: I want to test:   1. to see whether or not **ONE** AND ONLY ONE shapefile (which will be based on a filename wildcard) exists in a directory.    2. Add these shapefiles to a list    3. Use this list variable as an input to merge_managment function.  I already know how to walk through directories and pick out those filenames but not how to do the above. I was thinking something like:               rootDir = "\homePath"     featureinput1 = "path"     newOnlyShpList = []     for dirPath, dirNames, fileNames in os.walk(rootDir):         for file in fileNames:            if fnmatch.fnmatch(file, "*" + "2012" + "*" + ".shp")== True ##AND IF ONE SHAPEFILE EXISTS BY ITSELF IN DIRECTORY:##               ##append to newOnlyShpList               arcpy.Merge_managment([featureinput1, newOnlyShpList], "OutputHere")            elif               ##ignore if greater than one shapefile      All I know about is the arcpy .exists function but all that does is return a boolean on whether any shapefile exists. Maybe I need to check just for 1 .shp extension and it has nothing to do with arcpy? Thanks for any help.


title: Vector affine transformation in QGIS2

text: In QGIS 1.8, I can transform my point layer with the plugin "Affine transformation". So, this plugin don't exist in QGIS 2.0. Do you know a method to simply translate (i.e : X -> X+30000) in QGIS 2 ? It's possible in QGIS or I must use ogr2ogr, QGIS 1.8 or openjump ? Thank for your help. regards


title: flexviewer3.0 & wmts basemap

text: I'm using fleviewer 3.0 with wmts. I've got no result.. [white screen] from server-side i'm using both mapproxy.1.5a & geoserver2.2 my config.xml for flexviewer:                <layer label="Gwc-wmts" type="wmts" visible="true" imageformat="png"          url="http://xxx.xxx.xxx.xxx:8080/geoserver/gwc/service/wmts"                       servicemode="KVP" layerid="cite:my_layer"                     tileMatrixSetId="EPSG:4326"                          />                   <layer label="WMtS"                     type="wmts"                     url="http://xxx.xxx.xxx.xxx/mapproxy/service"                     layerid="my_layer"                     servicemode="KVP"                     imageformat="png"                     visible="true"                     tileMatrixSetId="grids_demo"                     />      I've succesfully display with openlayers. how can i use wmts with flexviewer?


title: Single tiled Mapserver WMS to avoid Labels and features cut along tile borders and repeated labels

text: I am using Mapserver-wms-openlayers for publishing maps. But there are some issues came across related to duplicate labeling for same feature in adjacent tiles, unwanted breaks in line features along tile borders, labels cut along tile boarders. Not much documentations to clear this anywhere. Can I create single tile using mapserver wms? Just increasing the tile-size to container (map-div) size is enough? My code is:               map = new OpenLayers.Map('map',       {zoomDuration: 1,projection: 'EPSG:3857'}     );          var mymap_all = new OpenLayers.Layer.WMS("EOL",     "http://192.168.0.233/cgi-bin/mapserv?map=/var/www/mstest/test_plant.map",       {'layers':"map_outline",        'transparent':true,        'format':'image/png'},       {isBaseLayer: false,opacity: 100},       {singleTile: true, ratio: 1}     );          var gmap = new OpenLayers.Layer.Google("Google Streets", // the default       {numZoomLevels: 25,visibility: false},       {isBaseLayer: true}     );          map.addLayers([mymap_all,gmap]);      ![See the cut off and duplicate labels along tile birders](http://i.stack.imgur.com/kh2o9.png) ![See an individual tile.](http://i.stack.imgur.com/vVmOj.png)


title: Understanding QGIS buffer tool units?

text: I have been trying to figure this out for a couple weeks now and have had no luck getting the buffer tool to accept anything but degrees as units of measure. I have found lots of stuff saying the layer needs to be reprojected and saved but it hasn't worked at all for me. Is there a way I could create a buffer without using ftools or at least force the units to meters somehow? As a workaround I converted meters to degrees (lat) and used that but the final product needs to be as close to reality as possible. Things I've tried:   * setting every unit option I could find to meters (where possible).   * setting everything to NAD83/Maryland (data is for Washington, DC) and saving it as such (as layers in ESRI shape files).   * reimporting the reprojected layers   * setting relevant layers to Google Mercator The was tried followed by creating a buffer. Many were tried in combination. QGIS 1.7.3 Slackware64 current (qgis from SBo-13.37 repo, tried on multilib and plain 64it with same results)


title: Ordnance Survey osgb:BNG spatial reference system not recognized by PostGIS

text: I'm trying to load an Ordnance Survey GML file into PostGIS using the ST_GeomFromGML function. The problem is that the spatial reference system that is used in the file, osgb:BNG, is not recognized by PostGIS:               # SELECT ST_GeomFromGML('<gml:Point srsName="osgb:BNG">              <gml:coordinates>527347.0,181346.0</gml:coordinates></gml:Point>');     ERROR:  unknown spatial reference system      Is there any workaround? Does "osgb:BNG" have an alternative name that is recognized by PostGIS? Thank you. * * * EDIT: Thanks to everybody for their answers. I ended up replacing "osgb:BNG" with "EPSG:27700" in the GML file (in the srsName parameter), although the other two options (modifying the spatial_ref_sys table, or using the ST_GeomFromGML function http://postgis.net/docs/ST_GeomFromGML.html with two arguments for PostGIS 2.0+) are perfectly valid too.


title: Defining datum for Lambert Azimuthal Equal Area and converting to geographic coordinates

text: I posted this question to a specialised mailing list for spatial data analysis using R here but didn't recieve a response. I am working with shapefiles and rasters in R, and I am unsure if I am specifying my projection information correctly (which I need to make sure I am as I want to reproject from one coordinate system to another). I have a shapefile (from the Hydro1K data). The projection information in the readme is described as:               Projection used:  Lambert Azimuthal Equal Area         Units = meters         Pixel Size = 1000 meters         Radius of Sphere of Influence = 6,370,997 meters         Longitude of Origin = 20 00 00E         Latitude of Origin = 5 00 00N         False Easting = 0.0         False Northing = 0.0      Looking at information in the readme and the associated .prj file I set the projection information using proj arguments like so:               proj <- CRS("+proj=laea +lon_0=20 +lat_0=5 +ellps=sphere") #the ellps 'sphere' has a radius of 6370997.0m     projection( myshpfile ) <- proj # In R the projection function allows you to set projection info for a file      However, I was wondering, do I also need to specify a datum for this projection? In the .prj file it says:               DATUM["D_Sphere_ARC_INFO",SPHEROID["Sphere_ARC_INFO",6370997.0,0.0]]      But I am not sure what datum this refers to? Does anyone know? Or can tell me where to find out? I also have some data which is in geographic coordinates. The .prj file of this data states:               GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]      Which I think is _standard_ geographic WGS84 projection? Am I correct in thinking that the proj arguments for this projection should be:               projgeo <- CRS("+proj=latlong +datum=WGS84 +ellps=WGS84")     projection(mygeoshpfile) <- projgeo`      Then to convert mygeoshpfile to the same projection as myshpfile, in R I can use spTransform like this:               mygeoshpfile2 <- spTransform(mygeoshpfile, proj)      I want to make sure I am accurately converting from one projection to the other. Do I need to specify further proj parameters? Thanks


title: How to split single shapefile into many, and use them as geoprocessing extents in ModelBuilder

text: I am trying to do the following things using ArcGIS model builder.   1. select by expression to output feature class.    2. use output feature class as spatial extent   3. raster to point The main goal is to reduce loading of computer, because the original raster is super large. If I convert all raster to point, the point shape file clashes. The problem is: how can I iterate the select function? In my model, it just exports one file. I have 15 shapes in a file, and I want to export each shape automatically. How can I revise my model?


title: Seeking a gvSIG plugin to go from shp to kml to cityGML

text: I'm looking for a gvSIG plugin to convert .shp to .kml and then to .cityGML. I'm working with gvSIG + 3D extension and I have .shp format data but I need it in .cityGML format.


title: Leaflet JS calling animatedMarker.stop() from event listener

text: I'm using the animated marker plug-in for Leaflet JS and would like to stop the marker from animating when it reaches a certain lat lon position. Currently I'm using Leaflet's 'move' event listener to detect when the marker reaches the specified lat lon. This part is working as I can console.log a message when the desired position is reached, however the stop method is not actually stopping the marker from animating. a live demo to my code can be found here My code is as follows:                                     <meta charset="utf-8">             <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">             <meta name="viewport" content="width=device-width">                          <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.css" />


title: How can i create a webservice the shortest route between two POIs?

text: I would like to create a prototype of a webservice that can calculate the shortest route between two POIs. How can I do that ? (I don't have any knowledge about the back-end of GIS and webmapping. So if you know any gis server or tool that can simplify this task it will be very helpful. I prefer opensource free tools. However, A very good tool or server that worth the price will be helpful for me )


title: How does the tolerance influence QgsGraphBuilder and tieing of points?

text: I am developing a script which uses OpenStreetMap data to calculate the distance (over the road network) between each building and the nearest hospital. To do this, I mainly follow the official tutorial http://www.qgis.org/en/docs/pyqgis_developer_cookbook/network_analysis.html My problem comes when calling QgsGraphBuilder. Because my buildings obviously don't lie exactly on the road network, I want to specify a tolerance value when creating the builder. However, with               builder = QgsGraphBuilder(crs, True, 200.0, "WGS84")      it doesn't "snap" my buildings to the network... Is there anything wrong with the way I call the function QgsGraphBuilder? I haven't seen any example which actually implements this tolerance parameter... **EDIT** I actually also tie all my buildings'centroids to the network:               builder = QgsGraphBuilder(crs, True, 200.0, "WGS84")          all_points = [] # A list that will contain the coordinates of all objects to be tied to the network     all_points.append(hospital) # I add the coordinates of the hospital          for building in coord_buildings.values():         all_points.append(building) # I add the coordinates of all the buildings'centroids              tiedPoints = director.makeGraph( builder, all_points ) # I tie the buildings'centroids to the graph              graph = builder.graph() # I build the graph              startId = graph.findVertex(hospital) # I take the id of the hospital in the graph              print startId # Displays -1      If I understand correctly, this means that my hospital doesn't match to anything in the network because it hasn't been tied properly... maybe because of the tolerance value? By the way, my data is in a PostGIS database, unprojected (EPSG 4326), in case it makes any difference **EDIT 2** I just saw that some buildings are actually tied to the network when I use only one parameter               builder = QgsGraphBuilder(crs)      or               builder = QgsGraphBuilder(crs, True, 0.0)      But rougly 1000 are still not tied. So probably really to do with the tolerance factor? When I specify the other parameters               builder = QgsGraphBuilder(crs, True, 200.0, "WGS84")      the dijkstra process fails (the tree only contains -1 values)


title: How can I get Google Fusion Tables to work in QGIS?

text: I am using GDAL/OGR 1.10 and QGIS 2.0.1. I am trying to load a google fusion table into QGIS using the method mentioned in this blog post. The only difference is that I am not declaring a email and password but using the OAuth refresh token I have generated. My VRT code is shown below.               <OGRVRTDataSource>         <OGRVRTLayer name="ps">            <SrcDataSource>GFT:refresh=<MY_VERY_LONG_TOKEN_IN_HERE> tables=1kQSkw-2cM_PU_jnu_T_PIksBkbyXm1feYaIooq8</SrcDataSource>         </OGRVRTLayer>     </OGRVRTDataSource>      But if I then add this layer to QGIS I get an OGR error that said "OGR[3] error 1: HTTP error code : 400", followed by another "OGR[3] error 1: Fetching OAuth2 access code from auth code failed." I thought that this would have worked because via the commandline I can use OGR to open the data source as shown in the image below. ![enter image description here](http://i.stack.imgur.com/thGHd.png) I have also tried structuring my VRT layer like in the blog post also with no luck. I'm a bit stuck on how to make this work. Any suggestions? Thanks Ando


title: In GRASS in QGIS, what do I do if "NVIZ module not found"?

text: I was a on a Windows system using GRASS in QGIS when the error below occurred. > NVIZ module not found I wonder how I can solve this problem?


title: How to add information to openstreetmap data?

text: I would like to add information to openstreetmap (routes,POI) but in a local version not to the version that is deployed on the web. So how can I do that ?


title: MultiLineString to separate individual lines using Python with GDAL/OGR, Fiona, Shapely

text: There are lots of MultiLineString features in a polyline shapefile. The problem is to split these lines into separate individual lines. There is a similar question with PostGIS, but I need to code in Python. I have been planning to extract the geometry from each MultiLineString feature and create separate features and append a shpfile with those new features. Later, in the second pass, I would delete the MultiLineString object which is no more required as it is now split into its components. It will require reading data from original shpfile and appending the newly created features to a copy of the shpfile. Then the appended (copy) shpfile needs to be rid of the MultiLineString features. It seems cumbersome as I find no way to read and write the shapefile simultaneously. There should be better ideas to do that. How to split these lines into separate individual lines using Python with OGR, Shapely, Fiona or Pyshp? A snippet of code to give an idea is below.               import fiona     from shapely.geometry import LineString          original_shpfile = fiona.open(path_to_road_network_shapefile)     with fiona.open(path_to_road_network_shapefile, 'a') as copy_shpfile:         rec = original_shpfile.next()         while rec:             try:                 vertices_on_link = rec['geometry']['coordinates']                 LineString(vertices_on_link) #reconstruct the line from vertices                 #if multipart,                  #has multiple lists within the list,                  #one for each of the Linestring component. also throws AssertionError                  except AssertionError:                 number_of_parts = len(vertices_on_link)                  for x in range(0,number_of_parts):                     part = rec                     part['geometry']['coordinates'] = vertices_on_link[x]                     copy_shpfile.write(part)             rec = original_shpfile.next()          #in the next phase, delete each of the the MultiLineString features from the copy of the shapefile


title: Raster incorrectly reprojected to OSGB(27700)

text: Ubuntu 12.04, QGIS 1.8.0, GDAL/OGR 1.7.3, GEOS 3.2.2 Open a Spatialite db with OS Mastermap poly layer (EPSG:27700);   Add OpenLayers Plugin (1.0) from QGIS offical repository;   Add a Google Satellite layer (EPSG:3857) and make OS poly fills transparent;   Zoom & drag map a bit till it 'settles down' - then both aligned nicely;   Make poly layer not visible and save map as image (jpg + jpgw);   Add saved jpg back in as a layer (EPSG:3857) - still aligned;   Reproject (warp) jpg layer from EPSG:3857 to a EPSG:27700 Gtiff;   Add this Gtiff layer - no longer aligned but shifted about 6m North.   ???!!!??? (On the fly CRS transformation is enabled) I've had this issue before with the unstable flavour of UbuntuGIS QGIS, so went back to the stable & all was ok. This time I'm getting the 'shift' in the stable UbuntuGIS QGIS and no amount of wiping out the libraries (with Synaptic) & reinstalling has so far got rid of this 'shift'. Any help or ideas gratefully received... * * * No problem reproducing the error (thanks underdark), but some more digging might narrow the issue a bit more. The proj4 CRS projection string for OSGB/27700 in GDAL1.9.1 is:   +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +towgs84=375,-111,431,0,0,0,0 +units=m +no_defs The same thing in GDAL1.7.3 is:   +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs Even though QGIS is reporting the CRS as 27700 with the same proj4 string as the earlier GDAL1.7.3 it's probably using the later GDAL1.9.1 parameters for the reprojection behind the scenes. That would be fine if the image lined up after reprojection - but it doesn't. To test a step further I created a QGIS user-defined CRS with the same projection parameters as the earlier GDAL version, and then reprojected with this - everything now lines up fine. Are the EPSG:27700 projection parameters the likely suspect in the later GDAL (which QGIS is using) - or am I barking up the wrong tree? Many thanks.


title: Can't install pyspatialite with python3 and sqlite3

text: I can't install pyspatialite. When I try it gives me this error:               pip install pyspatialite     Downloading/unpacking pyspatialite     Could not find a version that satisfies the requirement pyspatialite (from versions:      2.6.2-spatialite.2.3.1, 2.6.2-spatialite.2.4.0-4, 3.0.1-alpha-0)     Cleaning up...     No distributions matching the version for pyspatialite     Storing debug log for failure in /home/jenia/.pip/pip.log      The python interpreter that's installed in the virtualenv is 3.4.1. When I run explicetly:               pip install pyspatialite==2.6.2-spatialite.2.4.0-4      I get this:               Running setup.py (path:/home/jenia/pip/app/build/pyspatialite/setup.py) egg_info for package pyspatialite     Traceback (most recent call last):       File "<string>", line 17, in <module>       File "/home/jenia/pip/app/build/pyspatialite/setup.py", line 83         print "Is sphinx installed? If not, try 'sudo easy_install sphinx'."                                                                            ^     SyntaxError: invalid syntax     Complete output from command python setup.py egg_info:     Traceback (most recent call last):          File "<string>", line 17, in <module>          File "/home/jenia/pip/app/build/pyspatialite/setup.py", line 83          print "Is sphinx installed? If not, try 'sudo easy_install sphinx'."                                                                             ^           SyntaxError: invalid syntax           ----------------------------------------      Cleaning up...      Command python setup.py egg_info failed with error code 1 in /home/jenia/pip/app/build/pyspatialite      Storing debug log for failure in /home/jenia/.pip/pip.log      Does anyone know how to fix this error?


title: GetCount raises exception

text: I opted to use gp.GetCount in my script. This raises an exception, though the process completes "successfully" while returning zero features (which is untrue). I'm wondering how this could be. Using ArcGIS 9.1 and Python 2.1.               file = open(txt).read().splitlines()     for line in file:         query = "[FIELD] = \"%s\"" % line         if line[:].isdigit():             gp.SelectLayerByAttribute("lyr1", "ADD_TO_SELECTION", query)     result = int(gp.getCount("lyr1").getOutput(0))          gp.Append("lyr1", "featureclass", "NO_TEST")     gp.DeleteFeatures("lyr1")     gp.SelectLayerByAttribute("lyr1", "CLEAR_SELECTION")      Output looks like..               Execution GetCount lyr1 0     Row Count = 0     Executed Successfully      Frankly I just want to check if my feature layer (created with makefeaturelayer) is null.


title: Is it possible to move/shift an annotation to a new XY using Python?

text: Real quick question, I was wondering if it is possible to move/shift an annotation to a new XY using Python.


title: Which character encoding is used by the DBF file in shapefiles?

text: Which character-encoding is used by the dbf-file in Shape-files? It seems it is handled different, based on the program and the local encoding-settings of the machine. Which encoding is 'right' - specified for the format?


title: How to select an limited TOP n from a specific column in arcgis query builder

text: I'd like to know what is the best way to select a limited top 'n' of rows from a specific column of a geodatabase file. Currently I use a function in the query builder of the select tool (arcgis10) in model builder which look a lot like the one posted on another item on this site (Select top 5 most items in a geodatabase). It looks like this in the expression of the query builder: `[Join_Count] in(SELECT TOP 9 [Join_Count] FROM spatial_join_geodat ORDER BY [Join_Count] DESC)` With this function I am able get a top n, but if the 9,10,11,12..... rows have the same value also these rows are selected. And sometimes the 9th row has a 0 as value and then all the rows are selected which I don't want. So, how do I limit the number of rows to 9 if this is the case? Has anyone a solution for this? Thanks in advance!


title: Automatically download Modis image using python script

text: I need download Modis imagery automatically from the website: https://earthdata.nasa.gov/. I found this link: http://gis-techniques.blogspot.com/2010/06/getting-modis- image-automatically-from.html but I can't run it. In that code there's the line: `logFileread=open(r"D:\MODIS\MOD09\lpdaac.txt",'r')` I don't know the structure of this file.I don't know how to create it. If anyone knows the answer, please tell me. Thanks for any help!


title: GetMap Geoserver Width and Height

text: I was wondering how to avoid the Geoserver transformation that takes place once you request an image via GetMap by using `image/geotiff` at the end of the url sentence in the browser. I am experimenting with a geotiff that has 300 x 300 pixels (290 KB) in the server. If I set the parameters in the GetMap request (url):`width=1012&height=1012` The output image will have 1012 x 1012 pixels (1,002 KB). If I request `width=300&height=300` - as in the original - the output image will have 300 x 300 pixels and 290 KB. If I overlap the two images, both have the same bounding rectangle but obviously the pixels don´t match, understood. But the most intriguing and worrying thing is that if we analyze these 2 output images by using `gdalinfo -stats` in the command line, you will see that the 1012x1012 image has its parameters totally wrong (Minimum, Maximum, Mean, etc.) but the 300x300 one too. In fact the original image is a Float32 raster and the 2 output ones are type Byte. Is there any way of getting the original one from Geoserver, via url, without any transformation at all?


title: Openlayer map not loading

text: Just another OpenLayers problem Plugin is installed correctly but when I add a layer I get following message. (CRS is on Pseudo mercator) Can anyone help me out? An error has occurred while executing Python code: > Traceback (most recent call last): File > "C:\Users\s58sj/.qgis2/python/plugins\openlayers_plugin\openlayers_layer.py", > line 109, in draw self.render(rendererContext) File > "C:\Users\s58sj/.qgis2/python/plugins\openlayers_plugin\openlayers_layer.py", > line 158, in render for res in self.resolutions(): TypeError: 'NoneType' > object is not iterable > > Python version: 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit > (Intel)] > > QGIS version: 2.0.1-Dufour Dufour, ebebdf3 > > Python path: ['C:/PROGRA~2/QGISDU~1/apps/qgis/./python/plugins\processing', > 'C:/PROGRA~2/QGISDU~1/apps/qgis/./python', 'C:\Users\s58sj/.qgis2/python', > 'C:\Users\s58sj/.qgis2/python/plugins', > 'C:/PROGRA~2/QGISDU~1/apps/qgis/./python/plugins', > 'C:\PROGRA~2\QGISDU~1\bin\python27.zip', > 'C:\PROGRA~2\QGISDU~1\apps\Python27\DLLs', > 'C:\PROGRA~2\QGISDU~1\apps\Python27\lib', > 'C:\PROGRA~2\QGISDU~1\apps\Python27\lib\plat-win', > 'C:\PROGRA~2\QGISDU~1\apps\Python27\lib\lib-tk', 'C:\PROGRA~2\QGISDU~1\bin', > 'C:\PROGRA~2\QGISDU~1\apps\Python27', > 'C:\PROGRA~2\QGISDU~1\apps\Python27\lib\site-packages', > 'C:\PROGRA~2\QGISDU~1\apps\Python27\lib\site-packages\PIL', > 'C:\PROGRA~2\QGISDU~1\apps\Python27\lib\site-packages\win32', > 'C:\PROGRA~2\QGISDU~1\apps\Python27\lib\site-packages\win32\lib', > 'C:\PROGRA~2\QGISDU~1\apps\Python27\lib\site-packages\Pythonwin', > 'C:\PROGRA~2\QGISDU~1\apps\Python27\lib\site-packages\wx-2.8-msw-unicode', > 'C:\PROGRA~2\QGISDU~1\apps\qgis\python\plugins\fTools\tools']


title: Drag a Feature in ESRI, ArcObjects Engine (AxMapControl)

text: I'm trying to implement moving a point feature in a custom C# ArcGIS Engine application on an AxMapControl. I've already created a custom tool to do some other things. And I can track when the user is doing a drag-type operation (i.e. click and hold while moving the mouse). What I'd like to be able to do is give some visual feedback of the drag operation, but I'm not sure how to do that. I can handle the feature selection, identifying the drag, and getting the new position, etc. Just need help specifically with the drag feedback. Ideally I would like to update the cursor to have the same symbology as the feature, but that's not an absolute requirement.


title: Road Symbol/Label issues

text: I am trying to control how many road symbols and how do I do that ? I have geodatabase that has Transportation and in it has a featureclass, "Major_Rds" and it also has three symbology for Interstate, NM state roads, and US roads. What I would like to do is to limit a few symbols to be display at a specific scale. Thanks![enter image description here](http://i.stack.imgur.com/DUpez.png) You can see there are too many road symbols in Southeast New Mexico but you see a few in Northwest Texas. HELP !!!!!


title: Normalizing and adding kernel density rasters

text: I have 4 years of road kill data for one road, though each year has a different sample time frame (i.e. May-June vs. April-October) and therefore each year has a different number of surveys and totals of road kill. I would like to compare kernel density rasters to find the worst kill locations when the 4 years are combined, but I do not want to bias the data toward the year with the greatest number of kills. (I am assuming kill locations in years with fewer samples are representative). How can I normalize the rasters so I can add them and find the greatest kill hot spots on the road?


title: Planetary-scale computing architectures for electronic trading: where is the data?

text: In his intriguing TED Talk, _How algorithms shape our world_ , Kevin Slavin shows this map from "Planetary-scale computing architectures for electronic trading" ... does anyone know if this data is available online? ![enter image description here](http://i.stack.imgur.com/PHt9L.png)


title: geoserver export shapefile chinese problem

text: I'm trying to export shpfile from a postgis to shape-zip . So i issue the standard GetFeature request with shape-zip as format to geoserver. The shpfile which i get Charset is ISO-8859-1 so the chinese is '????' . How can i change the iso-8859-1 to utf-8? postgis charset is utf-8 and geoserver global charset is utf-8 ![enter image description here](http://i.stack.imgur.com/xN67A.jpg)


title: Where do I find information where I can download the legislative mapping data

text: > **Possible Duplicate:**   >  Where I can download legislative mapping data? It is a collection of files downloaded from aristotle to map Zip to District data. Among the files are 1. Census Code (ILCENSUS) which has County Census Code, State Census Code and State County Name 2. Legislator Identification (IL105ZD) which has district address information, legislator number and name. 3. Legislative district mapping(ILLEGYY) which has County Code, State Census Code and Zip.


title: Best way to visualize Google Maps and Mapinfo (or SHP or SQLite) at the same time?

text: I am having a bunch of Mapinfo data of a large area. This data has multiple layers and is also available as SHP, and of course it could be easily converted to SQLite ("SpatiaLite"). Although probably only one layer needs to be visualized at this point. The problem is: **The customer needs to select a rectangle** from the data so it can be processed further. I already though of writing a Google Maps Plugin / Mashup that is fed by some AJAX/JSON. Or writing a Plugin for uDig. (OpenJUMP won't be appropriate because it has problems handling large amounts of data.) Another idea was writing a Java app with Google Maps embedded and maybe some (OSS) overlay that visualizes the SHP/Mapinfo data. Each solution has its good sides but also its bad sides. So, what do you think is the best way to realize it? Thanks, Philip BTW: The solution should not consist of expensive Closed-Source Tools.


title: Data ETL workflow optimization

text: I have a legacy workflow that I would like to optimize and automate (at least partially). The current workflow goes like this. I receive a MS Access .mdb file containing a single table. This table is then loaded into an an existing Access db that contained some macros ,which I will reference later, and renamed BTMUA. To the table BTMUA several fields are manually inserted into the middle of the table. Additionally two fields data types are changed from text to date to more accurately reflect the data they contain. Once these changes have been completed a series of queries, via two macros, are run to parse, trim, and concatenate data from the original fields into the new fields. Specifically Field A id parsed into fields A1 A2 using a left and right functions, likewise field B is parsed into field B1 and B2. Any whitespaces are removed from fields A1, A2, B1, and B2 fields are removed. Finally fields A1, A2, B1, B2, and C are concatenated in one of 7 different ways depending on which fields actually contain data. Here ends the data modification and my use of Access. I then use FME Desktop load this data into an existing table in my MS Sql based SDE GDB (after first truncating the table). I would like to redesign this workflow and remove Access from the equation although I cannot change the fact that the data will originate in a .mdb file. I would also like to automate the process as much as possible so it can run either with a few mouse clicks or on a fixed schedule. Basically I am trying to figure out if it is best to use FME to load the data from the .mdb into my GDB and use either ArcCatalog and Model Builder or MS SQL Server management Studio an T-SQL to transform the data. Or is it more efficient to utilize FME Desktop to do the data trans formations.


title: Errors when creating a TextElement from ArcObjects

text: I am attempting to add some text in the layout view of ArcMap. I’m using the following line for the TextElement that I’ve found online from numerous places including ArcObjects Library Reference. Being new to ArcObjects, I'm not sure if I'm doing something wrong or if there is something else going on that I'm unaware of.               ITextElement textElement = new TextElementClass();       I’m receiving the following errors:               The type TextElementClass has no constructors defined     Interop type TextElementClass cannot be embedded.       Full Code:               protected override void OnClick()         {             IMxDocument mxDoc = ArcMap.Application.Document as IMxDocument;             IMap map = mxDoc.FocusMap;             IActiveView activeView = map as IActiveView;             IPageLayout pageLayout = activeView as IPageLayout;                  if (activeView is IPageLayout)             {                 IGraphicsContainer graphContainer = pageLayout as IGraphicsContainer;                 ITextElement textElement = new TextElementClass();                  textElement.Text = "Test";                 IElement element = textElement as IElement;             }             else             {                 MessageBox.Show("This tool only functions in layout view");             }             activeView.Refresh();         }


title: How can I tell a GP model that exports a dbf to NOT add it to the 'List by Source' window?

text: I have a GP Model that simply exports a selected points lat and long to a DBF. I would like to make it so it does not add the table to the list by source window as it hangs for an annoying amount of time and I do not need to use the exported table in the map anyway.![Picture of model in question](http://i.stack.imgur.com/CihUR.jpg)


title: How to configure partial word matching in AnswerWorks-Vantage Linguistics on ESRI Desktop and Server products?

text: ESRI, like many companies, has licensed iSEEK AnswerWorks from Vantage Linguistics for natural language search of the ArcGIS Help system. At ArcGIS 10, ESRI dropped the Microsoft Keyword indexing search function from the Help system. Unfortunately, ESRI's default settings for the indexed AnswerWorks searches are "full word match" only. Has anyone figured out how the AnswerWorks settings in ArcGIS can be modified to return "partial word match" searches?


title: Import .cdr file into gis/cad format

text: I have a corel draw (.cdr) file that I would like to import into a GIS. It is a vector format which I thing has no geographic information associated. I would like to be able to get it into MapInfo Professional and use the vector registering tools to place it correctly. The problem I have is I cannot get it into .tab easily. Does anyone know a way of getting it into any GIS/CAD format I could work with Thanks,


title: Why does ModelBuilder lose data sources when copy/pasting or renaming toolbox?

text: I have a modelbuilder with a parent model that contains several sub-models. The parent and sub-models are contained w/in the same toolbox. Everytime I copy&paste or rename the toolbox, the parent models shows a red x and when i open it, I can see that the submodels w/in the parent also have red x's. The issue seem to be that the sub-models loose their input sde data sources and so I have to re-establish them and then re-add them to the parent model. I would like to find out what causes the models to fail like this when copying or renaming. I'm using Desktop 10.2. The screenshot is of the parent model. The top row shows the failed sub-models and the bottom row is me in the middle of editing and re-adding the submodels to the canvas.![enter image description here](http://i.stack.imgur.com/mL6GT.jpg)


title: ERROR: "Can't save to disk (check for space, write permission, or name)" while creating TIN in memory

text: I get the following error while creating TIN in memory : ERROR 999999: Error executing function. Can't save to disk (check for space, write permission, or name). Failed to execute (CreateTin). I don't have any issue with writing any feature class in memory, I wonder why it doesn't work for TIN.               TIN = arcpy.CreateTin_3d("in_memory/TIN", Coordinate_System, "XS_lyr P001 hardline FID", "DELAUNAY")      When I remove the "in_memory/" and just save it on local drive it works fine.


title: Can I use GeoTools with Gradle?

text: I am going to implement shapefile uploading from a webform, and ingestion into PostGIS. One problem I am having is that my project is using **Gradle** for dependency management. I am unfamiliar with Gradle and have no idea how to find the right string to get the jars into my project.


title: How to create 3D web application using Open Source GIS software?

text: I'm using OpenLayers - 2.11,GeoServer 2.13, ExtJS 3.4, and Java for developing GIS based web applications. How can we create GIS based 3d application like below attachment using opensource softwares in GIS. ![enter image description here](http://i.stack.imgur.com/U4iDk.png) ![enter image description here](http://i.stack.imgur.com/vJZVK.png)


title: Postcode Boundaries : India

text: I was wondering if there are shape-files for postcode regions in India. I did find some shape-files that give the outline of the administrative units in the country but not with postcodes. Right now I am using Google Map API that highlights the region under pin-code. ## Update It looks like the information is not present in public domain. It looks like either you can crowdsource the information or buy it from a thirdparty called MapMyIndia. I found a blog by Anand.S where he wrote about his crowdsourcing idea. Other than this I couldn't really find anything interesting. mapping-pin-codes Thanks


title: Are there downloadable samples of Geoprocessing tools that can be published as Geoprocessing Service tasks?

text: I am looking for examples of Geoprocessing Services which contain a tool/script for download.


title: PostGis ST_Transform: failed to load NAD27-83 correction file (-38)

text: So I'm getting some user drawn polygons in WKT with OpenLayers. (Web Mercator CRS) and I now need to now convert it to SRID4326 so can do some spatial queries. However, when it fails to do a ST_Transform. A simplified query I run that gives me the error:               SELECT ST_AsText(            ST_Transform('SRID=3857;POLYGON((-10179308.152034 5209576.5082574,-10140172.393558 4329021.9425348,-8516038.4167805 4329021.9425348,-9514000.2579329 5385687.421402,-10179308.152034 5209576.5082574))'::geometry,4326)     );      It gives me this error: > ERROR: transform: couldn't project point (-1.08446e+07 5.1652e+06 0): failed > to load NAD27-83 correction file (-38) > > HINT: PostGIS was unable to transform the point because either no grid shift > files were found, or the point does not lie within the range for which the > grid shift is defined. Refer to the ST_Transform() section of the PostGIS > manual for details on how to configure PostGIS to alter this behaviour. > cohere=> select postgis_full_version(); Even after a bit of google-foo, I still can't figure out how to install the correction file I can do And I can do other transformations just fine (I tried 4326 to 2026 and 3857). I read somewhere to check to make sure PROJ is installed and it is: `SELECT PostGIS_Full_Version();` > POSTGIS="1.5.2" GEOS="3.2.2-CAPI-1.6.2" PROJ="Rel. 4.7.1, 23 September 2009" > LIBXML="2.6.26" USE_STATS Thanks,


title: Can't cast from IFeatureClass to IFeatureClassLoad

text: I'm attempting to load a large number of features (up to 310k) into a feature class. It is functional at the moment, but speed is a major issue. It takes about .42 seconds per 1000 features. I've seen references to putting the feature class in LoadOnlyMode, but to do so I need to cast to IFeatureClassLoad. This cast always fails. Here is how the feature class is created. It's nearly ripped straight out of an esri example page. I'm passing in a scratchworkspace created using the ScratchWorkspaceFactory, and thats pretty much the only thing of importance.               public IFeatureClass CreateFeatureClass(IWorkspace workspace, IFeatureDataset featureDataset, Type modelType, String featureClassName, UID CLSID, UID CLSEXT, String strConfigKeyword)         {             if (featureClassName == "") return null;                  IFeatureClass featureClass;             var featureWorkspace = (IFeatureWorkspace)workspace;                  var dataset = workspace.Datasets[esriDatasetType.esriDTFeatureClass].Next();             while (dataset != null)             {                 if (dataset.Name == featureClassName)                 {                     featureClass = featureWorkspace.OpenFeatureClass(featureClassName);                     return featureClass;                 }             }                  // assign the class id value if not assigned             if (CLSID == null)             {                 CLSID = new UID();             }                  IObjectClassDescription objectClassDescription = new FeatureClassDescription();             var name = new FeatureClassName {NameString = "Collisions"};                  // create the fields using the required fields method             var fields = objectClassDescription.RequiredFields;             IFieldsEdit fieldsEdit = (IFieldsEdit)fields; // Explicit Cast                  var typeField = new Field();             var editableField = (IFieldEdit)typeField;                  editableField.Name_2 = "TYPE";             editableField.Type_2 = esriFieldType.esriFieldTypeString;             editableField.IsNullable_2 = true;             editableField.AliasName_2 = "TYPE";             editableField.DefaultValue_2 = "Collision";             editableField.Editable_2 = true;             editableField.Length_2 = 100;             fieldsEdit.AddField(typeField);                  foreach (var property in modelType.GetProperties().Where(x => x.GetCustomAttributes(typeof(SearchableAttribute), false).Any()))             {                 var returnType = property.GetGetMethod().ReturnType;                 var searchData = (SearchableAttribute)property.GetCustomAttributes(typeof(SearchableAttribute), false).First();                 IField field = new Field();                 var fieldEdit = (IFieldEdit)field;                      fieldEdit.Name_2 = searchData.DisplayName.Trim();                 fieldEdit.Type_2 = returnType == typeof(DateTime) ? esriFieldType.esriFieldTypeDate : esriFieldType.esriFieldTypeString;                 fieldEdit.IsNullable_2 = true;                 fieldEdit.AliasName_2 = searchData.DisplayName;                 fieldEdit.DefaultValue_2 = string.Empty;                 fieldEdit.Editable_2 = true;                 fieldEdit.Length_2 = 250;                      // add field to field collection                 fieldsEdit.AddField(field);             }             fields = (IFields)fieldsEdit;                  String strShapeField = "";                  // locate the shape field             for (var j = 0; j < fields.FieldCount; j++)             {                 var field = fields.Field[j];                 if (field.Type == esriFieldType.esriFieldTypeGeometry)                 {                     strShapeField = field.Name;                     IGeometryDef geomDef = new GeometryDef();                     var geometryDefEdit = (IGeometryDefEdit)geomDef;                     geometryDefEdit.GeometryType_2 = esriGeometryType.esriGeometryPoint;                     geometryDefEdit.SpatialReference_2 = ArcMap.Document.FocusMap.SpatialReference;                     ((IFieldEdit)field).GeometryDef_2 = geomDef;                     break;                 }             }                  // Use IFieldChecker to create a validated fields collection.             IFieldChecker fieldChecker = new FieldChecker();             IEnumFieldError enumFieldError = null;             IFields validatedFields = null;             fieldChecker.ValidateWorkspace = (IWorkspace)workspace;             fieldChecker.Validate(fields, out enumFieldError, out validatedFields);                  // The enumFieldError enumerator can be inspected at this point to determine              // which fields were modified during validation.                       // finally create and return the feature class             if (featureDataset == null)// if no feature dataset passed in, create at the workspace level             {                 featureClass = featureWorkspace.CreateFeatureClass(featureClassName, validatedFields, CLSID, CLSEXT, esriFeatureType., strShapeField, strConfigKeyword);             }             else             {                 featureClass = featureDataset.CreateFeatureClass(featureClassName, validatedFields, CLSID, CLSEXT, esriFeatureType.esriFTSimple, strShapeField, strConfigKeyword);             }                  return featureClass;         }      Once that's done I attempt to load the features from a list of geometry points. The code starts like this:               var featureWorkspace = (IFeatureWorkspace) workspace;     IFeatureClass featureClass = featureWorkspace.OpenFeatureClass(FeatureClassName);     var loader = featureClass as IFeatureClassLoad;     if (loader != null) loader.LoadOnlyMode = true;     var schemaLock = (ISchemaLock) featureClass;     schemaLock.ChangeSchemaLock(esriSchemaLock.esriExclusiveSchemaLock);      where the loader variable is always null. am i missing something obvious? is my feature class not compatible with that interface? ## **EDIT** In case anyone else comes across this, the problem here was that i was using the ScratchWorkspaceFactory. that class creates a personal geodatabase, and its features cannot be cast to IFeatureClassLoad. FileGDBScratchWorkspaceFactory creates Local file workspaces, and its feature classes can be cast to IFeatureClassLoad. Devil is in the details.


title: Converting Geocentric to Geodetic

text: I am only looking for a confirmation of what I believe to be true. If my explaination or conclusion is not accurate I would appreciate it if the reason can be explained to me. Background Information: I am attempting to research a method to calculate the Latitude, Longitude, and Height of a point on the planet earth given Range, Azimuth, and Elevation of a point relative to another point where the Lat, Long, and Altitude is known. I am going to be using a geophysical library that allows me to provide it a geocentric value and it will return a Latitude and Longitude and the Geodetic Datum. Is WGS-84 is a valid datum for a Geocentric datum?   If I provide it a WGS-84 (X,Y,Z) point should it return a WGS-84 Latitude and Longitude?


title: Why does Describe function fail on annotation layer with RuntimeError: Object: Describe input value is not valid type?

text: I am accessing layers in an mxd programatically and also accessing the layer properties using the Describe function                lyr =arcpy.mapping.ListLayers(mxd) # gets me the list of layers in mxd           desc= arcpy.Describe(lyr[8]) #returns the properties of the layers       This last step fails at one of the layer "Annotation Class 1" as the layer has white space characters or a probable keyword ( I suppose) in it showing me the following error: > RuntimeError: Object: Describe input value is not valid type How do I handle that? It is impossible for me to go and manually change all mxd layer names with whitespace, please help, thanks


title: Transparency for PDFs in Arc

text: Trying to generate a vector-based PDF map, which includes transparencies, for quality purposes. However, I'm finding that transparencies get rasterized instead and is lower quality. Is there any solution to this other than exporting the PDF to Illustrator and manually applying transparencies there?


title: How to embed an OpenLayers map in a blog post?

text: I have a map in GeoServer which I need to publish in a blog post. I'm pretty sure this is possible but I am not managing to make it work. I'm posting the html source code from the openlayers layer preview I get from geoserver, but not getting the map... Any help? Thanks


title: How does ArcGIS calculate the "inside" point for "Feature to Point"

text: Let me back up and say that from what I understand there are two common ways to calculate the centroid of a polygon in ArcGIS:   1. Using Calculate Geometry on fields within the attribute table of the feature class.   2. Using `Data Management -> Features -> Feature to Point` from the toolbox. These both give the same result - the geometric centroid of the polygon. However, there is no guarantee that point lies inside the polygon. The Feature to Point tool has an inside checkbox option, that according to the documentation: > Uses a location contained by an input feature as its output point location. What I would like to know is how is this point calculated by ArcGIS and what is its "theoretical" meaning, if that makes sense.


title: How to determine a point lays within a polyline in arc engine?

text: I recently asked a similiar question on this, however I needed to know if there is a way to solve this if I only have a IPolyline Feature, and not the whole layer. I want to know if I can determine if a point lays within my Polyline feature. I tried using both intersect and difference from ITopologicalOperator, but still no use. Please Help:                 private bool PointLaysWithinLine(IPolyline currentPath, IPoint iPoint)         {             IPolyline newLine = new PolylineClass();             ((IPointCollection)newLine).AddPoint(iPoint);             newLine.Project(currentPath.SpatialReference);          //This doesn't work             IPolyline intersection = ((ITopologicalOperator)currentPath).Intersect(newLine, esriGeometryDimension.esriGeometryNoDimension) as IPolyline;          //This also doesn't work             IPolyline difference = ((ITopologicalOperator)currentPath).Difference(newLine) as IPolyline;                  return currentPath.Length != difference.Length;          }      _**_** _*_ ** _*_ ** _*_ ***** _UPDATE_ ** _*_ ** _*_ ** _*_ ** _*_ **** So after playing around for 2 days with user's comments and ideas. I came up with this code (thanks jakub)               point.SpatialReference = IMap.SpatialReference;     ISpatialFilter spatialFilter = new SpatialFilter();     spatialFilter.Geometry = point;     spatialFilter.GeometryField = ((IFeatureLayer)layer).FeatureClass.ShapeFieldName;     spatialFilter.SpatialRel = esriSpatialRelEnum.esriSpatialRelIntersects;     IFeatureCursor flowPathCursor = ((IFeatureLayer)layer).FeatureClass.Search(spatialFilter, true);          if (flowPathCursor.NextFeature() != null)        result = true;      The above code works for MOST time, however, some rare case it still CANNOT find the feature. Note that I USED snapping (vertices/edges) so it should be dead on. Also I tried using the slope y=mx+b method, and IIdentify2.Identify. They all work MOST time but some rare case (i notice it happening most often on straight EDGES). Any one have any idea? This is driving me insane.


title: Data Sharing in Geoserver

text: What are all the folders I have to share with others who would like to use my data ? I gave workspaces and styles folder. But it is not working in Geoserver 2.4.4. Since layergroup is inside the workspace I ignored the layergroup folder ![enter image description here](http://i.stack.imgur.com/5fPDC.jpg)


title: How to Validate a GeoJSON

text: I have a small script that I'm using to generate GeoJSON data from a data format not currently supported by GIS software. I would like to validate the output, but when I use ogr2ogr to read it, it doesn't give me any helpful information about what aspects, lines, or characters contained invalid data. Is there a decent GeoJSON validator somewhere, or a good method of validating GeoJSON data with OGR? EDIT: I am _not_ looking for JSON validators or the GeoJSON spec. I've seen and used both to get to this point, but OGR still returns an error. Thanks!


title: Unwanted dangle errors

text: As shown in the image is there any possibilities to avoid unwanted dangle errors in arcgis ?! 1:![enter image description here](http://i.stack.imgur.com/BLTLH.jpg)


title: How to save space in the legend and write the layer name besides the symbol?

text: I'm starting using QGIS to make a project for university and I am with a problem on configuring legends on Print Composer. The thing is I want the text of my legend to appear after the symbols/coloured rectangles and not above. My legend doesn't fit in the space because I have 2 lines for each layer when I could have just one. Is there any way I can solve this? ![enter image description here](http://i.stack.imgur.com/cmvtR.png)


title: Where can I find map icons for famous Paris landmarks?

text: Title says it all: looking for icons for famous landmarks in Paris, such as the Eiffel Tower, Arc de Triomphe, Louvre, Notre Dame. These should do. For other poi's I have general category-icons, but it would be nice to have special onces for the most well-known. (also from a ux-standpoint: i.e: 'getting your bearings' it would be great) Anyone knows where to look?


title: arcpy.AddMessage and codepage problems

text: Some times in my tools I need to output Cyrillic text via `arcpy.AddMessage` function. Previously in 10.0 it was very easy. I had .py file of the tool saved in UTF8 codepage. This code wrote messages in Cyrillic with system locale 'cp1251':               source_message = u'Some Cyrillic text here'     message = source_message.encode('cp1251')     arcpy.AddMessage(message)      But in 10.1 the same piece of code writes `<msg>0;` to messages. I have tried several ways of output (utf8, cp1251, unicode) with combinations of saving source .py file in different codepages - no way. May be anybody faced similar problems in 10.1 ? PS I am trying to run this tool in ArcCatalog 10.1 sp1


title: Is it possible to automatically create categories with mapserver?

text: I have a mapfile connecting to a postgres/postgis database. To create a thematic map I can set a class item and a number of classes, for example:               CLASSITEM  "aantal"         CLASS             NAME "0"             EXPRESSION ([aantal] = 0)              STYLE                 COLOR 116 255 117                  OUTLINECOLOR 178 178 178             END         END         CLASS             NAME "100-250"             EXPRESSION ([aantal] >= 1 AND [aantal] <= 2)              STYLE                 COLOR 0 255 0                  OUTLINECOLOR 178 178 178             END         END         CLASS             NAME "250-500"             EXPRESSION ([aantal] >= 3 AND [aantal] <= 10)              STYLE                 COLOR 0 210 0                  OUTLINECOLOR 178 178 178             END         END      However I have to do this 25 times with different attributes and different values. So I would like to know whether it is possible to do this automatically. Similar to the option in QGIS where you can set the number of classes and mode.


title: How can I write a GEOTIFF in C#?

text: I want to upload a jpeg or some raster image into a C# form and then on entering the latitude and longitudes I need to be able to create an GEOTIFF file of the same image. How can this be done in C#.NET?


title: How to create polygons from lines?

text: I am trying to create polygons from a line layer of lots and concessions (large blocks of land in rural areas). The lines are mainly grid style as they intersect mostly at right angles. I need to create polygons from these lines. Tired it in QGIS and it did not work. Any suggestions other than digitizing? I'm using ArcEditor 10. Thanks!!


title: ArcSketch for version 10?

text: I was looking for a version 10 update of the ArcSketch (free) add- on/extension. > ArcSketch allows you to sketch features quickly, easily, and intuitively > without having to plan ahead or deal with much ArcGIS overhead. Afterward, > the sketched features can be converted into standard features and shared > with others. > > ArcSketch allows you to create and edit sketches without having to specify > the layer each time. You can generate symbols that specify the creation of > feature classes and attributes with defined structure. Looking at the download options, it only lists 9.1-9.3 versions. According to the faq's, _appears_ that the functionality has been rolled into "future versions". Is it hiding somewhere is 10? > ArcSketch is no longer a supported product. Its functionality is being > incorporated into a future release of the core ArcGIS Software. If this does not exist in v10, does anyone know of alternatives (either ESRI or other software) that allows users to be able to quickly digitize and symbolize data without having to be an expert in the GIS software. I hope to allow managers or operators to create GIS data quickly in a emergency response scenario, without being a GIS person.


title: Get GPS way points to exact place

text: I added some GPS way points on land use layer. but way points are not in exact place.(Way points are located at little bit away from exact place) I want to adjust way points to exact place. GPS was Magellan 610 My PC's OS is windows 7 They all little bit away from exact location. and map frame with GCS_WGS_1984_44N CRS, And GPS shape file also with GCS_WGS_1984_44N CRS. I'm Using QGIS 1.7 for this activity.


title: OpenLayers3 vs Leaflet for styling multifeature geojson

text: I'm experimenting with various options for displaying geographic information to the public in html format. The ultimate aim is to build an online application where anyone can add the route they cycle to work and points of danger, for a project comparing perceived risk with actual accident data. Anyway, getting to the point, some colleagues and I have added our routes to a geojson file hosted by GitHub for a 'proof of concept' map. We used the nifty geojson.io interface to create this, and it can be seen on our GitHub page. The question, now that we have some example data online is how best to visualise it, styling the points for different levels of severity and risk. A colleague has demonstrated how the points can be styled based on attributes, but the code is very long compared with what can be done quickly in CartoCSS:                function initialize()  {         var map = L.map('map').setView([53.851,-1.61], 12);         L.tileLayer('http://tile.openstreetmap.org/{z}/{x}/{y}.png', {             attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA, Imagery © CloudMade',             maxZoom: 18         }).addTo(map);              L.geoJson(geojsonFeature, {             onEachFeature: onEachFeature,             pointToLayer: pointToLayer,             style : myStyle,          }).addTo(map);      }          function onEachFeature(feature, layer) {         var popupContent = feature.properties.Person + " " + feature.properties.Place;          layer.bindPopup(popupContent);     }          function pointToLayer(feature, latlng) {         return L.circleMarker(latlng, myStyle);     }          function myStyle(feature, layer)    {              switch (feature.properties.Place)   {                  case 'Home' :                 return style4;             break;                  case 'Work' :                  return style4;                break;                  case 'Danger':                  if (feature.properties.Severity == 1)   {                     return style1;                 }                      else if (feature.properties.Severity == 2)  {                     return style2;                 }                      else return style3;                  }     }             var style1 = {         "color": "#00FF00",         "radius" : 8,         "weight": 1,         "opacity": 1,         "fillOpacity": 0.5     };          var style2 = {         "color": "#FFFF00",         "radius" : 8,         "weight": 1,         "opacity": 1,         "fillOpacity": 0.5     };          var style3 = {         "color": "#FF0000",         "radius" : 8,         "weight": 1,         "opacity": 1,         "fillOpacity": 0.5     };          var style4 = {         "color": "#0000FF",         "radius" : 8,         "weight": 1,         "opacity": 1,         "fillOpacity": 0.5     };      I have looked at the geojson documentation for both Leaflet and OL3, but cannot find out how to do this properly. So really I have two questions, one specific and one more general:   1. Would OpenLayers3 be able to do this better?   2. Are there any other options for quickly styling geojson data for webmaps?


title: Algorithm to find coordinates at selected intervals along a polyline?

text: I am developing an algorithm to search down a river at selected intervals and return the coordinates. See below:               def Downstream(start, interval, data, offset=0, out=None):              if out is None:                  out = []              if start in data:                  shape, length, end = data[start]                  length = length[0]                   if interval < length:                      distance = offset                      while distance < length:                          out.append((shape, distance))                          distance += interval                      distance -= interval                      Downstream(end, interval, data, interval - (length - distance), out)                  else:                      Downstream(end, interval, data, offset - length, out)              return out      The `data` being searched is a dictionary of 4 parallel arrays: `start` coordinates at the beginning of a reach of river , `end` coordinates at the end of a reach of river, `length` segment length, and `shape` is its actual shape, oriented to run from start to end. The dictionary is keyed by `start`. Currently when I enter a key and interval, it returns all the possible intervals until the end, but the same coordinates with each interval. This question is how I began developing this algorithm . Select points approx. 2000 metres from another point along a river? The function `Along` is mentioned, but I have not been able to find any information on it. This could be the solution to my algorithm. The code is in Python script using ArcGIS 10.1


title: T-shaped polygons

text: Is there any coefficient that can indicate T-shaped polygons ? Examples of T-shaped polygons : ![enter image description here](http://i.stack.imgur.com/y2QEb.jpg)


title: GRASS GIS - v.select- ERROR: bad allocation -

text: I'm quite new to Grass GIS. I have two vector maps, one of a grid (each grid cell is a polygon) and one of a much larger polygon. I've been trying to select the grid cells that lie completely within the larger polygon. I've tried using the spatial query (v.select) with the 'within' option, but keep getting a "ERROR: bad allocation" message. no such error appears to be returned for the 'intersects' or 'overlaps' options of v.select Any help would be appreciated Kind regards, Yoni


title: Postgresql table won't display in QGIS 2.2

text: I just downloaded QGIS 2.2 to check it out and now one (just the one) of the tables from one of my PostgreSQL database won't display. It loads just fine in 2.0. The records are all there (there's only 3 in this case), I can see them in the attribute table, I can query them, but they don't show up on the map. When I try to zoom to a particular feature it pans the map down to the origin of the datum (coordinates 0,0) - but when I zoom to the extent of the layer it sets the map back to where it is supposed to be. What am I missing in the jump from 2.0 to 2.2?


title: OpenLayers: How do I keep a feature fixed while the map layer is moved (like in-car GPS displays)?

text: I am aiming to create something simple that works like a GPS navigation display, where the marker for 'you are here' is fixed while the map moves along. I have latitude and longitude coordinates supplied but when I move the map, the marker moves too - even though I tried setting the marker's layer to `isFixed: true`. Here's what I'm using to set up the map:               var map = new OpenLayers.Map('map');     var baseLayer = new OpenLayers.Layer.MapServer('base layer', 'url', {map: 'something.map'}, {layers: 'base'}, {transitionEffect: 'resize'}, {gutter:'15'});          var markerLayer = new OpenLayers.Layer.Vector('marker', {isFixed : true});     var feature = new OpenLayers.Feature.Vector(       new OpenLayers.Geometry.Point(100, 1.5),       {some:'data'}, {externalGraphic: 'img/marker.png', graphicHeight:25, graphicWidth:30});     markerLayer.addFeatures(feature);          map.addLayer(baseLayer);     mapp.addLayer(markerLayer);     map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);      A script at the bottom of my HTML updates `lat` and `lon` with coordinates (in degrees) pushed to it every second via a server-side event. After that, every second I am calling `map.setCenter(new OpenLayers.LonLat(lon, lat), zoom)` to re-center the map. At first I thought that if I drew my feature on a new, fixed layer, it wouldn't move, but the feature seems to be being drawn at 100N 1.5E, and staying there despite me panning the map. I want the marker to just stay where it is no matter how you pan the map. P.S. My map re-centering feels rather inefficient as I am creating a new LonLat every time, but I couldn't figure out from the API docs any way to directly update it e.g.:               center = new OpenLayers.LonLat(lon, lat);     map.setCenter(center, zoom);     FOR every second       ... update lon and lat with SSE ...       center = new OpenLayers.LonLat(lon, lat);       map.setCenter(center, zoom);     END FOR      Any help or suggestions would be much appreciated! :)


title: gdalwarp - strange result

text: I have an input jpg image (sat thumbnail) and I know a number of gcps for this image. I want to reproject the jpg to have a north up image. This is what I do: `./gdal_translate -of GTiff -a_srs EPSG:4326 -gcp pixel line lon lat -gcp pixel line lon lat ... etc... myinputfile.jpg temp.gtif ./gdalwarp -t_srs EPSG:4326 -r near temp.gtif myoutputfile.tif ` The result is "almost" correct, although I do get some strangest behaviours sometime, eg the image folds on itself, etc... very artistic but not good for a GIS application! If anybody can see anything wrong with the way I proceed or has a better idea, please advise! ### Edit Alright, it is working now. I believe the "weird" results were down to the fact I used a temporary file that was not deleted between gdal calls. As soon as I had the temp file removed (rm temp.gtif) between calls the results were fully normal.


title: Europe sub-national urban rates

text: Urban rate (the % of population living in urban areas) is a rather common demographic indicator, at nation-level resolution. I'm trying to locate sub- national urban rate data (NUTS level 2 to be precise) The raw data is accessible more or less in country census data, yet appears in a plethora of languages and sources. So if anyone knows of a source for urban rates, I would appreciate it.


title: How can I locate additional GCPs?

text: I'm a new user of QGIS. I'm georeferencing a scanned image of topographic map. At least 16 GCPs were required for us to locate. However, only 12 can be located and can be identified and be defined based from the coordinates given in the corners, horizontal and vertical borders and tick marks in the middle. Are there any other ways to obtain define coordinates of other GCPs accurately? Is interpolation possible in this case? If yes, how?


title: OpenLayers Vector Legend

text: I am looking for ways to add legend icons for vector features in OpenLayers. I am aware that GeoExt does this and have trawled through the code - but its not at all clear to me how it functions. Any pointers to examples and or pseudo code would be welcomed! Thanks!


title: OpenLayers.Popup.FramedCloud layout broken

text: On http://gis.stackexchange.com/a/19979/19654 i found a solution to add hover / mouseovers to my map:                      // add code to create tooltip/popup            popup = new OpenLayers.Popup.FramedCloud(               "",               feature.geometry.getBounds().getCenterLonLat(),               null, //new OpenLayers.Size(320,20),               "<div>" + feature.attributes['name'] + "</div>",               null,               true,               null);                 feature.popup = popup;      Doing this i found the popup don't have a nice / clean layout, see: ![enter image description here](http://i.stack.imgur.com/u6dik.png) I tried with a fixed size too (new OpenLayers.Size(320,20)) which seems to have the same effect. So, my question would be if someone has a cleaner/easier/nicer way to improve this? Thanks in advance for any hint on this.


title: How to create SLD with inline features and style and add to WMS using GeoTools?

text: I am trying to create labels with arbitrary values on a WMS map using GeoTools (9.4). I have created a feature type, a feature (in a data store), and a user layer. With that I generated an SLD document and sent it to Geoserver. Here is my code:               double x_min, y_min, x_max, y_max, width, height, x_center, y_center;          x_min = -10491786.13906;     y_min = 3869280.8541878;     x_max = -10478619.86094;     y_max = 3877727.1458122;          width = x_max - x_min;     height = y_max - y_min;          x_center = x_min + height / 2;     y_center = y_min + height / 2;          //  Create labels     SimpleFeatureTypeBuilder b = new SimpleFeatureTypeBuilder();     b.setName("ml");     b.setNamespaceURI("http://www.mylabel.com/");     b.setSRS("EPSG:900913");     b.add("geom", Point.class);     b.add("label", Integer.class);          SimpleFeatureType sft = b.buildFeatureType();          SimpleFeatureBuilder featureBuilder = new SimpleFeatureBuilder(sft);     GeometryFactory geometryFactory = JTSFactoryFinder.getGeometryFactory();          Point point = geometryFactory.createPoint(new Coordinate(x_center, y_center));     featureBuilder.add(point);     featureBuilder.add(1);          SimpleFeature feature = featureBuilder.buildFeature(null);          List<SimpleFeature> features = new ArrayList<SimpleFeature>();          features.add(feature);          MemoryDataStore mds = new MemoryDataStore(sft);          mds.addFeatures(features);               //  Create symbolization     StyleFactory sf = CommonFactoryFinder.getStyleFactory();     FilterFactory ff = CommonFactoryFinder.getFilterFactory();          Fill fillFont = sf.createFill(ff.literal("#ff0000"));     Font[] font = new Font[1];     font[0] = sf.createFont(ff.literal("sans-serif"), ff.literal("normal"), ff.literal("normal"), ff.literal(12));     Fill fillHalo = sf.createFill(ff.literal("#ffffff"));     Halo halo = sf.createHalo(fillHalo, ff.literal(3));     AnchorPoint ap = sf.createAnchorPoint(ff.literal(0.5), ff.literal(0.5));     Displacement d = sf.createDisplacement(ff.literal(0), ff.literal(0));     PointPlacement pp = sf.createPointPlacement(ap, d, ff.literal(0));     Symbolizer symbolizer = sf.createTextSymbolizer(fillFont, font, halo, ff.literal("label"), pp, "geom");     Style style = sf.createStyle();     style.setName("my-label");     StyleBuilder sb = new StyleBuilder();     style.featureTypeStyles().add(sb.createFeatureTypeStyle("my-label", new Symbolizer[] { symbolizer }));               //  Create SLD     StyledLayerDescriptor sld = sf.createStyledLayerDescriptor();     UserLayer ul = sf.createUserLayer();     ul.setInlineFeatureDatastore(mds);     ul.setInlineFeatureType(sft);     ul.addUserStyle(style);     sld.addStyledLayer(ul);          /*     // use UserLayerBuilder     UserLayerBuilder ulb = new UserLayerBuilder();     ulb.inlineData(mds, TYPE);     StyledLayerDescriptor sld = ulb.buildSLD();     */          SLDTransformer styleTransform = new SLDTransformer();     String sXml = styleTransform.transform(sld);          //  Create map     URL url = new URL("http://localhost:9080/geoserver/wms");     WebMapServer wms = new WebMapServer(url);          WMSCapabilities capabilities = wms.getCapabilities();     org.geotools.data.ows.Layer[] layers = WMSUtils.getNamedLayers(capabilities);          GetMapRequest map_request = wms.createGetMapRequest();     map_request.setFormat("image/png");     map_request.setDimensions(100, 100);     map_request.setTransparent(true);     map_request.setSRS("EPSG:900913");     map_request.setBBox(new Double(x_min).toString() + "," + new Double(y_min).toString() + "," + new Double(x_max).toString() + "," + new Double(y_max).toString());          map_request.setProperty(GetMapRequest.SLD_BODY, URLEncoder.encode(sXml, "UTF-8"));          GetMapResponse map_response = (GetMapResponse)wms.issueRequest(map_request);      Here is the SLD document:               <?xml version="1.0" encoding="UTF-8"?>     <sld:StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:sld="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" version="1.0.0">     <sld:UserLayer>     <sld:InlineFeature>     <FeatureCollection>     <gml:boundedBy>     <gml:Box srsName="900913">     <gml:coordinates xmlns:gml="http://www.opengis.net/gml" decimal="." cs="," ts=" ">-1.04875629932E7,3873504 -1.04875629932E7,3873504</gml:coordinates>     </gml:Box>     </gml:boundedBy>     <gml:featureMember>     <ml fid="fid--57398c6c_140a74006e1_-7fdf">     <:geom>     <gml:Point srsName="900913">     <gml:coordinates xmlns:gml="http://www.opengis.net/gml" decimal="." cs="," ts=" ">-1.04875629932E7,3873504</gml:coordinates>     </gml:Point>     </:geom>     <:label>1</:label>     </:ml>     </gml:featureMember>     </FeatureCollection>     </sld:InlineFeature>     <sld:LayerFeatureConstraints>     <sld:FeatureTypeConstraint/>     </sld:LayerFeatureConstraints>     <sld:UserStyle>     <sld:Name>my-label</sld:Name>     <sld:Title/>     <sld:FeatureTypeStyle>     <sld:Name>name</sld:Name>     <sld:FeatureTypeName>my-label</sld:FeatureTypeName>     <sld:Rule>     <sld:TextSymbolizer>     <sld:Geometry>     <ogc:PropertyName>geom</ogc:PropertyName>     </sld:Geometry>     <sld:Label>label</sld:Label>     <sld:Font>     <sld:CssParameter name="font-family">sans-serif</sld:CssParameter>     <sld:CssParameter name="font-size">12</sld:CssParameter>     <sld:CssParameter name="font-style">normal</sld:CssParameter>     <sld:CssParameter name="font-weight">normal</sld:CssParameter>     </sld:Font>     <sld:LabelPlacement>     <sld:PointPlacement>     <sld:AnchorPoint>     <sld:AnchorPointX>0.5</sld:AnchorPointX>     <sld:AnchorPointY>0.5</sld:AnchorPointY>     </sld:AnchorPoint></sld:PointPlacement>     </sld:LabelPlacement>     <sld:Halo>     <sld:Radius>3</sld:Radius>     <sld:Fill>     <sld:CssParameter name="fill">#ffffff</sld:CssParameter>     </sld:Fill>     </sld:Halo>     <sld:Fill>     <sld:CssParameter name="fill">#ff0000</sld:CssParameter>     </sld:Fill>     </sld:TextSymbolizer>     </sld:Rule>     </sld:FeatureTypeStyle>     </sld:UserStyle>     </sld:UserLayer>     </sld:StyledLayerDescriptor>      Geoserver returns the following error:               Element type "ml" must be followed by either attribute specifications, ">" or "/>".      I am expecting an image with a "1" in the center. The problem seems to be related to a missing namespace, but I don't know how to correct that. Thanks.


title: How to change the raster color range in GRASS NVIZ?

text: I'm trying to create a 3d map in GRASS NVIZ from a GDEM (raster) and the range of colors that show the height of the terrain are very ugly, how I can change them? For example, I would like the low levels in green and yellow high altitudes, simulating aridity with increasing altitude. Thanks.


title: Getting Coordinates from a feature with VBA

text: Is there a way to get the longitude and latitude coordinates from a feature class? I have some code which can select the first layer in the Table of Contents. I want to be able to get the lat./long. of a feature in that layer (any lat./long. within the Data Frame's current extent will do). With a point file I can see this being pretty straightforward (using the IPoint interface), but how would I go about do this with a polygon? (Bonus points to anyone who can tell me if I can get the lat./long. using a FactoryCode!) Here's my code thus far:               Dim pMxDoc As IMxDocument     Dim pMap As IMap     Dim pTargetFL As IFeatureLayer     Dim pTargetGD As IGeoDataset         Set pMxDoc = ThisDocument     Set pMap = pMxDoc.FocusMap     Set pTargetFL = pMap.Layer(0) 'Set the IFeatureLayer as the first layer in the TOC     Set pTargetGD = pTargetFL.FeatureClass          Dim pTargetSR As ISpatialReference     Dim pGeoDatasetEdit As IGeoDatasetSchemaEdit     Dim pSpatRefFact As ISpatialReferenceFactory     Dim pProjCoordSys As IProjectedCoordinateSystem     Set pTargetSR = pTargetGD.SpatialReference 'Set the spatial reference object          Dim fatCode As Integer     fatCode = pTargetSR.FactoryCode     MsgBox ("Layer Name: " & pTargetFL.Name & vbNewLine & "Layer Projection: " & pTargetSR.Name & vbNewLine & "Factory Code: " & fatCode)


title: Decompress Tile Package

text: I'm curious if it's possible to decompress a 10.1 **tile package (.tpk)** into a different format such as the cache bundle format.