texts: Clustering spatially connected polygons so all clusters have approximately the same size

texts:
I want to group together polygons from a shapefile a way that all the clusters formed contained approximately the same number of polygons.  The problem is that the source polygons have vastly different sizes.  Therefore, I cannot simply make a grid and lay it over my polygons.

The final goal of this work is to do some kind of "tiling" of the polygons to call computer heavy analysis on a sub-sample of my data.

The clustering has to be done strictly from a spatial contiguous polygons point of view.  I don't care about any attributes in the shape.

There are some similar questions out there (for example here and here), however my question differs as I don't use attribute clustering, have vastly different size polygons and can't use ArcGIS.

I'm open for a solution is R, QGIS, SAGA or GRASS.

The figure below shows an example of what I mean by vastly different size:

with the red circle being:

My data are openly available at :
http://www12.statcan.gc.ca/census-recensement/2011/geo/bound-limit/files-fichiers/2016/lda_000b16a_e.zip

I was thinking of scripting the solution so I can change the size of the cluster, but my ideal cluster size would be around 1000 polygons per group.


texts: How do you set OFFSETA for a Viewshed in ArcGIS10?

texts:
How do I calculate height when attempting to do a viewshed analysis in ArcGIS10?
I am able to create a viewshed analysis from a poly point file, however I need to calculate for the 80ft to 100ft tower height as well.  In 9.3 I was able to directly input the different variables, but in 10 the Environment Settings are different.

I adjusted the Z values under the Environmental Settings, converted everything to meters and then ran the viewshed but it was no different from the original.

Any suggestions?


texts: How do I import specific coordinates from Namibia in QGIS?

texts:
I have a map here with coordinates from the Schwarzeck Map Datum Format 1903. They have the following format:

y:  41 944,31
x: 363 810,71

I want these points to be pictured in QGIS...

How is it done?


texts:
How can I copy a table, or selection of rows or columns in a table, from Arcmap without going through the pointy-clicky-typey exercise of Export table? The destination of said copy could be anything: notepad, excel, word, whatever.

The existing context menu only allows copying the value for a single cell and using the keyboard [Ctrl-C] also just copies a single cell value:

I'm using Arcmap 10.1, but this has been annoying for years, so don't feel the need to restrict your answer to a particular version.


texts:
I have some ArcPy code that ingests some data, puts it into a file geodatabase, makes feature classes of it, creates layers for the feature classes, sets symbology on them, saves the layers to an mxd, then publishes the mxd to server, so it can be seen in Portal.

All that seems to go well, insofar as the feature classes and layers seem to be correctly populated.  And there are no errors with the publishing, either.  At least, it doesn't fail, or even give warnings.

When we look in Server, or Portal, the published layer (is that the right term?) seems to be there.  That is, there's an entry for each published service, and the thumbnail for the data seems reasonable.  However, trying to open it from portal via either MapViewer or ArcGIS Desktop fails.  In MapViewer, it complains that the layer (service name) cannot be added to the map.  In Desktop, the title of the window remains 'Untitled', and nothing shows up in the map view or in the layer view.

Making this more confusing, though, is that if we use the connection file to Server, and select the Service out of what appears there, it will show up on the map with no problems.

I'm a long ways from an expert on this, but that leads me to believe that it's a problem with Portal (configuration, or whatever).  However, a) this is happening on two different instances of Portal, each connected to a different instance of Server, and b) publishing was working fine on Friday, and we don't know of any changes to the configuration since then.

Possibly related, one of those Portal instances refuses to allow configuration changes to be saved, even when logged in as arcgis. (Not sure about the other; waiting to hear back from someone who can check that.  Update: no problem with that one.)

One Portal/Server instance is running (10.3) on Linux, while the other is (10.6) on Windows.

Any suggestions on what can be tried to debug this?

Update 2: Here are the arguments to

arcpy.mapping.CreateMapSDDraft (myMxd, sddFilename, serviceName,
                                'ARCGIS_SERVER', connectFilename,
                                True, 'TestData',
                                summary = 'My summary',
                                tags = { 'tag1', 'tag2' })

And I only pass the required arguments to arcpy.server.UploadServiceDefinition()

Update 3: I just noticed that the last request to the server, for the MapServer REST endpoint, does not fail, but does not return any data. Though, weirdly, it is an http request, not an https one.  I thought we'd required everything to be done in secure fashion.  Certainly, every other request is secure.  Is that something easy to fix?

Update 4: I mis-read the Web Developer->Network output from Firefox.  That last request to the MapServer endpoint showed up as insecure in the listing on the left of the page.  But high-lighting that request showed that the request URL was https (so, I guess, the fact that there was no response made Firefox flag it as insecure).  Not sure where that leaves things.

Also, as further clarification on the requests to arcgisonline.com, those are only for images, so (I think) are unlikely to be terribly meaningful.

Update 5: Somehow misread that URL a number of times.  Whatever the deal with it is, it's going to Portal, not Server.  And trying to connect directly to that endpoint gets an 'Unable to connect' error from Firefox.


texts:
i'm using pyQGis 3 with PyQt5 and i'm trying to render a registred Raster Layer into a file PNG using Python script. The problem is that in the new API they removed QgsMapRender and replaced it with QgsMapSettings and QgsMapRenderJob so i don't know how to render my Raster Layer using command line. in the GUI i just use save map as image and the map will be rendered. How can i do it with command line.
here is where i'm stucked.

# create image
img = QImage(QSize(800, 600), QImage.Format_ARGB32_Premultiplied)

# set image's background color
color = QColor(255, 255, 255)
img.fill(color.rgb())

# create painter
p = QPainter()
p.begin(img)
p.setRenderHint(QPainter.Antialiasing)

render = QgsMapRenderer() #Im stucked Here
#i changed it with
render=QgsMapSettings()

# set layer set
 render.setLayers(layer) #here i have a QgsRasterLayer
render.setLayerSet(layer)

# set extent
rect = QgsRectangle(render.fullExtent())
rect.scale(1.1)
render.setExtent(rect)

# set output size
render.setOutputSize(img.size(), img.logicalDpiX())

# do the rendering
render.render(p)

p.end()

# save image
img.save("render.png","png")


texts: How do I remove a join (between a standalone table and a feature layer) with ArcObjects?

texts:
I already know how to do a table join with ArcObjects, via the IDisplayTable, IMemoryRelationshipClassFactory etc. interfaces. Here are some links to resources that have example code for this:

"Advanced" table join options in ArcObjects (ESRI ArcGIS Desktop discussion forums archive)
Export a join table to arcmap (question here on GIS Stack Exchange)

What I need to know is, how do I undo, i.e. remove such a join?

Once I've joined a standalone table to a feature layer, I end up with references to:

an IRelationshipClass (resulting from the join operation);
an ITable/IStandaloneTable/IDisplayTable (the table that was joined to the feature layer); and
an IFeatureLayer (the feature layer to which the table was joined).

Do these interfaces, or rather the objects behind them, allow unjoining at all? I've seen that IRelationshipClass has various DeleteRelationship… methods, but I can't see how they could work towards that end.


texts: SQL server 2012 convert Multipolygon geometry to geography - GDA94 / MGA zone 55 coordinate reference system

texts:
Is there a way to convert geometry column value which has GDA94 / MGA zone 55 coordinate reference system into Geography value in SQL server 2012.
The layer is a multipolygon layer

We were having the WGS 84 system before and the below code was working fine

SELECT GEOGRAPHY::STGeomFromText(ogr_geometry.STAsText(),4326).MakeValid() FROM TableA

But now the code is returning error

Msg 6522, Level 16, State 1, Line 40
A .NET Framework error occurred during execution of user-defined routine or aggregate "geography":
System.FormatException: 24201: Latitude values must be between -90 and 90 degrees.

Can someone explain this error?


texts: Opening a kml file with Google Earth at a specific placemark

texts:
I have a local kml file full of Placemarks.

I would like to be able to do the following with one click of a hyperlink in a locally hosted HTML file.

Open Google Earth (if not already open)
Load this kml file
Center on a specific placemark

Just like opening an HTML document to a reference.
I've gone through the KML specifications, but can't see anything that looks like it would help.
Is there a way to do this?


texts: Rectangular (not square) pyramid with QuickMapServices

texts:
I’m using QGIS 2.14.9 (upgrading is not an option), and QuickMapServices. I have two tile servers (one for images and one for OSM). Images work, OSM does not. I'm sure the problem is related to whether the tile pyramid is square or not.

The image server serves a square pyramid and works fine in QMS. By "square", I mean the lowest resolution zoom has a single tile, the next-lowest has 2x2 tiles, etc.

But tiles from the OSM server are drawn in the wrong place, scaled by a factor of two somehow, because the OSM server uses a rectangular pyramid with a 2:1 aspect. The lowest resolution has two tiles, the next-lowest has 4x2 tiles, etc. I don't know whether this is unusual- it does make sense, since it's 360 degrees around the earth longitudinally and only 180 pole-to-pole- but I don't see how to make it work in QMS. It's not a public server so I can't point you to it.

I'm actually writing a standalone app, using the TileLayer class in QMS, so I do have the ability to pass in the tile_ranges parameter to TileLayer. Without doing that, I only get the western hemisphere. If I pass in tile_ranges with a 2:1 aspect, I get both hemispheres, but the scaling is still wrong.

I suspect I'll need to modify one of TileLayer's drawTiles methods.


texts: Performance issues after upgrading from 9.2 to ArcGIS Mobile release 10

texts:
We have recently upgraded an application originally written for ArcGIS mobile release 9.2 to the release 10. Even though we have just made a code conversion (no code refractory was applied), the performance in the new release is about 3 times slower when comparing to 9.2 while using the same hardware (within spec for 10), same amount of data (cache).

Does anybody has experienced something alike?

Thanks in advance!


texts: Adding polygon attribute to a gdb raster

texts:
I am working with the gSSURGO soil database which has many tables with data and one raster file. I managed to join the tables to the raster, so now I click on my map and can see all raster attributes.

I also have a polygon layer with property code and would like to add this code as a column to my raster table. I tried to convert the polygon to a raster, but am not able to link both raster tables because I do not have a common field. Then I tried to extract the raster cells using the polygons as a mask, but am again unable to link the remaining records to the polygons.

How can the information on multiple gdb rasters be linked to the data of a polygon layer?


texts:
I have received thousands of location information like below.

X= 10°52.579     Y= 078°38.473

I don't have idea in which format is this, please let me know what is the format of this location and please refer me how to convert this into decimal degrees to create the location points in ArcGIS software.


texts: Extracting point coordinates from QGIS into Excel using Python

texts:
I was formerly working on ArcGIS but now I'm working on QGIS 2.14.7 and Python 3.8 so I'm a bit confused with the QGIS script.
I have to extract coordinate of point layer (CRS:Lambert 93 and WGS84) and put them into Excel, the problem is that there are a lot of points, so I want to make it easier by automating it.
Is it possible to create a code that:

Takes point layer in entry
Adds coordinate X and Y (CRS Lambert 93) in the attributes table
Adds coordinate °, m, s (CRS WGS 84) in the attributes table
Exports the attribute table to Excel


texts:
I am using ExportToPNG (in ArcGIS 10.3.1) to produce images from a MXD with WMS data.
If I use the interface command ExportMap with the option "1-BIT_MONOCHROME_THRESHOLD" and a threshold at 256, the image I get is perfect.
But if I put this in a python to produce a series of images through DataDrivenPage, the output images are empty.
Here is my code:
for pageNum in range(1, mxd.dataDrivenPages.pageCount + 1):
  mxd.dataDrivenPages.currentPageID = pageNum
  arcpy.AddMessage(pageNum)
  df.scale=5000
  arcpy.mapping.ExportToPNG(mxd, cartella + os.sep + "F" + str(pageNum) +    ".png",df,world_file=True,color_mode="1-BIT_MONOCHROME_THRESHOLD",background_color=256)

Consider that I force df.scale=5000 to ensure the WMS data are displayed, because a scale_limit of 6000 is defined for that layer.
I see the dataframe panning to all pages, the scale is 1:5000 and the WMS data are visible, all the PNG files are produced, but they are white!
I tried the same with a gridIndex, not using DataDrivenPage, but the result is exactly the same.
UPDATE - 3 Dec 2019
Some more trials on this problem. If I fix a scale 1:3000, finally I get an image with the desired features from the WMS! But the image is not correctly georeferenced: it is slightly shifted with an increasing shift from the center toward all borders.
I also tried ExportToJPEG instead of PNG: in this case the images are perfect, but not usable for the vectorization I want to do after. In fact, though the ESRI documentation indicates the same parameters for all formats (PNG, JPG, TIF etc) the 1-BIT option is only applicable with the PNG, as you can see working with the "ExportMap" interface.
So the problem now is modified: not "empty images" but "shifted images".


texts: Export two related layers to KML with multigeometry using QGIS?

texts:
From QGIS, I would like to create a KML file, for GoogleEarth, which contains multigeometry in that KML file.

By example: consider two layers in QGIS -- the first layer contains polygons, and the second layer contain points.   There is a one-to-one relation between the two layers; for each polygon there is one point which is centered on the polygon.

a)The polygon layer has information about the polygon (color, etc...), and unique AreaID, for each.

b) The point layer has symbol information, a unique AreaID, and other attributes.

In Google Earth, I want the KML for a point/polygon pair to be within a MultiGeometryTag.  Ultimately, the attributes will popup in a balloon.

How to merge/combine and then export the two QGIS layers so that they end up in a KML file with MultiGeometry?


texts: Text issues when exporting from ArcMap 10.1 to Illustrator CS5

texts:
When exporting from ArcMap 10.1 to Illustrator CS5 I am getting a lot of errors (red box with plus sign). I have used this workflow in ArcMap 9.3 with less problems (there may have been a couple of errors but not the hundreds I am getting with version 10.1). I have played with the export dpi but the result doesn't change.

Can anyone advise with any suggestions how to fix this?


texts: ArcGIS Pro cannot access layers from Table of Contents by name

texts:
I'm trying to move some Python 2.7 scripts from ArcMap 10.4 to Python 3.4 and ArcGIS Pro 1.3.1. I'm having difficulty understanding why I cannot reference layers in the Table of Contents directly by name (see 1st screenshot). I am able to do this in ArcMap (see second screenshot).

There is exactly one address point selected in each environment and the layer is renamed in the table of contents to "addresspoints" in each environment.

I know I could just rewrite the script to use a "full path" to the layer OR set my arcpy.env.workspace (which in both cases here is NOT set to the Enterprise GDB where addresspoints lives) and use the full name of the feature class but I would very much like to understand why this isn't working and if it is by design or if it is a bug.

No Errors here (ArcMap 10.4).

The code:

myLayer = 'addresspoints'
ftrCount = int(arcpy.GetCount_management(myLayer).getOutput(0))
ftrCount

The error:

Runtime error
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\management.py", line 14999, in GetCount
    raise e
  File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\management.py", line 14996, in GetCount
    retval = convertArcObjectToPythonObject(gp.GetCount_management(*gp_fixargs((in_rows,), True)))
  File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\geoprocessing\_base.py", line 506, in <lambda>
    return lambda *args: val(*gp_fixargs(args, True))
arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000732: Input Rows: Dataset addresspoints does not exist or is not supported
Failed to execute (GetCount).


texts: How to plot gridded map from lat-lon and fill values in R?


texts: Linking a .chm or URL to the title bar help button for a ProWindow

texts: I noticed that the ProWindow exposes a "ShowHelpButton" property which shows a "?" on the title bar, but a click navigates to the ArcGIS Pro help website. Both the ArcGIS Pro SDK repository and the API reference have no guidance on the property's use (the API doesn't even show the property as a member). Is there anyway to point the help button to custom help content (e.g., a .chm file or a different URL)?


texts:
i need to find the distance between two gps location, So i think to do this:

lat1(seconds)-lat2(seconds)=lat * 30.7151 == distance latitude in meters =Latm
long1(seconds)-long2(seconds)=long *30.9221=== distance longitude in meters=Longm

for overall distance between them = sqr(Latm^2+Longm^2).
note: the nodes are in range of 30 meters so i need to deal with seconds cause it is small scale.


texts: Find which latitude and longitude values are falling in which raster cells

texts:
I am an absolute beginner in analyzing geographic data with R.

I have a database with longitude and latitude of around a million buildings in a country. I would like to find the average density of those buildings. For that I have divided the whole country into several cells using Raster and applied projection with the appropriate proj4 profile. Now I want to check which buildings are coming under which cell to find the density.

> metersCoordinates <- totalMeterDatabase[,c("longitude","latitude")]
> coordinates(metersCoordinates) <- ~longitude+latitude
> r <- raster(ncols=6000, nrows=2000)
> r[] <- 0
> crs(r) <- "+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=6000 +y_0=2000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs"

> projection(r)

Could you please tell me how can I find it?


texts: pgr_dijkstra return empty set after using osm2pgRouting

texts:
I recently started to work with pgRouting with this osm file

So I used osm2pgRouting to parse the file and load it into the DB.

osm2pgRouting (using the mapconfig_for_pedestrian.xml)
work's fine, but when I try to do a Dijkstra all I get is the Empty set.

here is the SQL request I'm using:

SELECT
    *
FROM
    pgr_dijkstra ('SELECT id, source, target, cost, reverse_cost FROM ways',
        3,
        4);

here my environment:

postgres (PostgreSQL) 10.11
pgRouting: 3.0.0 beta
osm2pgrouting Version 2.3.7

can someone give me a direction on what could be the cause of this behaviour?

more information on the exact line I believe I'm using.

|   id | source | target |
+------+--------+--------+
| 5    |   3317 |      4 |
| 3312 |      3 |   3780 |


texts: Transform Excel into vector in the Graphic Modeler

texts:
I have a graphic modeler with two inputs, a shapefile and an Excel file.
I would like to make a join by attribute between the two. But I am confronted with a concern, the join can only do this between two vectors, and I cannot transform the Excel file into a vector.

The goal is to call my excel file, see attachment


texts: Query an ArcGIS Online FC via an HTTP request

texts:
I have data that is hosted by ArcGIS Online.
I want to query ArcGIS Online via an HTTP request. The response would be a JSON object (similar to this).

What would it take to query a hosted ArcGIS Online FC via an HTTP request?


texts:
I have a list of lists that contains:

[vala, valb, valc, vald, (pntx, pnty)]
[vala, valb, valc, vald, (pntx, pnty)]
[vala, valb, valc, vald, (pntx, pnty)]

I also have a list of the field names that correspond to vala, valb, etc.

I am trying to use arcpy to create a feature class with all the information from the list, with the proper field names from the list of field names.

As I want the FC to be a point layer, I thought about using add XY event layer, however there seems to be no option for adding a field list and my x,y coordinates are in a tuple instead of individual list positions for indexing. I could probably create an empty feature class and use an insert cursor, but then how do I deal with the geometry?

I am using ArcMap 10.0.


texts: Verifying the number of times a line crosses other lines

texts:
I have a series of lines that represent streams. I have a stream line and two flowpath lines in one feature class and two banklines in another feature class. Total of five lines. I then have a feature class with cross-section lines that intersect these lines. These are all in a personal geodatabase.

I need the cross-sections to intersect each line only once. Because the five lines can be convoluted, sometimes a cross-section will cross one of the five stream lines more than once. Is there a way to identify which cross-section lines cross more then five lines?

It's a big data set so sifting through each cross-section individually is not optimal.


texts: Unable to drag and drop current map elements into custom geoprocessing tool?

texts:
I have scripted an ArcPy tool and the tool works fine in ArcGIS 10.2. The only problem is when I use the tool I can't drag and drop current map elements into the parameters, I have to manually navigate to the file through explorer each time, also there isn't a drop down menu of current map items to select from either?

Is it something to do with how I have set the tool parameters or is it a scripting issue?


texts: How to view the features of a point with a click in QGIS

texts:
I am developing a plug-in for QGIS. I am creating a form of personalized editing using QtCreator. The form is in the following image

I read a csv file and when i click in a button OK I get a layer with any desired points

My goal: When I click on the "SELECT POINT" I want plot  a graph with the point attributes.
I see this code

   class nameform:
    """QGIS Plugin Implementation."""

    def __init__(self, iface):

        self.iface = iface
        self.dlg.pushButtonContour.clicked.connect(self.open_contour)

        self.canvas = self.iface.mapCanvas()

    def open_graph(self):
        self.pointEmitter = QgsMapToolEmitPoint(self.iface.mapCanvas())
        QObject.connect( self.pointEmitter, SIGNAL("canvasClicked(const QgsPoint, Qt::MouseButton)"), self.selectNow)
        self.iface.mapCanvas().setMapTool( self.pointEmitter )

    def selectNow(self, point, button):
        layer = self.iface.activeLayer()
        if not layer or layer.type() != QgsMapLayer.VectorLayer:
            QMessageBox.warning(None, "No!", "Select a vector layer")
            return
        width = self.iface.mapCanvas().mapUnitsPerPixel() * 2
        rect = QgsRectangle(point.x() - width, point.y() - width, point.x() + width, point.y() + width)
        rect = self.iface.mapCanvas().mapRenderer().mapToLayerCoordinates(layer, rect)
        layer.select([], rect)
        feat = QgsFeature()
        ids = []
        while layer.nextFeature(feat):
            ids.append( feat.id() )
        layer.setSelectedFeatures( ids )

But i have a error. When i click in select point and i pick in the point gives me this error

TypeError: arguments did not match any overloaded call:
  QgsVectorLayer.select(QgsRectangle, bool): argument 1 has unexpected type 'list'
  QgsVectorLayer.select(int): argument 1 has unexpected type 'list'
  QgsVectorLayer.select(unknown-type): too many arguments


texts: Create different print composers from different layers added to QGIS

texts:
I'm using QGIS 2.8.3 with windows 10. I want to know if it's possible and how  to create, using python code, from each layer (in the table of content) a print composer to each one of them.

Any help?


texts:
This is a post originally posted on
stacksoverflow, but I was recommended to post it here also.

I have a lot of position data from fishing vessels, from where I would like to detect fishing activity. Basically fishing vessel are either steaming, fishing or inactive. I uploaded an example of a typical days data here:

https://files.dtu.dk/userportal/#/shared/public/_CVkU00lZFzuJWRS/Example.rds

We can read the data:

l <- readRDS(paste0(myDownloadFolder, "Example.rds"))

Make it spatial with sf:

library(sf)
st_geometry(l) <- l$geometry

And investigate it with mapview:

library(mapview)
mapview(l, col.regions = sf.colors(10))

From here we can see that they are basically fishing in two different places at that particular day.

If we plot a histogram of the speed, we get two distinguised peak, one around 2-4 and one around 7-9:

hist(l$speed,1000, xlim = c(1,15), ylim = c(0,30))

Is there a way to automatically detect the thresholds?

Only using points in that interval

inc <- l[l$speed>2 & l$speed<4,]

We can find time difference between those:

inc$INTV2 <- difftime(lead(inc$log), inc$log)
inc$INTV3 <- difftime((inc$log), lag(inc$log))
hist(as.numeric(inc$INTV2),1000, xlim = c(0,1000), ylim=c(0,100))

There will usually be at least 1 minute (60 sec) between each haul, but lets set it to 90 in this example.

stop <- inc[INTV2>90 | is.na(INTV2)]$log
start <- inc[INTV3>90 | is.na(INTV3)]$log

haul <- data.table(start, stop)
haul$length <- difftime(haul$stop, haul$start)

We can use hauls to get lines from the original data:

library(data.table)
library(dplyr)
DT <- data.table(l)

setDT(DT)[,log2 := log]
#allow for data table merge - tidspunkt
setkey(DT, log, log2)

## Merge with blackbox data on afstid og anktid
pts <- foverlaps(haul, DT, by.x=c("start", "stop"), nomatch=0)

st_geometry(pts) <- pts$geometry

l2 <- pts %>%
  dplyr::group_by(haulid) %>%
  summarise(do_union = FALSE) %>%
  sf::st_cast("LINESTRING")

mapview(l2, zcol="haulid")

This looks ok, but some of the hauls seems to consist of two hauls (Fishermen dont turn 180 degrees within a single haul):

Is it possible to use heading to distinguish when the haul should be cut (when they start turning and when they end the turn)? Would be nice to have a way where only straight lines are considered hauls.

This ended up in a long rambling - sorry about that. To conclude there is two issues I would like to have answered:
- How to automatically detect speed threholds
- How to cut hauls when they are turning.


texts:
I am trying to open a NetCDF file in QGIS. However it is not loading when I try to open it using Layer > Add Layer > Raster or even dragging and dropping it. I have also tried upgrading to master as suggested from this thread.

Here is the error message for 3.4-Madeira and 3.10-A Coruna

Invalid Layer: Raster layer Provider is not valid (provider: gdal,
URI: C:/Users/~/Dec-Levels.nc

Here is the error message for 3.13.0-Master

Invalid Layer: Raster layer Provider is not valid (provider: gdal, URI: C:\Users\~\sa.nc
(file: ..\..\..\src\core\raster\qgsrasterlayer.cpp row:
618function QgsRasterLayer::setDataProvider:)

I am using Windows 10 64bit and used the 64bit installers for QGIS. I also used this example file: https://drive.google.com/open?id=1vtHc5GtDhUe2ENTkua8ihWqp6jYTHPBo

How can I resolve this?


texts: Linking spatial and nonspatial data that is housed on two database servers?

texts:
I'm working on a proof of concept.

We are building a web map application where the data is split across two different database servers. The geometry is on ArcGIS server and the attributes or business data are on a remote SQL Server instance

Does anyone know to link query the data across two database servers?

One idea is to use REST webservices to communicate with the two separate datastores.


texts: Grid UTM coodinates in Google Earth Engine

texts: I am trying to use GEE to make maps intended for use on trails with compasses. I have already managed to place the contour lines but I couldn't put the grids with UTM coordinates.


texts:
I have multiple values in a table with the same CODE(Name) and each one has a ZIP. How to find all of the unique ZIP codes and add them to a field.

Here is an example of the result I am looking for:

NAME   ZIP        RESULT
A      17112      17112,15345,17102
A      15345      17112,15345,17103
A      17102      17112,15345,17104
B      17504      17504,17112
B      17112      17504,17112


texts: Exporting Layers to Cad with Seed file Changes size and Location On ArcMap

texts:
Some background information before I go into the issue. I am working on project
that takes place in Erie county New York. The shapefiles consist of 2 line layers and 2 point layers. The files were exported as a KML and converted into shapefiles with WGS 84. When I export those files to CAD it works fine and lines up properly.

I was using Orbit to export the points and it does not add a coordinate system but somehow line up where they should but only when I added an ersi basemap first. When I try exporting the layers to cad the blocks are in different places around the world.

When I Export the cad file with a seed file attached the exported DWG changes size and position. ArcMap sends it to the Dominican Republic. The converted file appears tiny and the blocks are on top each other with the parcel data in the middle.

I have tried changing the coordinate system of the cad file and have even tried exporting the polyline as a shapefile to  WGS 84 and WGS  83 zone 18n and changing the mapping units to no avail.


texts: Bessel ellipsoid definition for LV95 (EPSG:2056)

texts:
I recently wrote some code to transform coordinates between WGS 84 and the new Swiss projected coordinate system (LV95 / EPSG:2056). While doing that, I tried to find an authoritative source for the definition of the Bessel ellipsoid, which is used for LV95.
I checked the EPSG registry, the website of swisstopo (national mapping agency of Switzerland), as well as some other sources (see references below).
It seems that everybody agrees on the first value:

Semi-major axis: a = 6377397.155 m

My understanding is that usually the semi-minor axis b or the inverse flattening 1 / f is usually specified in addition to a, or sometimes both, where one is derived from the other.
[EPSG-Nov2015] defines:

Inverse flattening: 1 / f = 299.1528128

But [swisstopo-Dec2016] defines:

Inverse flattening: 1 / f = 299.15281285
Semi-minor axis: b = 6356078.962822 m

Unfortunately [swisstopo-Dec2016] does not indicate which of the values is derived, but gives [Bolliger-1967] as a reference, which defines:

Semi-minor axis: b = 6356078.96282 m

([Bolliger-1967] does not specify which values are derived either)
Are these differences relevant? If so, is it a "bug" in one of the references? Or am I overthinking this and should I just pick one of the values at random?
References

[EPSG-Nov2015] CH1903+ / LV95 (EPSG::2056)
[swisstopo-Dec2016] Formulas and constants for the calculation of the Swiss conformal cylindrical projection and for the transformation between coordinate systems, swisstopo, December 2016 (see page 5)

[Bolliger-1967] Die Projektionen der Schweizerischen Plan- und Kartenwerke, J. Bolliger, 1967 (see page 30)


texts: Determine size of screen/map to limit number of markers displayed

texts:
I am writing a JQuery Openlayers javascript web application that connects to a API, which exposes a million geo located points plus metrics and information about the points.

One metric is a points importance, so the points can be ordered and limited by this metric.
I can request from the API a limited amount of points within a bounding box.

The application is to be mobile optimised, which means I need to detect the screen size,  taking into account pixel density, and change the amount of points to be queried and displayed as markers to the user.

The markers are similar in size and look to google maps api marker/pin icon.  The user can tap a marker and display a call out.

So for a iPhone 3g, 4 and 4S a limit of 20 would be fine, an iPad 50, but for a desktop it's possible that it should be related to the current size the user has chosen for the map.

The application is to be responsive to layout and the user can choose how many information panels to show, so it's possible on the iPad the limit should decrease as more panels are "unfolded".  In fact the map is secondary, and this will be "foldable" too.

How do I determine the screen size of mobile/desktop devices, including taking into account retina displays (i.e. denser displays don't display more markers)?

Can I also determine the current map display area too?


texts: Options to Replace Interactive Mapping System

texts:
I have been tasked with replacing our organizations online interactive mapping system. It is your run of the mill County Government interactive map. Its bulky, unreliable, slow and out of date. It is currently running on ArcIMS and hasn't been supported in ages from ESRI.

44 layers are currently loaded onto the map.

In general we are moving towards content specific applications and I have created several  that divide those 44 layers into themed apps (planning & zoning, public safety, etc)

I have done this using a combination of ArcGIS Online and ArcGIS JavaScript API.

Those products work well for the smaller targeted applications, however, I can't seem to come up with a good solution for building the all-in-one interactive map replacement (it could be argued its not needed, but its a requirement).

Is anybody aware of a good solution or template (preferably free) for this large scale application?

I have recreated all of the map layers in services using ArcGIS for Server 10.1, I have marginally decent ArcGIS JavaScript API skills and an ArcGIS Online Organizational account.


texts: Reverse Geocoding: cannot connect to World Geocode Service

texts: I should probably go to ESRI for help with this question, but I was hoping that someone else might have had the same problem and solved it. I'm part of a larger university and we get ArcMap as a site license. We geocode often and pay for credits on ArcGIS Online. However, when I've needed to geocode I've noticed that when I physically open the tool that only the MGRS geocoding service is available. Yet when I right click on a dbase of addresses and select the geocode option the World Geocoder shows up as available and works (if I'm signed in to ArcGIS online of course). I've been geocoding this way and it hasn't been an issue, except now I need to reverse geocode. The World geocoding service isn't showing up in the reverse geocoding tool and there no options under the right click for reverse geocode. I've tried "adding a geocoder" in the tool bar but I can't find where the World Geocode Service lives. Any ideas about how to fix this or get around the problem?


texts: Get attributes from touching lines in network - results seems random

texts:
This question is similar to this one: Get attribute from touching line layer (QGIS) but there is a new and more komplex problem in that context I need to solve:

I have to plan drains, usually along a road network or any existing network digitized with snapping and tracing.  In in that drains will be cables. The cables will also be digitized with tracing and end in every drain junction. No cables cross a junction. There could be up to 10 cables inside one drain. The drains are identified by ID's.

Every cable need a (virtual)field with the ID of the drain in which it lies. With the refFunctions solution:

(geomintersects('drain','drainid')

from the question linked above, I will get the drain ID for every cable, BUT the cables are also touching other drains at their end/start nodes if there is a junction. The results will become something like random! If the drains are not touching at their junctions (digitizing a small gab), the expression will work fine. But that is not a well suiting solution for me.

You can reproduce the situation with the following package:


texts: Clustering points in postgresql to create contour map

texts:
UPDATE:
To try to make this a little more simple, is it possible to create a query which selects a group of points such that each point in the group is at most X units away from at least one other point in the group?  If that is possible, then can it be extended to return more than one row such that each row is a group of points as specified above?

I'm starting to think this isn't possible, so I'm working on some java code to do it, but I still have some hope.  Original post and info below:

I have a postgresql / postgis table with a grid of weighted points, and I'd like to essentially create a contour map of those points.  My goal is to get one or more polygon that surrounds points of a certain weight, and then repeat for other weights.  I'm going to convert those polygons to KML for display, which I can figure out later and is only relevant because I don't necessarily need this to be something dynamic or efficient - I can do it manually and save off the polygons at each step.

I've read a lot of other posts about this but they all seem to require additional libraries or software, and my points are already in a grid so the ST_SnapToGrid solution doesn't make sense to me.  Is there a strictly postgresql solution?

My thought is that there would be a query that creates a polygon (using ST_ConvexHull or ST_ConcaveHull) around points that are within some distance from each other (which should be a set value because my points are already equally spaced on a grid).

Example lat/lons/weights (for distance reference):

41.96892, -87.9351, 1904
41.97392, -87.9351, 1940
41.97892, -87.9351, 1978

Table:

CREATE TABLE temp_weighted_points
(
  id serial NOT NULL,
  latitude double precision,
  longitude double precision,
  weight double precision,
  type character varying(10),
  geom geometry(Point,4269),
  CONSTRAINT temp_weighted_points_pkey PRIMARY KEY (id)
)

I've tried this link (among others) but can't get any of those solutions to work:
https://stackoverflow.com/questions/13087288/separate-gis-points-into-groups-of-points-that-are-close-to-each-other

Any suggestions?

EDIT:
Regarding what the data looks like, it's a grid of drive times over the city of Chicago.  To create the data, I found a boundary shape file of the city of Chicago, then used a postgresql query to create a grid of equally spaced points within that boundary / polygon (for pictures and the query, see How to create regular point grid inside a polygon in Postgis?).  Each point is separate by .005 lat / lon units (degrees? not sure what it's called) as can be seen in the example lat/lons above.  Once I had these points, I used to google's drivetime api to generate drive times from each of the points to four different locations, and then took the smallest drive time between the four locations and stored that data as the weight for the grid point (the weight is in seconds, so the first example point above has a drivetime of about 31 minutes).  That's what I have at this time - points that are equally spaced over an area / polygon and that each have weights / heights associated with them.

What I'm trying to get is a contour map of this data, which will basically look like the city of Chicago with 4 depressions (the locations) or an upside down mountain with four peaks, because points on the grid close to the locations will have very small / short drive times, while points farther away will be higher.


texts:
I'm taking a geomorphology class right now that is theoretical, learning about geomorphic processes and formations.  There is no computer or quantitative component.

I'm enjoying it as far as it goes, but I'm left wondering: what does GIS get used for in modern geomorphology.  What kind of data gets collected?  What do people do with the data?


texts: Radar incidence angle of different images

texts:
I am beginning in radar traitement, I want to know if working with radar image with differents incidence angle is not correct for result, Could the radar image have the same incidence angle for traitement and comparison?
I have images Sentinel 1 SLC with incidence angle = 34° and sentinel 1 GRD with incidence angle = 39°,
I want to ask to some image Terrasar X to study merging work with those images but they ask me to give incidence angle, I don't know what to ask, because I want to work with those images and make traitement to compare with both SLC and GRD results,
If I ask for example for an incidance angle=34° there will be no problem in traitement with GRD image? or I have to ask for an incidence angle between 34 and 39°?


texts: How to reclassify a raster (tiff) with multiple bands?

texts:
i have a raster file containing information about the windspeed average for the year. My purpose is to reclassify the 15 classes based on their rgb-composite. The color is the only information given. So i want something like this. A is my inputraster.

A.1 == 255 && A.2 == 175 && A.3 == 176 = 1

And that i want to do with all different rgb-composite. Any suggestions? I tried r.reclass r.recode and the mapcalc from QGis.

Thx for your help.

Update 18.11.2013:

I'am still struggling with this issue. It seems like there is a erorr that has nothing to do with the mapcalc syntax. I just tried a easy expression, like "A*100". I get the following error:

Problem loading output layer:

Oooops! The following output layers could not be open
Output raster layer: H:/reclassify/test2.tif
The above files could not be opened, which probably indicates that they were not correctly produced by the executed algorithm

Checking the log information might help you see why those layers were not created as expected

This algorithm requires GRASS to be run. A test to check if GRASS is correctly installed and configured in your system has been performed, with the following result:

GRASS seems to be correctly installed and configured

I want to look at the log tab from the algorithm, but when the error appears i can't get access to the log tab. I only can close the error message and after that the r.mapcalc windows are closed too. So i'am not able to mark any lines from the log tab. I really need help.


texts: How to cut multiple neighboring raster images

texts:
I'm looking for a way to cut a larger number of neighboring aerial raster images (each sized 1x1 km, resolution 10 cm per pxel) into four smaller raster images (size 500 x 500 m). I haven't done this before, is there a (preferably QGIS-based) way to do this (semi-)automatically?

I don't need any "slippy map"-like tiles - this is only necessary because my colleagues use a rather exotic and antique CAD software that can't handle larger image sizes... (and our state geodata department doesn't sell smaller custom sized tiles any more)

Thanks a lot!


texts: Problem with georeferencer in Qgis 2 64bit installation

texts:
I tried to use the georeferencer in the new Qgis 2 64 bits for windows. I tried with the standallone installer and with the OSgeo4w installer. The problem is when I load the raster that I want to georeference, all I get is a gray square with a bunch of blurred colors at the top. I tried to use the georeferencer in Vista 64 (8gb of RAM) and in win 7 64 (16 gb of RAM). Also running Qgis as an administrator did not solve the problem.
I used the same image in a 32 bit installation of Qgis 2 and I have not a problem loading it or working with it.
I would appreciate any hint in what can I do to solve the issue


texts: Generating large number of maps using PyQGIS?

texts:
I have to make a large number (hundreds) of distribution maps of species.
I have a shapefile that contain the distributions for each species, and for each one, I would like to get a map as an image (jpg, png or otherwise) which contain the name of the species concerned, the legend (to distinguish areas of annual distributions, breeding, non-breeding, etc. ...).

I'd like to use QGIS to do this.


texts: A few months we began seeing a pop up in ArcCatalog when hitting the "Description" tab asking if you want to upgrade metadata. Clicking yes or no results in the existing metadata being deleted. Clicking the x to close the pop up is the only way to keep the existing metadata intact. Is this a known bug or am I missing something? Searched around with Google but didn't find much.


texts: Control points display location changes with scale

texts:
I'm trying to georeference an image by choosing points from Map (imported from Google hybrid) however the resulting tif is in no way located similar to the points (in fact the control points don't even fall inside the georeferenced image). The residual is in the thousands. I chose 3 points and used Linear transformation. I'm using WGS84 (EPSG:4326)

Also the display of the CP move as I zoom in and out of the map.

QGIS browser 2.4.0


texts: Print Composer Rotation and Inverted Polygons

texts:
I have created a new Print Composer. By default it shows fine as per screenshot:

However, when I set the Map Rotation, the Shapefile Layer set as an Inverted Polygon (Gradient) does not cover the surrounding area, outside of the red dotted lines as per this screenshot:

Any ideas what I need to do to correct this?

QGIS 2.18.11

CRS = OSGB 1936 / British National Grid - EPSG:27700

Symbology Settings:

Layers Panel:


texts: Subtract one image from another with Google Earth Engine and getting too high values

texts:
I'm trying to apply  Change Detection  with Google Earth Engine by subtract one image from another and  getting  too high values in the new image although there is low values in both images
select_Image = select_Image.select('LSWI').subtract(image_XT_ctrl.select('LSWI'))

the selected image (the one i subtract):

the Ctrl image (the one i subtract from):

the result:


texts: How to prevent markers overlaping other markers on map using QGIS 2.2.0

texts: I have points with similar coordinates and displaying them on a map of Latvia they overlapping. How can I display all the points using QGIS 2.2.0 like in Finnish map?


texts: QGIS corrupted excel file, possibility to repair?

texts:
I had an Excel file with several data which I imported into QGIS as a layer. For some reasons I had to change the data type of one column so I created a new one and imported data from the first column to the new one in the right data type.

That worked well but now I can't open my original Excel file any more. I tried to repair it with the Excel-repairing-tool but that didn't work.

Any help?


texts:
I'm pretty new to QGIS I have a couple of questions regarding .CSV files.

1) Whenever I download and import .CSV data into QGIS, it works perfectly. I get the points and everything is peachy, but, if I edit said .CSV file in Excel, save it again and import it again, I just get the table icon in my layers (the points aren't converted to shapes).

It's as if whenever I edit my .CSV file in Excel, it won't work anymore. Anyone know how to fix this or what I'm doing wrong here? (I save the .CSV as .CSV UTF-8 and need to use semicolons as a delimiter)

2) This kinda goes hand in hand with question 1 - instead of trying to edit data in Excel, I want to filter data out in QGIS itself. How do I do this? I know this is done using expressions, but I have no experience with these.

To give a bit more context, I have a .csv file with all traffic lights within a certain area, but it contains both, active and inactive ones. I want QGIS to only 'see' the active ones as points. (editting the .CSV in Excel doesn't work - like I tried to do in question 1).


texts: Difference between ArcObjects SDK for Java and ArcGIS Runtime for Java?

texts:
I would like to develop spatial tools and automate my spatial analysis process (including converting XY into shp, proximity analysis, network analysis, geocoding etc on thousands of files) in Java.

I was wondering if ArcGIS runtime sdk for Java can do the task or do I need ArcObjects sdk for Java.

I can see that they are two different things but I am really confused what is the difference between them and which one does what?

I am also looking for some tutorial.


texts:
I am making a QGIS plugin with QGIS 2.14.10

I use the reload plugin each time i want to update the plugin. But sometimes, when my plugin bug and i reload it, i get the icon twice in the toolbar and the first icon is off. It happen each first time that the plugin beug. And sometimes i get 3,4,5 same icon ...

How can i prevent this ?


texts: Joining attributes after selecting one polygon which intersects another using geopandas?

texts:
To select the polygons which overlap other layer's polygons, I came up with this code based on what I found on this site:

import geopandas as gpd
import fiona
import os
import sys

# Get the current working directory
path = os.getcwd()

# Parameters to fix
input1 = 'building.shp'    #polygons to keep from
input2 = 'cadastre.shp'    #polygons which must be intersected
outputname = 'intersect_selected.shp'
intersect = 0.75

# Read data
building = gpd.read_file(os.path.join(path,input1))
cadastre = gpd.read_file(os.path.join(path,input2))

# Check crs
if building.crs != cadastre.crs:
    print('CRS not match \nEnding script.')
    sys.exit()

#List crs
crs3 = building.crs

#Processing iteration
data = gpd.GeoDataFrame()
for index1, cad in cadastre.iterrows():
    for index2, buil in building.iterrows():
        if buil['geometry'].intersects(cad['geometry']):
            area_int = buil['geometry'].intersection(cad['geometry']).area
            area_buil = buil['geometry'].area
            area_cad = cad['geometry'].area
            crit1 = area_int/area_buil
            crit2 = area_int/area_cad
            if crit1 > intersect or crit2 == 1.0:
                geobuil = gpd.GeoDataFrame([buil], crs=crs3)
                geocad = gpd.GeoDataFrame([cad], crs=crs3)
                intersec = gpd.sjoin(geobuil, geocad, op='intersects')
                data = data.append(intersec)

#Export data
data.to_file('intersection.shp')

Example:
I am trying to select the polygons from building.shp which intersect more than 75% the ones from cadastre.shp or that contain polygons from cadastre. Once selected, I would like to add all the attributs from cadastre features.

Is the .sjoin() method not too much time consuming? Is there a better way to join the attributs of concerned polygons (cad and buil)?


texts:
I want to convert a js feature set retrieved from a geoprocessing service to a kml client side, and perhaps also to a csv (i have the object from the JS API).

Is there any way do this?

To clarify:
i work on the client side and were using google earth (even though it's deprecated, i know), the client consumes a geoprocessing service, it could consume the service via rest but that's non preferable because i wan't to have it as the result as an object, so i want to use the ArcGIS JS API to consume the service and load it to google earth as a kml.


texts: Choosing data type to use for input as feature class or shapefile in Python script tool using ArcPy?

texts:
I am writing a Python script tool within a toolbox with *.tbx extension.

I need to make the input parameter flexible (feature class or shapefile) , so which data type I should select for this parameter?


texts:
I have a Postgis table containing land parcels as polygons. These land parcels have boundaries defined by hedges, walls, fences etc. I would like to create a table of the individual boundary components for further survey and evaluation. The first step to this would be cutting the polygon boundaries into strings at each node.
It looks like ArcMap can do this using the "Polygon To Line" function (http://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/polygon-to-line.htm) but I can't find anything equivalent in Postgis or QGIS.

Any suggestions?


texts: Understanding datum and elevation of NASA ASTER DTM?

texts:
I have downloaded some data from http://asterweb.jpl.nasa.gov/gdem.asp

I would like to relate the elevations to some coastal data which is estimated to a specific ordnance dataum.

Can anyone tell me what the datum (i.e. 0) refers to in ASTER data?


texts: Using field mappings to remove fields from a merged table

texts:
EDIT: Soreted, thanks :-)

I'm trying to combine a (large) number of tables into a merged table, keeping only certain fields. I've tried the below, but it still gives all the fields. Any ideas?

listEventTables = arcpy.ListTables("RS_EVENT_ALL_*")

fieldMappings = arcpy.FieldMappings()

for table in listEventTables:
    fieldMappings.addTable(table)

for field in fieldMappings.fields:
    if field.name not in ["ROUTE_ID","TRIP_NUM","OFFICE_ID","VOLUME","ACTIVITY","ARRIV_TIME"]:
    fieldMappings.removeFieldMap(fieldMappings.findFieldMapIndex(field.name))

eventTable = outGDB + "Merge" # Merge of event tables (has to be in a GDB)

arcpy.Merge_management(listEventTables, eventTable, fieldMappings)


texts: Publicly accessible (near) real-time satellite imagery

texts:
The operators of the Himawari-8 weather satellite provide a fresh full-disc picture of Earth every 10 minutes. This is a great resource and powers applications such as RealEarth.

Are there any other Earth observation satellites that make real-time imagery publicly available?


texts:
Say that in a layout view of an MXD, I draw a simple rectangle.

Does a record of this rectangle exist anywhere in the project data in a way that can be edited or duplicated?

Reason: My team is attempting to create a graphic similar to a histogram and we would like to be able to bulk specify the placement of rectangles in the layout view.


texts: pop up Processing algorithm window from python console

texts:
Is there a method for just opening a processing algorithm without running it?

I mean, with:

import processing
processing.runalg("qgis:countpointsinpolygon")

I have to add all the parameters required for the algorithm, and it throws an error.

What if I just want to open the dialog window of that algorithm?


texts: Colour gradation in ArcMap - shades of blue

texts:
I have created a map of the United States with concentric circles around a geographic point, namely Detroit. I was able to give the different circles around the city colours of different grey shading. To do so, I used ArcMap's colours grey10-grey80. This is the result:

I have tried to reproduce the same map with a different colour shading. Ideally, I would like to have colour gradiation of different blue shades. The problem is that there exist too few and only very irregular predefined blue tones. I tried creating equal shades with ArcMap's colour selector but the result were irregular colours too. In the resulting map below, for example, some differences between the colours are barely visible, others are too large.

Because of that, I would like to ask if there exist any predefined shades of blue tones that give a clear (and aesthetically pleasing) result where differences are consistent and clearly visible like in the first (grey) map.


texts:
I have a very specific problem and I'm looking for a solution for it.
I need to add some sort of history to an object. The history will be stored like this:

begin_date
end_date
previous_id

Suppose the object that I'm wanting to add the history to is X. We have a central database (at the moment all mdb files, we will switch soon to gdb though) that contains the object X with the history. Workers on the field have a local version of the database and they also fill an object X_i that has an attribute changed.
X and X_i have an id to track them.

Now when we want to merge the local version of the database a script should run and fill the history of the central db like this:

if X_i.changed = true:
    search central_X.id, fill end_date with today
    search local_X.id, copy this attribute to central_X and:
        fill begin_date
        fill previous_id with central_X.id
        generate new unique id for the central_X

We also add new fields to the central db and update the unique ids:

for every i in local_X:
    if i not in central_X:
        copy i to central_X
        generate new unique id for i
        enter begin_date

For deleted items we do something similar but then we set the end_date.

At the end of the merge. We create a new X_i where all the ids are correctly filled and the changed attribute is empty everywhere.

What FME functions could be used for this?

I have looked at alternatives like an ArcSDE with archiving, but that would mean we would need to invest in an ArcSDE, change a significant part of our workflow and not all items that we change will have X_i.changed, so the archiving would contain way too much information to be really useful.

Added workflow to clarify.

I can use changedetector for this.
If X_i.changed is true
If X_i.id is not empty
set end_date for all processed data
no idea how to do this
no idea how to do this
no idea how to do this
find the biggest id so far and proceed from this id.


texts: How can I dynamically update raster visualization in python?

texts:
I want to visualize a very large raster image with python in an efficient way.

I have looked into datashader and found out that it is possible to dynamically update plots with millions of data points based on the current view and zoom level.

I was wondering if there is a way to visualize raster images in a similar way. It would be nice to have the raster at a lower resolution zoomed out and  a more detailed view zoomed in.

So far I have seen this behavior in Qgis but I am not sure how to achieve something similar with python.


texts: open current selection's tab in tabbed infoWindow container: ArcGIS Javascript API

texts:
I am updating a webApp using ArcGIS Javscript API 2.1
I have an infoWindow with tabs which shows all of the features in my map. I built it based on this example:
http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/arcgis/help/jssamples_start.htm#jssamples/identify_drilldown.html

I would like to have the infoWindow open with the tab that matches the selected feature on top (or, selected). Currently, in my map and in the above example, the tab that opens is the tab last clicked during the preceding instance of the infoWindow.

I see there is a 'selected' property for tab containers. I can set it for the initial layout of the infoWindow onload in HTML, but setting it in the Javascript code does not seem to work..

Does anyone have an idea how I may do this? Thanks,


texts: How can I get a numerical (or value) display for equal intervals in a layer?

texts:
I'm looking to classify regions on a map by the amount of light pollution in the area. I have the varied intensities (0 through 60) plotted using a color map, but is there anyway that instead of a spectrum of colors I can have the numerical output instead?

So in place of the different colors of blue as shown in the screen shot below, I would be able to see different numbers inside every pixel on the map.

If I could even get GIS to display the 'value' or 'label' rather than the 'color' that would be everything I'm asking for.

I feel like the solution should be easy, but I'm pretty stuck.


texts:
Does anybody know if there is a way to deploy Community Analyst in Portal?

We're in the process of migrating from ArcGIS Online to Portal, and would like our Online Community Analyst users to be able to move completely to the new enterprise environment.

I feel like there should be a way to integrate these two pieces of the platform together, but I haven't been able to find any documentation on this.


texts: Is it possible to insert an XYZ tile layer to an openlayers webmap created by qgis2web plugin?

texts:
The qgis2web plugin exports complete rasters. But in my case these files are too large... so instead of using the entire layer I'd like to use a tiled layer that I created (with TileMill).

What would be the best way to do this? I thought of a few ideas, but being a beginner in JS I couldn't get it to work:

Insert the ol.layer.Tile + view: new ol.View code in the index.html?
Insert the above codes in the qgis2web.js file (I suspect this is the right way but couldn't get it to work).
Is it possible to add the tile layer as a separate .js file and launch it from index.html?
I also assume I have to change the background color of the map in index.html to be transparent.

The zipfile of the qgis2web output (with only two small vector layers, 200KB) can be downloaded from:

http://www.tempgis.com.au/wp-content/uploads/stackexch/ol_qgis2web.zip

The link to one of the XYZ tiled images is:

http://www.tempgis.com.au/wp-content/uploads/stackexch/regional/{z}/{x}/{y}.png


texts: Avoid features to be automatically selected in table

texts:
In the screenshot below you will notice that in "Feature", a country has gotten automatically selected. I don't understand why. I have not selected any part of the data or the map. I don't want this because it is a cross country analysis.
In fact, in the dropdown box, not all the countries are appearing though I can see all these countries in the table.


texts: Leaflet in R Shiny -- Custom Color Ramp for Tiled Data?

texts:
I have large-ish grids (roughly 9000 x 9000 cells) of model results in single-band GeoTIFFs (re-projected from raw outputs in FLT in a different coordinate system). I am displaying them over a tiled background map in Shiny using leaflet -- specifically addRasterImage().
The modelers want to be able to pan and zoom to selected areas in these grids and adjust the display colors to highlight local variation in the results. I think I can provide this, but my solutions so far involve reloading the raster to change the colors, which takes a long time per change (loading the image at full resolution takes tens of seconds). Even without re-coloring, the response to pan and zoom is choppy and sluggish.
To improve the performance, I used gdal2tiles (with default settings, because I'm new to this) to tile and pyramid my GeoTIFF. Now I can display the result with addTiles() instead of addRasterImage(). The new map is much more responsive, but I can't seem to choose a color ramp for addTiles, so my display is now in a chunky greyscale, and the grey-shading is different in from tile to tile.
First of all, I have to do something to make the color ramping consistent across the tiles. Is that a gdal2tiles setting? If so, which is it?
What I really want (Everything! I want Everything!) is the flexibility of addRasterImage() and the responsiveness of a tiled-and-pyramided image. Is that possilbe using the tools offered by leaflet and Shiny?


texts:
I'm new with GIS.

I would like to know if there is a defined tile grid for Sentinel-1.

For Sentinel-2 images, there is a defined grid with UTM code, Latitude band and Square.

There is something like this for Sentinel-1?

If not, how can I find out which images contains the polygon that I need to analyse?

We are going to use the AWS sentinel bucket to download the images.


texts: Q-GIS Print Composer: underline in HTML () is almost invisible (too thin)

texts:
I am using HTML code to format text in a text box in print composer trying hard to underline just one word of a paragraph. Of course I could create a new text field just for one word but that screws the whole sentence over.

Edit: <u>  works fine. As well as ndawsons solution.
The underline is there, it´s just almost invisible. Is there a way to thicken it?

Alternatively a  new bottom border line can be used but that is more of a workaround than a solution:

u {
 border-bottom: 2px solid;
 text-decoration: none;
}

QGIS 2.10.1 Pisa


texts:
I am trying to append multiple feature classes to a new one. As they come from different sources, the fields are all different, so I have to map the fields of the input feature classes to the fields of the output feature class.

I've first set up a table which looks like this:

The table contains 1 record for every field in the input feature classes which needs to be mapped to an output field. My script iterates through the table and makes a Tablerecord object for every record in the table. These are stored in a dictionary table_records with a lookup ID:

{1: <__main__.Tablerecord instance at 0x0DF5BB70>,
 2: <__main__.Tablerecord instance at 0x0DF600D0>, ... }

Every Tablerecord has attributes id, path, field, targetfc, targetfield

Then for every output feature class mentioned, it makes a key in a dictionary output_fcs with lookup value a row of IDs: {'fence': [1, 2, 3,...]}

Then, the script should make 1 FieldMappings object for every output feature class, which contains a FieldMap object for every output field, each of which contains a reference to the associated input fields from the input feature classes.

Problem is, when I run this from PyCharm (though for Pyscripter and IDLE it's the same), it causes Python to crash ("python.exe has encountered a problem and needs to close. please tell microsoft about this problem" and all that). What is going on here, what is the fault in my script that does not just generate an error but crashes the interpreter?

Script:

for output_fc in output_fcs.keys():
    fc_list = []
    fms = arcpy.FieldMappings()
    fms.addTable(os.path.join(gdb_path, output_fc))
    id_list = output_fcs[output_fc]
    for record_id in id_list:
        record = table_records[record_id]
        if not (record.split or record.merge_field or record.merge_fc):
            i = fms.findFieldMapIndex(record.targetfield)
            if i == -1:
                fm = arcpy.FieldMap()
                fm.outputField = record.targetfield
                fm.addInputField(record.path, record.field)
                fms.addFieldMap(fm)
            else:
                fm = fms.getFieldMap(i)
                fm.addInputField(record.path, record.field)
                fms.replaceFieldMap(i, fm)


texts:
I get the following error when running r.thin:

  Traceback (most recent call last): File
  "C:/PROGRA~4/QGIS3/apps/qgis/./python/plugins\processing\algs\grass7\Grass7Algorithm.py",
  line 395, in processAlgorithm outputs[outName] = parameters[outName]
  NameError: name 'QgsProcessingOutputHtml' is not defined

Execution failed after 5.26 seconds

I looked at the Python script containing that section of code:

# Return outputs map
        outputs = {}
        for out in self.outputDefinitions():
            outName = out.name()
            if outName in parameters:
                outputs[outName] = parameters[outName]
                if isinstance(out, QgsProcessingOutputHtml):
                    self.convertToHtml(parameters[outName])

        return outputs

Thinking that a function wasn't called to start with, I added this to the call for the function:

from qgis.core import (Qgis,
                       QgsRasterLayer,
                       QgsApplication,
                       QgsMapLayer,
                       QgsProcessingUtils,
                       QgsProcessing,
                       QgsMessageLog,
                       QgsVectorFileWriter,
                       QgsProcessingAlgorithm,
                       QgsProcessingParameterDefinition,
                       QgsProcessingException,
                       QgsProcessingOutputHtml,

I still get the error. Is this a missing function, or is does this function exist anymore? I loaded the latest QGIS version (3.0.1).


texts:
I have a table containing a LocationEast and LocationNorth columns(int).
LocationEast and LocationNorth are coordinates that follows the SWEREF99 standard.

According to this page, http://www.epsg-registry.org/, the SRID for SWEREF99 is 3006.

I then try to run the following code:

INSERT into Places(Name, LocationEast, LocationNorth, GeographicLocation) values ('My Location', 673318, 6580874, geography::STGeomFromText ('POINT(673318 6580874)', 3006))

But I get the following error:

Msg 6522, Level 16, State 1, Line 1
A .NET Framework error occurred during execution of user-defined routine or aggregate "geography":
System.FormatException: 24201: Latitude values must be between -90 and 90 degrees.
System.FormatException:
   at Microsoft.SqlServer.Types.GeographyValidator.ValidatePoint(Double x, Double y, Nullable`1 z, Nullable`1 m)
   at Microsoft.SqlServer.Types.Validator.BeginFigure(Double x, Double y, Nullable`1 z, Nullable`1 m)
   at Microsoft.SqlServer.Types.ForwardingGeoDataSink.BeginFigure(Double x, Double y, Nullable`1 z, Nullable`1 m)
   at Microsoft.SqlServer.Types.CoordinateReversingGeoDataSink.BeginFigure(Double x, Double y, Nullable`1 z, Nullable`1 m)
   at Microsoft.SqlServer.Types.WellKnownTextReader.ParsePointText(Boolean parseParentheses)
   at Microsoft.SqlServer.Types.WellKnownTextReader.ParseTaggedText(OpenGisType type)
   at Microsoft.SqlServer.Types.WellKnownTextReader.Read(OpenGisType type, Int32 srid)
   at Microsoft.SqlServer.Types.SqlGeography.ParseText(OpenGisType type, SqlChars taggedText, Int32 srid)
   at Microsoft.SqlServer.Types.SqlGeography.GeographyFromText(OpenGisType type, SqlChars taggedText, Int32 srid)
.
The statement has been terminated.

My question is: How do I use the SWEREF99 format?


texts: zoomToExtent (getDataExtend) combined CQL filter, does not work

texts:
I'm using openlayers 2.12 and geoserver 2.1.3.

I created a search functionality for a vector layer that contains points/lines/polygons. I used CQL that dynamically gets data from a form.

When I use map.zoomToExtent(pins.getDataExtent()); does not work at all, instead it zooms 100% on an irrelevant place of the map. Never zooms to contains just the newly created features.

Map also contains other vector layers with no search functionality and a Google maps layer. All projections are EPSG 900913.

Check the following code. Form's "name" is a textfield, "era" is a dropdown and "borough" is  a dropdown containing string that will turn to Bounds , so map will zoom to a borough.

Search for : era OR name OR era+name with zoomToExtent (getDataExtend) on = zooms 100% at irrelevant place. I want this to zoom at new features.

Search for : era OR name OR era+name with zoomToExtent (getDataExtend) off = does not zoom, as it should be

Search for : era+borough OR name+borough OR era+name+borough with zoomToExtent (getDataExtend) on = zooms 100% at irrelevant place. I want this to zoom at new features.

Search for : era+borough OR name+borough OR era+name+borough with zoomToExtent (getDataExtend) off = zoom,at the borough as it should be.

The code...

//first, clear the layer
pins.removeFeatures(pins.features);
pins.refresh({force:true});

//split the chosen borough, to create bounds, so the map can zoom there
var binfo=document.getElementById("boroughselect").value;
if(binfo!=" "){
var split_binfo = binfo.split(",");
var bidchoosen=split_binfo[0];
var zoomTo=new OpenLayers.Bounds(split_binfo[1], split_binfo[2], split_binfo[3], split_binfo[4]).transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:900913"));
map.zoomToExtent(zoomTo);}

//create a filter using CQL
var filter_list = []

if (document.getElementById("eraselect").value != " ") {
    var filter_b = new OpenLayers.Filter.Comparison({
        type: OpenLayers.Filter.Comparison.EQUAL_TO,
        property: 'p_era',
        value: document.getElementById("eraselect").value
    });
    filter_list.push(filter_b);}

if (document.getElementById("nm").value != "") {
    var filter_c = new OpenLayers.Filter.Comparison({
        type: OpenLayers.Filter.Comparison.LIKE,
        property: 'p_name',
        value: document.getElementById("nm").value
    });
    filter_list.push(filter_c);}

//create the final filter,combining the above,  to search
var filter_final = new OpenLayers.Filter.Logical({
    type: OpenLayers.Filter.Logical.AND,
    filters: filter_list});

//pass the filter to the layer
var prot =  new OpenLayers.Protocol.WFS({
    url:  "http://localhost/geoserver/wfs",
    featureType: "pins",
    featureNS: "http://www.cultmap.gr",
    defaultFilter: filter_final});

var _CallBack = function(resp) {
    pins.addFeatures(resp.features)

var cb = pins.features.length;
if (cb == 0){
    document.getElementById("formMsgG").innerHTML = No results, please try again.";
            }};

var response = prot.read({callback: _CallBack});

pins.refresh({force:true});
map.zoomToExtent(pins.getDataExtent());


texts: How to analyze temporal point data in R?

texts: I have XY coordinate data of water depth (n = 30) where each coordinate has water depth attribute data for multiple dates from 2000 to 2007. I have imported the data in r for statistical analysis. I want to analyze water depth across different time periods of the year.  My dates are as column headings, for example: coordinates, date1, date2, date3,date4 etc and the depth is under date column headings. What statistical methods should I use to analyze and plot the information?


texts: How to fill in a polygon with a lot of holes in it? Arcmap 10.3

texts: I have a lake map layer that mistook algae for land and now some of my lakes have a a lot of hole in them and I don't want these holes. I also don't want to delete Islands and I have a lot of lakes.


texts: Loading Shapefile with Work Network creating Negative Scale

texts:
For the company I work for, we have our own servers and network we load upon start up to do our work within QGIS. However its about 50/50 when loading an outside shapefile that it works.

When I load certain shapefiles, I get this crazy scale of the shapefile that is around 1:-2,000,000,000. I re-project it to WGS 84 to match. I've tried re-projecting and saving to bring in the correct way from the start and it doesn't work. There are other shapefiles I can download and use that load up perfectly fine with no issues.

Any one have any idea what is causing this and how to get these shapefiles to load correctly?


texts: Geoserver mvn install success, maven eclipse build success but Eclipse fails to run project

texts:
I am able to download geoserver source code , build it with maven , create maven eclipse project but when i load the project from /src in the eclipse it does not run. after checking build path i found that M2_REPO structure is not as what the build path is expecting.

Here are my  computer details on ubuntu 14.04

JAVA

java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)

maven

Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T22:11:47+05:30)
Maven home: /usr/share/maven3
Java version: 1.8.0_121, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.4.0-72-generic", arch: "amd64", family: "unix"

Update

Tried to build the same thing with lower version (2.10) in windows it worked.
Ununtu still does not work


texts: Uninstalling ArcGIS extensions from earlier version after ArcGIS upgraded?

texts:
I uninstalled ArcGIS 9.3.1 (server, desktop, engine), then installed ArcGIS10.0 (Server, Desktop, engine).

When I tried to uninstall some arcmap extensions, I got error 1001 "unable to get installer types".

In other words, I forgot to heed this advice:

  Please note that you must uninstall
  the custom component before you
  attempt to uninstall ArcGIS. The
  reason for that is that custom
  components need to loaded at
  install/uninstall time.

Does anyone know how to cleanly uninstall this without uninstalling 10.0 and reinstalling 9.3.1?

Update: I think I've cleaned things up using Revo Uninstaller, then cleaning the registry using CCleaner.


texts: Prevent folder selection button from displaying in ArcGIS model tool?

texts: I've created an ArcGIS tool using ModelBuilder, 10.3.1.  One of the inputs must be a numeric value typed in by the user.  Thus there is no need for the model to display the default folder selection button for that input (see the red X in the attached screen shot).  How do I remove the button so that the user is not tempted to click it?


texts:
I am new to PostGIS. I have some linestring geometry values. Each linestring contains multiple points. I have dumped the points from that geometry by ST_DumpPoints. By ST_AsText, I have found that the first linestring contains 10 point sets (x,y,z) then second linestring contains 4 point sets. Now, I want to create a column named start and another column named end. The start will contain the start point of each point set of the linestring and end point will contain the next point of the point set of the linestring without the z value. E.g.

linestring1 dumped points: (1,2,2),(2,5,4),(3,4,5)......
linestring2 dumped points: (1,3,2),(3,3,4),(4,5,6)....

Now source and End columns will be

Source     End
(1,2)      (2,5)
(2,5)      (3,4)
(3,4)      .
.          .
.          .
.          .
.          .
(1,3)      (3,3)
(3,3)      (4,5)
(4,5)      .
.          .
.          .
.          .


texts: "Invalid feature class type" for input feature while using "Locate Features Along Routes"

texts: I am getting ERROR 000810 (Invalid feature class type) when I add my stream shapefile as an in_routes. That is really weird to me.


texts: QGIS 2.18 ImportError: DLL load failed: The specified module could not be found

texts:
I try to run the QSwat script and it begins with that:

from PyQt4.QtCore import * # @UnusedWildImport
from PyQt4.QtGui import * # @UnusedWildImport
from qgis.core import * # @UnusedWildImport
from qgis.gui import * # @UnusedWildImport

However I get this error:

Traceback (most recent call last):
  File "C:/Program Files/QGIS 2.18/apps/qgis/python/plugins/HidroTurk/HT_HJK/delineation.py", line 25, in <module>
    from qgis.core import * # @UnusedWildImport
  File "C:\Program Files\QGIS 2.18\apps\qgis\python\qgis\__init__.py", line 26, in <module>
    from qgis.PyQt import QtCore
  File "C:\Program Files\QGIS 2.18\apps\qgis\python\qgis\PyQt\QtCore.py", line 28, in <module>
    sip.setapi(api, 2)
ValueError: API 'QDate' has already been set to version 1

I read that if I import qgis.core and qgis.gui later, it fixes the problem so I wrote like that:

from qgis.core import * # @UnusedWildImport
from qgis.gui import * # @UnusedWildImport
from PyQt4.QtCore import * # @UnusedWildImport
from PyQt4.QtGui import * # @UnusedWildImport

I got this error:

Traceback (most recent call last):
  File "C:/Program Files/QGIS 2.18/apps/qgis/python/plugins/HidroTurk/HT_HJK/delineation.py", line 23, in <module>
    from qgis.core import * # @UnusedWildImport
  File "C:\Program Files\QGIS 2.18\apps\qgis\python\qgis\__init__.py", line 27, in <module>
    from qgis.core import QgsFeature, QgsGeometry
  File "C:\Program Files\QGIS 2.18\apps\qgis\python\qgis\core\__init__.py", line 30, in <module>
    from qgis._core import *
ImportError: DLL load failed: The specified module could not be found

I am sure that the problem source is PATH, PYTHONPATH and PYTHONHOME. Because I got this error in QGIS 3 and I solved it by adding paths that can be reached by writing python console print (sys.path) to the system variables of PATH and PYTHONPATH.

However I can not fix it with the same way. I have been handling with it for 5 days and I will go crazy!

Note: I can import them in QGIS 2.18 python console.


texts: Changing anchor point for popup without marker using Leaflet

texts:
Is it possible to change the position of the anchor point for the popup without using markers?
I was testing with this example. This code shows a popup, but I want to adjust the position of the anchor because it gets in front of a marker.
   var popup = L.popup()
    .setLatLng([testLat, testLng])
    .setContent("<div.... </div>")
    .openOn(map);

I already has markers and popups on the map and the position for those I get from a JSON-string. These popups opens when I click on a marker, but now I just want a simple popup to be visible when the map has loaded. I have tried to open one of the popup that I'm already have, but that does not seems to work. If that had worked, I didn't need to use a extra popup and change the anchor point for that popup because that is already done. This is a part of my code where I create the markers and bind them with popups.
Is there a way to open one of those popup instead?
// Add markers
for (i = 0; i < mapPos.length; i++) {
marker = new L.marker([mapPos[i]["lat"],mapPos[i]["lng"]], {icon: numbers[1]}).addTo(map).bindPopup("<div>.... </div>");
}


texts:
Can I export a list of layers and their associated file paths (like the pop-up when you open QGIS and links are missing) for all my layers within a QGIS Project?
I want my collegue to have a mirror image of the QGIS project I have created.
Also is there a way to copy all the styles and apply them to the same project on another computer?


texts: Know of any existing quality training/validation datasets for land cover?

texts:
Looking to do some moderate res. global land cover mapping and need as much training and validation data as possible--does anyone know of any good/quality land cover/land use data that are freely available? E.g. USGS's Global Land Cover Validation Reference Datasets, GOFC-GOLD's STEP training database.

Doesn't have to be global--regions/states/countries/continents work as well; just crowdsourcing ideas here!


texts: Is there a circle tool for line features in ArcMap 10?

texts:
I want to draw a roundabout in a road map in ArcMap 10. They are usually perfectly round circles.

How can I do this?

I am struggling to find a good way to do this.

It takes ages with the Line tool and Curve tool.

Can anyone help, please?


texts:
Issue: I've got openlayers application with some overview map which has just one scale so the size of it doesn't change even though I zoomed my map. Now i would like to make overview map locked - blocked, and in the same time to make possible to move the extent rectangle on the overview map, so it's not always in the center.
Summing up I want to switch properties between the extent rectangle on the overview map and overview map.

I will be grateful for your help


texts: How to create shapes in table based on key

texts:
I have a shapefile with every building on campus and a key(BUILDCODE), I have a table with the number of people per building and time of the measurement. I am trying to create a time enabled layer that will show the population in each building per day. My problem is that each building only has one shape in the shapefile, do I need to create a unique instance of every building per measurement or is there a simple way to associate one building to a series of measurements?

Thanks


texts: Randomly Selecting Polygons within Buffer

texts:
I am trying to select random polygons in a shapefile.  I have successfully used the research tool Random Selection to do so.
The next step is to randomly select polygons within buffered regions of the same shapefile.

I tried merging the "buffer layer" to my county layer and performing a Random Selection within Subsets, selecting the newly added buffer column as the Inset Subset Field.  This jams my computer even though I only asked it to select a few counties.

Any thoughts? Other ways to do this?


texts:
I need to get simplified boundaries of all countries with some buffer around them (20 km). I am using QGIS, I converted my country polygons vector layer from 4326 to 3857, set buffer, used simplify and the result looks OK.

Then, when I try to convert the layer with the new polygons to 4326 I get some malformed polygons for Russia, Fiji, Antarctica, and Tuvalu - I think it's because they appear on both east and west sides of the map in the 4326 projection. Then, when I try to use the "split vector layer" function, it says incorrect geometry.

Is there any way, how to do it "correctly"? I am new to QGIS, I need this for my other project.


texts: SLD encoding with GeoServer REST Configuration

texts:
I am using the GeoServer REST Configuration to add the following SLD file to GeoServer:

<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd" xmlns="http://www.opengis.net/sld">
  <NamedLayer>
    <Name>MyWorkspace:MyLayer</Name>
    <UserStyle>
      <Name>MyLayer_default_style</Name>
      <Title>MyLayer</Title>
      <Abstract>Default style for Mylayer</Abstract>
      <FeatureTypeStyle>
        <Rule>
          <Title>Polygon</Title>
          <PolygonSymbolizer>
            <Fill>
              <CssParameter name="fill">#CBCCCC</CssParameter>
            </Fill>
            <Stroke>
              <CssParameter name="stroke">#CBCCCC</CssParameter>
              <CssParameter name="stroke-width">1</CssParameter>
            </Stroke>
          </PolygonSymbolizer>
        </Rule>
      </FeatureTypeStyle>
    </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>

I have used the example from the GeoServer REST Docs and the sld file is added to GeoServer like expected. But the encoding of the sld file in GeoServer is now "UTF-8" instead of "ISO-8859-1" which I declared.
See the SLD created by GeoServer below:

<?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:NamedLayer>
    <sld:Name>MyWorkspace:MyLayer</sld:Name>
    <sld:UserStyle>
      <sld:Name>MyLayer_default_style</sld:Name>
      <sld:Title>MyLayer</sld:Title>
      <sld:Abstract>Default style for Mylayer</sld:Abstract>
      <sld:FeatureTypeStyle>
        <sld:Name>name</sld:Name>
        <sld:Rule>
          <sld:Title>Polygon</sld:Title>
          <sld:PolygonSymbolizer>
            <sld:Fill>
              <sld:CssParameter name="fill">#CBCCCC</sld:CssParameter>
            </sld:Fill>
            <sld:Stroke>
              <sld:CssParameter name="stroke">#CBCCCC</sld:CssParameter>
            </sld:Stroke>
          </sld:PolygonSymbolizer>
        </sld:Rule>
      </sld:FeatureTypeStyle>
    </sld:UserStyle>
  </sld:NamedLayer>
</sld:StyledLayerDescriptor>

I have tested this using GeoServer 2.1 (all RC and final release).

How can I add the SLD by using the GeoServer REST Configuration with my declared encoding and not "UTF-8"?


texts: How do I show this lake-depth kml in openlayers

texts:
I have made some examples showing timezones.kml on top of my map in openlayers v3.8.2 without any big issues but this kml (document.kml) of mine just does not want to work.
It just doesn't show at all. It loads perfectly in Google Eart and you should be able to have a look at it there if you want to see how it should be.

This is one version of my code that doesn't show the vector layer (or showing it in the wrong place/hidden/scaled so small I can't find it or whatever).

I haven't got the grasp of all this yet and would be very happy for some help on the way.

var raster = new ol.layer.Tile({
              source: new ol.source.OSM("Thunderforest.Landscape",
      ["http://a.tile.thunderforest.com/landscape/${z}/${x}/${y}.png",
       "http://b.tile.thunderforest.com/landscape/${z}/${x}/${y}.png",
       "http://c.tile.thunderforest.com/landscape//${z}/${x}/${y}.png"])
})

var vector = new ol.layer.Vector({
        source: new ol.source.Vector({
            url: 'path/to/document.kml',
            format: new ol.format.KML({ extractStyles: true, extractAttributes: true})
        })
    });

 var map = new ol.Map({
        target: 'map',
        layers: [
          raster,
          vector,
        ],
        view: new ol.View({
            center: ol.proj.transform([12.58,58.76], 'EPSG:4326', 'EPSG:3857'),
            zoom: 13
        })
    });


texts:
I've been doing GIS for about a decade now and was under the impression to avoid using Macs if using ArcMap because it runs on Windows OS. I've heard that if one really wished to run ArcMap on a Mac it's possible to have parallel OSs or use a virtual box and that this type of technology is pretty solid these days.

I need to replace my PC laptop and have been getting more and more interested using open source alternatives like QGIS and GeoServer to make web mapping services. Additionally, I would be using the laptop to log into a remote virtual machine I use for work that has ArcMap on it so the OS on the laptop wouldn't matter for that purpose.

I occasionally attend an open hack night for web mappers and I'm usually the only one there with a PC laptop. Is there any reason why I should switch to a Mac or should I just stick with a PC?


texts: How can I parse hundreds of *.lyr files for their Definition Queries?

texts:
I have ~600 lyr files that reference a table on an SDE database that has about 20,000,000 records.  Some of these *lyr files have an incorrect definition query applied or is missing the query entirely.

I think I'm looking for a way to create a table with the Lyr file name and it's definition query, but I'm not sure if that's something I can do in python or model builder.  Can anyone pt me in the right direction?


texts: Error in shortest distance between points and lines

texts:
I am using QGIS 2.18.4 in along with GRASS plugin to analyaze vector data. I have to shapefiles, 1) roads and 2) observation points. Both layers are as geographic coordinates (WGS 84). I need to know the closest distance between each point and a given line (the closest too). To acompish this, I thought of using the function v.distance of GRASS. First, I created a mapset in GRASS; then I loaded both files into the mapset using directly "add vector layer" in QGIS. Finally, when using the function "v.in.org.qgis" from GRASS to load the roads, the following error pops up:

C:/PROGRA~1/QGIS2~1.18/apps/grass/GRASS-~1.0/bin/v.in.ogr.exe
"input=C:\Users\lucianolasala\Documents\Analysis\Wild
boars\Shapefiles\Roads\Red Vial\002_Red_Vial.shp" output=Red snap=-1
min_area=0.0001 -o --o
Over-riding projection check

Check if OGR layer <002_Red_Vial> contains polygons...
￼Vector map already exists and will be overwritten
Table linked to vector map does not exist
Unable to create table: 'create table Red (cat integer, UNION integer, TIPO
varchar ( 22 ), NOMBRE varchar ( 30 ), JURISDICCI varchar ( 14 ), CLASE
varchar ( 22 ), TRANSITABI varchar ( 24 ), PROVINCIA varchar ( 60 ), PAIS
varchar ( 15 ), OBSERVACIO varchar ( 50 ), HOJA varchar ( 10 ), FUENTE
varchar ( 50 ))'
Finished with error


texts: Find Distance within each Raster contiguous cell block

texts:
I was asked to find for each Individual Contiguous Forest Block the distances INSIDE of each where it would be the farthest (aka the most isolated) from each forest cell block's respective edges. I know this should involve Euclidean Distance and possibly followed by Reclassify, but perhaps not?
 I tried performing EucDist on the forest cell block layer with a mask of that same forest cell block layer, but the result didn't seem to be what I wanted.


texts: GDAL: Changing a GeoTIFF's Proj.4 K value

texts:
I have a GeoTIFF that appears to have a broken proj4 K value.
When I run the command: gdalsrsinfo -o proj4 <Filename>
I get the output: +proj=stere +lat_0=-90 +lon_0=0 +k=0 +x_0=0 +y_0=0 +R=1737400 +units=m +no_defs

My understanding is that k should never be 0.  I assume the author of this GeoTIFF intended for it to be 1.

I tried using following command to set k with no luck: gdal_translate -projwin_srs "+proj=stere +lat_0=-90 +lon_0=0 +k=1 +x_0=0 +y_0=0 +R=1737400 +units=m +no_defs" <input file> <output file>

How can I update the proj4 k value of my GeoTIFF?  Is the proj4 string something that can be changed directly?


texts:
I'm working on a valve isolation project for a natural gas application. I'm a design engineer foremost, but like to play with programming and GIS applications fairly often. I've got a bit of experience with both, but Python is pretty new to me, and programming on a GIS application is also new to me.

What I would like to do, is to have the script start, and prompt for input from the user. The user would then select a line feature ("Main") in the map. I want it to store the value of a particular field ("SegmentID") of that line feature I selected to a variable called HitSegmentID. The script will then select all point features on the "valve" layer that share the same segment id. I tried doing some research on functions yesterday that involved active layer, user input, prompting dialogue boxes and selected layer, but nothing I've found yet does anything that I want.

Can someone point me in the right direction?


texts: Leaflet TimeSlider not showing points correctly

texts:
I'm trying to add about 13 thousand points in a map using the TimeSlide plugin, but my points are not following a logical order of appearance. When I use the slider I get the dates in the box below in a arbitrary order, I'm tryng to add based in a yearly progression by the first year being 1985 and the last year being 2013. Here is my code:
        //calling the geoJSON
        var SaoPaulo = L.geoJson(SP_ResSinglePoint, {

            pointToLayer: function (feature, latlng) {
                var popupContent = "<b>Year Built: </b>" + feature.properties.Timestrg;
                //console.log(popupContent);
                return L.circleMarker(latlng, Style(feature)).bindPopup(popupContent);
            },

        });

        //Create sliderControl
        var sliderControl = L.control.sliderControl({
            position: "bottomright",
            layer: SaoPaulo,
            range: true,
            timeAttribute: "Timestrg",
            follow: true,
        });

        //add sliderControl to the map
        map.addControl(sliderControl);

        //initialize sliderControl
        sliderControl.startSlider()

Part of my json:
 "features": [{
    "type": "Feature",
    "properties": {
        "ID": 15897,
        "Time": 2013,
        "Timestrg": "2013"
    },
    "geometry": {
        "type": "Point",
        "coordinates": [-46.793243, -23.691582]
    }
}, {
    "type": "Feature",
    "properties": {
        "ID": 7422,
        "Time": 2001,
        "Timestrg": "2001"
    },
    "geometry": {
        "type": "Point",
        "coordinates": [-46.800534, -23.687368]
    }

The documentation says that I have to alter the time property to fit my project, I believe that by using the timeAttribute: "Timestrg", it changes the time attribute right?
Best,
Updated code with part of my geoJson request.


texts: What traits identify 2D, 2.5D, 3D geometries, and how can you convert downward, such as from 2.5D to 2D?

texts:
In answering OGR - Weird GeomType -2147483645 on polygon shapefile, posed by @Burton449, I came to realize I don't have a definitive grasp on what distinguishes 2D, 2.5D, and 3D geometries. I certainly realize Z/elevation values are integrated into the data, but I'm unclear if the 2.5D or 3D nature of the data is designated at both the file level (projection, headers, etc?) and the individual feature/geometry level, or just the latter.

It occurred to me that in order to express vertical units, for the GIS to be spatially-aware, the projection might/should specifically mention the vertical datum. However if I use OGRINFO to interrogate a tiger line roads layer (tl_2012_45079_roads.shp), which came down the pipe as a 3D-enabled layer, the layer's SRS is just good ol' NAD83 (EPSG:4269). While ogrinfo can tell the layer is 3D, I'm not seeing any evidence of this in the WKT geometry. Here's a snippet of output showing the summary details and a bit of the first feature geometry:

C:\>ogrinfo C:\xGIS\Tiger\tl_2012_45079_roads.shp -geom=yes -sql " SELECT * from
 tl_2012_45079_roads WHERE FULLNAME = 'US Hwy 1' " | more
INFO: Open of `C:\xGIS\Tiger\tl_2012_45079_roads.shp'
      using driver `ESRI Shapefile' successful.

Layer name: tl_2012_45079_roads
Geometry: 3D Line String
Feature Count: 3
Extent: (-81.341364, 33.753578) - (-80.603160, 34.268694)
Layer SRS WKT:
GEOGCS["GCS_North_American_1983",
    DATUM["North_American_Datum_1983",
        SPHEROID["GRS_1980",6378137,298.257222101]],
    PRIMEM["Greenwich",0],
    UNIT["Degree",0.017453292519943295]]
LINEARID: String (22.0)
FULLNAME: String (100.0)
RTTYP: String (1.0)
MTFCC: String (5.0)
OGRFeature(tl_2012_45079_roads):6176
  LINEARID (String) = 1102215607452
  FULLNAME (String) = US Hwy 1
  RTTYP (String) = U
  MTFCC (String) = S1200
  LINESTRING (-81.050945 33.995744,-81.050455 33.995919,-81.049132 33.996364,-81
.049051 33.996392,-81.048981 33.996415,-81.048852 33.996458,-81.04883 33.996466,
-- More  --

Specifically I'd like to know:

How are the Z-values/flags integrated in 2.5D and 3D geometries, and what is responsible for "announcing" this when a file is accessed? In other words, how might I know at a glance?
Are Z-values of 2.5D and 3D geometries expressed in WKT? I realize OGR can designate the 25D option, but I'm unclear on where the z-value is expressed. Does WKT for a 2.5D or 3D geometry include the z-value?
Finally, How might you convert down, from a 2.5D to a 2D geometry?


texts:
I am very new to QGIS and I am trying to determine the spatial projection and the units of distance of a certain raster file.  The closest thing I can find is the CRS, which is set to some sort of custom value of USER:100000.  However, I'm not sure if that's what I'm supposed to be looking for.

Also, if that is what I'm looking for, how do I determine the units of distance from the file?