texts:
I have lots of models in QGIS 3.8. I´m translating them to Python scripts to still use in the Tollbox but qith reduced processing time.

Using the QGIS automatic "export model as Python script", I´m having some trouble to get any shapefile that are not load in QGIS.

I made a simple model that merge two external shapefiles, that´s the export result:

from qgis.core import QgsProcessing
from qgis.core import QgsProcessingAlgorithm
from qgis.core import QgsProcessingMultiStepFeedback
from qgis.core import QgsProcessingParameterFeatureSink
import processing

class JustMerge(QgsProcessingAlgorithm):

    def initAlgorithm(self, config=None):
        self.addParameter(QgsProcessingParameterFeatureSink('MergedOutput', 'Merged Output', type=QgsProcessing.TypeVectorAnyGeometry, createByDefault=True, defaultValue=None))

    def processAlgorithm(self, parameters, context, model_feedback):
        # Use a multi-step feedback, so that individual child algorithm progress reports are adjusted for the
        # overall progress through the model
        feedback = QgsProcessingMultiStepFeedback(1, model_feedback)
        results = {}
        outputs = {}

        # Merge Layers
        alg_params = {
            'CRS': None,
            'LAYERS': [['C:/Shapes/File1.shp'],['C:/Shapes/File2.shp']],
            'OUTPUT': parameters['MergedOutput']
        }
        outputs['MergeLayers'] = processing.run('native:mergevectorlayers', alg_params, context=context, feedback=feedback, is_child_algorithm=True)
        results['MergedOutput'] = outputs['MergeLayers']['OUTPUT']
        return results

    def name(self):
        return 'Just Merge'

    def displayName(self):
        return 'Just Merge'

    def group(self):
        return 'Just Merge'

    def groupId(self):
        return 'Just Merge'

    def createInstance(self):
        return JustMerge()

  I got this error only when running the Script, the original model works perfectly:

Processing algorithm…
Algorithm 'Just Merge' starting…
Input parameters:
{ 'MergedOutput' : 'TEMPORARY_OUTPUT' }

Traceback (most recent call last):
File "<string>", line 26, in processAlgorithm
File "C:/PROGRA~1/QGIS3~1.8/apps/qgis/./python/plugins\processing\tools\general.py", line 114, in run
return Processing.runAlgorithm(algOrName, parameters, onFinish=post_process, feedback=feedback, context=context)
File "C:/PROGRA~1/QGIS3~1.8/apps/qgis/./python/plugins\processing\core\Processing.py", line 136, in runAlgorithm
feedback.reportError(msg)
TypeError: reportError(self, error: str, fatalError: bool): not enough arguments

Execution failed after 0.04 seconds

Loading resulting layers
Algorithm 'Just Merge' finished

  I´m looking for the right way to call the external files.


texts: Maxent error: Error projecting, two layers have different geographic dimensions

texts:
When I run climate data (signed 16 bit) and land use data (unsigned 8 bit) on  Maxent, I got an error message:

  Error projecting: java.io.IOException: Files bio6 and alt in directory
  D:\WorldClim\Future\ACCESS1_0\rcp4 have different geographic
  dimensions.

Despite correcting the layers to have the same dimensions (I AOI of the same), Maxent still gives me an error message for the same two layers.


texts: Creating ArcGIS 9.3 geodatabase in ArcGIS 10?

texts:
Dooes anyone know if it's possible to create a v9.3 geodatabase from ArcGIS 10?

Opening them is not a problem, but I haven't found a way to create one without going back to 9.3 and doing it there.


texts: Trinidad Tobago Coordinate Reference System

texts:
I am currently hoping to set up a map of the North of Tobago with the amphibian species which are present there.

I am very new to QGIS and am unsure how to get Tobago as a projection?


texts: How to link Mapbox markers with checkbox inside a HTML table

texts:
I have a Mapbox map , and at the moment my marker comes up on map load. But what I'm trying to do is to only display the marker when the user clicks the check box inside the table. I have tried several methods but has not worked out.
HTML TABLE

  <input type="checkbox"  class="remember">

Javascript for Mapbox
mapboxgl.accessToken = 'pk.eyJ1IjoiZXNxdWlsYXgiLCJhIjoiY2tqd2ZyMXJsMGVqeDJ4cW8xcnRja2tqdiJ9.7z7Eyrj3iexJ9uDVYIT0yw';
var map = new mapboxgl.Map({
  container: 'map',
  style: 'mapbox://styles/joel001/ckokqqll178jp17n7ju7plcmy',
  center: [115.83333, -32.01667],
  zoom: 11
});

map.on('load', function () {

  map.loadImage(
    'https://img.icons8.com/nolan/64/map-pin.png',
    function (error, image) {
      if (error) throw error;

      // Add the image to the map style.
      map.addImage('myimage', image);

      map.addSource('places', {
        'type': 'geojson',
        'data': {
          'type': 'FeatureCollection',
          'features': [
            //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

            {
              'type': 'Feature',
              'properties': {
                'title': 'My Marker'
              },
              'geometry': {
                'type': 'Point',
                'coordinates': [long, lat]
              }
            }

          ]
        }
      });

      // Add a layer showing the places.

      map.addLayer({
        'id': 'places',
        'type': 'symbol',
        'source': 'places',
        'layout': {
          'icon-image': 'myimage',
          'text-field': ['get', 'title'],
          'text-offset': [0, 1.55],
          'text-anchor': 'top'
        }

      });

      // When a click event occurs on a feature in the places layer, open a popup at the
      // location of the feature, with description HTML from its properties.
      map.on('click', 'places', function (e) {
        var coordinates = e.features[0].geometry.coordinates.slice();
        var description = e.features[0].properties.description;

        // Ensure that if the map is zoomed out such that multiple
        // copies of the feature are visible, the popup appears
        // over the copy being pointed to.
        while (Math.abs(e.lngLat.lng - coordinates[0]) > 180) {
          coordinates[0] += e.lngLat.lng > coordinates[0] ? 360 : -360;
        }

        new mapboxgl.Popup()
          .setLngLat(coordinates)
          .setHTML(description)
          .addTo(map);
      });

      // Change the cursor to a pointer when the mouse is over the places layer.
      map.on('mouseenter', 'places', function () {
        map.getCanvas().style.cursor = 'pointer';
      });

      // Change it back to a pointer when it leaves.
      map.on('mouseleave', 'places', function () {
        map.getCanvas().style.cursor = '';
      });

    }
  );
});


texts: QGIS3.x using processing algorithms outside of python console (when writing a plugin)

texts:
For a school assignment I need to write a QGIS plugin.
Part of the plugin that i'm writing needs to use the 'select by location' processing tool on a previously created buffer.
The codelines that I want to use is:
import processing

def selectBagFromOverlapBuffer(self):
        self.layer1 = QgsProject.instance().mapLayersByName('bag:verblijfsobject')
        self.layer2 = QgsProject.instance().mapLayersByName('buffer')
        processing.runalg('qgis:selectbylocation',self.layer1, self.layer2,u'within',0)

The error message I get is "module 'processing' has no attribute 'runalg'
Is there a step I'm missing with accesing processing tools from a plugin .py script?


texts: Not showing multiple markers on OpenLayers

texts:
I want to show multiple markers on my Google map with OpenLayers.
Below is my code :

for (var pointcount = 0; pointcount < jsonObj.length; pointcount++) {

if (jsonObj[pointcount].Long != null && jsonObj[pointcount].Lat != null) {

    var markerslonLat = new OpenLayers.LonLat(jsonObj[pointcount].Long, jsonObj[pointcount].Lat).transform(WGS84, map.getProjectionObject(), 0);
    map.panTo(markerslonLat);

    markers.addMarker(new OpenLayers.Marker(markerslonLat, icon));

    alert('  marker added. Long : ' + jsonObj[pointcount].Long + '    ||    lat : ' + jsonObj[pointcount].Lat);
}

But, it shows only last one.
What have I missed in my code?


texts: Coordinate grid display on a rotated map

texts:
I have a series of maps that require me to rotate my data frame within my layout screen (north "rarely" points up in these maps).  I ONLY want to show east coordinates on the top/bottom and ONLY north coordinates on the sides (see image below).  How do I do this?  I would expect to see such an option when I go inside of properties menu under "grids", but I'm not having any luck.  I'm using ArcView 10.  Can anyone help?  If I haven't articulated what I'm trying to accomplish very well, feel free to edit my question.
Thanks in advance


texts: Adding and removing legends with layer selection in Leaflet

texts:
I'm new to Leaflet/Javascript and have been struggling to get legends a map to show only when a specific layer is selected from the layer control. I have three layers, one of which I would like to have no legend and two others that have a corresponding legend. I came across an example, but have not been able to make it work:

// Add and remove legend from layers
map.on('overlayadd', function (eventLayer) {
// Switch to the Permafrost legend...
   if (eventLayer.name === 'Permafrost') {
       this.removeControl(legend1);
       legend2.addTo(this);}
  else { // Or switch to the treeline legend...
       this.removeControl(legend2);
       legend1.addTo(this);
  }});

I created a jsfiddle with the specific example:

http://jsfiddle.net/gerlis/T8DHb/3/


texts: How to create a line into a table in Postgis?

texts:
I need to draw a line and create a new entry on an existing table in Postgis.

Say I have a table called myTable and two points with coordinates 528115,181037 and 528115,181037 using the EPSG:27700 (OSGB British National Grid)

I know that I need to use the command ST_MakeLine and I tried something like:

 INSERT INTO myTable(id, name, geom)
 VALUES('1','test', ST_SetSRID(ST_MakeLine((528115,181037),(533903,180877), 27700)));

But it doesn't work. Error returned is:

   ERROR:  function st_makeline(record, record, integer) does not exist
LINE 2:      VALUES('1','test', ST_SetSRID(ST_MakeLine((528115,18103...
                                       ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

********** Error **********

ERROR: function st_makeline(record, record, integer) does not exist
SQL state: 42883
Hint: No function matches the given name and argument types. You might need to add explicit type casts.
Character: 69

My create table statement is:

CREATE TABLE public.myTable(
  id integer NOT NULL,
  name character varying(25),
  geom geometry(LineString,27700),
  CONSTRAINT pk_bft PRIMARY KEY (id)
)
WITH (
OIDS=TRUE
 );

And in the documentation it's not clear on how to add the created line into an existing table. How to do this?


texts: Clipping raster to multiple rasters for each parcel using ArcGIS Desktop?

texts:
I have a raster aerial photo.  I have county wide parcel data.

I want to clip/screen shot the raster at each individual parcel.

Think of this application - a post card with an image of your house --here is your house--

I want to have each parcel attribute to contain information + hyperlink of the aerial photo.

Any other solutions welcome, but this is the only method I could think of. Although I am unsure of how to achieve it efficiently.

Using ArcInfo 10.


texts: Why is there an extra pixel in some world images, 43201 vs 43200?

texts:
I have two images both of which have world nighttime lights. They are off by 1 pixel and the equivalent decimal degrees, but the 43201 image seems to be "too large." Using gdal:

Driver: GTiff/GeoTIFF
Files: F152000.v4b_web.avg_vis.tif
Size is 43201, 16801
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
Origin = (-180.004166666650008,75.004166666649994)
Pixel Size = (0.008333333300000,-0.008333333300000)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_XRESOLUTION=100
  TIFFTAG_YRESOLUTION=100
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (-180.0041667,  75.0041667) (180d 0'15.00"W, 75d 0'15.00"N)
Lower Left  (-180.0041667, -65.0041661) (180d 0'15.00"W, 65d 0'15.00"S)
Upper Right ( 180.0041652,  75.0041667) (180d 0'14.99"E, 75d 0'15.00"N)
Lower Right ( 180.0041652, -65.0041661) (180d 0'14.99"E, 65d 0'15.00"S)
Center      (  -0.0000007,   5.0000003) (  0d 0' 0.00"W,  5d 0' 0.00"N)
Band 1 Block=43201x1 Type=Byte, ColorInterp=Gray

But 43201 * 0.008333333300000 = 360.0083318933

In other image, gdalinfo gives:

Driver: GTiff/GeoTIFF
Files: world_stable_lights.tif
Size is 43200, 21600
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
Origin = (-180.000000000000000,90.000000000000000)
Pixel Size = (0.008333000354469,-0.008333000354469)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_XRESOLUTION=100
  TIFFTAG_YRESOLUTION=100
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (-180.0000000,  90.0000000) (180d 0' 0.00"W, 90d 0' 0.00"N)
Lower Left  (-180.0000000, -89.9928077) (180d 0' 0.00"W, 89d59'34.11"S)
Upper Right ( 179.9856153,  90.0000000) (179d59' 8.22"E, 90d 0' 0.00"N)
Lower Right ( 179.9856153, -89.9928077) (179d59' 8.22"E, 89d59'34.11"S)
Center      (  -0.0071923,   0.0035962) (  0d 0'25.89"W,  0d 0'12.95"N)
Band 1 Block=43200x1 Type=Byte, ColorInterp=Gray

43200 * 0.008333000354469 = 359.99999856. This is closer to 360 than the 360.008333... above.

Not to be picky, but it seems there is an extra pixel. I thought that the leftmost column of pixels could perhaps be a duplicate of the rightmost, that they might "overlap," but this is not the case. One system ultimately has (-0.0000007,-0.0000007) as the centroid of the pixel closest to (0,0), whereas the other system has that centroid at (0.0041667,0.0041667), off by one-half of a pixel.

I'm also confused as to why each pixel is larger in the 43201 image. 0.00000033294553 (the difference in size of each pixel) * 43201 (the 1 doesn't really matter here) = 0.01438357988, which is not close to a 1 or 1/2 pixel 'offset.' I'm new to GIS and I'm curious what is going on here. Could someone illuminate this for me please?


texts: How to write log message in QGIS's script algorithms GUI tab?

texts:
I want to write some log in the log tab of processing algorithm User Interface.

I tried this :

from qgis.core import QgsMessageLog

QgsMessageLog.logMessage("test")

but when I launch the script "test" is not logged.

How to write a log in the processing User Interface ?

the processing guide log's chapter doesn't tell much about writing a log in this tab.

If i use :

from qgis.core import QgsMessageLog
QgsMessageLog.logMessage("test", tag="Processing", level=QgsMessageLog.INFO)

the log result is wrote under the console log panel called "Processing", but not in the processing GUI log tab.


texts: Is there a way to include an autocomplete search bar that does not point back to your data in CartoDB?

texts:
I would like to include an autocomplete search bar that uses google maps api or bing maps geocoder, etc. Is there an easy way to integrate this with cartodb's search box?

// add search bar to map
var v = cdb.vis.Overlay.create('search', map.viz, {});
v.show();
$('#map').append(v.render().el);
$('.cartodb-searchbox').find('input.text').attr('placeholder', 'Enter Location...');


texts: Understanding difference between Flight Angles (FlightYaw/FlightPitch/FlightRoll) and GimbalYaw/GimbalPitch/GimbalRoll

texts:
I am working on a project that requires me to extract/compute the orientation of the CAMERA in the world coordinate system. I have gone through the documentation (Flight Control, etc) but I am unable to understand the following:
What is the difference between Flight Angles (FlightYaw/FlightPitch/FlightRoll) and GimbalYaw/GimbalPitch/GimbalRoll?
This is my current understanding but it does not seem correct:
Flight Angles:

The Yaw angle seems to be the orientation of the CAMERA in the world coordinate system.
Pitch and Roll seem to be the orientation of the DRONE in the world's coordinate system.

Gimbal Angles: The angles of the CAMERA in the body coordinate system.

This seems to be the case for pitch and roll but the yaw value sometimes does not follow this from the looks of it (In some cases the Gimbal Yaw is almost identical to the Flight Yaw and it doesn't make sense when I use Google Earth to verify what the orientation should be rough - In these cases, the flight yaw seemingly gives the absolute orientation of the CAMERA in the world coordinate system)

I have been stuck on this and going through countless forum posts as well as documentation to seek clarification with no success. I hope someone can clear things up for me and outline what Gimbal vs Flight Angle. Most importantly, I want to be able to calculate the orientation of the CAMERA in the world coordinate systems.


texts: How to iterate RGB raster layers in ModelBuilder?

texts:
I have an RGB raster that I'm calculating color-based indices from. When I do the calculations manually, I can select a certain band of the RGB raster to calculate.
I need to do the same operations on a folder of rasters, so I use ModelBuilder to iterate the folder, but I don't can't select the individual R, G, B layers from each raster and do calculations on them

I've found this question, and have defined the Raster Calculator expression as such, but I receive the following error:


texts: After a reinstall of ArcInfo 9.3 (which works fine for mapping etc), the box for all of my extensions is blank. I've checked, and they're all licensed in Desktop Administrator, but not showing at all in ArcMap. Does anyone know how I can fix this please?


texts: Pyqgis. The nearestNeighbor() function returns different number of items than requested (qgis 2.18.2)

texts:
I have this chunk of code(inside a loop), where I request 6 nearest elements from a spatialIndex, but I'm getting different numbers of elements, sometimes 6, another 7, another 8... is very strange.

nearest_ids = target_spatial_index.nearestNeighbor(center,6)
if log:
    logging.info('Center: '+str(center))
    logging.info("Total nearest:"+str(len(nearest_ids))+'->'+str(nearest_ids))

Log:

...
Center: (125051,4.38048e+06)
Total nearest:8->[6L, 14L, 7L, 15L, 19L, 16L, 20L, 8L]
Center: (123452,4.379e+06)
Total nearest:8->[5L, 13L, 18L, 2L, 10L, 7L, 15L, 19L]
Center: (124261,4.38087e+06)
Total nearest:6->[7L, 15L, 19L, 16L, 20L, 8L]
Center: (123265,4.37567e+06)
Total nearest:7->[1L, 9L, 17L, 11L, 3L, 2L, 10L]
...

  Can anyone confirm it? (Yes, see my answer below)


texts: arcpy.Erase_analysis function and output

texts:
I have attached my code (Python). I am trying to loop trough each FC in same file GDB and subtract a FC from remaining FCs not equal to input FC. Then want to create/generate FC from erased result function. Also, I want to give specific FC name to the output. I can get to the end of my script, except last line.

Example: GDB has [A,B,C,D] - 4 FCs.
1st round:
input FC: A     (Do not use A-A)
Output should be A-B and called Product_By_AB
       should be A-C and called Product_By_AC
       should be A-D and called Product_By_AD
2nd round:
input FC:B (Do not use B-B)
Output should be B-A and called Product_By_BA
       should be B-C and called Product_By_BC
       should be B-D and called Product_By_BD
and so on.

import arcpy
arcpy.env.overwriteOutput = True
arcpy.env.workspace = r'C:\input.gdb'

Match_FC = arcpy.ListFeatureClasses()

for fclass in Match_FC:
  for fc in Match_FC:
    if fc != fclass:
        fclass_lyr = arcpy.MakeFeatureLayer_management(fclass, "fclass_lyr")
        fc_lyr = arcpy.MakeFeatureLayer_management(fc, "fc_lyr")
        arcpy.SelectLayerByLocation_management(fclass_lyr, 'INTERSECT', fc_lyr)
        desc = arcpy.Describe("fclass_lyr")
        fcIntersect=[]
        if desc.FIDSet:

             output='{}'.format(fclass)

            arcpy.Erase_analysis(fclass, fc,output, '')

        else:
           arcpy.Delete_management(fclass_lyr)
        arcpy.Delete_management(fc_lyr)

    else:
        "Skipping FC-{}".format(fc)


texts: Calculate new field from existing fields using expression in gdal/ogr and append to shapefile

texts:
I'm trying to calculate a new field from existing fields based on a simple expression for a set of polygons in GDAL/OGR.

The expression is basically:

new field = (field 1 / field 2) * field 3

After calculating, I need to append the new field on to the existing set of polygons and sum all the values in that new field.

This is very straightforward in ArcGIS or using ArcPy, but I can't find a solution for GDAL/OGR.


texts: Projection change shifts point locations in ArcMap?

texts:
I'm having an issue with points shifting their locations when projected differently.

I have several files with undefined coordinate systems (from a Trimble GPS).  If I bring these shapefiles into a dataframe that's in WGS84, they appear in what I assume is the correct location based on the aerial.  If I then define the coordinate system of the shapefile as WGS84, they continue to appear in the same location. If I then move that shapefile into an MXD with a dataframe that's in state plane, the shapefile projects on-the-fly to the same location. I then export that shapefile with the data frame's coordinate system, the data stays in that location. So far so good.

However--if I define the coordinate system of the shapefile as WGS84, then try to project the file into state plane using the Project tool (no matter which coordinate system the dataframe is in), the points shift by about three feet.

Does anyone know why this is happening? More importantly, which location is in the correct location--the original points or the shifted ones?  How do you tell?


texts:
I am currently working on a solution to generate clientside PDFs from OpenLayers content. The experience is okay so far, but I am having a bit of a hassle.

The abstract is as follows:

Calculating the amount of pixels needed to fill a given space on paper
Temporarily set the map to given resolution
read canvas
do print stuff
reset map to previous resolution

In code:

      var mapSizeForPrint = [
        // in pixel
        Math.round(this.pdf.width * pixelsPerMapMillimeter),
        Math.round(this.pdf.height * pixelsPerMapMillimeter)
      ];
      ...
      var map = this.openLayersMap();
      ...
      this.mapExtent = map.getView().calculateExtent(this.mapSize);
      ...
      this.rendercompleteListener = map.once("rendercomplete", event => {
       //Do printing magic
      }
      map.setSize(mapSizeForPrint);
      map.getView().fit(this.mapExtent, { size: mapSizeForPrint });

If anyone is interested in the (dirty) details: full code is available as open source here

That works to a certain degree.

scaling to 80 DPI, I get an expected subset of the map
scaling to 120 DPI, I get a relatively expected subset of the map
scaling to 200 DPI, getting an unexpected result

Currently I assume, that I get the "same" dataset for any given resolution - i.e. the visible center of the 80DPI version is "the same" as the 200DPI only that it doesn't fit on screen; but that seems not to be the case.

Does anybody give me a hint in which direction to look? Perhaps I have some false assumptions which I currently do not see or do not see, how to overcome.


texts: QGIS not reading colormap from hand-edited .qgs file

texts:
I have a set of rasters which store solar radiation incidence over the course of a year. In QGIS, I want to map the same extent, and with the same reference features, varying only the solar raster within the set.

My idea was to create a master project file, symbolize and lay out the map in print composer using the first raster of the set, save the project, and then edit the .qgs file as XML. For each map in the series, I did a find and replace for all instances of the raster name, then saved as a new .qgs file.

When I opened the projects again in QGIS, each raster showed in the proper file, but it had lost its symbology and reverted to greyscale. Each file contains this code:

<customColorRamp>
  <colorRampType>INTERPOLATED</colorRampType>
  <colorRampEntry red="255" blue="236" value="0.000000" green="247" label=""/>
  <colorRampEntry red="254" blue="200" value="5000.000000" green="232" label=""/>
  <colorRampEntry red="253" blue="158" value="10000.000000" green="212" label=""/>
  <colorRampEntry red="253" blue="132" value="15000.000000" green="187" label=""/>
  <colorRampEntry red="252" blue="89" value="20000.000000" green="141" label=""/>
  <colorRampEntry red="239" blue="72" value="25000.000000" green="101" label=""/>
  <colorRampEntry red="215" blue="31" value="30000.000000" green="48" label=""/>
  <colorRampEntry red="153" blue="0" value="35000.000000" green="0" label=""/>
</customColorRamp>

Furthermore, a diff check on the files shows that resetting the symbology in QGIS and saving changes only the timestamp property within the file, nothing else.

So if the colormap isn't being saved in the .qgs, where is it being saved?


texts:
I'm having an issue where the Y coordinate in a UTM is being rounded to the nearest 10th, and I don't know why.

I have a SQL Server Database with a view that is using columns from a table in another database through a linked server.  This view has an extra SHAPE column in which I computer the POINT from the X and Y columns in table. I'm using this formula to create the Geometry,

geometry::STPointFromText('POINT(' + CAST(X_UTM_NAD83Z14_D AS VARCHAR(20))
                      + ' ' + CAST(Y_UTM_NAD83Z14_D AS VARCHAR(20)) + ')', 26914) AS SHAPE

The columns X_UTM_NAD83Z14_D and Y_UTM_NAD83Z14_D are float datatype

The problem was noticed when it was compared to original points and a temporary layer was made directly from the source table.  The X direction was fine, but the Y direction was being rounded to the nearest tenth and thus shifting all the points north or south a maximum of 5 meters.

Original Coordinate: 335688.2, 6067867.1
PointFromText Coordinate: 335688.2, 6067870.0

Could someone help me figure this out?  I don't understand where the error is coming from.


texts: Oracle layer not editable in QGIS as non-owner user

texts:
When I open a QGIS (3.10) connection to an Oracle (12c) database using a logon which owns a spatial table, and add the table as a layer, the layer can be edited as normal.
If I open the Oracle connection using a different logon, the same table cannot be edited (toggle editing is inactive).

I've tried a user with the DBA role, and can edit the layer as that user via SQL update statements (from SQL*Plus), but not from within QGIS.
I've tried creating a user synonym and ensuring there's an entry in USER_SDO_GEOM_METADATA for the table and user.
I've also granted the user the SELECT/INSERT/UPDATE/DELETE ANY TABLE system privileges in case the DBA role isn't enough (some privileges only work when granted directly, not via a role).
The database connection was created via the QGIS browser with no credentials stored, allowing QGIS to prompt for them as the connection is opened.

What is it that determines whether an Oracle Spatial table is editable in QGIS?

I'm reluctant to give out the SYSTEM owner password to all and sundry, or to have it unencrypted in a QGIS layer file.

Surely I can't be the only person who uses Oracle in a multi-user environment?


texts: Comparing two same-shape band arrays, one against a set of conditions to then change the other one

texts:
first band and second band can be assumed to be the same shape.
I want to test the second band against two conditions (that it's not "invalid_data" and the value is one of the numbers in "list_of_desired_values").
For the index where those conditions were deemed true for the second band, I want to then change the first band at that same index to -9999 in this case.
I can't get this to work, and ideally I'd like to be able to do this within Numpy rather than a for loop for efficiency. Does anyone know an effective way to do this?
invalid_data = 5 #example
list_of_desired_values = [11, 2]
ds_first_band = original_raster_ds.GetRasterBand(1).ReadAsArray()
ds_second_band = original_raster_ds.GetRasterBand(2).ReadAsArray()
for index, x in enumerate(ds_second_band.flatten()):
    if x != invalid_data:
        if x in list_of_desired_values:
            ds_first_band.flatten()[index] = -9999


texts: How to use an existing database to authenticate users in GeoNetwork

texts:
By default GeoNetwork stores users and groups in two tables named users and usergroups in the configured database, in my case a PostGIS database.

For our webgis application we have already an existing database with users, groups and roles. Is it possible to use the same database to authenticate users in GeoNetwork as well (preferably without recompiling GeoNetwork)?


texts: How to configure OTB in my own application?

texts:
I had installed  Orfeo Toolbox via Osgeo4w and using the applications through commandline.

Now my question is if i want to use Orfeo Toolboxin my application without installing through Osgeo4w, and use the OTB applications through the command line ?

How to do it? I mean with out installing through Osgeo4w if i want to use the OTB applications through command line what are the dependencies  i need to download? how to configure ?

Thanks in advance


texts: PermGenSpace error in Tomcat with geonetwork 3.0

texts:
I'm running a geonetwork 3.0.1 instance on tomcat7. Regularly, i.e. every few actions of my only user, my tomcat runs into a PermGenSpace error. This especially occurs during harvesting of other catalogues.

I already configured geonetwork to use Postgres (postgres.xml). Then I adapted /ect/default/tomcat7 and set in the JAVA_OPTS: -Xms=1024m -XmX=2048m -XX:MaxPermSize=2048m. If I get it right, that should be the maximum tolerable values, as my server runs on 4GB RAM. Actually I am not sure, if those values are actually applied by the JVM, as I could not prove it with memory monitoring.

As the latest configuration improvement, I set the geonetwork_data_dir outside the tomcat webapp path. Since then, it seems to behave a bit improved, but I am still affected by this tiring PermGenSpace error.

Are there best practice experiences, which values to use, especially for -XX:MaxPermSize?

Are there suggestions, what else to enhance in the configuration?

EDIT:

I changed my server configuration and run with 6GB now. Other reconfiguration has been changing the JAVA_OPTS to

JAVA_OPTS="-Djava.awt.headless=true -Xms512m -Xmx1024m -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:+UseParNewGC -XX:NewRatio=2 -XX:+AggressiveOpts -Xrs -XX:PerfDataSamplingInterval=500 -XX:MaxPermSize=256m"

The out of memory errors disappeared until now, after a few tests. Also harvesting a remote CSW ran quickly and without disruption.

So in general I can run geonetwork with the 1GB heap and 256 Perm space as proposed in the accepted answer now.


texts: Openlayers WMS layer not diplaying in IE windows mobile 6 emulator

texts:
I am new to openlayers. I tried this example. I have published world shapefile to tiger workspace as 'country' layer to geoserver and want to access with WMS. The world map is getting displayed in IE on Windows XP but not in  IE of Windows 6 mobile emulator. I am able to access geoserver's admin page on my PC from the mobile emulator so network connection may not be  issue. Kindly suggest anything I am missing.

  <title>OpenLayers Example</title>


texts: How can I respond to mouse unclick in mapinfo using mapbasic? Is there any event triggered when the mouse in unclicked? For example at the end of drawing a line when the mouse button is released.


texts: Limit Zooming Geometry Features in OpenLayers

texts:
I draw flag feature on my map as follows:

myVectorLayer = new OpenLayers.Layer.Vector("Flag Geometry", {
renderers: renderer,
isBaseLayer: true,
projection: new OpenLayers.Projection("EPSG:900913"),
styleMap: new OpenLayers.StyleMap({
    "default": new OpenLayers.Style(OpenLayers.Util.applyDefaults({
        fillColor: "red",
        strokeColor: "gray",
        label: "${label}",
        fontColor: "${favColor}",
        fontSize: "12px",
        fontFamily: "Courier New, monospace",
        fontWeight: "bold",
        labelYOffset: 2 //for flag
    }, OpenLayers.Feature.Vector.style["default"])),
        "select": new OpenLayers.Style(OpenLayers.Util.applyDefaults({
    }, OpenLayers.Feature.Vector.style["select"]))
})
});

var pointList = [];
var xs = [0, 0, 240, 240, 8, 8, 0];
var ys = [0, 280, 280, 120, 120, 0, 0];

for(var p=0; p<6; ++p) {
    var newPoint = new OpenLayers.Geometry.Point(camera.get('latitude') + xs[p],
        camera.get('longitude') + ys[p]);

    pointList.push(newPoint);
}
pointList.push(pointList[0]);
var linearRing = new OpenLayers.Geometry.LinearRing(pointList);
var flagVector = new OpenLayers.Feature.Vector(
        new OpenLayers.Geometry.Polygon([linearRing]));

flagVector.attributes= {
    label: 'label',
    favColor: 'blue', //favorite color
    align: "cm"
};
myVectorLayer.addFeatures([flagVector]);

This zooms by default when zooming the map but when zooming out the feature becomes so small that it disappears. Is there a way to limit this zooming effect for the feature so that it stops zooming out the feature after a certain level?


texts: Conversion of Polygon vector files to Raster GRID 8 bit unsigned integer

texts:
I am trying to convert a polygon shapefile layer into Raster GRID with 8 bits and which is unsigned integer. I managed to convert the shapefile in ArcGIS with the Arc Toolbox Conversion tools, but the raster I get is GRID floating point 32 bits. I am trying to convert even that raster into GRID, have tried to use Copy Raster tool in Arc Toolbox as suggested by someone, but I didn't manage to get the right raster. It has a number of options there, I don't know which ones will do the work. THe options in Copy Raster are:

Convert 1 bit data into 8 bit optional
Colormap to RGB optional
Pixel Type: 8_BIT_UNSIGNED
Scale pixel value optional
RGB to colormap optional

I don't know whether to check 1,2,4 or not. Is there any other way to do it?


texts: Checking population data for plausibility in OpenRouteService QGIS Plugin

texts: Does anyone have any experience how reliable/plausible the reachability analysis for German cities are? Can anyone report whether the population data, which are supposed to come from the "Global Human Settlement Program", are plausible for the calculated isochrones? Did anyone double check the population output against other data?


texts:
I am interested in calculating the minimum distance of a canal necessary to irrigate any given point in a map. The problem is that the cost map would have to be asymmetric since water can flow down a slope but not up.

Is there any way of modifying the Cost Distance Tool to allow for asymmetric costs (more expensive to go from "A" to "B" than from "B" to "A"?


texts:
I have a problem with OpenLayers rendering close labels. When two labels are close, it will render the labels texts unreadable.

My goal is that when two labels with text overlap each other,  one could see the text clearly on a white background. So, if two labels overlap each other, one should be able to read the text of the one on top correctly.

For this I used the following characteristics:

pstyle.label = txt;
pstyle.fontColor = "#000000"
pstyle.fontOpacity = 1;
pstyle.fontFamily="Arial";
pstyle.fontSize = "12 px";  //16px
pstyle.fontWeight = "bold";
pstyle.labelYOffset = -10;

pstyle.graphic = false;

pstyle.backgroundGraphic = "/ddrt_WEB/img/WhiteBackground.png";
pstyle.backgroundYOffset = 1;
pstyle.backgroundHeight = 20;
pstyle.backgroundWidth = 180;
pstyle.backgroundGraphicZIndex = 1

Which properties do I have to use to avoid this problems?


texts:
i tried to install the last version of Qgis (Version 3.0), i removed the Users.qgis folder, the installation was succefelly executed.

i used plugins Builder to create a new plugin but it's failed cause of the path doesn't found

how should i create the .qgis files to create new plugins again?

i tried to unstall completly Qgis and instal it again but the .qgis folder does not appear.


texts: OpenLayers alternatives supporting more client-side features

texts:
I am considering different architectures for a system that will ideally use client-side rendering for point features and must be plugin-free. I have been using this application developed in response to this question to test my laptop (which is quite capable - quad-core 2.6 ghz cpu, 4 gb memory, not under any other load, Firefox 8) with different numbers of points in OpenLayers and it is noticeably lagging at 500 and starts struggling over 1,000. The randomly-generated features don't seem to have any event handlers and all use the same symbology.

I expect to be showing up to 1,000 features, with up to 10 different symbols, all with click and mouse-over handlers, and on less capable platforms.

I was hoping for better client-side performance, especially after seeing this GIS Cloud example - I know it works differently (HTML5 canvas vs. SVG) but the difference in performance is really striking.

My key questions (if you would be so kind) are:

Is the random point generating application representative of performance in other OpenLayers applications you have written / used?
Is there a proven and free alternative web mapping API that supports WMS services (which I need to use) and is faster with client-side features, without using Flash / Silverlight / any other plugins?
Any other suggestions on what I should be investigating?

Relying primarily on server-side rendering is an option but both I and the client would like to avoid this due to concerns over scaling-up user numbers and the responsiveness of the UI.


texts: Raster Spatial Join of Two Datasets with Different Grid Cells

texts:
I have two raster datasets with different resolution rates, dataset A is land use data with smaller grids, while dataset B is crop output per unit data with much larger grids.

I would like to join the two datasets, say, put the output data of each grid from B to every grid of A, which means each smaller grid of A would be added a new value called "crop output per unit". some grids of A are within B's grids, so I would like to simply add value of grids from B to the smaller A grids, some grids from A are on the border of two grids from B, maybe I can use the mean of the value from the two grids.

I am not sure whether GIS can realize it.


texts: What's this rooftop texture found in Google Maps imagery - is it an artifact?

texts:
Looking at a rooftop in Google Maps, I noticed a strange texture on it which was not at all apparent from a view on the ground. I viewed the same spot in Google Earth to look at it across time. The strange texture was present as far back as 2009 but after that, although the texture went away, that section of the roof does remain brighter than the rest of the roof consistently over time. On the ground it does appear slightly flatter on that part of the roof than other parts, could that have an affect, or be a clue as to what that texture actually represents?

What could cause this texture and brightness?

Current imagery from Google:

2006 imagery showing non-textured roof but with a brighter coloration:

2005:

2003:


texts: Creating a polyline with a specified slope

texts:
I would like to create a road (polyline) starting from a point, with a specified slope, until reaching the top of a hill (or going out of the DTM Raster).

The dowstream slope of the DTM must always be on the same side of the created polyligne to avoid hairpins.

I am working with qgis, arcgis-10.1, python, ...

I found some developments but that work with Autocad :

http://files.carlsonsw.com/mirror/manuals/old/dtm.pdf

https://www.youtube.com/watch?v=t6VAKWSD-7o

I have almost the same need that Craig :

3D Polyline by Slope on Surface

Somebody can tell me what would be the best method ?

Or is there already someting that could do that ?


texts: How to re-ID polygons with sapply instead of for loop

texts:
I have a line of code that renames the id's of polygons in a SpatialPolygonsDataFrame by directly manipulating the ID slot of the polygon. I'm a bit slow when it comes to sapply, having used for loops for at least 20 years. Anyhow I have a piece of code that works using a for loop, but its really slow. I would like to replace it with a sapply command but can't figure it out. My code looks like this:

for(v in 1:nrow(SPoly)) {
    SPoly@polygons[[v]]@ID <- SPoly@data[v,3]
}

Can anyone suggest an sapply implementation of same?


texts: Enlarging/shrinking while maintaining aspect ratio when using Google Earth Pro to Edit Image Overlay?

texts:
In Google Earth Pro "Edit Image Overlay", the only way I have found to enlarge
or shrink the overlay while maintaining the X:Y aspect ratio is to
grab one of the four green corners (not the four middle of edge
"T"s), and carefully pull it in a direction exactly toward or away
from the image center "+". Is there any better way?
(Note Properties > Location > Fit to screen wipes out rotation.)


texts: Debugging spplot() and reflconv() on R Cannot allocate vector of size ...?

texts:
I am trying to perform LANSAT data of Digital Numbers (DN) to reflectance in R(coding) using reflconv().

When I apply that function to example it shows below error:

>library(rgdal)
x <- readGDAL("LC81370452014329LGN00_B5.TIF")
// LC81370452014329LGN00_B5.TIF has GDAL driver GTiff and has
7891 rows   and 7711 columns

 >spplot(x)
// Error : cannot allocate vector of size 232.1 Mb

>reflconv(x,2.0000E-05,-0.100000)
//Error : cannot allocate vector of size 464.2 Mb

What is the cause of this error?


texts:
How to display numberoffeatures in map using geoext on grid?

 Ext.onReady(function() {
            app = new Ext.Viewport({
                layout: "border",
                items: items
            });

items.push({
        xtype: "grid",
        ref: "capsGrid", // makes the grid available as app.capsGrid
        title: "Available Layers",
        region: "north",
        height: 150,
        viewConfig: {forceFit: true},
        store: new GeoExt.data.WFSCapabilitiesStore({
                url: "http://localhost:8080/geoserver/wfs?request=GetFeature&typename=GisData:sites&version=1.1.1&resultType=hits&filter=(%3CFilter%3E%3CPropertyIsEqualTo%3E%3CPropertyName%3EVendor%3C/PropertyName%3E%3CLiteral%3EvendorTE%3C/Literal%3E%3C/PropertyIsEqualTo%3E%3C/Filter%3E)",
                protocolOptions: {version: "1.1.1"},
                autoLoad: true
            }),
        columns: [
            {header: "numberOfFeatures", dataIndex: "numberOfFeatures", sortable: true}
        ]
    });

I get xml response in firebug:


texts: Remove all but one lines in cluster of parallel lines

texts:
I just want one line that represents the centroid of a bunch of parallel lines, which one in each bunch doesn't matter.
I've already tried doing a dissolve operation to make one thick line that overlaps the unwanted ones, but the result looks clunky and I would really rather a Polyline as data.
This is what the data looks like right now. I drew a few black lines between the clusters in the paint to show you what I am going for.


texts: "Cannot find folder" error uploading QGis plug-in to official repository

texts:
I am trying to upload a QGis plug-in to the official repository. When uploading the .zip file I always get back this error message:

  There were errors reading plugin package (please check also your
  plugin's metadata). Cannot find a folder inside the compressed
  package: this does not seems a valid plugin

The contents of the .zip file are as follows:

.
├── dialogue_load.py
├── dialogue_load.ui
├── dialogue_new.py
├── dialogue_new.ui
├── help
│   ├── build
│   ├── make.bat
│   ├── Makefile
│   └── source
│       ├── conf.py
│       ├── index.rst
│       ├── _static
│       └── _templates
├── hex_utils_qgis.py
├── i18n
│   └── af.ts
├── icons
│   ├── Load.png
│   └── New.png
├── __init__.py
├── LICENCE
├── Makefile
├── metadata.txt
├── pb_tool.cfg
├── plugin_upload.py
├── pylintrc
├── README.md
├── resources.py
├── resources.qrc
├── scripts
│   ├── compile-strings.sh
│   ├── run-env-linux.sh
│   └── update-strings.sh
└── test
    ├── __init__.py
    ├── qgis_interface.py
    ├── tenbytenraster.asc
    ├── tenbytenraster.asc.aux.xml
    ├── tenbytenraster.keywords
    ├── tenbytenraster.lic
    ├── tenbytenraster.prj
    ├── tenbytenraster.qml
    ├── test_hex-utils-qgis_dialog.py
    ├── test_init.py
    ├── test_qgis_environment.py
    ├── test_resources.py
    ├── test_translations.py
    └── utilities.py

What is missing?


texts:
I have 3D scene created from digital elevation model in ArcScene. I want to export it in a file and than open that file in any browser so I can view the 3D environment. I managed to do it in QGIS via threejs plugin which exported a bunch of files and one html file for viewing in a browser, but in ArcScene I cannot figure it out.

Any suggestions?


texts: Rotating and scaling raster without distortion using QGIS?

texts:
I have some low-quality vector data and I'm trying to align some higher-quality raster images with it so that I can improve the vectors. Unfortunately the rasters have no control points or coordinates, so I have to align the images by matching up two identifiable points that exist in both the raster and the vector:

In my 3D software, I can align to these two points without distortion simply by locking the aspect ratio, to get this result:

But using the Qgis Georeferencer with the same points, I get a distorted result (note that the raster is now considerably less wide left-to-right than the vector):

I tried different transformation types in the georeferencer and none of them gave the desired result. I kept the CRS set to the same one as the project (WGS84).

How can I align the raster in QGIS with a simple rotate and scale, without altering the aspect ratio?


texts: ArcGIS Workflows - choose from more maps when executing step

texts:
When I have created some workflow and use it as a job, there is a step that open a new map window for data editation. But I cant figured out how to offer to the user to choose from different maps to be suggested in this window:

My goal is to have these three maps to choose from this window.
When I edit the Step (ArcGISProSteps.OpenMap) properties, I found argument /map:<map_name>, which can be added many times. So I edit this argument like:

/map:roads_osm /map:roads_strees /map:roads_blank.

I also tried different formatting like

/map:"roads_osm" /map:"roads_strees" /map:"roads_blank"

or

/map:<roads_osm> /map:<roads_strees> /map:<roads_blank>.

But when I use this argument, ArcGIS Pro throws an error message when this step is executed: Maps roads_osm, roads_streets, roads_blank could not be found. But these maps are already imported into Workflow Manager Administrator.
I also found Job properties, there is a Map tab, but there I can choose only one map from drop-down list.
Does somebody some idea what I'm doing wrong with that?


texts: Returns a point interpolated along a line using geopandas

texts: Is there a function like Postgis ST_Line_Interpolate_Point in GeoPandas?


texts:
I want to visualize a road present in the OpenStreetMap.

Using OpenLayers, I try to do in the following way:

Take a set of co-ordinates which should represent the two sides of the road.
Join both the points on the map. (leads to a straight line)

Now, the problem with this approach is that it is just a straight line (obviously), what is the way of following the path along the road ?

Just a note that I'm not tied up with OpenLayers or anything. I can use any mapping library as long as it achieves this functionality.


texts: Worsened image quality and false colours after georeferencing

texts:
When I georeference a map of vegetation types (about 20 colours, each representing a certain vegetation) the quality of the georeferenced map is really bad and some colours have changed (e.g. black becomes white), which makes it almost impossible to recognise certain types.

I did the "usual" procedure: transformation type: linear, method: nearest neighbor.
For source I tried jpeg & tiff, same bad result.

Any suggestions how to improve the quality of the map and the originality of the map?

Thanks!


texts: Cell statistics sum resulting cells to indicate original input rasters

texts:
I have 5 rasters (habitat suitability models for 5 different species) that I have set to the value 1, I have then used the Cell stats (ArcGIS 10.0) to add the rasters together so I can see the overlap i.e. were 5 rasters overlap a corridor in that location would be better than in a place were only 2 rasters overlap.

What I want to do is have a field (s) added to the summed raster that tells me which of the original rasters overlap at that location. i.e. in location 1. the frog and bird raster overlap etc. this would need to be done for every cell in the final raster. I think maybe lookup or raster calculator but it is a bit beyond me and I don't want to go to vector...

There are a few similar questions on here but not exactly and I can't make them work


texts:
I made a PostgreSQL with PosGIS Extension DB with the pgsnapshot_schema and loaded an .osm.pbf-file with OSMOSIS into it.
Now i connected it to TileMill, but if i look up into the table i just see columns with the datatype of integer(id, version, User_id,changset_id). But i would like to use Tilemill with the hstore column to select the data and use it for the labels!
In TileMill i wrote into the Table or subquery: ways;
Geometry field: linestring
Does anyone know, how i can fix it easily?


texts: What happened to the sample Portland gp services?

texts:
I'm trying to use a sample asynch gpservice.

The Portland services ( http://sampleserver2.arcgisonline.com/ArcGIS/rest/services/Portland )
returns 500.

It is used as a reference implementation in the online doc:
http://resources.esri.com/help/9.3/arcgisserver/apis/rest/index.html?gpexecute.html

Does anyone know of an asynchronous gp service I can test against?

Thanks!


texts: How to Smooth Polygons after converting DEM using Raster to Polygon?

texts:
I have a DEM SRTM that I classify using Spatial Analyst Tools > Reclass > Reclassify.

The result is box shaped so I go to Layer Properties > Display and choose cubic convolution. The result is smooth (not box shaped).

Next I convert to polygon using Conversion Tools > From Raster > Raster to Polygon choosing Simplify polygon. Then the polygon output is boxshaped.

So how do I create smooth polygons like from cubic display raster ?


texts:
I'm trying to reproject an X,Y passed in from an Add-in.

So far this works fine:

pointGeometry = arcpy.PointGeometry(arcpy.Point(x,y),srIn,False, False)
projectedPoint = pointGeometry.projectAs(srOut)

Based on projectAs (spatial_reference, {transformation_name})

I should be able to pass in the transformation_name, but I have no idea where a list of constants may be (says it's a string)?

In .NET I would use 'OSGB1936_To_WGS1984_2', for the transformation I am after.


texts: Converting KML to TAB while maintaining the path to and name of embedded image

texts:
I have a number of kml files that have images linked in them. When I try to convert them to tab using FME/UniversalTranslator/QGIS/GlobalMapper I get a tab file which has the spatial location of the points but the attribute table does not include the name of the image. How can I get this? a process entirely in Mapinfo 12 will be ideal.

"<description>&lt;img src=&quot;MAPPT_20151210_110739_-1565318452.jpg&quot; width=&quot;480px&quot;/&gt;&lt;/br&gt;&lt;/br&gt;&lt;a href=&quot;MAPPT_20151210_110739_-1565318452.jpg&quot;&gt;To view original size of image file click RIGHT BUTTON and choose OPEN LINK.&lt;/a&gt;&lt;/br&gt;&lt;/br&gt;&lt;table border=&quot;1&quot;&gt;&lt;tr&gt;&lt;td&gt;Type&lt;/td&gt;&lt;td&gt;Tent&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Comments&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Maintenance Action&lt;/td&gt;&lt;td&gt;No action&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Post Material&lt;/td&gt;&lt;td&gt;Steel&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Sign Material&lt;/td&gt;&lt;td&gt;Aluminium&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Sign Condition&lt;/td&gt;&lt;td&gt;Good&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Post Installation&lt;/td&gt;&lt;td&gt;One post sign&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;User&lt;/td&gt;&lt;td&gt;John Kenna&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Logo&lt;/td&gt;&lt;td&gt;None&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Post Condition&lt;/td&gt;&lt;td&gt;Good&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Date/Time&lt;/td&gt;&lt;td&gt;10-12-2015 11:08&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</description>

So I need MAPPT_20151210_110739_-1565318452.jpg to be put in the "Image" attribute of the generated table along with all the other data in their own attributes.

I have seen similar questions here re: getting the extended data but none of them deal with getting the image name.

I have tried Global Mapper (my go to for this kind of work), QGIS, KML2SHP and FME. QGIS doesn't even separate the extended data (as per comments in How to convert KML to shapefile without losing attributes using QGIS?). The others do this but don't give me the image name.

The only "complex" solution I can think of is to convert to tab in GM Script and then read the kml in python and extract the value between [img src="] and [;] and put this into the tab as value for the image attribute. Surely there's a better solution!

Here a sample dataset -it has the kml, kmz and a shp plus the images. https://drive.google.com/file/d/0BxjBqNsSHofKQkRhWGtPamJTcmM/view?usp=sharing


texts: Show different marker for cluster and icon for single vector features in OpenLayers

texts:
I have a vector layer which is geoJSON file containing school points and their attributes,to visualize this i defined cluster and show circle which size is based on the number of features it contains. Whenever the zoom level reaches individual schools, i need to display symbol of school.

In style, i can define the size of cluster using the pointRadius property, and show icon using the externalGraphic property. i need to use both at once i.e use rendering as circle if cluster is more than one and render as icon in individual feautures.

How can i do this?


texts: QGIS3 error Python on launch, Ubuntu 16.4

texts:
I installed QGIS3 on ubuntu 16.4.

When I launch QGIS I get an error:

Impossible de charger PyQt. (Can't load PyQt)
Le support Python va être désactivé. (Python support will be deactivate)

Traceback (most recent call last):
  File "", line 1, in
ImportError: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.9' not found (required by /usr/local/lib/python3.5/dist-packages/PyQt5/QtCore.so)

Version de Python :
3.5.2 (default, Nov 23 2017, 16:37:01)
[GCC 5.4.0 20160609]

Version de QGIS :
3.0.0-Girona 'Girona', 0def61c

Chemin vers Python : (Path to Python)
['/usr/share/qgis/python', '/home/sangis/.local/share/QGIS/QGIS3/profiles
/default/python', '/home/sangis/.local/share/QGIS/QGIS3/profiles/default
/python/plugins', '/usr/share/qgis/python/plugins', '/usr/lib
/python35.zip', '/usr/lib/python3.5', '/usr/lib/python3.5/plat-x86_64-
linux-gnu', '/usr/lib/python3.5/lib-dynload', '/home/sangis/.local
/lib/python3.5/site-packages', '/usr/local/lib/python3.5/dist-packages',
 '/usr/lib/python3/dist-packages']

I can continue to use QGIS but I can't access the classic plugins list in the plugin menu (only 8 plugins available).

I tried to fix it by installing Qt5.9.

any idea how I can fix this error?


texts: What is the difference between Spatial predicates "Covers" and "Contains"?

texts:
I try to understand the Spatial predicates of the DE-9IM Intersection matrix. I don't get the difference between predicates Covers (respective CoveredBy) and Contains (resp. Within).

I try to draw geometries with JTS Topology Suite, they are always Covers = True and Contains = True (or both are False) but I don't manage to make them different, i.e. to see the difference between Covers and Contains. Does anybody have an example (preferably an WKT or a picture) which illustrate the difference?


texts: Workflow to manage different input files with rasterio

texts:
I'm switching from R to python's rasterio and would like to get your experience in how to best manage different input files. I want to do various calculations, but I'm facing a problem in aligning my rasters.
Goal: 'Aligning' different input files, so they can be read as arrays with the same shape.
In R, I would just create a template and then apply this to the different input files
country_template <- raster()
country_template <- setExtent(country_template, dimensions, crs etc)
...

slope<- projectRaster(slope, country_template,
       crs = 'xyz',res = yxz)

In rasterio, I have tried to use rio warp to get matching resolution and crs of the two input files, but my arrays still have different shapes.
I tried
command_string = 'rio warp {} {} --res {}'.format(os.getcwd()+input, os.getcwd()+output ,res)
os.popen(command_string).read()

ValueError: operands could not be broadcast together with shapes (1196,2264) (3764,6736)

How can I fix this?


texts:
I'm working on a script to automate the conversion of CAD .dwgs of rooms to feature classes, I'm nearing completion and am now working on the second portion of the script (I've seperated it into two modules as the first part takes about an hour to run and the second part should execute MUCH faster).  Part of the script involves adding two fields to one layer, and then joining it to another layer.

The problem is, when I execute "arcpy.AddJoin_management" the fields I added aren't in the attribute table.  Whats puzzeling is the fields show up when I crate a shapefile from the layer when I perform "arcpy.CopyFeatures_management" before I execute the join.

import arcpy
from arcpy import env
import os
import math

# Set the MTolerance to 0.02
arcpy.env.MTolerance = 0.02

# Set overwrite option

arcpy.env.overwriteOutput = True

#Set Workspace

arcpy.env.workspace = "in_memory"

#input dataset from part 2
converted_CAD = r"C:\Users\JOE.AWESOME\test_script_output\test.shp"

#create a minimum boundary geometry
arcpy.MinimumBoundingGeometry_management (converted_CAD, 'bounding_geom', 'RECTANGLE_BY_AREA','', '', 'MBG_FIELDS')

#create layers for an attribute join
arcpy.MakeFeatureLayer_management (converted_CAD, 'CAD_layer')
arcpy.MakeFeatureLayer_management ('bounding_geom', 'bounding_geom_layer')

#Add a field to the table for the difference between the Minimum Bounding Geometry and the CAD_layer area

arcpy.AddField_management ('CAD_layer', 'area_diffe', 'FLOAT')

arcpy.AddField_management ('CAD_layer', 'area_sqM', 'FLOAT')

#join the two layers for analysis

arcpy.AddJoin_management ('CAD_layer', 'FID', 'bounding_geom_layer', 'ORIG_FID')

#calculate the area of the polygons in the CAD_layer

arcpy.CalculateField_management ('CAD_layer', 'area_sqM', '!shape.area@squaremeters!', 'PYTHON_9.3')

arcpy.CopyFeatures_management ('CAD_layer', r"C:\Users\JOE.AWESOME\test_script_output\join_test.shp")

I've tried changing them to a FLOAT from a DOUBLE, but that didn't change anything.  I'm stuck, maybe it's something little.  In the words of Michael Bolton, "I always miss some mundane detail."


texts:
Hello has anyone got experience running i.landsat.toar ?

The output files I get are empty, the command takes but a moment to complete. However when run in verbose mode all the calculations are done, it just does not complete the filling of the raster.

I am working on Win7 with GRASS7SVN. I am processing Landsat 5. I have taken care to reproject the images properly since there is incorrect metadata for Landsat in the southern hemisphere. The file paths are short and space free.

I note the following, but these don't appear to be directly related to my problem.

https://trac.osgeo.org/grass/ticket/1183

http://lists.osgeo.org/pipermail/grass-user/2010-September/057803.html

and the latest manual at

https://svn.osgeo.org/grass/grass-addons/imagery/i.landsat.toar/description.html

Any thoughts appreciated.

Some output;

BAND 5  (code 5)
   calibrated digital number (DN): 1.0 to 255.0
   calibration constants (L): -0.370 to 30.200
   at-surface radiance = 0.12035 * DN + 0.48667
   mean solar exoatmospheric irradiance (ESUN): 220.000
   at-surface reflectance = radiance / 60.70201
   the darkness DN with a least 100 pixels is 1
   the mode of DN is 0
-------------------
 BAND 6 thermal  (code 6)
   calibrated digital number (DN): 1.0 to 255.0
   calibration constants (L): 1.238 to 15.303
   at-surface radiance = 0.05537 * DN + 1.18263
   at-sensor temperature = 1260.560 / log[(607.760 /
radiance) + 1.0]
-------------------
 BAND 7  (code 7)
   calibrated digital number (DN): 1.0 to 255.0
   calibration constants (L): -0.150 to 16.500
   at-surface radiance = 0.06555 * DN + 0.16508
   mean solar exoatmospheric irradiance (ESUN): 83.440
   at-surface reflectance = radiance / 23.06338
   the darkness DN with a least 100 pixels is 1
   the mode of DN is 0
-------------------
Calculating...
Writing reflectance of <5_9384_20101227_1> to <5_9384_20101227_toar_1>...
Writing reflectance of <5_9384_20101227_2> to <5_9384_20101227_toar_2>...
Writing reflectance of <5_9384_20101227_3> to <5_9384_20101227_toar_3>...


texts: Export multiple layers in ArcMap 10.1 and change each layer's source to exported data

texts:
A client has requested the MXD and relevant data for a particular map. The file contains over 40 layers across multiple data frames and references multiple geodatabases and shapefiles.

Is there a bulk method for exporting each layer (in view extent) to a local geodatabase and changing the source for that layer to the exported data? Is there a better way of packaging a map?


texts: BoundGlobalError when submitting a Task (Descartes Labs)

texts:
I have written a deployment function to run using Descartes Labs' Task module. My Task group definition is:
# define a new task group
tasks = dl.Tasks()
async_func = tasks.create_function(
    f=save_training_samples,
    name='get-training-timeseries',
    image='us.gcr.io/dl-ci-cd/images/tasks/public/py3.7:v2021.01.27-1-g371bb0bf',
    maximum_concurrency=10
)

When I run the asynchronous function in a for-loop over a list of points at which to pull imagery, I get the error:
BoundGlobalError: Illegal reference to one or more global variables in your function: ['dl', 'get_features', 'get_sentinel2_cloudmasked', 'gpd', 'np', 'pd', 'pickle']
What does the error mean? get_features and get_sentinel2_cloudmasked are other functions in the Jupyter notebook.


texts: Converting multipolygon data to polygons?

texts:
I have a data set in Excel with several rows represents different polygon information. Polygon coordinates are provided in one columns as "Multipolygon". Example of one "Multipolygon" is given below;

MULTIPOLYGON (((145.7628 -36.5212, 145.7628 -36.5212, 145.7628 -36.5212, 145.7628 -36.5212)))

I want to import these data as polygon data set in ArcGIS Desktop.


texts: What is priority in mapconfig_for_cars.xml of osm2pgrouting?

texts: I am new user to pgrouting. I wonder what the meaning of "priority" value means? By default, the values are 1, 1.05, 1.15, 1.5, etc. How to calculate it and why it becomes a value. Also, is this value the same as the penalty value that can be used in routing queries with Dijkstra?


texts: Saving each feature in PNG format along with map canvas in certain scale using PyQGIS

texts:
I want to export each feature by zooming to certain scale (eg 1:25000 where feature will be inside map canvas) and save into PNG format. I know function
iface.mapCanvas().saveAsImage("image_path")

but how to iterate each feature with fix scale value.


texts: Arcgis Javascript latitude and longitude convert to WGS_1984_UTM_Zone_36N

texts:
I am using Arcgis Javascript api. I have two points comes from Google maps like this
x:-111.67095840000002 y: 32.7558935
I wanna use this points on my Arcgis map. My map spatial reference is using wkt WGS_1984_UTM_Zone.... I mean it is not using wkid.
theX = results[0].geometry.location.lng();
theY = results[0].geometry.location.lat();

console.log("Longitude: " + theX + " Latitude: " + theY);

var pointESRI = new Point(Number(theX), Number(theY), map.spatialReference);
console.log(pointESRI);

var mp = WebMercatorUtils.geographicToWebMercator(pointESRI);
console.log(mp);

pointESRI = new Point({ "x": mp.x, "y": mp.y, "spatialReference": map.spatialReference });

WebMercatorUtils.geographicToWebMercator() methot not converting point as appropriate to WGS84 reference.


texts: Buffer that isn't centered on attribute and angled opposite of the groundwater flow direction?

texts:
I'm using ArcGIS 3D Analyst 10.5.0.

I used a groundwater potentiometric surface raster to calculate flow direction in a "springshed" (the groundwater version of a watershed). Now I want to use this flow direction to create a shapefile of "contributing zones" for a set of groundwater wells using this direction.

I have some average groundwater velocities that I will use to roughly estimate a 1-year capture zone size, e.g. a darcy velocity of 10 cm d-1 would lead to 1-year capture zones that extend 36.5 m in the direction opposite of groundwater flow.

Now I want to use my rough estimates of distances of my 1-year capture zone along with my flow direction to create a capture zone for each well. My idea was to create buffers "upstream" from groundwater wells, then somehow angle them in the direction opposite of groundwater flow. I've read through threads explaining how to create square buffers, but I can't find any information for creating buffers that do not center on the attribute or how to angle the buffer using my direction values.

Is buffer the way to do this?


texts: How to get the path of enterprise geodatabase stored in sql server?

texts:
I want to enter a geodatabase in a ListVersions tool.Output will be list of versions in a table.
Do i need to give a connection file path for Enterprise_GDB:__
or path of actual GDB. and  how????
I am getting an error. Tool is not working successfully...


texts:
I want to add some points that represent coordinates (in shapefile) onto geotiff image which is earth basically. I used command line:

gdal_rasterize -burn 200 -ts 1000 600 -ot byte -l point point.shp land.tiff

but this just gave me a black backgrounded image with red dots. I'm new with gdal and gis so maybe my way could be a little bit wrong. Maybe ı should use gdal_grid but ı don't know how


texts: Exporting data from .mxd file to SQL Server database using C#?

texts:
I am using ArcGIS product (v.10.1). I have also tempalte of Maps from ArcGIS. But i need to get data from maps (.mxd files) to store it into MS SQL database.
Explanation: I have application that has map in it's window. When i click on some city on map i get name of the city and it's coordinates and save them into DB. Problem - i need to have list of cities in database before i click on map to make some custom autocomplete for textBox.

I read some articles about getting data using Python, but i don't know this language.
Any advices how to export data from mxd files?

Note:
I am using C# to work with data.


texts:
I want to make a rule-based style on the maximum value from a field. I set my expression like:

max("fieldname")

It returns every value instead of only the maximum one.

Can anyone tell me the right syntax for this?


texts: Generating TIN from DEM using MacOSX/Unix tools?

texts:
I'd like to generate a 3d terrain model moving from a DEM dataset (currently in shp and GeoTIFF format).

As far as I understand it, the first step of the better path would be generating a TIN, but I can't find the way to do.

I found a lot of references to ArcGIS 3D Analyst, but no tools in MacOSX/Unix world.

Are there any?


texts: How can I use a custom .ui file (widget) as a popup in qgis2web?

texts:
I am exporting a map with qgis2web with popups. I have seen that I can make attributes and their labels show up on the popups. The problem is that I want to add a custom widget I created in QT designer.

I have used in QGIS "layer">"properties">"Attributes Form" and then "Provide ui-file" to create a point with my widget, but when I export it with qgis2web the popup appears blank.

I am exporting as OpenLayers, not Leaflet.


texts:
Is there a map projection (or a more appropriate term) which allows you to see every country as an equally sized land area, but positioned approximately in the correct geographic position?

Water could still be incorporated as it shows continental separation, etc.


texts:
I'm using Q gis and my question is, how come you can only use split parts tool on a polygon once?
The second time throws an error of "Geometry is invalid". What if i want to split a polygon into 3 separate parts?
I've found one question like this, where the guy moved away the split polygon, but i need to keep the geometry as is, only have 3 parts of a single polygon.
Using QGIS 3.10
EDIT:
Before:

After: (The green line is the second split i need.)

Thanks


texts:
Is there a way to import google maps into ArcMap as a raster, vector, WMS or other format layer? I need to use/manipulate the data within ArcMap as Googlemaps does not have the necessary tools.

I tried using the googlemaps engine connector but it doesn't seem like it would let you do this. I've even been thinking about capturing several screens and georeferencing them as TIF files but this would prove very tedious. I just need a quick and simple way to upload a googlemap of a certain region into Arcmap.


texts: Estimating direction of travel of road line segment based on long/lat in PostGIS?

texts:
Well, this seems pretty simple but haven't been answered cleanly in previous relevant questions for example:

Identify the direction of traveling road segment and
Finding compass direction between two distant GPS points?

I have a large dataset of road network (multi-linestrings) of an area of interest converted to linestrings using ST_Dump(). For each linestring, I would like to estimate "the direction of travel" (north to south, east to west and vice versa) based on extracted X,Ys. Two sample linestrings are shown below.

For the above sample linestrings, ST_StartPoint() and ST_EndPoint() return the start and end points (Xs, Ys) of the same. Based on these X,Ys (long/lat), how do I estimate the direction of travel of these linestrings?

UPDATE

Assuming that I have my area of interest in the northern hemisphere. Following diagram may "represent" the "direction of travel" (from north to south).


texts: Spatial Autocorrelation tool vs. Incremental Spatial Autocorrelation

texts: When you run the Spatial Autocorrelation (Monrans I) tool, you have the option of setting 'Conceptualization of Spatial Relationships'.  This option isn't available for the Incremental Spatial Autocorrelation tool.  Aren't these two tools doing the same thing, except one is a one-time process and the other adding defined distance increments for a number of cases?  If so, what is the 'Conceptualization of Spatial Relationships' being used in the Incremental tool?


texts: Set TIFF's location creating raster with GRASS

texts:
I'm trying to create a raster with GRASS using the command r.in.gdal input="landsat-image.tiff" output="landsat-image.output" but I am getting this error:

Locação PROJ_INFO é:
name: NAD27(76) / MTM zone 12
ellps: clark66
proj: tmerc
lat_0: 0
lon_0: -81
k: 0.9999
x_0: 304800
y_0: 0
no_defs: defined
init: EPSG:2021

PROJ_INFO do conjunto de dados é:
name: WGS 84 / UTM zone 23N
datum: wgs84
ellps: wgs84
proj: utm
zone: 23
no_defs: defined

ERROR: proj

I can only create the raster overriding my projections above the image using flag -o in the parameters, but I don't want to do that. I want to know if I can create the raster using the same image's.


texts: Projecting map from overlay and tile for server?

texts:
I am not from the geographic field and am having issues finding the correct words to feed google, or this really hasn't been asked before.

Simply put:

I have a map in a bunch of KMZ files.
I want to cut them into tiles of different sizes so that my tile server can serve them to applications as overlays.
Creating an image overlay is not a solution because I receive out of memory errors on my mobile device.

Specifically:

The KMZ files are really ZIP files and contain 9 PNG files and 1 KML file
The PNG files are visually aligned on the map in the following manner:

A1 | A2 | A3
____________
B1 | B2 | B3
____________
C1 | C2 | C3

The KML file contains placement information of files A1-C3
The KMZ files do not all cover the same amount of area (some are bigger some smaller) and the placement information is not the same for all KMZ files and their contents (the top-left top-right bottom-left bottom-right are not always rectangular, they may be stretched).

I have tried stitching the images together using java commands BufferedImage and Graphics2D but have noticed that they are stretched and don't fit exactly one into the other and leave spaces between the images. I assume this is because the earth is round and I am trying to do this on a plane.

I have thought about creating a canvas and projecting the images to their lat/lng positions and then creating an image of that.

Is there a program that does the tiling for me and how do I preprocess the KMZ files so that the program can use the images?

I don't know how to proceed.

How could I go about this?


texts: CartoDBfy'ed Table not appearing in editor on local environment?

texts:
I'm trying to create data tables by SQL and visualize them by CARTO editor.

But between my local and CARTO environments, the results of CartoDBfy were different : local was failed and CARTO was success.

What is the different between each environments?
And what should I do to deal with the table in CARTO editor?

Details are bellow.

1. Local Environment

I built the development CartoDB environment on cloud server, according to 'http://cartodb.readthedocs.io/en/latest/install.html'.
The installation was finished successfully and I can use CARTO without problems.

Then I created and CartoDBfy'ed a table like this

CREATE TABLE public.test (
    cartodb_id INTEGER,
    the_geom geometry(Geometry,4326),
    the_geom_webmercator geometry(Geometry,3857),
    code character(4) NOT NULL
);

SELECT cdb_cartodbfytable('test');

These queries were finished successfully. The returned message was bellow.

  {"rows":[{"cdb_cartodbfytable":"test"}],"time":0.068,"fields":{"cdb_cartodbfytable":{"type":"regclass"}},"total_rows":1,"notices":["trigger
  \"track_updates\" for table \"test\" does not exist,
  skipping","trigger \"update_the_geom_webmercator_trigger\" for table
  \"test\" does not exist, skipping","trigger \"test_quota\" for table
  \"test\" does not exist, skipping","trigger \"test_quota_per_row\" for
  table \"test\" does not exist, skipping"]}

But the table NEVER appeared on the Datasets dashboard.

2. CARTO Environment

I executed same queries in my CARTO Account(xxx.caro.com) via SQL API, they were finishing successfully with the same message and APPEARED in the dashboard.


texts:
When normalizing a lasCatalog, the processing stops early with the following error:

An error occurred when processing the chunk 22. Try to load this chunk with:
 chunk <- readRDS("/tmp/RtmpdcuTUO/chunk22.rds")
 las <- readLAS(chunk)
No ground point found in the point cloud.

I understand this to be a problem with the raw point cloud, however might it be fixed by adding a larger buffer (currently using 100m)? If it can't be remedied, then I would like to simply ignore this "bad" chunk and continue to process the remaining chunks. Does lidR support this out of the box? Or do I need to create a custom catalog_apply() to catch the error and move on?


texts: Error adding row - sequence size must match size of row

texts:
I have this table with one row

timestamp_pretty   3.1.2014 9:13
timestamp          1,38874E+12
msgid              3
targetType         A
mmsi               205533000
lat                53.4346
long               14.580546
posacc             0
sog                0
cog                319.5
shipType           CARGO
dimBow             68
draught            4
dimPort            6
dimStarboard       5
dimStern           12
month              1
week               1
imo                8404446
country            Belgium
name               FAST JULIA

I want to make a point feature class from arcpy using insert cursor:

# Read the csv
csv.register_dialect("xls", lineterminator="\n")
f = open(incsv, "r")
reader = csv.reader(f, dialect = "xls")

# Add fields to fc
desc = arcpy.Describe(incsv)
for field in desc.fields:
    arcpy.AddField_management(outfc,field.name,field.type)

# the fieldnames
fields = desc.fields
fieldnames = [field.name for field in fields]

 # Create InsertCursor.
cursor = arcpy.da.InsertCursor(outfc, ['SHAPE@XY'] + fieldnames)
count = 0
next(reader, None) # skip the header
for row in reader:
    if count % 10000 == 0:
        print "processing row {0}".format(count) + " of " + table
    Ycoord = row[5]
    Xcoord = row[6]
    newrow = [(float(Xcoord), float(Ycoord))] + row[0:]
    cursor.insertRow([newrow])
    count += 1
del cursor
f.close()

But I get this error:

line 130, in <module>
    cursor.insertRow([newrow])
TypeError: sequence size must match size of the row

I've been through SE similar answers and made many tests (days) but to no avail.

****EDIT****

If I print the result of newrow and row[0:] like this:

newrow = [(float(Xcoord), float(Ycoord))] + row[0:]
print "new row: "+str(newrow)
print "row[0:]: "+str(row[0:])

*EDIT 2 *
name and type use for create feature class

[u'timestamp_pretty', u'timestamp', u'msgid', u'targetType', u'mmsi', u'lat', u'long', u'lat_D', u'long_D', u'posacc', u'sog', u'cog', u'shipType', u'dimBow', u'draught', u'dimPort', u'dimStarboard', u'dimStern', u'month', u'week', u'imo', u'country', u'name']
[u'Date', u'Double', u'Integer', u'String', u'Integer', u'String', u'String', u'Double', u'Double', u'Integer', u'String', u'String', u'String', u'Integer', u'String', u'Integer', u'Integer', u'Integer', u'Integer', u'Integer', u'Integer', u'String', u'String']

I get this result:

new row: [(14.580546, 53.4346), '03/01/2014 09:13:26', '1388740406000', '3', 'A', '205533000', '53.4346', '14.580546', '0', '0', '319.5', 'CARGO', '68', '4', '6', '5', '12', '01', '01', '8404446', 'Belgium', 'FAST JULIA']
row[0:]: ['03/01/2014 09:13:26', '1388740406000', '3', 'A', '205533000', '53.4346', '14.580546', '0', '0', '319.5', 'CARGO', '68', '4', '6', '5', '12', '01', '01', '8404446', 'Belgium', 'FAST JULIA']

I now, newrow has 22 fields (counting the coordinates in the beginning) and row[0:] has 21. Is that the error? If so why did it work in the original script I got from @John?


texts: Alternatives to ogr2ogr for loading large GeoJson file(s) to PostGIS

texts:
I have a 7GB GeoJson file that I would like to load into a PostGIS database.  I have tried using ogr2ogr but it fails because the file is too big for ogr2ogr to load into memory and then process.

Are there any other alternatives for loading this geojson file into PostGIS?

The ogr2ogr error I get is:

  ERROR 2: CPLMalloc(): Out of memory allocating -611145182 bytes. This
  application has requested the Runtime to terminate it in an unusual
  way. Please contact the application's support team for more
  information.


texts: Regrouping raster values from range to one value using GRASS GIS?

texts:
Using GRASS GIS is there a way to give a certain value for 3D raster cells that fall within a certain range, whether it's by using module (reclass, recode, r3.mapcalc)?

Another alternative would be to export the 3D raster as a point file and do this using MS Access, but I have not found a way to export a 3D raster as an xyz file (it is possible with a 2D raster).


texts: Bringing Feature Selection To Top using ArcObjects?

texts:
I'm using IFeatureSelection.SelectFeatures() to select parcel polygons in my parcel layer.

It works fine until I create a ClassBreaksRenderer to apply a color ramp based on a field in the feature.

The selection proceeds without error but does not draw on top of the renderer.

Is there a way to ensure that the feature selection draws on top?


texts: Why is the exterior shell of this GeoJSON invalid?


texts:
I want to digitize features in QGIS from an orthophoto and set the z-value of each node from a dsm/dtm.

What is the best workflow for this?

The solution might be to simply set what layer the vector features should inherit their z-value from but as far as I have seen this is not possible?

Is there work being made in this area?


texts: Geopandas [Shapely] spatial difference: TopologyException: no outgoing dirEdge found

texts:
I am working on the "solver" that sequentially selects best location from the list, basing on poi and overlapping polygons within the certain buffer, then removes those points and location from the loop, subtracts buffer for the selected location from buffers for all remaining locations, and starts again, looking for the next location.

In terms of tools, I use py2.7 and geopandas, which, in its turn, uses shapely -> geos.

It works fine, until at certain moment stops with the following error:

TopologyException: no outgoing dirEdge found at 37.584887352337432 55.775210354236364
TopologyException: found non-noded intersection between LINESTRING (37.8155 55.7494, 37.8155 55.7496) and LINESTRING (37.8156 55.7495, 37.8154 55.7496) at ...

Basing on suggestions, I tried to use .buffer(0) and even with a very small amount - it didn't help, and I am totally lost...


texts: GeoPandas Overlay Symmetric Difference: How to get the upper polygon

texts:
I have the following code which get the difference of a pie wedges.

c= gp.overlay(a,b,how='symmetric_difference')

How to get the upper polygon?


texts: Convert absolute file path to raster databaset

texts:
I wrote a simple python script that outputs an absolute path as string to a GeoTiff file. So this file can be treated as Raster.

In a Model, the GeoTiff file is to be the input raster of a CopyRaster arctool procedure. I dragged the python script in the Model and realised CopyRaster only accepts Raster Dataset as input but not the string.

How can I make the python script work the CopyRaster tool?


texts: QGIS & PostGIS: Layer not valid - not loaded

texts:
I've been having some issues with PostGIS and QGIS.
I'm trying to connect to a PostGIS database, and retreive a layer called MargamParkMap (in Schema MargamPark)

No warning triangle (like the views - I get why that is - no Primary key, that's not my problem) - should be fine right?

Wrong.
Now - the error would appear to be because key="", rather than having an actual value. But the table has a primary key!
So - why is QGIS ignoring the primary key in the layer? It has one, why not use it!?
:EDIT:
For some reason, if I create a new project (not even close and reopen QGIS) it works.... But then sometimes, it doesnt, straight after it working.


texts: QGIS Load tiles from local TMS using XYZ Tiles

texts:
I have exported the map tiles with the Raster tool box, and saved the tiles in the QGIS default temp folder with 512x512 resolution and 96 dpi.

Now I'm trying to load the tiles back to QGIS. After some reading, looks like XYZ Tiles is the best way to go. However, after loading, the map images do not show up in QGIS.

The URL that I entered was:
file:////var/folders/j8/_8nfnqv119n7_wswhm_5bhwr0000gn/T/processing_501b13906436489496768b2c01c2497a/c5bcb3f8e6be499bb887621a56ea2ce3/OUTPUT_DIRECTORY/{z}/{x}/{y}.png

I also tried the following according to the answer in this post. But both of them do not work.
file:////var//folders//j8//_8nfnqv119n7_wswhm_5bhwr0000gn//T//processing_501b13906436489496768b2c01c2497a//c5bcb3f8e6be499bb887621a56ea2ce3//OUTPUT_DIRECTORY//{z}//{x}//{y}.png

My QGIS version is 3.10.10, and I use MacOS.


texts: Add SimpleMarkerSymbol and then remove it upon next click

texts:
My map has some markers and when I click to identify a marker, I'm adding a marker to it.  When I click the next marker though, I'd like for the previous marker to be removed since I'm only interested in the more recently identified element.

I'm using the legacy modules, JavaScript API.

    var symbol = new esri.symbol.SimpleMarkerSymbol(esri.symbol.SimpleMarkerSymbol.STYLE_SQUARE, 18,
        new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,
        new dojo.Color([0,0,0]), 1),        // border color
        new dojo.Color([255,255,0,0.80]));  // fill color
    App.map.graphics.add(new esri.Graphic(queryResults[0].feature.geometry, symbol));


texts: Clip using Discard and Preserve option in QGIS

texts:
I am currently using QGIS, but it seems like there is no option like in ArcMap for Cliping polygons where I can choose if I want to Discard or Preserve selected area.
Can you help me with that?


texts:
Has QGIS 1.7 been released as a stable version yet?

I see on the QGIS site the windows download on the is still referring to 1.6 and the OSGEO4W install has 1.6.0-7 as the stable release.

I had seen some links here and here among others which referred to March/April for a release. I'm not unhappy with the timeline, I'm just curious that I might have missed something.

Thanks

Ando


texts: Calling a variable in SelectLayerByAttribute

texts:
I am trying to code a Python add in for ArcGIS 10.2. I have a shape called FACILITIES which contains facilities, a field CATEGORY and I wish to select all the entities that are categorized as "school"
In order to populate a ComboBox into that addin, I use the SelectLayerByAttribute tool, as follows :

arcpy.SelectLayerByAttribute_management("FACILITIES", "NEW_SELECTION","CATEGORY = '" + "school" + "'")

It is working properly. But I wish the category to be variable. So I tried like this :

SelectedCategory = "school"
arcpy.SelectLayerByAttribute_management("FACILITIES", "NEW_SELECTION","CATEGORY = '" + SelectedCategory + "'")

But even though it seems very similar my Combobox fails to launch.

What am I doing wrong ?


texts: How to perform a clean re-installation due to dll errors

texts:
Following a virus, Qgis won't run and errors saying missing dll.  I manually replaced the first missing dll but it now complains about a second one.  I suspect that if I simply replace this one it will just keep complaining about them all.
I have tried to remove and reinstall Qgis but this didn't fix the problem.
Is there a way to clean de-install?
Or a quick way to replace all the dlls?
Thanks
Graham


texts: QGIS 3.10.13 (64-bit) on a Asus laptop with Windows 10 is running EXTREMELY SLOW - looking for suggestions

texts:
I am using: QGIS 3.10.13 (64 Bit)
My machine: OS: Windows 10 Home, version 20H2, OS build 19042.746
Installed RAM: 12.0 GB ( 11.9 GB usable)
Processor: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz, 2201 Mhz, 6 Cores
Graphic card: NVIDIA Geoforce GTX 1060
Device: Asus Tuf Gaming FX504 Series
All the data is on my laptop. I am not using any data located on a server and I am not connected to a server.
I had QGIS 3.4 installed on that same laptop for a whole year. It worked fast and was very stable. I updated to 3.10.4 and it suddenly became very slow. The software and projects open fairly fast, but almost everytime I click on a menu Item or an Icon in QGIS it takes 20-100 seconds for  the software to respond. Often I also get the message that qgis-ltr-bin.exe is not responding.
Here is what I tried so far:
Uninstall 3.10.4 and re-install 3.4 - the issue did not get fixed.
Uninstall 3.4, install 3.10.13 and clear the user profile in the App data/ roaming/ Qgis/ Roaming folder - the issue still remains. I have tried this 3 times and QGIS still ends up being very slow.
I have tried opening different projects and creating new projects. QGIS still seems to run very slow and makes it impossible to accomplish my GIS based work.
I do not know what else to try. Would anyone have any suggestions what to check for?


texts: Transforming a list of addresses into multiple shapefiles

texts:
I'm willing to create an electoral map from the complete list of addresses of a city (Rome, Italy). I have data (.csv) that relate each address (road and civic number) to an electoral section.

I thought that I should group together into a single shapefile all addresses of each section, but I crashed into an obvious problem: geocoding (via a python script) of such a large number of addresses causes all web geocoding services to stop working for the excessive amount of requests.
Is there a way work around this, perhaps downloading the whole bunch of address data for the area I need and then geocoding the addresses offline? Which software can I use to geocode offline?

A second problem, that is marginal as long as I don't manage to solve the first one, is this: even if I had said coordinates, I wouldn't be able to join them together into shapefiles. Any advice on this, too?


texts: Layer not generating correctly when running Raster Fillnodata in QGIS

texts: Using QGIS 3.4.5 I am attempting to fill a landsat 7 band raster layer as the image contains diagonal lines because of the scan line corrector issue. I'm using the raster analysis no fill data tool but the layer does not generate correctly as the screen shot below. I've tried altering the setting to every conceivable combination but no success.


texts: Consuming GeoServer UTFGrid output in OpenLayers 3 ol.source.TileUTFGrid results in error processing response object

texts:
GeoServer now supports UTFGrid outputs for layer services.  This is great however the support for consuming them seems incomplete in OpenLayers 3. I set up a simple map to attempt this but can't get it to work. The issue seems similar to this question however I have done the steps recommended and am still getting the same error.

Here are some details:

I'm making a request in OpenLayers 3 like this:

var geoserverGrid = new ol.source.TileUTFGrid({
        tileJSON: {
            "jsonp": true,
             "attribution": "",
            "bounds": [-180, -85.05112877980659, 180, 85.05112877980659],
            "grids": ["http://localhost:8080/geoserver/topp/wms?service=WMS&version=1.1.0&request=GetMap&layers=topp:states&styles=&bbox=-124.73142200000001,24.955967,-66.969849,49.371735&width=768&height=330&srs=EPSG:4326&format=application/json;type=utfgrid"],
            "maxzoom": 8,
            "minzoom": 0,
            "scheme": "xyz",
            "tilejson": "2.0.0",
            "tiles": ["http://localhost:8080/geoserver/gwc/service/wmts/?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=topp:states&STYLE=_null&TILEMATRIXSET=EPSG:4326&TILEMATRIX=EPSG:4326:{z}&TILEROW={y}&TILECOL={x}&FORMAT=image/png"],
            "version": "1.0.0"
        },
        "jsonp": true,
  });
var geoserverGridLayer = new ol.layer.Tile({source: geoserverGrid});
var map = new ol.Map({
    layers: [
         geoserverGridLayer
    ],
    target: 'map',
    view: new ol.View({
      center: [0, 0],
      zoom: 2
    })
  });

The response from GeoServer looks like this:

{
"grid": [
"
     !!
",
"
####################$$$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&&&&&&&&&&&&&&&&&&&&&&&&!!!!!!!!
",
"
...... I CUT THIS RESPONSE OFF TO SAVE SPACE IN THIS POST

The error that is thrown in the console is:

Uncaught SyntaxError: Unexpected token:

Which on closer instpection is pointing at

"grid":

For clarity's sake I looked at the layer source response from this official OpenLayers 3 UTFGrid example and noticed that the UTF object is NOT wrapped in a "grid" property. In fact, it looks a lot different.  You can see the MapBox request here.

What I am seeing from these two responses is a completely different format being used for ol.source.TileUTFGrid.

In the question I mentioned above @ahocevar said:

  the current implementation of ol.source.TileUTFGrid is not perfectly suited for use with GeoServer. It would have to be made more flexible in terms of configuration options.

I had hopped that @ahocevar response would be fixed with the pull request mentioned in that same question but It appears that is not the case. It's very possible that I am doing something wrong.  Can anybody verify that I am indeed setting up this layer correctly and that this is (as presumed) an issue where OpenLayers 3 just doesn't support GeoServers UTFGrid output format yet?


texts:
I need some help to produce histograms regarding my data about an algae density collected in 8 sampling sites, 4 times a year, for 5 years.

I would like to analyse them, underlining the differences in density, for each site, both among times and years but I don't know how to do this.

I can create a layer for each considered year but I'm not able to see how to compare with histograms the density among years for each site.


texts: How to change GDAL version in QGIS to get ECW import to work

texts:
I’ve previously been successful in importing ecw into QGIS 2.0 but the same methods (for example How to add *.ecw files to QGIS 2.0 on Windows?) have failed with a fresh install of QGIS 2.2 with OSGeo4W on W7 64. Seems to be a GDAL version issue. The OSGeo4W shell tells me I have GDAL version 1.11 but this new installed QGIS is “compiled against GDAL/OGR" version 1.10 according to 'about'. I’ve successfully got the ecw format listed by ‘gdalinfo –formats’ but that’s version 1.11 which I assume QGIS 2.2 can’t see. I note that OSGeo4W64/bin has both gdal110.dll and gdal111.dll. How do I force QGIS to use gdal 1.11 and not 1.10 and so be able to read ecw rasters (which I assume is the problem)? Any ideas gratefully received.

Thanks for the response nmtoken. I find that I have a different folder structure from my fresh QGIS2.2 install from OSGeo4W which has no less than 50 gdal files (from “gdal_auth.bat” to “gdalwarp.exe”) in C:/OSGeoW64/bin and one file “gdal_ECW_JP2ECW.dll” which is in C:/OSGeoW64/bin/gdalplugins. No “gisinternals” folder exists for me. I have followed the instructions on the GDAL website and also other answers on gis.stackexchange by manually copying the various ERDAS_ecw_SDKfiles to the appropriate folders. This worked with QGIS2.0 but fails with QGIS2.2. I've put C:/OSGeo4W/bin as the path in the Gdal Tools executables  dialog box but QGIS2.2 still fails to recognise ecw rasters. Has anyone successfully imported ecw rasters in QGIS2.2? If so, could they let me (and others) know how they did it!

Success! QGIS2.2 64bit now importing all my ecws perfectly. Andre Joost's advice to manually roll back the default Gdal1.11 to Gdal1.10 and reinstall using the OSGeo4W advanced options works. How many users would have worked this one out for themselves I wonder? Either OSGeo4W should default to Gdal1.10 on express install or QGIS should compile against Gdal1.11.


texts: Loading rasters from a GeoPackage into QGIS modeler based on attribute information?

texts:
I am looking to load raster layers from a GeoPackage based on strings of attribute information that is stored in a field. The process I am looking for is as follows:

Site Boundary created before the model is used as a model input.
10km Tile (OS data) ready for use as a model input.

Buffer of site boundary to create generate area of interest to select tiles.
Intersection of buffer with 10km tiles generates attribute information for 'Tile name'
'Load layer into project' - identifies multiple tiles based on 'Tile name' to add to the project.

I am stuck with getting the 'Load layer into project' to add layers from a GeoPackage and have not been able to achieve this even for an individual raster layer in a GeoPackage.

I am using QGIS version 3.8


texts:
Here I have a point at the line with an X/Y coordinate.  It also has a leader line to it.  This leader line has an X2/Y2 coordinate.  Both of these coordinates are in the same attribute table.  Then, I have another attribute "A".  The fields in "A" are different numbers.  Each point maybe have a similar or different number.
I would like the to have the label "A" displayed from the X2/Y2 coordinate.

I don't have much experience with VBScript or Python.

Within my attributes, I have an X and Y coordinate.  I would like to turn on a label from these coordinates.  The unique part is that these coordinates were created from a leader line of the original symbol.  We now want to put the label within the symbol.  The new X/Y coordinates are the exact center of where to do this.

The attributes I would like to use are A, X, and Y.


texts: How to digitize infrared slides for use in GIS?

texts:
I have an aerial infrared slide with the following dimensions 20cm x 30cm. It was captured with an infrared camera from a height of around 3000m a few years back and now my environmental agency would like to digitize it for further analysis in GIS. I have until now had no experience with either infrared imagery or digitization of slides so the first thing I did was to put in into our flatbed scanner and see what came out. The image is dark! By manipulating histograms of the red/blue/green channels using The Gimp I can create a few outlines and increase detail a bit, but it is really still showing nothing.

Can anyone put me on the right track as to either how to scan this sort of document or how to manipulate the pixels using photoshop or similar software?

A few pictures to set the context are below:

600dpi Scan without manipulation

With pixel manipulation


texts: How to calculate the perimeter of the polygon using python programming

texts:
Is it possible to calculate the perimeter of each feature of the polygon?

For calculating the area we are using:

area=feature.geometry().area()

is there any function to calculate the circumference?


texts:
We're attempting to download and run the CartoDB stack on an Ubuntu Amazon EC2 instance dedicated just for it. So we've begun from a bare bones OS install.

We've gone through the install/configure README (https://github.com/CartoDB/cartodb) and got through most of it without too much of an issue. But when it comes time to figuring out how to actually run the thing, we're at a loss. The readme doesn't even seem to explain how you're supposed to run the stack perpetually as a service, or even as separate components side-by-side.

The closest it seems to come is suggesting foreman but even that has come to a convoluted cluster**** of dependency issues to where I can't even add it to the gem bundle as described (and it doesn't help none of us have Ruby experience)

Do you have any pointers on where to go from here?

Even Google is utterly failing me at this point.