texts: Converting table asset data type from 'Long' to 'String'

texts:
I am attempting to generate 50 random points per land use class through Google Earth Engine. I have performed this operation before on an earlier instance, where the inputs were the following

(1) SRTMGL1 data
(2) Table asset data (polygons/points)

However, now I am attempting to repeat the same operation i.e. randomly sample from a FeatureCollection, but instead of sampling 50 random points from polygons subsetted according to their land use class, I am wanting sample from points

i.e. From a vector layer made up of points (not polygons), randomly select 50 points per land use class, and NOT randomly select points within polygons.

However, although the code works, the CSVs I generated after running the code are empty, and there are no entries. I found then that the ee.Filter.eq operation that I applied in my code did not actually filter anything, and after troubleshooting via print(var), it showed zero elements.

After comparing my two scripts, I postulated that the error in filtering arises because now, my Table data has values for land use classifiers under the feature 'id' and 'id2' (corresponding to 2 levels of land cover classification) to be in 'Long' format instead of the 'String' format that I previously managed to get it working on.

Is there a way to convert 'Long' data to 'String' data? Or is there something else wrong with my code/workflow? Or is there a way to properly code to filter from 'Long' data?

The link to my current script is
https://code.earthengine.google.com/3a5e3bbffea2c37ca6393b8d5df75d06


texts: I see that if I use the "Move Label" button to adjust the location of a feature label in a map project, that will also move the location of that label in other map projects that I have created (using QGIS 3.4.11). Is there a way to move the label in one map project, but leave the label as is in other map projects?


texts: Making Open Action only enabled on visible polygons

texts:
I have a shape with polygons with Date field (YYYY-MM-DD). The shape is displayed as Categorised according to year (substr("Date",1,4) and I can switch polygons on an of according to year.
I have an action to open an image of a polygon (cmd /c [%path%] that works fine.

The problem is that it is also active on an empty area when polygons are not displayed.
I know I could make an additional field with year only and categorise display on year field.

Is it possible to make an Action responding only on visible polygons if they are categorised with substr function?


texts: What is the correct URL to resolve GeoTools dependencis via Gradle

texts:
I have a build process that was working correctly until last weekend when it suddenly was not able to find some libraries:

org.geotools:gt-xml:20.3
org.geotools:gt-opengis:20.3
org.geotools.jdbc:gt-jdbc-postgis:20.3

The list of repos I am currently using are these:

maven { url "https://download.osgeo.org/webdav/geotools/" }
maven { url "https://maven.geo-solutions.it/" }
maven { url "https://repo.maven.apache.org/maven2" }
maven { url "https://clojars.org/repo" }

Is there a new official location for the GeoTools libraries ?

Please note this started failing during the last weekend (2020-04-11/12).


texts: How long for surveying quality GPS to get accurate 3D position information

texts:
I recently read an Ordnance Survey Blog article that seemed to suggest that it was necessary to leave the GPS device in use for four hours to gather requisite data.  I am aware that "domestic" GPS units benefit from being left in one position to get better positional accuracy but had assumed that survey quality equipment was "accurate" immediately. What am I missing please?

Nige


texts: How can I inject categorizedSymbolRenderer into My QgsFeatureRenderer?

texts:
I try to get the categorizedSymbolRenderer value in order to render them
In all sample of code I found ( in python but not in c++ ) it said :

renderer = QgsCategorizedSymbolRendererV2(expression , categories)
layer.setRendererV2(renderer)

In my application I want to do the same thing but in c++, so I write that :

lrenderer = QgsCategorizedSymbolRendererV2("Sea",Categories)
pLayer->setRendererV2(lrenderer);

lrenderer is a QgsFeatureRendererV2 *
the build failed !!!!
the error message is : cannot convert 'QgsCategorizedSymbolRendererV2' to 'QgsFeatureRendererV2*' in assignment ....

How can i do ?


texts: I am having opening the adf files from this ftp server  in QGIS. I can open the .ovr files, but they end up in the middle of the ocean.


texts: What are the 'output_layer' Parameter Options for QGIS tool "saveselectedfeatures"?

texts:
After a few comments and my own consideration I've completely Edited the content (and title) of this post.

What are valid "output_layer" parameter options when scripting with the "saveselectedfeatures" tool?

I'm writing a script that uses the tool as follows:

processing.runandload('qgis:saveselectedfeatures', Input, 'Output.shp')

I also tried removing the shapefile extension and just putting 'Output' as the final parameter.  Still errors and no resulting output.

Don't worry about "Input", it's a perfectly valid layer with selected features.

PARTIAL SOLUTION

@Joseph provided the partial solution of replacing " 'Output.shp' " with " None " (no quotations).

processing.runandload('qgis:saveselectedfeatures', Input, None)

This results in successful execution with a temporary output layer called "Solution" popping up in the Layers Window.

BUT...

I call this a partial solution because I find it hard to believe that the designer(s) of this tool didn't also intend to give users the option to choose the name of their output file (as I originally tried to do) via the final parameter ('output_layer'), as described in the tool's Help Tab.

FINAL THOUGHTS

The tool's Help tab offers the following instruction:

But it seems this is not quite as "helpful" as it could be.  It seems like a few short and simple examples of acceptable values for the 2nd parameter would avoid any confusion.

Something like:

Output file options:  temporary layer, Shapefile, etc...

2nd Parameter ('output_layer') options:
" 'User_chosen_name' " (or " 'User_chosen_name.shp' "), OR "None" (produces auto-named temporary layer).

I'm a relatively new user of QGIS.


texts: How to color-balance false-composites of pan-sharpened Landsat images in GRASS?

texts:
Whenever I try to pan-sharpen composites of some Landsat images in GRASS using i.pansharpen, i.fusion.brovey or the IHS sharpening method, the output will have some or all of the following characteristics:

the composite color is in a different hue compared to the un-sharpened composite
the brightness level is messed up
the entire composite went all-white/all-black (when using images pre-processed to top-of-atmosphere reflectance or surface reflectance corrections in i.landsat.toar)

I've also tried all of the following; but the colors/brightness remained the same or turned even worse:

Applied i.landsat.rgb, before-and-after the pan-sharpening process
Played with the -f or -p flag in i.landsat.rgb
Tried r.colors to edit the color table to grey/grey255/grey.eq
Tried i.pansharpen using all Brovey/IHS/PCA methods
Played with the -l flag in i.pansharpen to rebalance the blue-channel

The GRASS GIS manual did explained on how to perform pan-sharpening and color-balancing, but I can't figure out how to combine both processes in a concurrent workflow. I suspected that this is due to my poor understanding of color-tables, color-histogram, etc. in GRASS..

So, can someone explain to me - how do you tackle color-balancing problems when dealing with Landsat images after image-processing in GRASS? Can you share with me your favorite workflow/methods?

Many thanks for any feedback!


texts: Convert MineSight (*.msr) files to Shapefiles or Feature classes

texts:
How would I convert the MineSight (*.msr) files to Shapefiles.

MineSight files are used in MineSight Software which is used for creating block models in 3D.


texts: Different ways of saving color ramps in QGIS (xml, qml, csv), which should I use?

texts:
I started to use QGIS for personal mapping as a hobby (specially for planning bike routes), and I notice there are more than one way to use color ramps.

There are styles, which can be saved and loaded, and may contain color ramps (that is, they aren't the color ramps themselves); When you save a style, the color ramp is saved as a colorrampshader tag in a .qml file;
There are the color ramps themselves, which consist of a table of value, RGBA color (editable via color picker), and label. This, when saved, generate a plain CSV file with .txt extension. An important difference seem to be the mapping of each color to a defined value (for example, to a given elevation) as opposed to a percentage from bottom to top;
There are xml files that apparently can be imported via Style Manager as described in this blog post.

What I would like to know is: what is the preferred/canonical way to store a color ramp? Where can I find the specifications about colorramp and colorrampshader in their respective xml namespaces?

And where does QGIS store the predefined color ramp files?


texts: Doing If/Then over multiple data columns in Python Parser of ArcGIS Field Calculator?

texts:
I have some VB code saved that looks at two columns of data, and populates a third with the low value.

Pre-logic Script Code:

Dim output as double
if [MIN_LEFT] < [MIN_RIGHT] Then
  output = [MIN_LEFT]
else
  output = [MIN_RIGHT]
end if

low = output

I've never used Python before, but I see that I'm going to have to if I want to do this calculation!  But I'm stumped by the comparison of the two columns, and how to define that.  Can anyone help me? (And I apologize if this is overly basic!)


texts: Generating randomised coordinates data set using R?

texts:
I am looking to produce a data set of randomised coordinates points that can easily be generated in R with something like:

Seqlat <- seq(from=-90, to=90, by=.01)
Seqlong <- seq(from=-180, to=180, by=.01)
Latitude <- sample(Seqlat, size=1000, replace=TRUE)
Longitude <- sample(Seqlong, size=1000, replace=TRUE)
VirtualCoordinates <- data.frame(x= Longitude, y = Latitude)

but instead of completely random coordinates, I am looking for all my coordinates to only be over land.

I can visualise and detect which points occur on land with ggplot2:

WorldData <- map_data('world')
Vcoordinates_map <- ggplot() +
                     geom_map(data = WorldData, map = WorldData,
                      aes(x = long, y = lat, group = group, map_id=region),
                       fill = "white", colour = "#7f7f7f", size=0.5) +
                        coord_equal()+
                         theme_bw() +
stat_binhex(data=VirtualCoordinates,
             bins = 100, colour = "black",
              aes(x = Longitude, y = Latitude))

Vcoordinates_map

But I not sure how to set "land" as a condition or an if statement, when generating the data set.

Any ideas on how to achieve this?


texts: Display QGIS Temporal Controller widget within custom plugin widget

texts:
I am building a QGIS-Plugin retrieving time-series raster data from several sources, which is then supposed to be visualized (so far separately and manually) via the Temporal Controller widget, added in QGIS 3.14.
So far, I am opening the Temporal Controller on plugin startup via
        for i in iface.mainWindow().findChildren(QtWidgets.QDockWidget):
          if i.objectName() == 'Temporal Controller':
            i.setVisible(True)

For user convenience, I am trying to add the Temporal Controller widget within my custom widget, which contains the other functions of my plugin. I.e. the Temporal Controller is simply supposed to be displayed as-is within my plugin's own UI.
Unfortunately, I have so far only worked using Qt Designer, and my experience building a UI from code is very limited. I have not found an example that this is possible.
Is it at all possible to import an existing widget into another widget?


texts: Using Python strip and split functions in ArcGIS Field Calculator?

texts:
I am trying to populate a field with the last word in an address string using field calculator within ModelBuilder.  My code takes the whole address string (1234 S Brittany Town Dr) as a parameter, then splits it into a list and returns the last item in the list:

def getSufDir( prop_location ):
    prop_location.strip()
    x = prop_location.split(' ')
    return x[len(x)-1]

This code works for 433 of the 37,000 records in the layer.  I discovered that those 433 records have 25 characters (prop_location is a 25 character maximum field).  All other records return blank.  Why is this happening?  These code snippets seem to work fine in IDLE, but return blank values for most records when done in Field Calculator.  I have attached an image of my field calculator window for reference.

An example of an address that is failing to process is 6847 W Mesa Arch Dr.

I edited to code to:

return x[-1]

and got an identical result.


texts: Convert 0's to NoData in QGIS Raster Calculator

texts: What is the easiest way to convert cells with a value of 0 to NoData in QGIS Raster Calculator?


texts:
How to extract x,y,z values from a point/node in PyQGIS?

I am working on QGIS 3.


texts: Is there any way to find out what REST services are being consumed in ArcGIS Online

texts:
Is there any way I can get a list of REST services being consumed in ArcGIS Online?

I am an admin on our account and just trying to see where our REST Services are being used.

Rather then open each map or application in ArcGIS Online.  I thought there may be someway of ArcGIS Online doing it for me. Or some other tool that could do it.


texts: WMS Renders Differently Than GWC in GeoServer?

texts:
We are showing US States using GWC.

When the user selects a state, we show a "selected polygon" layer on top of it:

As you can see from the image, the yellow Highlighted WMS layer is incorrectly rendering on top of the red GWC layer of states.

Both are the same layer in Geoserver.  The layer has two styles available: the thin red line and the thicker yellow line.

We are rendering it once with plain GWC, and once as a WMS layer (with a filter on it to only show the selected state).

Both the GWC and WMS layers are in Google Maps, which is requesting 256 x 256 tiles.

BTW this only happens at lower zoom levels.  As you zoom in, the two line up better until they completely overlap at about zoom level 7.

Again, this is the exact same layer, the only difference is the service endpoint: GWC in one, and WMS in the other.

Edit: Ian asked me to post this additional information:

Here is the GetCapabilities info for this layer:

  <Layer queryable="1" opaque="0">
    <Name>MyWorkspace:state</Name>
    <Title>state</Title>
    <Abstract/>
    <KeywordList>
      <Keyword>features</Keyword>
      <Keyword>state</Keyword>
    </KeywordList>
    <SRS>EPSG:4326</SRS>
    <LatLonBoundingBox minx="-180.0" miny="-90.0" maxx="180.0" maxy="90.0"/>
    <BoundingBox SRS="EPSG:4326" minx="-180.0" miny="-90.0" maxx="180.0" maxy="90.0"/>
    <Style>
      <Name>MyWorkspace:state</Name>
      <Title>Default Polygon</Title>
      <Abstract>A sample style that draws a polygon</Abstract>
      <LegendURL width="20" height="20">
        <Format>image/png</Format>
        <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://tiles.MyWorkspace.com:80/geoserver/wms?request=GetLegendGraphic&amp;format=image%2Fpng&amp;width=20&amp;height=20&amp;layer=MyWorkspace%3Astate"/>
      </LegendURL>
    </Style>
    <Style>
      <Name>MyWorkspace:state</Name>
      <Title>Default Polygon</Title>
      <Abstract>A sample style that draws a polygon</Abstract>
      <LegendURL width="20" height="20">
        <Format>image/png</Format>
        <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://tiles.MyWorkspace.com:80/geoserver/wms?request=GetLegendGraphic&amp;format=image%2Fpng&amp;width=20&amp;height=20&amp;layer=MyWorkspace%3Astate&amp;style=state"/>
      </LegendURL>
    </Style>
  </Layer>

I can't actually post my code, but here are sample URLs:

GWC URL: /geoserver/gwc/service/gmaps?layers=MyWorkspace:state&zoom=6&x=17&y=25&format=image/png&styles=MyWorkspace:state

WMS (GetMap) URL: /geoserver/wms?request=GetMap&service=WMS&version=1.1.1&layers=state&srs=EPSG:4326&format=image%2Fpng&bbox=-101.25,40.97989806962013,-90,48.922499263758255&width=256&height=256&tiled=true&format=image/png&transparent=true&styles=PolygonHighlight&cql_filter=id%20=%2044

Another Edit:

It looks like this may be a screen coordinates to map coordinates conversion issue.  We use Google Maps' ImageMapType class (https://developers.google.com/maps/documentation/javascript/reference/image-overlay#ImageMapType) to render both our GWC and WMS layers.  But GWC doesn't require conversion of screen coordinates to map coordinates.  It takes screen coordinates (tile numbers) as inputs.  The WMS endpoint, however, requires a bounding box.  Since the version of the Google Maps API that we are using didn't offer a fromPointToLatLng method, we relied on some conversion code I found on the internet (http://blog.canberraphotography.com.au/googlewms/ was the url, but it's dead now).  It looks like upgrading to the latest google maps API may be the answer.


texts: How to georeference city data set with geoid and objectid as only location data

texts:
I am new to Cartodb and ran into my first hiccup. I was trying to import a data set of walkable food access in Philadelphia that is available from Open Data Philly. I can't figure out how to georeference the map as there is only 3 columns...

OBJECTID 3848   GEOID 421010125003026  ACCESS_  High Access

What is GEOID? Does this have to be connected to some kind of library to mean anything?


texts: Adding values from different fields within same row in ArcGIS field calculator?

texts: In my attribute table, I have over 200 fields and tens of thousands of rows or attributes. I am trying to sum the values in each field across each row. This seems like a basic function but when I search for this topic, I've only found instructions on summing entire fields. I could just select each individual field with a "+" in between in the field calculator but there has to be a simpler way than that.


texts:
How to make a contour/outline of grid net polygon? Just need a thick boundary of the grid net to make the result more "beautiful".

I tried to do it somehow in symbology, but unsuccessfully.


texts: Drawing GeoJson polygon in arbitrary coordinate system

texts:
I have a GeoJson polygon I am trying to draw in a 3d scene using d3 and three.js

I have done this before when the polygon was represented in lat, lng coordinates,
but in my case the coordinate system is just integers between -10 and 10 for both x and y.

var path = d3.geo.path().projection(d3.geo.equirectangular().center([0,0]))
var contour = transformSVGPath(path(geoJSONObject));

However if I add this object to my scene, it is translated far away from its center (0, 0)

What am I doing wrong?


texts: Check if WMS layer is queryable in OpenLayers?

texts:
I'm running a map with lots of different WMS layers published by GeoServer. Some of them are queryable, some of them are not. How can I tell that with OpenLayers API?

I'm requesting GetFeatureInfo and I need to request only the queryable layers, layers with queryable param set to false always return "Layer is not queryable" when requested - and that's what I want to hide from users.
I looked into OpenLayers.Map.layers and found no "queryable" property.

UPDATE (to the first comment):
This works fine as long as I use it with localhost:8080/geoserver/wms?service=WMS&version=1.1.1&request=GetCapabilities&. When I tried to get capabilities from http://www.edpp.cz:8080/geoserver/wms?service=WMS&version=1.1.1&request=GetCapabilities&, I got empty array of layers as a result.

I'm trying it with the following code:

function getCapabilities(offline) {
    var url = '';
    if (offline) {
        url = 'localhost:8080/geoserver/wms?service=WMS&version=1.1.1&request=GetCapabilities&';
    }
    else {
        url = 'http://www.edpp.cz:8080/geoserver/wms?service=WMS&version=1.1.1&request=GetCapabilities&'
    }
    var layers = []
        ,result
        ,request = OpenLayers.Request.GET({
            url: url
            ,success: function(response) {
                var format = new OpenLayers.Format.XML()
                    ,xml = format.read(response.responseText)
                    ,text = format.write(xml)
                    ,CAPformat = new OpenLayers.Format.WMSCapabilities()
                    ,cap = CAPformat.read(xml);
                    if (cap.capability) {
                        for (var len = cap.capability.layers.length-1; len >= 0; len -= 1) {
                            if (cap.capability.layers[len].queryable) {
                                layers.push(cap.capability.layers[len].name);
                            }
                        }
                    }
            }
        });
    return layers; //ARRAY
}


texts:
I use GeoServer 2.7.0 and Leaflet-0.7.7 and the jquery:

<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script>`

for showing a WFS in my Geoserver. How do I get it from Postgis? I don't know if I need something else to add.

The WMS works very well but the WFS doesn't.

var map = L.map('map', {
    center: [33.578659, -7.615443],
    zoom: 13,
    layers: [googleStreets]
});

var geojsonLayer = new L.GeoJSON();

function handleJson(data) {
    console.log(data)
    geojsonLayer.addData(data);
}

var geoJsonUrl = "http://localhost:8080/geoserver/Gestion-proprete/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=Gestion-proprete:borne&maxFeatures=50&outputFormat=text/javascript&format_options=callback:getJson"
$.ajax({
    url: geoJsonUrl,
    dataType: 'json',
    jsonpCallback: 'getJson',
    success: handleJson
});

map.addLayer(geojsonLayer);

This is what I've got, but it is not showing at the map:


texts: How to get transparent nodata values in GeoExplorer?

texts: I have a single-band raster image with NoData values set to 0. Is it possible to get them transparent in GeoExplorer?


texts:
I'm looking for a list of all populated places(not just big cities/ports) on the world that reside on sea/ocean. The list should contain the place name, latitude and longitude. Does something like that exist somewhere?

UPDATE:
A bit more details: The reason I'm asking for this is because of my project requirement. I need to build a web service which can let people select a place in a list of all possible places in the world(Listed for example in GeoNames DB) but which are on the sea or ocean. The user then gets meteorological data that is related only to places which are on the sea. Like tides, sea temperatures and other more specific info related to the project. Allowing the user to select a place which is not on the sea would simply make no sense.


texts: Layers Properties - Extent - Custom Extent

texts: If I were to set up a custom extent on several global data layers using a smaller geographic region (i.e. North America), will Arc still "draw/process" that data even though it is hidden outside my North America boundary?  I'm wondering because I have a lot of global data layers that have symbology and labels but I don't need to view them all the time during my work day (although I do still need them from time to time so I cannot just clip or remove the data from my project).  Do you think my performance would be improved if I use the custom extent and potentially eliminate drawing on the map?


texts: Copying feature datasets weekly from EGDB to EGDB (geometric networks included)

texts:
I've been trying find a way to copy a few select feature datasets from our main production Enterprise geodatabase environment to a second Enterprise geodatabase. These datasets include geometric networks and the process must repeat weekly (unattended) I've tried various models in ArcGIS Pro essentially deleting previous versions of the data, creating new feature datasets and copying everything over but it ultimately ends up with appended _1's after multiple runs. I'm leaning towards using FME as we just purchased FME server but my exposure to it is limited to say the least.
I was originally using the Feature Class to Feature Class tool but it was decided afterwards to include the Geometric Network which really changes things up. I've been at this for a few days now with little to no success and unfortunately no one in my workplace is really GIS savvy. Can anyone provide a nudge in the right direction?


texts: Moving multiple points in batch using ArcGIS Desktop?

texts:
I have multiple parcel polygons and they all have one side touching the lake polygon. Each parcel polygon has a point inside which is now at the centroid of the parcel. I need to find a way to move the points in batch so they remain inside the parcel polygon while the points would move at a specific distance from the edge of the lake, or on the edge of the lake.

Here how my data is looking actually. I need to move the red point to the edge of the lake or to a specific distance from the edge of the lake while the points remain inside of the parcel polygon that they are actually in.

I have access to all levels of licence depending of my actual needs.

actual data


texts: How Can I Make QGIS Stop Blinking Every Time I Pan?

texts:
The way QGIS draws the canvas when panning is quite annoying. If I pan the map even a little bit  everything goes blank for a second or two before the layers are drawn. It looks like this happens only when the layer content is supposed to be downloaded (my PostGIS layers are drawn without hurting my eyes), so this might be just a problem with the configuration rather than the code. Does anyone have a solution?

Oh, and the question should be "how  can I make QGIS suitable for epileptics?". It's that annoying.

EDIT to pose question for QGIS 2.4 onwards:

This still appears to be an issue in 2.4. There seem to be some helpful setting under Settings > Rendering but these don't help the issue. QGIS just lacks the nice, slippy, smooth feel of other map viewers. Is caching still on the cards?


texts: Combining zonal statistics of multiple rasters into a single table ArcGIS Pro

texts:
I have a collection of 22 raster images from which I need to find the min, max, and mean, and put the results from each image into a single combined table.

This question is very similar to what I am wanting to do. However, the answers do not seem to work for me. Additionally, I am working on ArcGIS Pro, which is why I have decided to make this a new question.

I am working in model builder and this is what my model currently looks like:

The answers say that after this step, this model needs to be made the sub-model of a new model that appends the collected tables to a new table. This is where I encounter my problem. The collected output cannot be used as it does not show up as a variable. I have made it a parameter but this does not help.

I have broken the problem up into steps and it all works perfectly until the collect values and append part.

I have experienced some bugs with ArcGIS Pro and was wondering if it not appearing as a variable is one of them.

Is there a different way of doing this? Or am I do something wrong?

EDIT:

I have managed to get the Output values of the Collect Values tool to appear in the super-model. However, it still cannot be used as a variable. I cannot find an option on Pro to turn a parameter into a variable.


texts:
I am pulling WFS data into R and using gdalUtils::ogrinfo to look at the available layer names on a WFS server.  Using the same url in QGIS, this is very fast and gives complete information.  With gdalUtils::ogrinfo, either I get an error, or it is very slow.

This url works fine in QGIS (note: you will have to get your own Key and replace <YourKey> if you want test it)

https://data.linz.govt.nz/services;key=<YourKey>/wfs?

The following code in R:

keyLINZ <- "<YourKey>"
dsnLINZ <- paste0("https://data.linz.govt.nz/services;key=", keyLINZ,"/wfs?")
ogrinfo(dsnLINZ, ro = TRUE, so = TRUE, verbose = TRUE)

Gives the following error:

 [1] "ERROR 4: Failed to read GeoJSON data"
 [2] "FAILURE:"
 [3] "Unable to open datasource `https://data.linz.govt.nz/services;key=<YourKey>/wfs?' with the following drivers."
...
list of all GDAL drivers
...
attr(,"status")
[1] 1
Warning message:
running command '"C:\OSGeo4W64\bin\ogrinfo.exe" -ro  -so  "https://data.linz.govt.nz/services;key=<YourKey>/wfs?" ' had status 1

It still does not work by adding request=GetCapabilities to the end of the url (like other WFS urls that work).

However, it does work by adding SERVICE=WFS&REQUEST=GetCapabilities to the end of the url.  But, it takes a very long time to list the layers.  Also, it only lists the layer number and feature type (polygon, point, line).  None of the other information that QGIS lists (Title, layer Name, Abstract, coordinate system) are listed, even with the q = TRUE option set.

How can I get the WFS information from the server in R similar to the info in QGIS and at the same speed?


texts: OpenLayers : Draw shape from external geojson file

texts: I am trying to draw a shape (airplane) from external geojson file. Said shape uses data from 2 object structures inside the geojson file. I can load both shapes separately, but I can't append/join them together.


texts: I need US zipcode areas (polygons) for a web map implementation. Can you tell me where to find it (free or paid)?


texts: GeoServer digest authentication not persisting

texts:
I've followed the GeoServer documentation for adding digest authentication to my 2.16.2 instance of GeoServer, but basic authentication still remains when I test using curl.

I added a digest authentication filter where I selected digest and then clicked on 'close', but when I subsequently click on the 'default' in the  filter chain the digest option is not selected (see image below).

Any suggestions would be welcome.

Thanks for your advice.


texts:
I have a table with a series of objects in it. Each record has a reference number but these numbers are NOT unique - e.g. there are two records with reference "01" and each of them has a different object attached.

I would like to combine all objects with the same reference number into a collection object so that I can attach these collection objects to a different table. I should end up with one row per reference number with no duplicates and without losing any of the objects.

I could use "Objects combine" but this will do a geographic union which is not appropriate - some sites are subsections of sites with the same reference number.

The documentation for the "Create collection" statement only shows it being used to create objects.


texts: How to change no data value from -32768 to -3.40282e+38 in raster in QGIS?

texts:
I am trying to change the null values of a raster from -32768 to -3.40282e+38 in QGIS.
I tried using warp tool setting the no data values to my desired number but it did not change it.
Then I used the translate tool and didn't change it either...
I tried using r.null to in grass and it change it to 2.14748e+09
I don't know another method or what should I try to change?


texts: How to Check if a Layer is PRESENT or ABSENT in a Project via PyQGIS?

texts:
In QGIS, what is the simplest python code (least possible) to verify if a particular layer is PRESENT or ABSENT in the Map Layers list?

NOTE: The script shouldn't trip an error IF the layer is ABSENT.


texts: Is it possible to add another WMS to bing maps base layers list in OpenLayers 3

texts:
I am using a drop down for the user to choose a bing basemap in web map. I'd like to also include a USGS WMS in the list of choices, but am unsure how to do it. This is the current code for populating the list of bing base layers:

var baseStyles = [
  'Road',
  'AerialWithLabels',
];
var baseLayers = [];
var i, ii;
for (i = 0, ii = baseStyles.length; i < ii; ++i) {
  baseLayers.push(new ol.layer.Tile({
    visible: false,
    preload: Infinity,
    source: new ol.source.BingMaps({
      key: 'Ak-dzM4wZjSqTlzveKz5u0d4IQ4bRzVI309GxmkgSVr1ewS6iPSrOvOKhA-CJlm3',
      imagerySet: baseStyles[i]
      // use maxZoom 19 to see stretched tiles instead of the BingMaps
      // "no photos at this zoom level" tiles
      // maxZoom: 19
    })
  }));
}

And here is the code for adding the USGS WMS:

var USGSimagery = new ol.layer.Tile({
                source: new ol.source.TileWMS(({
                    url: 'http://raster.nationalmap.gov/arcgis/services/Orthoimagery/USGS_EROS_Ortho_SCALE/ImageServer/WMSServer',
                    params: {
                        'LAYERS': 0
                        }
                    }))
 });

In my map I am adding one other vector layer besides the base layers:

var map = new ol.Map({
    layers: baseLayers.concat(layerVector),//new ol.layer.Tile({source: new ol.source.OSM()}), layerVector],
    loadTilesWhileInteracting: true,
    target: document.getElementById('map'),
    view: view
    });

And this is the code for setting the values for the choice list:

 <select id="layer-select">
       <option value="AerialWithLabels" selected>Aerial with labels</option>
       <option value="Road">Road</option>
     </select>
</div>
<script>

I can add the USGSImagery WMS to the map the same as layerVector and it shows up, but I want it to be added to my list of base layers instead so I can choose whether or not it displays. I'm not sure how to do this, can anyone help?


texts: Can TileMill be used to create Paper Map from OpenStreetMap source?

texts: I would like to know which software is the best for making paper map from osm source. Is tileMill good for that ?


texts: GIS Database format functional differences

texts:
We are a small team (10 p) working on spatial planning. We are using QGIS as a main tool.
We have a lot of open source data, we daily use on multiple projects, and therefore some files are duplicated over and over on our shared drive.
For each project, people download or copy some files (like administrative boundries, or population data, etc.).
I would like to compile those sources in a unique central database or file, which would be accessible by anyone in my team. I've looked for some information about each format (SpatiaLite, GeoPackage, PostGIS), but struggle to pick one.
Given that SpatiaLite is slower, ive decided to remove it from this equation.
At a high level, what are the functional and non-functional differences between a postGIS database and a Geopackage database.


texts: GeoServer layer property inaccessible from OpenLayers

texts:
I have a PostGIS table linked to GeoServer and eventualy with OpenLayers in a web map app.
Recently, I have created and populated a new column in the table (called atgid) but it seems that I am unable to get the respective feature value in OpenLayers via feature.get() function.
In GeoServer:
I can see the new property/column (atgid) being listed under Feature Type Details in GeoServer and when I use the layer preview functionality, I see the different values when I click on a specific feature.
In OpenLayers:
However, when I load the layer as VectorTile in OpenLayers and get its features properties (feature.getProperties()) my newly created property (atgid) is not even listed, let alone accessed.
Any ideas as to what may be causing this?
I have restarted my browser and even my PC to avoid cache related issues.


texts: Arcpy Geocoding Script Fails (vague messaging)

texts:
Using ArcMap 10.6 to load a Python script that will geocode 25,000 addresses. It looks like it fail during the actual gecoding attempt with an error:
ERROR 000010: Geocode addresses failed.Failed to execute (GeocodeAddresses).
I've tried switching forward slashes to back slashes, removing spaces in my file directories, and tried using a DBF outside of the GDB or tried using the table as a GDB table.

import arcpy
from arcpy import env
env.overwriteOutput = True

arcpy.env.workspace = "C:/Data_Projects/OCHIN_CVS/Scripting/OCHIN_Scripting.gdb"

# GEOCODE OCHIN RECORDS
address_table   = r"C:/Data_Projects/OCHIN_CVS/Scripting/OCHIN_Geocoding.dbf"
address_locator = "C:/StreetMapPremium/Locators/USA_ZIP4_LocalComposite"
address_fields = "Provider_Prefer_Add_Street Address;Provider_Prefer_Add_City City;Provider_Prefer_Add_State State;Provider_Prefer_Add_Zip Zip"

geocode_result  = "C:/Data_Projects/OCHIN_CVS/Scripting/OCHIN_Scripting.gdb/geocode_result"

arcpy.GeocodeAddresses_geocoding(address_table, address_locator, address_fields, geocode_result, "STATIC")

# DELETE LOCAL VARIABLES
del mxd, df, code

print "Success!"

EDIT: I have run this script on a machine that has a Basic license, and on another machine that has an Advanced license. Can anyone shed light on why this might fail?


texts: Rotating Feature-Linked Annotation to MapLogic map book data frame rotation?

texts: Once creating a feature-linked Annotation feature class, how do I set the rotation for the annotations to be horizontal with the data frame's rotation in a MapLogic map book?


texts: Reduce time of a drone log to a single record per second

texts:
I am trying to use the log track that come from the dji phantom, after convert into csv and being able to import in QGIS, I get a table with  10 records per second. This is beacuse it gives me one record per 100 milisecond. For what I need which is export to a gpx file to use in another software, I want to delete or average this 10 records per second into one record.

My Goal in doing all this is beacause I want to use the video and the tracklog from the drone dji phantom4 to be able to use in the plug in UAV tracker for QGIS or use VIRB EDIT..

I know this can Be done easly in Dashware but I dont want to use that sofware, I really need the UAV tracker, I have made I worked but is such a pain to clean the data so I will work...  Anybody have a better way to get the UAV working for dji phantom without so much prep?


texts:
I am reading the documentation of Python library xarray

After having opened multiple NetCDFs and explored their contents, I see that some files store their coordinates as a matrix and some store their coordinates as a single variable.

For example variables as a matrix:

import numpy
lat = numpy.array([[-6.91,-6.91],[-6.90,-6.90]])

or for example as a one dimensional list:

lat = [-6.91,-6.90]

When setting the coordinates of a NetCDF using xarray,

It doesn't recognize the matrix of lat as a dimension (as shown by the lack of the asterisk)

What is the benefit of storing it as a 2D matrix?


texts: Google Earth Engine - Add text label at lat/lon location?

texts: I assume this is a really basic question but I can't find the solution anywhere. I simply want to add some text onto a map layer at a certain lat/lon location.


texts: Stubborn geojson layer misaligned with mapbox (leaflet) tiles only in production website, not in codepen or other online sandboxes

texts:
You can see my code and expected result in this  running swiftly in codepen! Other online sandboxes work as expected too.

The exact same code running in my php file on my wordpress site, shows the geojson layer misaligned, specifically offsetted top the top and to the left like . Effect persists when moving the map around and zooming.

What stupid thing am I missing here? I've been busting my head all over this and google has not been much of a help. Haven't found a workaround to it either, like maybe offset it as much but the opposite direction to equalise.

I am attaching my HTML code below as well for indexing reasons:

    <link href='https://api.mapbox.com/mapbox.js/v2.2.4/mapbox.css' rel='stylesheet' />

    <link href='//api.tiles.mapbox.com/mapbox.js/plugins/leaflet-fullscreen/v0.0.2/leaflet.fullscreen.css' rel='stylesheet' />

Disclaimer: I'm more of a C/C++, Java programmer having a go at web development for the new skills, working a major local opportunity and my love for design and DataViz. Still getting my feet wet with PHP, JS, and the like so maybe I've missed something on that front?...


texts: Adjusting world raster to magnify Transatlantic region?

texts:
My current project involves using a world sized raster to show Transatlantic migration. Because of the size of the Atlantic ocean in the raster, the lines indicating migration overlap and confuse the information that I'm trying to communicate.

Is there a good way to shorten the width of the ocean on the raster to give each line more clarity?

Alternatively, is there a source where I can find a good Transatlantic specific raster?


texts: Reclassifying table to get values per cell using ArcMap

texts:
I reclassified a utilization distribution (space use; raster) map for an animal with an electronic transmitter, so that its original values fall within three classes: 0-2. When I open its attribute table, it shows me a summary table of the number of cells per category. However, I am interested in the reclassified value for each grid cell within my study area.
Is there a way to do this?
A google search was unhelpful, perhaps because I am not specific enough it the problem formulation. What I am looking for is an attribute table that at least shows the grid cell ID and its corresponding value for all grid cells considered.


texts: Labeling feature with table using ArcMap?

texts:
Is there a way to write an expression that puts the variables into a table like in the sample image?

I can do it manually like in the sample but I will be making about 150 maps, so it would be way more efficient to code in a label format.


texts: How can I get the map data frame fill the page layout (ArcObjects java)

texts:
I need to export a map for several extents (typically states or regions of a country) to PDF. I have a MXD document that I open in an ArcObject console program.I manage to set the PageLayout to A2 form and change the orientation of the page depending on my extent. Nevertheless, I would like to set the data frame to fill my PageLayout with a given margin (1cm for example) between the PageLayout and the data frame, and then change the map extent to my region extent. How can I do that please ?

My actual code is

                    IPageLayout pageLayout = (IPageLayout)activeView;
                IPage page = pageLayout.getPage();

                if(regionExtent.getHeight() > regionExtent.getWidth()) {
                    log.info("Orientation : Portrait");
                    page.setOrientation((short) 1);
                } else {
                    log.info("Orientation : Paysage");
                    page.setOrientation((short) 2);
                }
                log.info("Format : A2");
                page.setFormID(esriPageFormID.esriPageFormA2);
                page.setUnits(esriUnits.esriCentimeters);
                page.setStretchGraphicsWithPage(true);
                pageLayout.zoomToWhole();
                pageLayout.setAlignToMargins(true);

                IMap map = activeView.getFocusMap();
                // here I have to get the map fill the pageLayout


texts: Convert JSONto GeoJSON or Geometry Format in PostgreSQL\PostGIS

texts:
Assuming that if I run a query in my database like this

select coordinate_json from location

It will return coordinate_json column with value like this (example for one row):

"{\"type\": \"Point\", \"coordinates\": [96.25518281124721, 4.335420234501272]}"

The problem is, every time I run this query to convert coordinate_json to geometry column :

select ST_GeomFromGeoJSON(coordinate_json) from location

I will get this error message:

ERROR:  function st_geomfromgeojson(json) does not exist

Maybe coordinate_json format, as I wrote above, is not match with GeoJSON format remind that there're backslash, so how can I convert that to Geometry Column?


texts: Make numbered grid overlay with different colours showing the frequency of data in QGIS

texts: I would like to create a grid overlay. Each grid cell should be numbered and showing frequency of some data using different colours. The grid is over a shapefile of an area.


texts:
I'm searching for a data base or webservice, that provides buildings at a level of detail (LOD) of

cuboid (length,width,height) or
roof, corners, etc

or better. The area should cover germany.
I've seen very good results at google earth but there seem to be no way to export and use that data.

It'd be nice if the data source is INSPIRE-complient.


texts: Widening Multiple Polygons at same time in ArcMap?

texts:
I am trying to edit polygons in the same feature class. I have a feature class which contain a number of polygons. I will need to increase the size of the polygons but only the width (the length has to remain). The polygons are not perfect rectangles thus making it a bit harder to edit as well.

I am wondering if I can do this using geoprocessing tools or DIE to edit the polygons at the sametime thus I do not have to edit the polygons one by one. I have quite a number of polygons to edit. If I have a tool to run or something the results will be more consistent compared to editing by hard.

Or I am wondering if it is possible to add a polygon on top of the original polygon with the same length but larger width.

Example:

The edited polygon should look like this:


texts: How do I change the style of points that were created with pointToLayer in Leaflet?

texts:
I'd like to change the style of certain points based on events, but I can't figure out how to do it.

Here's a working jsfiddle for an example.

var points = new L.geoJson(pointsData, {
  pointToLayer: function(feature, latlng) {
    if (feature.properties.name === "Point1") {
      return L.circleMarker(latlng, {
        radius: 10,
        fillColor: "blue",
        color: "black"
      });

    } else if (feature.properties.name === "Point2") {
      return L.circleMarker(latlng, {
        radius: 10,
        fillColor: "green",
        color: "white"
      });

    } else if (feature.properties.name === "Point3") {
      return L.circleMarker(latlng, {
        radius: 10,
        fillColor: "orange",
        color: "purple"
      });
    }
  }
}).addTo(map);

In the above example, how would I change the style of, say, Point1 after it's been created?

I haven't found anything in the documentation, or online.

Is it possible?

I ended up splitting the geojson up for each point, and created a function that returns a new geojson object.

point1Data = {
    ...
};

point2Data = {
    ...
};

function createPoint(pointData, radius, fill, stroke) {

    return new L.geoJson(pointData, {
        pointToLayer: function (feature, latlng) {
            return L.circleMarker(latlng, {
                radius: radius,
                fillColor: fill,
                color: stroke,
            });
        }
    });
}

point1.createPoint(point1Data, 10, "red", "black").addTo(map);
point1.remove();
point1 = createPoint(point1Data, 10, "black", "red").addTo(map);

Here's a working jsfiddle for an example.


texts:
I am working on a site selection projection where I will be unable to perform any in situ observations.  A key component of the selection process is the ruggedness of the underlying terrain.

I plan on using GDALdem to create the derived ruggedness maps.  I have read both the Wilson, et al. 2007 paper and the GDALdem documentation.  While both offer insight into the algorithms used to generate the indices, only the Wilson paper offers an assessment of index suitability.

It is essential, because I can not perform in situ observations, that the index selected over estimate the surface roughness.

In your experience, which index have you utilized, for what application, and why?


texts: arcpy.setValue for Condition from Dictionary

texts:
I am trying to create a function to update multiple fields based on different criteria. I want to pass the field name and condition through a dictionary (please see the function description in the enclosed code).

def CalculateFieldsBasedOnCondition(sourceTable, fieldNames_Condition):
  '''
  fieldNames_Condition = {'TestID': '"LOC-"+(row.getValue("OBJECTID"))',
                          'UPADATED':'Yes'}

  usage: CalculateFieldsBasedOnCondition(sourceTable, fieldNames_Condition)
  '''
  try:
    rows=arcpy.UpdateCursor(sourceTable)
    for row in rows:
      for fieldName, condition in fieldNames_Condition.iteritems():
        row.setValue(fieldName,condition)
        rows.updateRow(row)
    del row, rows

  except Exception, e:
    import traceback, sys
    tb = sys.exc_info()[2]
    print "Line %i" % tb.tb_lineno
    print e.message

I am working with Python 2.6.5, Arcpy 10 and Win 7 64 and the sourceTable is a FileGDB Featureclass.

I would like to get the result of TestID field as "LOC-101" where 101 is the value of the ObjectID field. If I run this now-it'll write the condition as such as it's treated as a string. How can I parse the condition as a non string item?


texts: Zoom level wise radius change in Leaflet Heat

texts:
I am using leaflet.heat for creating heatmap with leaflet API.I have a highest intensity of 1.0 and lowest 0.0. I have created a getRadius function where I tried to change radius based on zoom scale. In zoom level 7 it showing very good result as I am trying to plot approximately half million of data. When I am increasing the zoom level the radius is not enough to visible expected result. Probably increasing the radius with zoom scale will be the solution. But the radius became static and its showing the value based on map loading zoom level. How could I change this?

function getRadius(){
            var radius;
            if (currentZoom === 7){
                radius=2
            }
            else if (currentZoom === 8) {
                radius = 4;
            }
            else if (currentZoom === 9) {
                radius = 6;
            }
            else if (currentZoom === 10) {
                radius = 8;
            }
            else if (currentZoom === 11) {
                radius = 10;
            }
            else if (currentZoom === 12) {
                radius = 12;
            }
            else if (currentZoom === 13) {
                radius = 14;
            }
            else if (currentZoom === 14) {
                radius = 16;
            }
            else if (currentZoom === 15) {
                radius = 18;
            }
            else if (currentZoom === 16) {
                radius = 20;
            }
            else if (currentZoom === 17) {
                radius = 22;
            }
            else if (currentZoom === 18) {
                radius = 24;
            }
            return radius;
        }
var heatmap = L.heatLayer(allHeats, {
                    radius: getRadius(),
                    max: 1.0,
                    blur: 15,
                    gradient: {
                        0.0: 'green',
                        0.5: 'yellow',
                        1.0: 'red'
                    },
                    minOpacity: 0.7
                }).addTo(map);


texts:
I'm on the hunt for field boundary coordinates in the US in the form of GeoJSON, a Shapefile or any structured format that I can use to overlay on a map.

I've tried looking at the US Department of Agriculture but can't seem to find it.

Not sure I'm using the correct terminology for find such data.


texts: Inaccurate altitude GPS data with my Android?

texts:
I've been recording tracks with GeoTracker on my Android. In places I have points that have altitudes higher than the peaks of a mountain. Like one altitude difference is 46 m.

How is it possible to get that big difference?

Is GPS on my Andorid that bad when it comes to accuracy or is it app itself, and why is this happening?

Edit

My device is:Sony xperia m4 aqua, I had High accuracy mode turn on. Specification for my phone: imei.info/phonedatabase/16958-sony-xperia-m4-aqua-e2303 (GPS: A-GPS/Glonass, GLONASS: No). I am also interested, based on this, how will I be able to figure out what is the accuracy of my measured position and altitude?


texts: Using Maplex, how do you keep labels from overlapping a non-labeled layer?

texts:
I'm working on a map of roads and rivers. For this map roads have names and rivers do not. I'd like to keep road names from overlapping the rivers. I'm working on a whole county with lots of places where roads and rivers cross. How do I keep those road names off the rivers?

I'm using Maplex for labeling. I don't actually want the rivers labeled at all so I tried putting in a blank column and labeling them with that, then giving it a really high feature weight, while dropping the road feature weight to zero. This didn't work and I'm not sure what else to do.


texts: Finding percentage of raster contained in shapefile using ArcGIS Pro

texts:
Using ArcGIS Pro, I have a raster that shows tree height and a shapefile that contain parcels of land. I am trying to find out the percentage of the raster that intersects with the shapefile for each parcel. I am assuming that Zonal Statistics is the tool to use in this case, but I am not sure what to choose for each parameter, such as the zone field.
Is there a better tool to use or should I use this one and if so, what would the parameters be?


texts: Calculating the visibility of an observer walking a line transect

texts:
I was wondering if anyone can help. I'm want to calculate the visibility for an observer doing a bird survey by walking 1km transects broken up into 200m sections.

I want to calculate the visibility for each transect using 6 points for each 200m section  so as to get as close to what a walking observer would be able to see as possible.

Originally I used a viewshed to do this and created a 250m buffer around each point then calculated the % area visible in each. However the problem is viewshed shows me what would be visible from at least one of the points and I want to know what would be visible from each point individually or atleast each set of 6 points that make up a 200m section. I have 320 200m sections in my survey so that's 1920 points which makes it impossible to do this by creating a separate viewshed for each point. Are there any alternative ways I can do this?


texts: Assign similar ID to points inside a polygon

texts:
I have 3 input datasets of points.
What I'm trying to do is to assign a common ID code to the points that are close to each other (no specific distance).

I'm using a ModelBuilder to achieve this : first, i create a buffer around each dataset of points, then i combine the 3 buffers and dissolve it.

What I'm trying to do next is to assign an ID to points that are Inside the same polygon (combined/dissolved buffer), but this is where I'm stuck at...

I'm trying to use the Spatial Join but i don't understand how to separate the points.


texts:
I need to compare the areas of two rasters for calculating the percentage parts from another.
For example, I have one raster file which shows separated agriculture fields. The value of each field is 1 and the space between the fields is noDATA. In the second raster all fields from the first raster are divided in catchment areas and the value of each catchment area represents the size of the area. Now I want to calculate what percentage have the single catchment areas of the whole field.  I`m using ArcMap and each pixel represents 1 qm.

Raster 1 is showing the fields

Raster 2 is showing the catchment Area

One upon the other


texts:
Can anyone point me to a (if possible at all) list of public PostGIS Servers, where one can set up their own database/tables?

I would need a PostGIS server on 24h/7d while not having the resources by myself for multiple humanitarian projects in the south pacific.


texts:
I know that Google Maps does not have a truck routing feature , ie, changing the route if a low bridge is detected.

Is there a way I can implement this in Google Maps using a 3rd party API?

If yes, then which APIs are supported and preferable.


texts: Joining two tables on ArcMap together that are different types (String-Double)?

texts:
I am trying to figure out Population percentage change based off census tract data from 2010 and 2014 data. One of my tables I pulled from the U.S. Census Bureau (2010 data); this table came with the shapefile that was downloaded from their website and is String as its type. I also have the census tract table data from American Fact Finder (2014 data); this table is a CSV file I imported into ArcMap. It is a Double as its type. I was going to add a field to my target table (2010 data) so I can join the 2014 data to it but I am not even allowed to add a field (it is grayed out).

My main objective is to add the 2014 data to the 2010 data table (using the Census tracts as a common link) so I can calculate the population percentage change based off each census tract over the course of those years. I am using ArcGIS 10.3.1.


texts: What is the unit of smoothing in gdal_grid?

texts:
I am using the gdal_grid command line with invdist algorithm and would like to spedify a smoothing parameter but I am wondering whether it shouold be in pixel or data units (meters in my case)?

I've found the following related links :

gdal_grid
GDALGridInverseDistanceToAPowerOptions

but none is clearly specifying the unit.


texts: Can OSM's iD editor be used on custom maps?

texts:
I'm setting up a community-based mapping solution for a local NGO. They need their own maps and, after some consideration, I have decided to go with Mapperz suggestion and use MapBox.

It's good to use MapBox technology as it is scalable, modifiable and, using their fantastic iD editor, should allow user edits.

I cannot work out how to make my maps editable, however.
To provide a concrete example, how would I add an editor that would allow this layer of points to be modified, allowing new users to create new points just like on OpenStreetMap (OSM)?

I know it can be done with GeoServer, but want to retain the beautiful simplicity of MapBox for this one.


texts: Installing QGIS LTR instead of latest version on Ubuntu

texts:
Due to major bugs on QGIS 3.18 I am forced to install the LTR version. But the official instructions here (https://www.qgis.org/de/site/forusers/alldownloads.html) do only explain how to install the latest version.
I am using Ubuntu 20.04.

Update:
I followed the advice below and continued installation, now I got this:
sudo apt install qgis qgis-plugin-grass
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 qgis : Depends: python3-qgis (= 1:3.16.5+32focal) but 1:3.18.1+32focal is to be installed
        Depends: qgis-providers (= 1:3.16.5+32focal) but 1:3.18.1+32focal is to be installed
        Depends: qgis-common (= 1:3.16.5+32focal) but 1:3.18.1+32focal is to be installed
 qgis-plugin-grass : Depends: qgis-plugin-grass-common (= 1:3.16.5+32focal) but 1:3.18.1+32focal is to be installed
                     Depends: qgis-provider-grass (= 1:3.16.5+32focal) but 1:3.18.1+32focal is to be installed
E: Unable to correct problems, you have held broken packages.


texts: GDAL conversion to Terragen outputs file full of zeros?

texts:
I recently learned some gdal command line syntax in my attempt to convert some geotiff files to the Terragen format.

During my first attempt I noticed a message about nodata values:

gdalwarp -of TERRAGEN -co MINUSERPIXELVALUE=20 -co MAXUSERPIXELVALUE=1347 "src.tif" "dest.ter"
Creating output file that is 8743P x 6159L.
Processing input file src.tif
Using internal nodata values (eg. -3.40282e+038) for image src.tif
0...10...20...30...40...50...60...70...80...90...100 - done.

(GDAL 1.7.0b2, FWTools 2.4.7, released 2010/01/19)

However, after the conversion I opened up the file in Terragen and while no errors were presented, the file contained no terrain data. I proceeded to open the file in a hex editor and noticed that while a proper file header appears to be present, the majority of the data is a bunch of zeros. If I understand the Terragen format correctly, it appears either no "chunks" are present or they all contain values of zero.

This is in stark contrast to performing a conversion within Terragen itself - I can import the src.tif file in Terragen and export a .ter file. The terrain is present in all its glory within Terragen. Viewing this file in a hex editor I can see many "chunks" of non-zero data present throughout the file.

Strangely, the file generated by gdalwarp is roughly the same file size as the one generated by Terragen, again the difference being it is full of zeros.

I noticed that my version of gdalwarp was quite outdated, so I decided to jump on linux and use the gdal tool set there. I also decided to mix things up a bit and use gdal-translate instead:

$ gdal_translate -of TERRAGEN -co MINUSERPIXELVALUE=-4.452 -co MAXUSERPIXELVALUE=3052.968 src.tif dest.ter
Input file size is 8743, 6159
0...10...20...30...40...50...60...70...80...90...100 - done.

I even tried specifying "none" for the nodata value:

$ gdal_translate -of TERRAGEN -a_nodata none -co MINUSERPIXELVALUE=-4.452 -co MAXUSERPIXELVALUE=3052.968 src.tif dest.ter
Input file size is 8743, 6159
0...10...20...30...40...50...60...70...80...90...100 - done.

(GDAL 1.10.0, released 2013/04/24)

However, in each case the result was the same. The terragen output file was chock full of zeros. I suspect that I need to provide additional parameters to the gdal tools in order to properly convert the data to the terragen format. I'm just not sure where to start. Any ideas?

UPDATE 1

For reference, gdalinfo outputs:

I have both full output from gdalinfo -hist and brief output from:

gdalinfo -nomd -norat -noct -nofl

I have also run the same query on the file that was converted by Terragen itself, the one that contains proper terrain data.

Brief outputs:
src.tif
dest.ter
proper-conversion.ter

Full outputs:
src.tif <---- ~5MB
dest.ter
proper-conversion.ter


texts: QgsFeatureRequest() with a string search within QGIS3 Processing Script

texts:
I'm trying to select features using a string comparison within my script using a QgsFeatureRequest() and getFeatures()

roadsRequest = QgsFeatureRequest()
roadsExpression = str(roadsIDField[0]) + ' LIKE ' +  str(featIDUnique)
feedback.pushInfo(roadsExpression)

For reference then, the roadsExpression looks like the below or I have tried using an " = " operator too:

  identifier LIKE 534553B5-9A71-4DE2-B8C2-56B0B31D5EB2

I've then set the filter expression of the QgsFeatureRequest() object and passed attempted to get features as below and getFeatures() should return a QgsFeatureIterator:

roadsRequest.setFilterExpression(roadsExpression)
roadsFeatures = roadsSource.getFeatures(roadsRequest)

Now, I've brought roadsSource in as a parameterAsSource() to provide a QgsProcessingFeatureSource() object and I therefore get a valid QgsFeatureIterator object in roadsFeatures but this is empty.

However, I am unable to edit a QgsProcessingFeatureSource object therefore I tried bringing roadsSource in using parameterAsVectorLayer() to provide a QgsVectorLayer() object that I can edit. However when I use getFeatures(roadsRequest) on this vector layer object, I get an invalid feature iterator.

I think I am doing something wrong with how I've built my request using the strings but I don't know what as everything is compiling and running without any errors, I'm just not getting the results out that I expect.


texts: Requesting two layers in search action of one PanelForm

texts:
I have a panelForm with 4 fields, and a search button, that search for the features that correspond to the 4 fields given by the user.
and I have two layers that both contains the 4 fields. after the search I have two gridpanel, each one hold data(attributes) from each layer corresponding to the found feature, now I only get the features of only one gridPanel, because the panel form accept only one protocol.

How can I get the other attribute corresponding to the founded feature from the other layer.


texts: Reproject EPSG:3857 to Gnomonic projection using GDAL

texts:
I'm trying to reproject Mapbox maps from whatever projection they come in (which I believe is EPSG:3857) to what I believe should be a Gnomonic projection.
Let me try to be more clear actually. I'd like to use the map tiles to generate UV faces for a cube like this one:

The image below uses an equirectangular environment texture as the diffuse shader for the cube, and baking a single face of the cube would result in an image like this one:

What I'm trying to do is get a similar "cube face" texture, but without using Blender to shade and bake the texture. Instead I'm trying to use GDAL to reproject the texture to what I believe should be a Gnomonic projection, with radius equal to half the diagonal of a cube face, and the centre of projection being the coordinates that map to the centre of the cube face. So for the North Pole, that would be 90°N 0°E, and for the front face that would just be 0°N 0°E.
So to get the face that would contain the British isles, I thought these GDAL commands should suffice:
gdal_translate -a_srs EPSG:3857 -a_ullr -20026376.39 20048966.10 20026376.39 -20048966.10
gdalwarp -t_srs +proj=gnom

But if I do that, I instead get a very high image with narrow width, that seems to contain mostly just ocean.
The question is, what would be the right projection string to get a cube-face like the picture above?

Note that I've been using gdal-js to do the transformations in the browser. See this CodePen for example, which contains an example that converts the source image to equirectangular projection. The projection string can be edited in the JS editor and the result is updated real-time (this is what I used to experiment with projections.)

UPDATE:
I think I'm doing something wrong with the reprojection. The following commands give me the wonky looking result below:
gdal_translate -a_srs EPSG:3857 -a_ullr -20026376.39 20048966.10 20026376.39 -20048966.10
gdalwarp -t_srs +proj=ortho

I'm pretty sure that transparent band around the equator should not be there. Instead, there should be a transparent bit around the poles, since web mercator does not cover the last 5°s or so.


texts: Why are raster z-values changed when reprojecting?

texts:
I have raster data with height values (z). When I try to reproject/warp the raster to Gauss Kruger 3, the z-values are changing (several meters). (The data is already GK3, but I have to reproject them, because the clipper function does not work otherwise.)

Why is that?


texts: What is the difference between using Activator.CreateInstance() and having a static variable?

texts:
I'm look at two different ways of setting up my IWorkspaceFactory variable:

A

public static class GIS
{
    private static Type factoryType = Type.GetTypeFromProgID("esriDataSourcesRaster.RasterWorkspaceFactory");
    public static IWorkspaceFactory RWSF = Activator.CreateInstance(factoryType) as IWorkspaceFactory;
}

B

public static class GIS
{
    public static IWorkspaceFactory RWSF = new RasterWorkspaceFactoryClass();
}

Are these still both singleton? If so, is there any difference between these? I've tested it both ways and they appear to do the same thing, but I'm wondering why ESRI recommends A and if I'll run into errors if I've used B.


texts:
I am trying to check intersection with buffered area of shape:

--This works

&cql_filter=INTERSECTS(shape, POLYGON((-90 40, -90 45, -60 45, -60 40, -90 40)))

--This does not

&cql_filter=INTERSECTS(buffer(shape,1), POLYGON((-90 40, -90 45, -60 45, -60 40, -90 40)))

Although it´s not quite clear what is returned by the buffer, is this geometry?

  buffer    geometry:Geometry,  distance:Double Returns the buffered area around the geometry using the specified distance

Is there any other way to do this via WFS?


texts: I have feature classes and tables having relationship shored in them.(Feature classes has id as which is primary key in other table  ). I want to publish the Feature class as a service on arcgis server 10.1. I want to show the value in place of the id's.what is the best way to do it.


texts: Targeting sub folders using GeoServer ImageMosaic URL?

texts:
I am creating an ImageMosaic data store by selecting a top level folder.  In the folder there are potentially thousands of folders and millions of files, most of which are not TIFF files.

Is there a way to tell GeoServer to look for a certain named sub folder (i.e. AerialImages that contains just TIFFs that I want to use in the ImageMosaic) and grab the TIFFs from within this sub folder?

It is obviously impractical for GeoServer to scan all thousands and millions of files, especially as there are also millions of JPEG files too within different sub folders that I do not want to use in the ImageMosaic (GeoServer looks for world transform files for the JPEGs).

I am unable to move the TIFFs unfortunately to their own top level folder.

I was hoping to use a Reg Ex but not sure if possible.

Sample structure of the data:

TopLevelFolder

Part1Data

Part1SubFolder1 (contains thousands of sub folders and millions of
files but no TIFFs)
Part1SubFolder2 (contains several sub folders/files but no TIFFs)
Part1SubFolder3 (contains several sub folders/files but no TIFFs)
Part1SubFolder4

AerialImages (this sub folder contains the TIFFs I need for
ImageMosaic)

Part2Data

Part2SubFolder1 (contains thousands of sub folders and millions of
files but no TIFFs)
Part2SubFolder2 (contains several sub folders/files but no TIFFs)
Part2SubFolder3 (contains several sub folders/files but no TIFFs)
Part1SubFolder4

AerialImages (this sub folder contains the TIFFs I need for
ImageMosaic)

Part3Data

and so on as above

There could be up to 20 "Parts" of data.  It is the highlighted sub folders I need to target for extracting the TIFFs from.


texts: gdal_translate GTiff drivers does not support NUM_THREADS creation option

texts:
I am using gdal to stitch together google earth engine tiles (35 tiles, roughly 100 gigs altogether).
First I build a VRT
import os
from osgeo import gdal

# Build a VRT
os.system('gdalbuildvrt /scratch/user/output.vrt /scratch/user/MODIS_NDVI_TIFF/*.tif')

Then I use gdal_translate to stitch them together with various creation options to help with processing speed:
os.system('gdal_translate --config GDAL_CACHEMAX 1024 -a_nodata 0 -of GTIFF -co COMPRESS=DEFLATE -co ZLEVEL=1 -co TILED=YES -co BIGTIFF=YES -co NUM_THREADS=ALL_CPUS -co BLOCKXSIZE=512 -co BLOCKYSIZE=512 -co INTERLEAVE=BAND /scratch/user/output.vrt /scratch/user/MyBigNastyRasty2.tif')

Specifically, I would like the resulting image to be a GeoTiff. However, I am getting this warning:
Warning 6: Driver GTiff does not support NUM_THREADS creation option
This is curious because the gdal website says that this format can use this creation option.
I am using gdal version 2.3.3. Why am I getting this warning?


texts:
In this algorithm I need to create points inside every polygon. The easy solution I was thought was using the centroid. With some help of the community we reach in this algorithm

from qgis.PyQt.QtGui import *
from qgis.PyQt.QtCore import *
import processing

source_layer = iface.addVectorLayer("folder/Polygon.shp", "Setor", "ogr")
crs = source_layer.crs().toWkt()

# Define additional attributes already on the layer level
centroid_layer = QgsVectorLayer('Point?field=cd_geocodi:string&crs=' + crs, 'MyPoint' , 'memory')

centroid_layer.startEditing()
# Loop over all features
points = 50
p = 1
while p <= points:
#reading every feature and getting those centroid and one attribute
    for source_feature in source_layer.getFeatures():
        geometry = source_feature.geometry()
        centroid = geometry.centroid()
        name = source_feature.attribute("CD_GEOCODI") # select the attribute

        # Create the new feature with the fields of the memory layer
        # And set geometry and attribute before adding it to the target layer
        centroid_feature = QgsFeature(centroid_layer.fields())
        centroid_feature.setGeometry(centroid)
        centroid_feature['cd_geocodi'] = name
        centroid_layer.addFeature(centroid_feature)
    p += 1
centroid_layer.commitChanges()

# Add the layer to the registry
QgsMapLayerRegistry.instance().addMapLayer(centroid_layer)

#https://docs.qgis.org/2.8/en/docs/user_manual/processing_algs/qgis/vector_analysis_tools/countpointsinpolygonweighted.html

#counting points inside polygons

Result = "folder/output.shp"
processing.runalg("qgis:countpointsinpolygon", source_layer, centroid_layer, 'NUMPOINTS', Result)
iface.addVectorLayer(Result, 'result', 'ogr')

But depending on how unusual is the polygon the centroid is calculated in other polygon, like below:

I found answers like https://gis.stackexchange.com/a/259185/104521 who makes me think about create a for inside another for, to use some similar logic to filter the polygon area and insert a random point inside. I had try to adapt these algorithms, but I did not make it. Probably because my skills are limited.

Can someone help me?


texts: Count the number of pixels according to their value using for loop

texts:
I have script that does the enxt procedures:

create imagecollection from Landsat7
clip the images according to specific geometry and calculte NDVI for each one
filter the rasters according to the number of pixels (I don't want to have small rasters)
creates images by calculte for each year the mean NDVI value.
Creates timeseries graph based on years.

Now I want to create the 6th step which is to calculte for each raster how many pixels got NDVI value greater than 3. because I have one image per year I want to create a for loop that will count those pixels for each year and will produce a table.
I have written a code but it is not good because it seems like javascript doesn't understand that "i" is image. also, I don't think this code will prosuce a table in the end.

This is my code:

// Declare years of interest
var years = ee.List.sequence(2000, 2013);

// Map a function to select data within the year and apply mean reducer
var byYear = ee.ImageCollection.fromImages(
    years.map(function(y) {
      return filter
        .filter(ee.Filter.calendarRange(y, y, 'year'))
        .reduce(ee.Reducer.mean())
        .set('year', y);
    })
  );

var listOfImages =(byYear.toList(byYear.size()));

for (var i in listOfImages) {
  var gt03 = i.gt(0.3).selfMask().rename('NDVI_gt03');
  Map.addLayer(gt03,ndviParams,i);
  //count the number of total pixels
  var c03 = gt03.reduceRegion({
  reducer: ee.Reducer.count(),
  geometry: geometry,
  crs: 'EPSG:4326',
  scale: 30,
  });

print(c03,year);
}

The wrror message:

  i.gt is not a function

*I don't understand this error, because this code works when I do it on one image so why here it can't?

*maybe instead of lop I should use function? then what is the differences between them?

My end goal: To get a table or any calculation which shows for each year the number of pixels that were found in my raster with value higher than 0.3


texts: How to configure IIS site as application for ArcGIS Server 10.2?

texts:
I am having several errors displayed after installing the webadaptor onto my site. They all contain this error message "This error can be caused by a virtual directory not being configured as an application in IIS" all issues point to my web.config file. If it's of any help the first two of four errors are caused by these two lines so it leads me to believe that it is being caused by the aspnet_client. I have already made this into an application so I'm a bit lost at this point.

<authentication mode="Windows" />
<membership defaultProvider="AspNetSqlMembershipProvider">


texts: Adding PieChart Layer through DVF in a Leaflet map

texts:
I am using Leaflet DVF (https://github.com/humangeo/leaflet-dvf/wiki/) to add several chart layers over a map.

I succesfuly added a Choropleth map but now I am stuck with the Charts Layers.
This is the code:

// This is the code for the Choropleth

    var options = {
        locationMode: L.LocationModes.LOOKUP,
        recordsField: null,
        codeField: 'CODIGO',
        locationLookup: zipData, // A GeoJSON FeatureCollection that will be used to lookup boundaries/location
        locationTextField: 'ESTADO',
        includeBoundary: true, // Whether or not to include a background boundary so people know what boundary each marker is associated with
        layerOptions: {
            fillOpacity: 0.9,
            opacity: 1,
            weight: 1
        },
        displayOptions: {
            POPU: {
                displayName: 'Population',
                fillColor: new L.HSLSaturationFunction(new L.Point(90000, 0), new L.Point(635100, 1), {
                    outputHue: 240
                }),
                color: new L.HSLSaturationFunction(new L.Point(90000, 0), new L.Point(635100, 1 ), {
                    outputHue: 240,
                    outputLuminosity: '35%'
                })
            }
        }
    };

    var nlPopLayerChoropleth = new L.ChoroplethDataLayer(NLpopdens, options);
    layerControl.addOverlay(nlPopLayerChoropleth, 'Choropleth');

// This is the code for the Charts Layer

    var electionOptions = {
    recordsField: 'features',
    locationMode: L.LocationModes.LOOKUP,
    codeField: 'CODIGO',
    chartOptions: {
        'PRI': {
            displayName: 'Opcion 1',
            color: 'hsl(0,100%,25%) ',
            fillColor: 'hsl(0,80%,75%)',
            maxValue: 8000000
        },
        'PAN': {
            displayName: 'Opcion 2',
            color: 'hsl(240,100%,25%)',
            fillColor: 'hsl(240,80%,75%)',
            maxValue: 8000000
        }
    },
    layerOptions: {
        fillOpacity: 0.8,
        opacity: 1,
        weight: 1,
        radius: 10,
        barThickness: 5
    },
    tooltipOptions: {
        iconSize: new L.Point(80,60),
        iconAnchor: new L.Point(-5,60)
    },
    onEachRecord: function (layer,record) {
        $html = $(L.HTMLUtils.buildTable(record));

        layer.bindPopup($html.wrap('<div/>').parent().html(),{
            minWidth: 400,
            maxWidth: 400
        });
    },
    legendOptions: {
        title: '2008 Results'
    }
};

var electionChartLayer2008 = new L.PieChartDataLayer(zipData,electionOptions);

map.addLayer(electionChartLayer2008);

The GEOJSON I am using is like this:

var zipData = {"type":"FeatureCollection","features":[{"type":"Feature","properties":{"CODIGO":"MX02","ESTADO":"Baja California","PRI":23,"PAN":12},"geometry":{"type":"MultiPolygon","coordinates":[[[[-113.13971710205078,29.017776489257812],[-113.24057006835938,29.06777572631836]...

I also have another script where the property "POPU" is located:

var NLpopdens =[
    {
        "CODIGO": "MX01",
        "ESTADO": "Aguascalientes",
        "POPU": "634000",
        "AREA": "162.18",
        "Density": "3346.0192378838",
        "Partidos": {"PRI":400,"PAN":200},

},

...

(for each state)


texts:
I have seen few posts here that shows you how to remove duplicate labels by adding new field. Also saw posts that talks about using Maplex tools that will remove duplicate values based on the buffer.

How can I remove the duplicates values based on feature not with distance how Maplex does.

See image below that illustrates what I am trying to achieve.

I think this can be achieved by using python coding in label expression.But I am not good with Python coding.


texts: SQL Server equivelent to Arcmap Intersect for polygons?

texts:
I have three different sets of GEOMETRY Polygon datasets in SQL Server that completely overlap. I need to create a new dataset that has a polygon for each unique area of the three layers. So ultimately I need lots of puzzle pieces.

AND I need to accomplish it in SQL Server, not something like ArcMap.

Any clues?


texts: How to extract DEM files from google Earth/Map for surfer?

texts: I will need to do a 3D representation of a terrain and I heard surfer is ideal, but then I do not have a DEM file of the region, I know Google Earth and Map could help, but I do not know how? If there is another way round, please where can I get one for free?


texts: R leaflet creates geometric striations in some maps but not others

texts:
I have been creating leaflet maps from raster files with discrete values. Leaflet creates smooth maps form some of the rasters, but in other there is a strange pattern of geometric striations across the map. All of the rasters were derived from one original raster. In addition, the source raster files used to create the leaflet maps do not have this strange pattern.

Below is the code:

This code chunk creates the 'expected' maps

f <- function(r) {
  ifelse(r <= 100, 50,
         ifelse(r >= 100 & r < 150, 20,
                    ifelse(r >= 150, 0, NA)))
}

r1 <- calc(r, fun = f)

writeRaster(r1, overwrite=TRUE, 'filePath/r1.tif')

r1 <- projectRasterForLeaflet(r1, method = 'ngb')

pal_r1 <- colorBin(SAGA_pal[[1]], values(r1), bins = c(0,10,20,30,40,50,60,70,80,90,100,115,120,150,180,200,220), na.color = "transparent", reverse=TRUE)

(ll_r1 <- leaflet() %>%
    addProviderTiles("Esri.WorldImagery") %>%
    addRasterImage(r1, colors=pal_r1, opacity=0.5) %>%
    addLegend(pal=pal_r1, values=values(r1), title="r1")
)

link to r1 image

This code chunk creates the strange pattern:
f <- function(r) {
  ifelse(r <= 100,180,
         ifelse(r >= 100 & r < 150, 120,
                ifelse(r >= 150 & r < 200, 80,
                       ifelse(r >= 200 & r < 400, 50,
                              ifelse(r >= 400 & r < 800, 50,
                                     ifelse(r >= 800 & r < 1200, 30,
                                            ifelse(r >= 1200,0, NA)))))))
}

[![r1][1]][1]

r2 <- calc(r, fun = f)

writeRaster(r2, overwrite=TRUE, 'filePath/r2.tif')

r2data <- r2

r2data <- projectRasterForLeaflet(r2data, method = 'ngb')

pal_r2 <- colorBin(SAGA_pal[[1]], values(r2data), bins = c(0,10,20,30,40,50,60,70,80,90,100,115,120,150,180,200,220), na.color = "transparent", reverse=TRUE)

(ll_r2 <- leaflet() %>%
    addProviderTiles("Esri.WorldImagery") %>%
    addRasterImage(r2data, colors=pal_r2, opacity=0.5) %>%
    addLegend(pal=pal_r2, values=values(r2data), title="R2")
)


texts: Generate a string based on an integer range

texts:
After some initial research, I was unable to find a solution for the following issue. I'm sure there's an answer to this question already floating around here somewhere, but hopefully someone can give me a more personalized answer for my particular situation.

I am using ArcMap 10.3

I would like to have a String field that automatically generates a category name based off of an Integer field range.
Basically: If the Integer is between 0-500, the String would generate "Red" for the category field.
There are 5 different Categories to choose from within my Integer data.

To my understanding, this would need to happen via the Field Calculator, using a code block and Python.

So,
Can I generate a String result in Field1 based on a designated Integer range in Field2?
If so, How?


texts: Mass conversion of .JP2 images to .TIF format in R

texts:
I need to convert a list of .jp2 files to .tif. I cannot do it manually since it is a large number of files. So I can't use:

gdal_translate(path_vhr_imag_1, "splt1.tif")
gdal_translate(path_vhr_imag_2, "splt2.tif")

I have found this code to convert a list of .jp2 files but it is not working properly.
Source: https://geoinnova.org/blog-territorio/sig-conversion-masiva-de-imagenes-sentinel-2a/

library(rgdal)
library(raster)
library(tools)

setwd("D:/list_test")

#Nombre de la carpeta de destino de los ficheros tif
carpetaTif <- 'tif/'

#Lista con los ficheros originales en formato jp2
lista.jp2 <- list.files('D:/list_test',pattern='.jp2',full.names=TRUE)

#Bucle para recorrer la lista de ficheros jp2 que queremos convertir
for(jp2 in lista.jp2){
  r <- raster(readGDAL(i))
  outRaster <- file_path_sans_ext(basename(i))
  writeRaster(paste(carpetaTif,outRaster,'.tif',sep=''),r,overwrite = TRUE)
}

Error:
Error in readGDAL(i) : object 'i' not found

Can anyone find the error?


texts: Exporting Map with Table - formatting disappears?

texts: I'm working in ArcMap 10.3. I have a table that I've copied directly from Excel into ArcMap. In the layout view, all the formatting (highlighting and cell borders) have been properly imported. However, when exporting, the formatting for the table disappears. I've tried exporting it as both PDF and JPEB, but it disappears on both. Is there some way that I can export with the formatting intact?


texts: QGIS becomes unresponsive when adding new vector layers?

texts:
QGIS suddenly won't allow addition of new vector layers when running on PC (Lyon 2.12.1).  I've reinstalled it, no help.  I've recently changed to Windows 10 from 7, otherwise nothing much has changed on my system.

The program starts up ok, and I can open existing projects and raster files.  When I try to load a new vector file however the program immediately freezes whether using the menu or layers toolbar (before I am asked to choose a layer) and I have to use task manager to close the program.

Any ideas?

I installed an earlier (2.8) version of Qgis but this didn't fix the problem.  I also did a complete uninstall (both versions), then reinstalled the newest version 2.12.3 - no improvement.

I can work with shapefiles within an existing project, but as soon as I try to add a new vector file the program freezes.  Meanwhile version 2.12 works happily on both Mac and another (slower) PC.


texts: Adding a legend to CARTO.js v4 map application

texts:
I have made a map that shows fire risk for the different Districts within South Africa, and each fire risk is styled by value to match a certain color. I am trying to add a legend to show what each colour relates to a field (extreme, high, medium or low-risk level) but I am not having any luck. There is this legend example on the CARTO docs, but it is a little tricky to adapt to my code.

I have added the code and a CodePen, and here are the layer properties:

overall is the column I would like to represent in the legend.


texts:
I am trying to come up with a SQL statement that will select the data based on multiple criteria and using multiple fields, but it is not returning the correct results back.

Example: Depth < 1 OR Depth > 7 OR Offset < 9 OR HSDV > 4 OR VSDV > 12

I want all points that meet just one of these criteria to be selected.


texts: Google Earth KMZ file converter to GeoTIFF

texts:
Any easy KMZ to GeoTIFF converters?
Mygeodata converter works perfect but its limited to 3 files per month.
I also can use QGIS to convert from KMZ to TIFF, it just takes a few extra steps.
Does anyone know of a free, simple online converter? Batch converter is even better.


texts: Finding census block for given address using Tiger geocoder

texts:
I have a geocoder based on Tiger/Line data running on PostGIS. I need to find census block for a given address. How can I do it?

Like I can do for census tract:

SELECT get_tract(ST_Point(-71.101375, 42.31376) ) As tract_name;

What would be similar query for finding census block and block group?


texts: Shapefiles for all the individual countries in the world

texts:
I'm searching for shapefiles that I can later convert into SVG (with something like kartograph.py). Essentially I'm just looking for the outline with (if possible) a dot where the capital is on the map.

Is there anywhere that I can download them all? Or is there a better solution than using shapefiles?


texts: QGIS Set label text quadrant as above baseline or below the top of the ascent

texts:
In the product description for a topographic map over Sweden there is a recommendation to use an abbribute field containing digits to quadrant placement of labels in a point shapefile containing all the text displayed on the map.

The shapefile contains a lot of categories so I use rule-based labeling to format each category, so that information can be more easily distinguished.

My problem is not using the quadrant placement digits I get from the attribute field. The problem is that the government agency that created the map defines that text displayed above the point is placed with the point on the baseline of the typeface, but QGIS places the text with the point at the bottom of the descent. At the opposite, the agency defines that  text displayed below the point is placed with the point at the top of the ascent, but in QGIS text displayed below the point has a space between the point and the text. My guess is that the agency uses Arcgis as they provide .lyr files. Perhaps Arcgis defines quadrant placement in this way? Personally I think it makes a lot more sense, especially with text below the point.

I use QGIS 2.14.2, Linux Mint 17.3 Cinnamon. I have tried Noto Sans, Liberation Sans, Nimbus Sans L, Arial, Verdana and Fira Sans. The problem exists using both points and map units.

Here I use Arial 32pt for text "Visby". As you can see, the point is at the bottom right of the ascent, and not at the baseline.

Again, Arial 32pt. The point is at the top right of text "Visby", and QGIS has added some space between the typeface and the point.

My question is then, how do I make QGIS define text placement above point as the baseline of the typeface, and how do I set text below point as the the top of the ascent?


texts: Alternative approach for loading osm2pgsql data

texts:
I am slowly going insane trying to successfully complete an OSM data import and I would like to find an alternative approach. What I'm attempting is frustratingly simple yet fails repeatedly.

Originally I attempted to import the latest planet .osm.bz2 file in slim mode but this failed with a parsing error. Then I tried to import the .pbf in slim mode and this was moving so slowly that it would have taken three months. Then I got the memory in my VM increased to 48GB and removed the -s slim mode argument, and the import failed when it ran out of memory. Finally I attempted to import the pbf in slim mode with a 44GB node cache and approximately half way through the nodes, after working for several days, it failed with Zlib compression failed (code -3, incorrect data check).

There has to be a simpler, faster, and more reliable way to do this. Ideally I would like to simply download someone else's Postgres data file, attach it to my database, sit back and relax.

I need the data to be in the osm2pgsql schema but I really don't care how it gets there, as long as it's no more than a couple of months old. Does anyone know why this is so complicated, and how to make it simpler?


texts: Update Layer with python, error attribute renderer

texts:
I am attempting to automate symbology using python, and ArcMap 10.0. I am importing this script into a toolbox, which I run from arcmap

Currently I am getting two errors:

1) LayerObject: Set attribute renderer does not exist. I am not sure what the problem is.

2) When I change true to false, Could not find replacement layer.

Here is my code:

import arcpy

mxd = arcpy.mapping.MapDocument("CURRENT")

df = arcpy.mapping.ListDataFrames(mxd)[0]

updateLayer = arcpy.mapping.ListLayers(mxd, "*", df)[0]

sourceLayer = arcpy.mapping.Layer(r"C:\me\fun.lyr")

for lyr in updateLayer:

    arcpy.mapping.UpdateLayer(df, updateLayer, sourceLayer, True)

#UpdateLayer ( data_frame, update_layer, source_layer, {symbology_only})


texts: Match linestrings using Fréchet distance

texts:
I have two datasets of roads (both in WGS84). One has nicely digitized geometries, but lack some of the attributes and the other has heeded attributes, but digitized terribly. I want to transfer attributes from the second set to the first one.

Here is an example of two sets (black and orange lines) aligned against OSM

Basically the challenge is to determine which linestring from one dataset corresponds to the given linestring from the other. I'm going to use PostGIS for this task because one dataset is already in the database and there is a ST_FrechetDistance function in PostGIS. I searched for the function that would help to accomplish my task and it seems that Fréchet distance is what is needed - or maybe there are better solutions?

I wonder how to determine reasonable threshold for Fréchet distance value to conclude that lines are related or not?

I measured several distances for the test area and it seems that 0.006 is the threshold I'm looking for, but there is no guarantee that this is true for the rest of the dataset.

Here is example value from the 2 linestrings that do align (one is half the length of the other though):

SELECT ST_FrechetDistance(
'LineString (37.01317091699999651 55.89133175799999975,
37.01350427900000284 55.89167322899999846, 37.01370659599999868
55.8918562969999968, 37.01392270800000261 55.89202131599999746,
37.0140330629999994 55.89208319800000169, 37.01427676299999803
55.89205225700000312, 37.01486072400000182 55.89188466000000233,
37.01598266399999915 55.89158040499999913, 37.01677354000000264
55.89136381499999828, 37.01698045500000234 55.89129935300000085,
37.01726093999999989 55.89123231300000327, 37.01741727600000331
55.89123489199999995, 37.01775293899999753 55.8912735689999991,
37.01881510399999797 55.89140249199999744, 37.01888867400000294
55.89141538399999831, 37.01929330800000173 55.89149015899999995,
37.01949102700000083 55.89163197399999916, 37.01986807200000129
55.89198521800000208, 37.02038306200000051 55.89246480100000269,
37.02068653700000311 55.89278322999999915, 37.02096242399999682
55.89309649999999863, 37.02124290900000148 55.89327956099999994,
37.02149810499999916 55.89351160999999735, 37.02196021500000001
55.89395765599999777, 37.02218552299999743 55.89415102699999949,
37.02241083100000196 55.89438564900000017, 37.02290282900000307
55.89484973300000092, 37.02305456700000263 55.8949966910000029,
37.02307755799999711 55.8950817719999975, 37.02338103400000335
55.89511013300000286, 37.02368450899999885
55.89508435100000128)'::geometry,
'LineString (37.01323479507839664 55.89131127098399787,
37.01327962101100155 55.89137207276179709, 37.01333908948289775
55.8914527722402994, 37.01408630813619993 55.89211050199340036,
37.01414990885830036 55.89209669970679784, 37.01470506770390045
55.89197610579609687, 37.01728871229249762 55.89122951334790201,
37.01752766415810214 55.89125747115409837, 37.01901716073069792
55.89143226995420122, 37.01948167956410174
55.89158208247790327)'::geometry
) as value

-------------------------------------
value
0.005470800678888038

What is the measurement unit for this value? Is it degrees or something else? Should geometries be transformed to other CRS before distance calculation? How to find out value of the proper threshold?


texts: Shapefiles misalign with Google Maps when exporting from Print Composer

texts:
I've built a project with several shapefiles and Google Satellite as a background. Everything seems to be perfectly fine, I manage to prepare the Print Layout but when I finally save as image or PDF, the Google Satellite imagery becomes misaligned with the shapefiles.

I've tried reprojecting all SHPs to EPSG 3857, with no change in the final result. How can I solve this?


texts:
in QGIS I created a point layer with a field which was initially set as text. For each feature, I wrote in that field a date: "yy.mm.dd". I then modified the field to "date" with a format yyyy-mm-dd.
Now, all the features created after the type change have the date in the new format and stored as dates, while features created before the type change have date = NULL. Actually, in the column preview of the attribute table I can see the old text stored in the field, so I think the original information is stored, despite in the "wrong" format.
Is there an automatic method to retrieve the old dates and store them as dates with the new format?


texts: Polygons across international dateline [-180..+180 longitude]

texts:
I'm trying to generate polygons for satellite orbital swaths.
So far I have a method to generate two lines which represent the edge of each swath in [lat,long]. Some of the swath's cross the international dateline and so wrap round:

I was able to solve this with ogr2ogr -wrapdateline:

ogr2ogr -wrapdateline  -f "ESRI Shapefile" test.shp orbits.shp

Which does split the lines probably

I now want to be able to generate polygons on the interior of both lines. So for example in the case where one edge of the swath crosses the dateline a polygon fills in when it emerges on the other side, like:

I need a method that is automated as I need to repeat the task a lot. Preferably in python as that's how i have generated the lines. Here are the two shapefiles containing the lines: wraparound ; datelinefixed


texts:
I'm trying to calculate a NDVI index for a raster of Landsat TM with ST_MapAlgebraExpr in PostGIS (2.1):

CREATE TABLE ndvi_lugo_tm AS (
SELECT
ST_MapAlgebraExpr(lugo_tm.rast, 5, lugo_tm.rast, 4,
(('[rast1.val]-[rast2.val])/[rast1.val]+[rast2.val]+0.01')),
'32BF', 'INTERSECTION')
AS rast, 1 AS rid
FROM lugo_tm AS lugo_tm);

But I get error:

ERROR:  error de sintaxis en o cerca de «)»
LINE 1: SELECT ($1-$2)/$1+$2+0.01)::double precision
                                 ^
QUERY:  SELECT ($1-$2)/$1+$2+0.01)::double precision
********** Error **********
ERROR: error de sintaxis en o cerca de «)»

Can anyone help me?


texts:
I would like to be able to open in MBTiles a map format for my android device.

I know to open this file with ArcGIS Android SDK but does anybody know how to open this from open source library, such as from Mapbox,osmdroid...etc?


texts: draw path on indoor map using geoJSON avoiding obstacles

texts:
I'm a CS student and right now I'm developing an android app that uses google maps API, the problem is the map I'm working on is indoor and I'm facing problems when I want to draw a path from user location to specific location he chose because Directions API doesn't work with indoor map and when using a drawPolyLine method it draws a line that passes through walls, bathrooms, and anything on its way,, so to solve this problem I made a GeoJSON file with linestring and polygon of each obstacle in that map..

and now I want to use the available drawing methods along with the geoJSON file to read the points/polygon and avoid it while drawing the path on the map, I searched a lot before asking and seeking for help but didn't find anything helpful and the deadline of the project is 2 weeks from now,

could please give an idea or anything that could solve my issue?