texts: Getting scipy.cKDTree to return everything with a given meter radius

texts:
I want to find everything within a 0.1 meter radius.
I'm confused on exactly how query_ball_point is getting distance. I'm using decimal degree coordinates when creating the cKDTree, ie. [(-73.52610659993773, 40.99738620279574), (-73.52610659993992, 40.99738620279341), etc].
This currently works in my real life use cases but it was just testing different numbers until it did. I read the cKDTree documentation and I'm having a hard time understanding how it's getting the distance and how different units come into play. I feel like I might be overthinking this but was hoping someone could give some clarity for someone with no understanding of geography.
new_tree = spatial.cKDTree(decimal_degree_coords)
found_points = new_tree.query_ball_point(check_feature, .00001)


texts: Google Earth Engine Export CSV MODIS Pixel Data for Multiple Polygons within a Rectangle

texts:
Having watched GEE tutorials, pieced together code from several StackExchange questions and received help from Kuik and Jobbo90 I managed to write a code for a MODIS/006/MOD11A1 surface temperature time series; https://code.earthengine.google.com/e66a97bf90ceff11d81331be86e0f969.

I would now like to adapt the code so that the CSV output file includes three new columns;
1) Pixel longitude
2) Pixel latitude
3) Pixel area name (either a Tokyo district name or if not within a district and within the rectangle then labelled vicinity).

Having watched the GEE Tables and Vectors tutorial; https://www.youtube.com/watch?v=XLE-apehUCk and sought help from StackExchange questions such as; Extract Pixel Values for Multiple Polygons and Images and Extracting pixel values by points and converting to table in Google Earth Engine? I attempted to adjust the code but have failed to do so.

In the Tables and Vectors tutorial Nick Clinton states "here`s one way" to make a table which suggests that there are multiple ways to formulate a table and perhaps this explains why I am struggling to adjust my code with information from different sources.

I predict that I need to adjust something in the following section of my code from the first link but I can`t figure out how/where;

function spacedPoints(fc, proj) {
  var latlon = ee.Image.pixelLonLat().reproject(proj);
  var coords = latlon.select(['longitude', 'latitude'])
                 .reduceRegion({reducer: ee.Reducer.toList(),
                                geometry: fc.geometry(1).buffer(proj.nominalScale().toInt()),
                                scale: proj.nominalScale().toInt()
  });
  var point_list = ee.List(coords.get('longitude')).zip(ee.List(coords.get('latitude')));
  print(point_list);
  var list = ee.List([0]);
  var feats = ee.FeatureCollection(point_list.map(function(point){
    var ind = point_list.indexOf(point);
    var feat = ee.Feature(ee.Geometry.Point(point_list.get(ind)), {'ID': ind});
    return list.add(feat);
  }).flatten().removeAll([0]));
  return feats.filterBounds(fc.geometry(1));
}

How can I adjust the above code so that three new columns; 1) Pixel longitude
2) Pixel latitude
3) Pixel area name are added to the exported CSV file?


texts: ArcGIS Server Services containing process crashed

texts:
I have several services deployed on ArcGIS Server 10.1, one of them has the error:

  Services containing process crashed. ServiceName.GPServer instance has
  crashed.

Any suggestions for correction?

If I need to uninstall ArcGIS Server is there a way to keep the services created or do I need to create again?


texts:
Following this example (see the section "Use the Tiles as a CartoDB Base Map"), I am trying to add a set of xyz tiles to CartoDB, without success.

I exported a EPSG:3857 png from ArcGIS, and created tiles with gdal2tiles:

gdal2tiles.py combine_rc1.png fortiles -z 3-11

I uploaded these to an Amazon s3 bucket, and made them public. Here is one tile as an example: https://s3-us-west-1.amazonaws.com/amazonbasin/fortiles/3/2/3.png

Following the CartoDB example linked above, I then tried to add a custom xyz basemap:

  Insert your XYZ URL:
  Enter a url: https://s3-us-west-1.amazonaws.com/amazonbasin/fortiles/{z}/{x}/{y}.png

But this doesn't validate, and nothing is added to the map. The page says:

  We couldn't validate this, if you're sure it contains data click "add basemap".

The example is for Google cloud storage. Should I expect this to work with Amazon s3? If so, what am I doing wrong?


texts: Are there any multipolygons in my shapefile?

texts: In QGIS 2.x, is there a simple way to determine if a polygons layer contains multipolygon geometries and if yes: which are these features?


texts:
I need to get WMS URL of my shapefiles published via Geoserver 2.11.1. What I did so far is to create a workspace called "MyTest" and upload some shapefiles. In the list of layers I can see shapefiles. Then I selected "MyTest" workspace and published it as WMS. I got no error messages, but when I go to "http://localhost:8080/geoserver/MyTest/wms" I see the message:

  HTTP ERROR 404 Problem accessing /geoserver/MyTest/wms. Reason: Not Found.

I don't know at which moment I made a mistake...

My final goal is to plug the map into Kibana, but to do this I need WMS URL.


texts:
Anyone out thee have a solution?
Using a TopoJSON file that has been converted from Shape. In QGIS, when I open it, it has no projection? I can't reproject a TopJSON file in QGIS.


texts: Creating a MPK file Equivalent/project template in QGIS from a project file for being the standard for various QGIS projects

texts:
Currently I have a project with some layer groups, which contains shapefiles (with value relations to other layers etc.) and also has some tables (that are necessary for the value relations). I want to create something like a MPK file/project template, that other users in my organization can use, so that the table/shapefiles relations are always used and that they cannot be separated by accident. This project/mpk file will be on a local LAN server we have (for example a V drive) but will be saved/copied locally to seperate for projects.

I heard a Geopackage is the best solution for this so far, but are there any others?

Note: right now we are not thinking about using a Database server, just this option for now.


texts: Displaying properties of GeoJSON in popup on Leaflet?

texts:
This is my simple GeoJSON with Leaflet map.  I want to display properties as popup but I don't know why it is empty.

Can you tell me my mistake?

<title>A Leaflet map!</title>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />


texts: How can I fill NA values in my NDVI Data?

texts:
I have been trying for weeks now to clean my NDVI data. I know that I have to apply Savitzky-Golay filter to smoothen my data. But before that, I have to fill the missing values in my data. I am trying to do this by loess polynomial regression method as suggested in this post. But I have many missing values in my data at the beginning and at the end i.e. NA values on the absolute tail of time-series data.
Here is my sample data:

I don't know how to resolve this problem. My data consists ndvi values for different pixels of different plots of a particular crop. I request you guys to please help me out on this.


texts: ST_IsValidReason get all points 'Self-intersection'

texts:
Check this geometry, please:

  ST_GeomFromText('MULTIPOLYGON Z (((228696.8 338223.3 0,228563.8 338278.5 0,228579.6 338194.2 0,228678.5 338298.6 0,228573 338078.6 0,228512.3 338355.7 0,228696.8 338223.3 0)))') as geom

There's 4 'Self-intersection' points, but the location(ST_IsValidDetail(geom)) select only one

  SELECT location(ST_IsValidDetail(geom)) as geom, reason(ST_IsValidDetail(geom))

How can I get all points?

Something like: ST_DumpInValidReason


texts:
I have two maps, a 3D and a 2D Map in my app, The user can move both camera, but the current position and rotation of the 3D camera must be reflected in the 2D map (see Screenshot)

I made it draw on the 2D map using a billboard, and rotate using the rotation property and assigning to it the heading of the camera :
{
      image: 'assets/images/entity/camera.png',
      position: this.camera.position,
      rotation: this.camera.heading,
      id: this.id
 }

but it appear that depending on the place of the globe, the rotation as to be different. For example in the above example I have to do:
-this.camera.heading + 90
but in other place of the world, the calculation is different.
How can I make a formula that makes it match everywhere around the globe ?


texts: Matplotlib Basemap Resolution with PyQt makes Python Quit Unexpectedly

texts:
I'm having difficulties using Matplotlibs Basemap in combination with a PyQt4 interface. Basically I create a Pyqt4 Canvas in which I plot a Matplotlib Basemap and some markers. I call the function in

self.button3 = QtGui.QPushButton('plot', self)
self.button3.clicked.connect(lambda: self.plot(geom0))

And pass a geometry to my plot(geom0) function.

def plot(self, geom0):
                x1, y1 = zip(*((geom0.GetX(i), geom0.GetY(i)) for i in range(geom0.GetPointCount())))
                print geom0

                self.m = Basemap(projection='merc', resolution = None, area_thresh = 0.1,llcrnrlon=6.66321, llcrnrlat=50.48198, urcrnrlon=7.54761, urcrnrlat=51.46085)
                self.m.drawlsmask(land_color='lightgreen',ocean_color='aqua',lakes=True)

                x,y = self.m(x1, y1)
                self.m.plot(x, y, 'D-', markersize=4, linewidth=2, color='k', markerfacecolor='b')

                self.canvas.draw()

This works fine and the canvas is filled and a map without any kind of resolution is shown with my Linestring from geom0 but when I change the resolution to low 'l' or high 'h' Python quits unexpectedly. Changing the resolution to low or high takes a while to calculate and I guess that is where the problem lies.

Do you have any ideas how I can tell PyQt to wait until the Basemap is calculated?


texts: Does opening QGIS multiple times slow down an algorithm?

texts:
I have to run an algorithm (SEBE, from the tool UMEP) around 30 times, everytime taking a couple of minutes to a few hours. Unfortunately, it seems like it can not be run as a Batch-process, so I opened QGIS 4 times and ran the algorithm in each of them - My hope is that I could use all 4 kernels of my notebook this way, since SEBE only uses 1 as far as I know.
Could anyone tell me if my thoughts are correct?


texts: Calculating Geometric Mean in Raster calculator

texts:
I am calculating Geometric Mean for land degradation mapping. I am applying following formula in ArcGIS 10.2-
("GW.img" * "LULC.img" * "Rain.img" * "Temp.img" * "Wind.img" * "NDVI.img" * "Livestock.img" * "Pop_Density.img" * "USLE" * "WEQ.img") ** (1/10.)
on the raster calculator. The final result is ranging from 4.1 to 8.5. But this map having various blank patches with no value. I am quite dubious about the way i am applying formula in raster calculator. Please, suggest me the right way to do it.


texts:
I have three tables (Table_1, Table_2, Table_3) with the same fields:
geom, Field_a, Field_b, Field_c, Field_d.

I want to SELECT these tables so that all their rows appear but I want do not want rows where geometries intersects with other rows from other tables.

I mean that I do not want intersection duplicates in my new table.

Here is the code I tried:

SELECT * FROM Table_1 AS T1
UNION
SELECT * FROM Table_2 AS T2 WHERE ST_Intersects(T2.geom, T1.geom) IS FALSE
UNION
SELECT * FROM Table_3 AS T3 WHERE ST_Intersects(T3.geom, T2.geom) IS FALSE
AND ST_Intersects(T3.geom, T1.geom)

I get the message Missing entry on the first ST_Intersects() on T1.geom.
I don't know what does this mean.


texts:
Need to reproject features (Poly & Point) to Local CRS, buffer the Poly, then clip the points based on the buffer, then reproject back to original to WGS84. Tested query without they reprojections (st_transform) functions and it worked, but unsure what is going wrong when the st_transform functions are added?

SELECT
    ST_TRANSFORM(ST_INTERSECTION(
        (SELECT ST_BUFFER(ST_COLLECT(ST_TRANSFORM(geom,SRID_Local)),5280) FROM Poly),
            ST_TRANSFORM(Point.geom,SRID_Local)),SRID_Original) AS geom,
FROM
    Poly,Point
WHERE
    ST_INTERSECTION(
        (SELECT ST_BUFFER(ST_COLLECT(ST_TRANSFORM(geom,SRID_Local)),5280) FROM Poly),
            ST_TRANSFORM(Point.geom,26913)) IS NOT NULL


texts: Interactive map where users can import, transform and export their own layer

texts:
I started to create an interactive map with React and Leaflet.
I would like to add a sidebars where user of the map can import, display on the map, edit and export their own layer.
Basically, it would overwrite the layer from the original map, and the user will be also able to edit some attributes from the layer.
Does anyone have experience with this? Ideally, it would be something with React and Leaflet but I'm also open to other solutions.


texts: I am very new to QGIS and although I've been able to download the software and get aerial imagery using the plugins menu, I'm getting nowhere with creating a shapefile that I can use to draw a polygon on the aerial image. I've gone through the layer - create new shapefile procedure many times, but when prompted to save the shapefile on my C:drive, nothing happens.  I've tried using "add vector layer" then searching for the file I thought I'd saved, but there is nothing there.  Nor does the shapefile appear on the layers menu on the left of the project.  Where am I going wrong please?


texts: How to generate a hospital perimeter database

texts:
I have about 2500 hospital points with names and addresses across the nation. My goal is to create a polygon layer of perimeters for these hospitals. The perimeter shape should look like what's in Google Map. Below is an example.

What's the best way to achieve this?


texts: Creating a list of unique street names from a list of address

texts:
I would like to generate a unique list of street names from a list of UK addresses, but obviously there will be a number of streets with the same name.  I want to distinguish between streets that are genuinely different.

On AtoZ, the street names on the index is written as:

Bell street, RH1
High Street, RH1

and so on.  I have yet to come across a street name with more than one outcode.  So based on this,

34, Bell street, RH1 6HH and
36, Bell street, RH1 6HJ

would refer to the same street, but say you had

34, Bell street, RH1 6HH and
36, Bell street, RH2 6HJ

can I be certain that these are two different streets?


texts: I'm learning to use Tilemill to map Toronto OSM street data.  I've added osm2psql data from http://metro.teczno.com/#toronto.  When turning on road labels for the line file, I find that I'm getting results much too frequently.  Is there a way to control the frequency or distance between labels?


texts: Why do I get different results with gdal_calc within the osgeo4w shell and QGIS' raster calculator?

texts: I'm just wanting to make a simple map algebra operation in the osgeo4w shell using gdal_calc but I get wrong results when I divide one raster with the other. When I use the same rasters in QGIS and perform the same map algebra operation with raster calculator, I get no problem.


texts: Is there a standard vernacular for levels of political boundaries (specifically city, county, state, nation)

texts:
While building a geotemporal web app, I found that virtually all countries followed this simple four-level structure, akin to what we in the US of A call: city, county, state, nation.
However, most other nations use different terms for city, county, state, and nation.
Is there an "ISO" or similar standard for these names that would be recognized and accepted internationally? (hopefully globally)


texts: QGIS custom Python expressions not loading on startup

texts: My custom Python expressions are not loading at startup and I dont know why. Its a real pain because I have virtual layers depending on those expressions, so after I load them I have to manually refresh those virtual layers' queries... I have not found an option in QGIS options to fix this.


texts: Mapbox GL Filter symbols and Add custom icons with Markers

texts:
I have a problem with Mapbox GL: starting from the example Filter symbols by toggling to list (https://www.mapbox.com/mapbox-gl-js/example/filter-markers/) I have to Add custom icons with Markers (https://www.mapbox.com/mapbox-gl-js/example/custom-marker-icons/). In practice I would like to customize the icons while maintaining the filter.

<script>
mapboxgl.accessToken = '<your access token here>';
var geojson = {
    "type": "FeatureCollection",
    "features": [{
        "type": "Feature",
        "properties": {
            "icon": "theatre",
"iconSize": [50, 50]
        },
        "geometry": {
            "type": "Point",
            "coordinates": [-77.038659, 38.931567]
        }
    },  {
        "type": "Feature",
        "properties": {
            "icon": "music",
"iconSize": [40, 40]
        },
        "geometry": {
            "type": "Point",
            "coordinates": [-77.007481, 38.876516]
        }
    }]
};

var filterGroup = document.getElementById('filter-group');
var map = new mapboxgl.Map({
    container: 'map',
    style: 'mapbox://styles/mapbox/light-v9',
    center: [-77.04, 38.907],
    zoom: 11.15
});

map.on('load', function() {
    // Add a GeoJSON source containing place coordinates and information.
    map.addSource("places", {
        "type": "geojson",
        "data":geojson
    });

    geojson.features.forEach(function(marker) {
var el = document.createElement('div');
    el.className = 'marker';
    el.style.backgroundImage = 'url(https://placekitten.com/g/' + marker.properties.iconSize.join('/') + '/)';
    el.style.width = marker.properties.iconSize[0] + 'px';
    el.style.height = marker.properties.iconSize[1] + 'px';
        var symbol = feature.properties['icon'];
        var layerID = 'poi-' + symbol;

        // Add a layer for this symbol type if it hasn't been added already.
        if (!map.getLayer(layerID)) {
            map.addLayer({
                "id": layerID,
                "type": "symbol",
                "source": "geojson",
                "layout": {
                    "icon-image": symbol + "-15",
                    "icon-allow-overlap": true
                },
                "filter": ["==", "icon", symbol]
            });

            // Add checkbox and label elements for the layer.
            var input = document.createElement('input');
            input.type = 'checkbox';
            input.id = layerID;
            input.checked = true;
            filterGroup.appendChild(input);

            var label = document.createElement('label');
            label.setAttribute('for', layerID);
            label.textContent = symbol;
            filterGroup.appendChild(label);

            // When the checkbox changes, update the visibility of the layer.
            input.addEventListener('change', function(e) {
                map.setLayoutProperty(layerID, 'visibility',
                    e.target.checked ? 'visible' : 'none');
            });
        }
    });
});
</script>


texts: Saving Changed Features from OpenLayers does not work because GeoServer claims Layer to be read-only

texts:
Trying to save a few changed Features in OpenLayers back to my geoserver (2.4.4) with saveStrategy.save().

Features don’t change. What I get in the geoserver protocol is:
org.geoserver.wfs.WFSTransactionException: {server.de/myproject}MyLayer is read-only

What can I do about that? The features definitely have a primary key.

I found out, saving features works for other layers, though I don't see any major differences in the WFS xml that I could hold responsible for that.


texts: Copying a WFS layer to the disk, using GDAL's Python bindings? (it creates empty files)

texts:
I'm quite new to ogr/gdal (both in osgeo4w shell and python) and I have tried to set up a script that should connect to a WFS and download a specific file. The best match to my problem was this stackexchange question: Using GDAL's Python Bindings, how can I download an entire Layer?
Using this code, I'm able to connect to the WFS and create a local file (I think). But when I try to copy the WFS dataset to the local file, the file ends up being empty.

My own code:

import sys, os
from osgeo import ogr, gdal

#setting the output destination
wfs_destination = r"C:\wfs_downloads"

#the layer name im looking for
lyrname = "Bypasstilladelser"

#opening the wfs
indriver = ogr.GetDriverByName('WFS')
url = 'http://kystatlas.kyst.dk/arcgis/services/ekstern/KDI_Bypass/MapServer/WFSServer?'
wfs_ds = indriver.Open('WFS:' + url)

#setting up a datasource for the output
outdriver = ogr.GetDriverByName('ESRI Shapefile')
outfile = os.path.join(wfs_destination, lyrname+'.shp')
out_ds = outdriver.CreateDataSource(outfile)#)

#opening the output file in write-access mode (have tried with and without it)
tmp = outdriver.Open(outfile, 1)

#copying the layer from the wfs to the created output destination.
out_ds.CopyLayer(wfs_ds.GetLayerByName(lyrname), outfile, ['OVERWRITE=YES'])


texts: Polygon dynamic grid creation for a shapefile

texts:
I have used QGIS Vector->ResearchTools-> Vector Grid to create a 1 lat x 1 long grid for the landpolygon shapefile (from osm).

Now, I am interested in creating dynamic grid for the original landpolygon shapefile, i.e., close to the coastal-lines grid size should be .001 lat x .001 long and in the other areas existing grid size.

Any suggestions?

I need the coastal lines to be .001x.001 and in other areas 1x1. So the grid size is different in a single shape file.


texts:
I'm trying to add a CartoDB basemap to my OpenLayers 3 map and then a province layer afterwards. I already read Adding CartoDB basemap in OpenLayers 3? and it was very useful but I created my own map in CartoDB and I want to add it to Openlayers 3.

Here are links to my CartoDB map and my CartoDB.js.


texts: Is there any way to know which geocoded location coordinates returned by the Google maps API are wrong?

texts:
I have a dataset of about a million addresses. I was tasked with finding the latitudes and longitudes of all these addresses. I finished doing that (took about a week and about $3000 in credit card charges). But when doing a random manual check, I noticed that quite a few addresses have identical latitudes and longitudes returned. I thought, that can't be right. So I put some of these addresses manually in maps.google.com, and found that, yes, indeed the coordinates returned by the API for these are wrong.

So, among a million records, how do I programmatically determine which coordinates are wrong? I've thought a lot, and checked the dataset a lot, and I can't find any pattern among the addresses for which wrong coordinates are returned - no special characters in all of them (few of them do have, but other addresses with special characters have correct coordinates), no particular country, no regular misspellings in those addresses, etc.

I don't want to have to geocode the whole dataset and spend another 1 week and $3000 - if possible, i would like to identify the wrong ones and rerun the code for only them. From my random checkings, I would guess around 20% of the locations have wrong coordinates. If only I could find a way to identify them.

As an aside, are there other services which are free and return good quality of results? I tried using open street maps, but I found that for the addresses in my dataset, it was not able to return coordinates for almost half of them (due to the detail in the addresses).


texts: How to define border colour for rule-based style using PyQGIS?

texts:
I use the following to create a Rule-based style for a given layer which includes defining a label, expression and colour fill:

from PyQt4.QtGui import QColor

layer = qgis.utils.iface.activeLayer()
style_rules = (
    ('First', 'expression_1', '#dbffdb'),
    ('Second', 'expression_2', '#f0ab64'),
)
symbol = QgsSymbolV2.defaultSymbol(layer.geometryType())
renderer = QgsRuleBasedRendererV2(symbol)
root_rule = renderer.rootRule()
for label, expression, color_name in style_rules:
    rule = root_rule.children()[0].clone()
    rule.setLabel(label)
    rule.setFilterExpression(expression)
    rule.symbol().setColor(QColor(color_name))
    root_rule.appendChild(rule)

root_rule.removeChildAt(0)
layer.setRendererV2(renderer)
layer.triggerRepaint()

Can I define the colour border using the above method? If not, how could I iterate through the symbol layers and apply a border colour after a rule-based style has been set?

I tried incorporating it into style_rules but not sure how to set it (in this case, I just want the border colour to match the polygon fill):

style_rules = (
    ('First', 'expression_1', '#dbffdb', '#dbffdb'),
    ('Second', 'expression_2', '#f0ab64', '#f0ab64'),
)
for label, expression, color_name, color_border in style_rules:
    rule = root_rule.children()[0].clone()
    rule.setLabel(label)
    rule.setFilterExpression(expression)
    rule.symbol().setColor(QColor(color_name))
    root_rule.appendChild(rule)

EDIT:

I have looked at the QgsSymbolV2 and QgsRuleBasedRendererV2 classes but neither seems to have anything related to the border. The QgsSimpleFillSymbolLayerV2 class does have a borderColor function so I'm now wondering if it is even possible to define a border colour using the QgsRuleBasedRendererV2 class.

I'm using QGIS 2.18.0 for Win7 64-bit.


texts: FME Many to One to append attribute and not create new feature

texts:
I have a land cadastre spatial table where the Land_no is unique for each parcel. I am joining this to a non-spatial mssql search where the property number is repeated whenever there is more than one owner.

Wherever the prop_no is repeated, I want the FeatureMerger to append any extra owner info to the existing OBJECT rather than create a new geometric as it has to be unique by Land_no.

The first example below shows what I would like to see

So the Name_IDs would be '8678|8679'

I have the following settings in my FeatureMerger -this also shows the section of the model and the output from the SQLCreator

Can I get it to append the values in the Owner_Name and Name_IDs fields without having to (somehow) manipulate the SQL to do this .

A further issue is that if there are more than 2 owners then the name should be

Albert Einsteen and Martin Luther and others

Not

Albert Einsteen and Martin Luther and Sigmund Freud

But the Name ID's should have the value for all three - so '1234|1456|1789'

UPDATE
Here's the model with some relevant parameters exposed.


texts: Error: cannot acquire a lock when editing in ArcMap 10.1

texts:
We have a problem with a shapefile feature class. Periodically it will not save edits with an error message as the following:

  Cannot save edits; cannot acquire a lock

Working in 10.1 with a water main shapefile (with about 5 other users on different workstations viewing the layer). It has been suggested to us that the toplogy/rules associated with the layer is causing the problem.
Does anyone know if this might be the problem and or has a solution?


texts: ArcObjects - Finding the intersection of a polyline and polygon?

texts:
I have a polyline and polygon. The polyline will intersect the polygon at two or fewer points. I would like to get these intersection points as X and Y values.

EDIT: Here is a quick code sample using ITopologicalOperator based on the answers below. It's a quick chop job, but it'll help get others started.

        Public Function GetPolygonIntersection(ByVal pLine As IPolyline, ByVal pPolygon As IPolygon) As IPoint

        Dim pGeom As IGeometry
        Dim pTopo As ITopologicalOperator = pLine
        Dim pPoints As IPointCollection
        Dim pPoint As IPoint = Nothing

        If Not pTopo.IsSimple Then pTopo.Simplify()
        pGeom = pTopo.Intersect(pPolygon, esriGeometry0Dimension)
        If pGeom.IsEmpty Then
            Return Nothing
        End If

        If pGeom.GeometryType = esriGeometryMultipoint Then
            pPoints = pGeom
            If pPoints.PointCount = 1 Then
                pPoint = pPoints.Point(0)
            End If
        End If

        Return pPoint
    End Function


texts: Is there an analog of ArcGIS Desktop's “Results” tab in QGIS?

texts:
I want to rerun previously started QGIS tools without manually specifying inputs again. ArcGIS "Results" tab save all input parameters so I can double click on it and start tool again without retyping all inputs.

How can I do the same using QGIS?


texts: Difference between datum transformations in QGIS 3.4 and ArcMap 10.7

texts: Could someone briefly explain the difference between how datum transformations are handled by QGIS versus ArcMap? For example, I am under the impression that in QGIS you can simply select a destination CRS when exporting a layer and this operation handles the  datum transformation and reprojection. Whereas, in ArcMap this is broken into 2 steps. Could someone explain the method of transformation in QGIS vs ArcMap?


texts: How to get POI in city in OpenStreetMap through Overpass API with cURL?

texts:
I'm very new to OpenStreetMap's Overpass QL API. After digging through its hefty wiki and several tutorials I get the feeling that if I want to query for a city I can use either area[name="Tbilisi"][boundary=administrative] or {{geocodeArea:Tbilisi}}. I think [boundary=administrative] helps identify it as a city or at least some kind of official entity like a state or municipality rather than, say, part of the name of a cafe. I don't know if I am right.

Following that, I should be able to get restaurants in Tbilisi with the area[name="Tbilisi"][boundary=administrative] syntax on Overpass Turbo like so:

area[name="Tbilisi"][boundary=administrative]->.searchArea;
node["amenity"="restaurant"](area.searchArea);
out;

However, it returns '"elements": []'. out count returns a total of 0.

I then tried with {{geocodeArea:Tbilisi}}:

{{geocodeArea:Tbilisi}}->.searchArea;
node["amenity"="restaurant"](area.searchArea);
out;

This returned a very long list of elements, out count total is 419.

Unfortunately, I can't use {{geocodeArea:Tbilisi}} with cURL like this:

curl --globoff 'https://overpass-api.de/api/interpreter?data=[out:json];{{geocodeArea:Tbilisi}}->.searchArea;node["amenity"="restaurant"](area.searchArea);out;'

It gives:

...

Error: line 1: parse error: Unknown type "{"

Error: line 1: parse error: An empty query is not allowed

Error: line 1: parse error: ';' expected - '{' found.

(Update 8 Apr 19: As mmd mentions in the comments below, {{geocodeArea:CITY_NAME}} is Overpass Turbo syntactic sugar and cannot be used for Overpass API.) Looking into the Network tab of dev tools after running this same query in Overpass Turbo, I find this works on Overpass Turbo because it translates {{geocodeArea:Tbilisi}} to area(3601996871). But I'd like to query by city name if possible.

I don't know if I've misunderstood the query structure. If I try the area[name="CITY_NAME"] syntax with Singapore like so:

[out:json];
area[name="Singapore"][boundary=administrative]->.searchArea;
node["amenity"="restaurant"](area.searchArea);
out count;

Overpass Turbo returns a total of 2221.

But with the {{geocodeArea:CITY_NAME}} syntax like this:

[out:json];
{{geocodeArea:Singapore}}->.searchArea;
node["amenity"="restaurant"](area.searchArea);
out count;

The total count is different. It's 2192.

What is the correct way to query for POI in a city? Preferably with cURL and by city name?


texts: How to handle exception in Arcobject 'Attempted to read or write protected memory' while working with three different featureclass

texts:
I have three featureclasses representing Road,Rail and city junction respectively.
First i have taken rail  and road featureclass and done spatial query

spatialfilter.spatialrel=esrispatialrelenum.esrispatialrelintersects.

and found those roads from road featureclass that intersects rail network on the basis of some attribute.Then from intersected road , taken 'frm_Junction' field and open junction feature class and done query and found those junction point that has 'JUNCTION_ID = frm_Junction' of road and if record found in junction then 'RLY_Phatak' attribute value  is checked .if its zero then it is reported as error.

All the queries and function is running fine on one system but on another system exception prompt that is -- error: 'Attempted to read or write protected memory.This is often an indication that the other memory is corrupt'.

All the featurecursor and other memories are released properly still exception exists.

I am not getting why this exception is prompting when the code is working fine on three or four system.??How do we handle such type of exception??


texts: Properties and columns difference in GEE feature collections

texts:
What the difference between columns and properties in Google Earth Engine feature collections?
When I build a new feature collection with a property directly in the code editor, when I print it I do not see "properties" but only "columns" and "features". Instead, when I open a feature collection which I have as an asset I see "properties","columns" and "features" as three different parts of the the feature collections. Where "columns" are the fields from the shapefile that I imported as asset.
So, why "properties" are added in a feature collections imported as asset?
And what's the difference between "properties" and "columns"?


texts: Is saving rasters to VRT bad convention?

texts:
I'm working with a lot of rasters (dozens of thousands) and would like to store them for a while. They will be used intermittently, but never all at once! The size of VRT (~2 kb) is such a positive for me, because I can store a year's worth of rasters with less than a GB for cost, whereas before I was dealing with upwards of 50 GB when using TIF.

I'm just worried that maybe I don't fully understand the VRT file type. I've tried to look at documentation and don't see anything wrong with doing this.

Do you think this is OK?


texts: Filling field with different names using ArcGIS Desktop?

texts:
I have a shapefile with a field called "Name". The name field contains many hundred columns of City, Lake, River, County. I want to add a value in another field for each of the entries in "Name". Like, all records of City will get the value 10, all records of Lake get the value 7 and so on.

Is there an easy way to do this?


texts:
I have three images in GEE ,I would like to reproject two of them to have the dame reprojection as the third one.
each of those 3 images is mosaic of all the avilable tiles from certain day.
The problem is that when I try to reproject the two images I get error:

Image (Error) Image.reduceResolution: The input to reduceResolution does not have a valid default projection. Use reproject() first to set
the base projection.

The thing is that I do reproject the images before. I have tried it in two different ways but still get the same error:
try 1:
//Reproject

//Get information about the  projection.
//there are two images with this projection

var projection1 =  img_one.projection();
print('PROJECTION Image 1:',  projection1);

//the projection I want to reproject to
var projection2 =  image_two.projection();
print('I want my previous images to have this projection:',  projection2);

// // //resampling images to "projection 2"

var prj_one=img_vv.reproject({crs: projection2});
var prj_one=img_vv.reduceResolution({reducer: ee.Reducer.mean()});
var prj_three=img_vh.reproject({crs: projection2});
var prj_three=img_vh.reduceResolution({reducer: ee.Reducer.mean()});

try 2 (less lines):

var prj_one=img_vv.reduceResolution({reducer: ee.Reducer.mean()}).reproject({crs: projection2});

var prj_three=img_vh.reduceResolution({reducer: ee.Reducer.mean()}).reproject({crs: projection2});

but still got the same error.
The weird thing is that when I don't mosaic the images from imagecollection I don't get this error at all.
Here is link for the code:
https://code.earthengine.google.com/d5ba407afff4ed384ad9d1cfbf89ee6c
My end goal : to be able to reproject the layers and export as one raster with three bands that have the same projection
edit: if instead of using mosaic to create my image I use "first()" I get the image but it doesnt help me because then I don't get the full image.


texts: Manually splitting polyline into two parts at specific vertex?

texts:
I defined a brand new shapefile as a polyline type in ArcCat. When I opened ArcMap (10.1) and started an editing session, I had no problems adding vertices. I would now like to manually add a point at the start of the line - but I am having unexpected difficulty.

Edit: I think I may be taking the wrong approch here:

While in editing mode with the shapefile selected, "point - adds point to the edit sketch" is greyed out. If I go to Editor> Construct Points, I get the error: "The map does not contain a point target. Add an editable point layer and / or a point template to the map."

I am confused at this message. Is the polyline not a point target? Under my Create Features window, the shapefile shows up with the "Line" construction tools. Is the polyline not the "template to map"?)

I have looked at online help related to my question - but in my case, I can't can the point tool they mention in step 9.

EDIT: I think I may have misunderstood the purpose of "add point" - I thought this was how to manually "split" a line into two and have the line acquire a row in its attribute table. So to rephrase my question: how do I define a vertex so that it "splits" a line into two segments? (I'm no longer sure what "add points" is meant for)


texts: Calculate the percentage of a Line passing through Polygons

texts:
I have a polygon layer of a region (100% coverage, no overlaps) and a line layer in the same region.
I want to calculate for each line to which percentage it crosses certain polygons.

I have seen the question also here How to calculate the percentage of a Line through Polygons?
but its 6 years old and the proposed solution is completely manual.
Is there maybe a newer, more automatable solution, considering QGIS 3.6 or R?


texts: How to add a button (with image) on a map using Google Maps API

texts:
I need to put a button on a map built using Google Maps API v3.

I've seen this sample
 https://developers.google.com/maps/documentation/javascript/examples/control-custom

and that's good for me but I'd like to put an image (like this one http://www.freepngimg.com/png/15500-click-png-picture), in the button instead of the text "Center Map".

How may I modify the code sample to obtain it (sorry for the entry level question .... )?


texts: How to keep Table Order in Identify Results?

texts: Is there a way to keep the default table order when using the "Identify Feature" tool. I see that you can sort the "identify results" by table column name or value. I don't want the data in this view sorted at all. In our database, we've already standardized our column order so it's easier for the users.


texts: What is the most appropriate technology for publishing Census (and other) data for small areas?

texts:
We have a web application which shows the (United Kingdom) Census data on thematic maps using client-side code (based on OpenLayers) and KML.

// This section can be skipped

// begin

At the moment it works in the following way

We store area shapes as KML in database (just shapes, no styles, colours or other data)
We also store the Census data against each area (e.g. area="Output area E01000123", time period=2011, variable= "% of single people", metric value = 34.12) in the same DB. Of course, data structure is normalized.
A user selects a region (e.g. London) and a variable
We get all the small areas within the selected region, generate the KML and apply colors based on metric values.
The web page displays KML on a map (using OpenLayers-based Javascript code).

//end

This approach works well when the number of small areas in a region is not too large.
In some cases the number of small areas might reach 5000.
In this case client-side code is too slow in IE8 (which we have to support).
So I guess we have to generate an image from the shapes server-side.

What is the most appropriate technology?

In the past we used GeoServer with PostGis backend. It was not too fast and quite unstable. I can explain how we used it.

UPDATE

I decided to use GeoServer + PostGis. GeoServer serves images. When a user selects an area, the client-side code creates a custom SLD and passes it to GeoServer.
When no or few areas are selected, it is very fast (~1sec), even with 30000 polygons in the layer. If a user selects e.g. 2000 areas, it takes several seconds (I guess because GeoServer has to process a huge SLD file).


texts: PyQGIS: Signal for handling multiple QgsVectorLayer changes at once or on "Save for All Layers"

texts:
Is there a signal that I can listen for changes to any QgsVectorLayers rather than having a listener for each layer? I have a scenario where layer A and B must be committed together which I have a validation logic within the method.
When I make changes to QgsVectorLayer and save the layer, I can listen for such event via signals like QgsVectorLayer.beforeCommitChanges(..).
When I make changes to multiple QgsVectorLayers, I receive multiple beforeCommitChanges signal for each affected layer. Instead, I want a way to derive single signal which contain all affected layers.


texts:
I'm trying to calculate the area of an Island before a land uplift of 9 meters. I have two shapefiles, one with the polygon of the Island and one of the elevation as a pointfile (10x10 raster).

Does anyone have an idea on how to get the original area before the uplift?


texts: ArcGIS Pro connection to PostgreSQL Database

texts:
I am connecting a PostgreSQL database to ArcGIS Pro and it connects but when I attempt to open the attribute table I receive a "Shape Integrity Error" and cannot view it.

I am able to view the attribute table when I connect to the database through ArcMap.


texts:
Changing the destination (scratch workspace) of outputs of geoprocessing tools in a model in one go,

I couldn’t figure out the best way to change the destination (scratch workspace) of outputs of geoprocessing tools in a model in one go.

For example, if the “scratch workspace” is set to be “D:\Q.gdb” and then it is needed set it to be “D:\R.gdb”, then how this can be done?

Switching the “scratch workspace” from “D:\Q.gdb” to “D:\R.gdb” doesn’t do the job. The outputs of the tools are not directed to the “D:\R.gdb”. Is it required to change the “scratch workspace” for each tool one by one?

What is the best way to do that?


texts: Merging two datums to create single elevation dataset in ArcMap?

texts:
I have an SRTM loaded. I also have a landcover data layer.
I want to merge the two datums to create a single elevation data set.
How can I do this?


texts: Creating vector layer (Shapefile) with QgsNewVectorLayerDialog

texts:
I'm using the following code that displays a window to create a new Shapefile:

from qgis.gui import QgsNewVectorLayerDialog

new_vector_layer_dialog = QgsNewVectorLayerDialog()
new_vector_layer_dialog.show()

How can I put a flag on the Polygon by code, and not the line or the point?

Also when you press the OK button, how to get the dialog to select where to save the Shapefile?

When you click OK, it does not create a Shapefile, but just closes the dialog box. Additionally, it does not create a vector layer in the Layers Panel.

What do I need to do to create the layer and load it into the Layers Panel?


texts: Creating relationship between MS Access DB and Google Maps API/Fusion Tables?

texts:
We are having an issue with a project that we are working on using Google API and M.S Access. Our project goal is to design a web map in Google API where we can select a parcel of land and have all of the information regarding all of the minor variances that are associated with that parcel come up in a pop up window. We have created a google fusion table of the parcels kml and have it show up on our map. Each parcel has a unique ‘ARN’ number that corresponds to the ‘ARN’ number on the minor variances that is associated with that parcel. All of the minor variances are stored in a Microsoft Access table with all of its associated information (ie Roll Number, City, By Law Numberetc). We want to create a relationship between the parcels layer and the minor variance Access database so that when the parcel is clicked on the web map all of the information for the minor variances that are associated with that parcel (based on the shared ‘ARN’ number) come up in the pop up window. We figure we may have to export our Access database as a CSV and bring it into google fusion tables in order to create a relationship. We have provided a visual below on how we would like our information to be displayed.

I created a mock up of how we want the popup windows to look in a very rough form. The fields in the second image are all from the MS Access DB, though not all will be included in the final window.

How do I create this relationship between the parcels kml and our Access database?


texts: Interface of QGIS plugin created by QtCreator

texts:
The image below is the interface of the plugin which I created using Qt Creator.

However, when I loaded this plugin in QGIS3 (version: 3.6.1). The interface of the plugin does not appear completely. (Only some part of the text appeared.)

The same problem also occurs when I installed plugins from repositories.

Does anyone know how to solve this problem?


texts: Unable to export Projected layer [UTM] to Google Earth from ArcGIS for Desktop?

texts:
When tried to export any vector layer in ArcGIS [projected in UTM] to Google Earth, it is falling away from the actual location.

However, when I export vector layer in Geographical Coordinate System then it exactly falls in the location.

May I know the reason for this?


texts:
If I limit the results by nominatim will they be ordered by importance? So if I set ?limit=1 will I get the match with the highest importance?

If not, how can I enforce this?


texts: area values determined with field calculator become null when saving

texts: using field calculator in Qgis 1.8.0 to get the area, it shows just right at first but when I save it, the values become Null.


texts: rgrass7: Invalid number of 'breaks' for hist.default

texts:
So I just started to use the library rgrass7 from R and I got this error

  Error in hist.default(v, main = main, plot = plot, ...) :
    invalid number of 'breaks'

Or, using the summary function, I get errors like:

  NA's         1      1      1      1

So I was wondering what was wrong.Because I don't know if it's the function at this point or it's my GRASS session that is open, or anything at all.

The code that I used is pretty straightforward:

library(raster)
library(rgdal)
library(rgrass7)
initGRASS(gisBase = "C:/GRASS/GRASS_GIS_7_3_svn", home = tempdir(),
      gisDbase = "C:/Users/user/Desktop/data",
      location = "Thesis", mapset = "user" override=T)

 my_vmaps=execGRASS("g.list", parameters = list(type = "vector", pattern = "precip*"))

 r1=readRAST(c("gera.1","gera.2","gera.3","gera.4"))
 r=brick(r1)
 hist(r$gera.1)
 summary(r)
 hist(r1 )


texts: Arcpy CreateUniqueName usage: keep original input names

texts:
This is a continuation of the question I asked here:

At this point I'm really just trying to get everything in one place and keep the original shapefile basename. I'll tackle merging like-named files later, which is why I'm using CopyFeatures for now. I'm confused about why the second sample below didn't have a result list similar to the first one. It looks like the first sample ran through the first folder and copied those shapefiles to the gdb, and when it got to the next folder with a 'Bank_Ero' name it failed.

So now, I'd like to create a unique file name (keeping that original shp base name) if one already exists. As always, any hints, or direction will be greatly appreciated, and thanks for looking.

Original sample:

for dirname, dirnames, filenames in os.walk ("C:\FOR MIKEK\GPS Files\GPS_ANDY"):
    for subdirname in dirnames:
        env.workspace = os.path.join(dirname, subdirname)
        All_List = arcpy.ListFeatureClasses()
        for shp in All_List:
            outFeatureClass = os.path.join("C:\FOR MIKEK\Python_Scratch.gdb", shp.strip(".shp"))
            arcpy.CopyFeatures_management(shp, outFeatureClass)

<Result 'C:\\FOR MIKEK\\Python_Scratch.gdb\\Bank_Ero'>
<Result 'C:\\FOR MIKEK\\Python_Scratch.gdb\\Fish_Bar'>
<Result 'C:\\FOR MIKEK\\Python_Scratch.gdb\\Flag'>
<Result 'C:\\FOR MIKEK\\Python_Scratch.gdb\\Outfall'>

Traceback (most recent call last):
  File "<pyshell#82>", line 7, in <module>
    arcpy.CopyFeatures_management(shp, outFeatureClass)
  File "C:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\management.py", line 1943, in CopyFeatures
    raise e
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000725: Output Feature Class: Dataset C:\FOR MIKEK\Python_Scratch.gdb\Bank_Ero already exists.
Failed to execute (CopyFeatures).

and now attempting to use CreateUniqueName:

import arcpy, os
>>> from arcpy import env
>>> env.workspace = "C:\FOR MIKEK\GPS Files\GPS_ANDY"
>>> for dirname, dirnames, filesnames in os.walk ("C:\FOR MIKEK\GPS Files\GPS_ANDY"):
    for subdirname in dirnames:
        env.workspace = os.path.join(dirname, subdirname)
        shpList = arcpy.ListFeatureClasses()
        for shp in shpList:
            outFC = os.path.join("C:\FOR MIKEK\Python_Scratch.gdb", shp.strip (".shp"))
            if arcpy.Exists(outFC):
                arcpy.CreateUniqueName(os.path.join, "C:\FOR MIKEK\Python_Scratch.gdb")
                arcpy.CopyFeatures_management(shp, outFC)

>>> xferFiles = arcpy.ListFeatureClasses("C:\FOR MIKEK\Python_Scratch.gdb")
>>> print xferFiles
[]


texts: Google Maps - get all tiles locations around a specific latitude longitude

texts:
I am currently working on an app that requires the ability to temporarily download Google Maps for offline use.

As suggested here using tileprovider I can render my own tiles for offline use.

Suppose I have the following location lat lng(10,10) and zoom level 2, how can I get all tiles around a distance of 1km near this location .

As shown in this post I already know the equation required in order to convert latitude, longitude  to a tile coordinates x,y,z but my problem is I don't know how to figure out what are all the tiles positions around a specific location of a range of 1km for example.


texts: How to calculate cumulative sum conditionally across raster?

texts:
I don't know if this is possible without coding, but I need to:

Create a raster file that, for each value in the input raster, sums
all pixel values across the entire extent that are less than or equal
to the input pixel.  That value then needs to be written to the
corresponding cell in the new raster.
Scale the output between 1 and 100, but that is the easier part of
this.

The only spatial analyst tool I can find that looks remotely useful is BlockStatistics (I was thinking I could conditionally run BlockSum) but that tool seems to require that the raster be split into multiple blocks.

Is there a way to sort of hack BlockStatistics to only use one block/zone that corresponds to the extent of the entire raster?  Or would I need to come up with a python script for this?

Unfortunately, I don't think my coding skills are up for that.

Thanks in advance for the help!


texts: Why can I not choose the join field I need from a csv or Excel file?

texts:
I am attempting to join census data (county level) to a county base map, using the FIPS county code as the join field.

I can join successfully if I do not alter the original csv file from the census download.  However, ArcMap will make all data fields into string types that way and I want a numeric type. According to the ArcMap help file, I should remove all text entries from the first eight rows of the table and make them numerals (I used zero). After making this change, ArcMap won't let me select the FIPS column as the join column anymore. Frustrating! Any suggestions?


texts: Appending data in a relational database without changing the GUID

texts:
So I am building an ArcGIS relational geodatabase; one copy is stored online for users to enter data into and another copy is stored locally for minor processing and then to generate reports.  The geodatabase consists of a point feature class that is has a 1:M relationship with a polygon feature class; which then has a 1:1 relationship with a table.  I built a model to add new data from the online version onto the local copy (which has to be done weekly) using the Append tool.  However, the Global ID field/primary key for each component of the geodatabase is changed during the append process but the foreign key remains the same.  So the relationships are now messed up and I can't get the data I need out of the database.

Is there another tool I should be using?  Or maybe I need to make a text field and copy the GlobalID before doing the append, and then either copy the correct GlobalID back into the GlobalID field OR restructure the relationship so it's referring to the right field?


texts: DXF Export contains additional layer 2216

texts:
I am exporting my QGIS layers using this (see image below):

I am using QGIS 2.8.0 and CAD 2013. The layers are correctly showing when i open my dxf file in CAD but surprisingly same operation is working correctly on another system (PC).
It is creating additional layer with name 2216 and my all layer inside that layer while my all layers is also present. What i am doing wrong? Do i require additional settings?


texts:
I have a problem with ecw file. I'm using mapserver and openlayers. I have a ecw file and I make my tileindex file with gdaltindex. I want to put in my map file, I tried many ways but no ones work. How can I show my ecw files in my map?

PS: I have support for ecw files by the way.


texts: Import Shapefile into Existing Spatialite Table

texts:
I am working with a Spatialite database and a series of shapefiles. I have an empty spatialite table that has geometry and columns. What I would like to do is to load the shapefiles into the spatialite table (Append) but I am unsure if this is possible with Spatialite. I do not see an option with the Spatialite-GUI, or the QGIS plugin. Does anyone have any ideas or tricks the a SQL query?

Thanks...

EDIT

I would like to add a SELECT statement so that I only get selected rows


texts: How to completely uninstall and remove QGIS 2.8.1 on Windows Vista?

texts: I want to uninstall and completely remove QGIS installation from my computer(windows vista). I have uninstalled it and when i try to reinstall it says it is already installed on the system.


texts: Using Intersect and Join to analyze data in ArcGIS Desktop?

texts:
I am attempting to calculate area covered by roads within a grid. I have used the intersect(analysis) tool to create a new shp file that segmented the road features according to the grid. I then joined the roads (along with their calculated segment lengths) with the grid cell to sum the total road length within each grid cell. This all works except that the join tool is including road segments that are in adjacent grid cells.

These segments touch the edges of the cell boundaries and are essentially being included in the road segment length sums for 2 grid cells. Is there a way to fix this issue without having to individually move each segment so it doesn't touch adjacent grid cells?

I am using ArcGIS 10.3.1 for Desktop. These shapefiles are simple, local and created by my previous project coordinator using Arc.


texts: gdal_rasterize : getting area not in or touching polygon (options -at and -i)

texts:
I would like to capture the area that is not in a polygon (option -i) and that doesn't touch that polygon.

gdal_rasterize -at will return the polygon + edges, but gdal_rasterize -at -i will not invert gdal_rasterize -at, but will add pixels on edges to gdal_rasterize.

As a result, the burned area includes the edges, which is not what I want. I was hoping -at -i would have a different result than -i -at, but it didn't.

Is there a simple way of burning everything that is [not inside the polygon OR not on the edge of the polygon] ?


texts: Keeping leading zeroes in QGIS in big files

texts:
I am trying to load a file with many columns into QGIS. With both .txt and .csv format the leading zeroes of some data values get lost. However, I need the leading zeroes to merge the file with a map.

Using .csvt does not make much sense here, as I have too many columns and will use different files with different numbers of columns and therefore I would have to adapt the .csvt file everytime.

I am also not able to use a field calculator to adapt the columns once loaded into QGIS as the field calculator is inactive for .csv or .txt files.

Is there another way to ensure that the leading zeroes do not get lost?
The file is generated with R. I don't know if this is relevant


texts: How to set the cell size of a raster using gdalwarp?

texts:
I am using gdalwarp to clip a raster file. My original raster has pixel size of (30,-30). Using gdaltranslate or gdalwarp the pixelsize changes to (22, -35) and (26,-26) respectively.

Any pointers how to maintain the cell size?


texts: How to change color ramp in graduated classification with standard deviation using pyqgis

texts:
I'm using graduated clasiffication with standard deviation to style my shapefile (see code below). But I need to use different color ramp for classes below mean (-1std, -2std etc.).I'm thinking of looping over classes below mean and change the color to blue. But how can I choose the appropriate color from blue ramp.

from qgis.core import  (QgsVectorLayer, QgsMapLayerRegistry, QgsGraduatedSymbolRendererV2, QgsSymbolV2,QgsRendererRangeV2)
from PyQt4 import QtGui

def validatedDefaultSymbol( geometryType ):
    symbol = QgsSymbolV2.defaultSymbol( geometryType )
    if symbol is None:
        if geometryType == QGis.Point:
            symbol = QgsMarkerSymbolV2()
        elif geometryType == QGis.Line:
            symbol =  QgsLineSymbolV2 ()
        elif geometryType == QGis.Polygon:
            symbol = QgsFillSymbolV2 ()
    return symbol

def applyGraduatedSymbologyStandardMode( layer, field, classes, mode):
    symbol = validatedDefaultSymbol( layer.geometryType() )
    colorRamp = QgsVectorGradientColorRampV2.create({'color1':'255,0,0,255', 'color2':'0,0,255,255','stops':'0.25;255,255,0,255:0.50;0,255,0,255:0.75;0,255,255,255'})
    renderer = QgsGraduatedSymbolRendererV2.createRenderer( layer, targetField, classes, mode, symbol, colorRamp )
    layer.setRendererV2( renderer )

targetField = 'myfield'

classes = 6

layer = QgsVectorLayer('myshapefile.shp', "My Layer" , 'ogr')

if layer.isValid():
    applyGraduatedSymbologyStandardMode( layer, targetField, classes, QgsGraduatedSymbolRendererV2.StdDev)
    QgsMapLayerRegistry.instance().addMapLayers( [layer] )


texts: Using Arcade for ArcGIS Pro Dictionary style

texts:
I successfully created a new dictionary style that adds a symbol if a value exists (boolean); trying to add more symbols if values in other fields exist, but no luck.  I am new to Arcade, so probably missing something obvious.

My field names are featured, stocked, and ofba_acces.
My symbol key names are Featured, Trout Stock, and Boat Ramp.

My dictionary configuration looks like:

{
  "configuration": [{
      "name": "text",
      "value": "ON",
      "domain": ["ON", "OFF"],
      "info": "indicates if the text is rendered"
    }
  ],
  "symbol": ["Featured", "Trout Stock", "Boat Ramp"],
  "text": ["name"]
}

Then my dictionary script looks like:

// conventions:
// Symbolizes fishing points with symbols clockwise
// $xyz: attribute (received as string)

// calculate the semi-colon delimited list of keys.
var keys;

// Check if the 'featured' symbol should be shown.
if($featured == "-1"){
// Add this key to the list.
keys = keys + "Featured;";
}

// Check if the 'stocked' symbol should be shown.
if($stocked == "-1"){
// Add this key to the list.
keys = keys + "Trout Stock;";
}

// Check if the 'ofba' symbol should be shown.
if($ofba_acces == "-1"){
// Add this key to the list.
keys = keys + "Boat Ramp;";
}

// See if text should be displayed.
var showLabels = $text != 'OFF';

// Add the label key if text is on.
if (showLabels) {
  keys = keys + "label-name;";
}
// Return string of keys.
return keys;

The scripts worked with just the Featured category, but not when I add others.


texts: How can I access to history service layer

texts: I have set up a service which is provided by ArcGIS. I would like to have access to all the versions of the  parcel layer which are created during the edits I applied earlier to be able to gather information such as: the time of edit, the number of edits and the time...  Please tell me if there is an alternative way to access those information other than trying to access the versioned  parcels?


texts: I am trying to create a new table of attributes for later purposes, in arcGIS but just an empty one, How can i do this? I also have it as an Excel format, but I don't know if there is any way to export it into ArcMap?


texts: Converting shapefile to SVG keeping internal data?

texts:
I am very new to GIS. I found a tutorial on how to make a choropleth using Python tools. I want to follow it but use my own data and map. However the tutorial uses a US map SVG file and I need to use a CA zipcode map. The only map that I have found in a shapefile from the US Census. I have tried using kartograph.py to convert it to SVG, but it loses the zipcode within the file when I do so.
How can I convert the file to SVG and keep each path id'ed as the appropriate zipcode.

I am trying to follow the How to Make a US County Thematic Map Using Free Tools tutorial. That should give you an idea of what I am trying to do, only I don't have a SVG formatted map.

I have seen references to javascript utilities. I have never used Javascript but suppose I could use something simple.


texts: Heat map which will be auto-updated from Google Docs

texts: I want to develop a heat map (standardized choropleth map) which will be auto-updated with data pulled from GoogleDocs. Which tools are the most helpful for developing that kind of map?


texts: Can't load geoJSON files in Leaflet layer control

texts:
First of all, I have to sorry about my English. May not be perfect. I have a problem with show my geojson files into layer control. I read every topic about that on this side, i have tried on a milion ways to show them and nothing works. Can anybody tell me where I did wrong?`

    <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css"/>

    <script src="http://code.jquery.com/jquery-1.12.0.min.js"></script>
    <script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
    <script src="data/zabudowaJSON.geojson"type="text/javascript"></script>
    <script src="data/drogiJSON.geojson"type="text/javascript"></script>

    <script type="text/javascript">

        var map = L.map('map');

        L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png').addTo(map);

        map.attributionControl.addAttribution("Dane: OpenStreetMap");

        map.setView([53.082222,18.2184333],10);

        L.control.scale().addTo(map);

function onEachFeature(feature, layer) {
layer.bindPopup(feature.properties.zabudowaJSON + ", " + feature.properties.drogiJSON);
    }

    $.getJSON("data/zabudowaJSON.geoJSON", function (zabudowaJSON) {
        L.geoJson(zabudowaJSON, {
        onEachFeature: onEachFeature,
        pointToLayer: function (feature, latlng) {
            switch (feature.properties.Remember) {

            }
        }
        }).addTo(map);
    })
function onEachFeature(feature, layer) {
layer.bindPopup(feature.properties.zabudowaJSON + ", " + feature.properties.drogiJSON);
    }

    $.getJSON("data/drogiJSON.geoJSON", function (drogiJSON) { // pull data from external file
        L.geoJson(drogiJSON, {
        onEachFeature: onEachFeature,
        pointToLayer: function (feature, latlng) {
            switch (feature.properties.Remember) {

            }
        }
        }).addTo(map);
        })

        var osm = L.tileLayer(
            'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'
            , {attribution: attribution}
    );

        var zabudowaJSON_l = L.geoJson(zabudowaJSON.geojson).addTo(map);
        var drogiJSON_1 = L.geoJson(drogiJSON.geojson).addTo(map);

        var baseLayers = {
            "OpenStreetMap": osm};

        var overlays = {
            "zabudowa": zabudowaJSON_l,
                "drogi": drogiJSON_1};

    L.control.layers(baseLayers, overlays).addTo(map);

    </script>

</body>

`


texts: Cloud and cloud shadow masking for old LANDSAT and ASTER images in GRASS

texts:
I am trying to remove cloud and cloud shadows for Landsat 4-5 ASTER images in GRASS GIS.

I have knowledge that detecting cloud and cloud shadow pixels which is >(255*0.2), but I cannot figure out the appropriate syntax for r.mapcalc?


texts:
I have the raster below which I want to convert to a set of vector lines:

As you can see, there are small breaks in the lines and some bits are double-width. I want to be able to reliably import these sort of images to a vector in ArcGIS.

I've spent a lot of time trying to get tools like Integrate, Extend Lines, Trim Lines and Unsplit Lines to do what I want, but I just can't seem to achieve it. I guess this problem must have been experienced before, does anyone have any ideas for a workflow that would do what I want?

I thought of maybe trying to clean up the raster before-hand, but I'm not sure how to go about that.


texts: Ordering of VisibleLayers in Infowindow by clicking on map

texts:
I am trying to display the information of multiple layers on infowindow by onclick event in the proper order of layers they exist on the map.
I have written some code for this, but the infowindow displays layer information with different layerorder on different clicks.
i.e on one click infowindow display the layer information with order

layerID:3

layerID:2
and in some other click it shows with order

layerID:2

layerID:3

Actually we are accessing the service in the code by using
setProxyPage: function () {
            //Set rule to use proxy to access services without going through web adaptor
            //https://developers.arcgis.com/javascript/jshelp/ags_proxy.html
            esriConfig.defaults.io.proxyUrl = app.appConfig.ProxyUrl;
            urlUtils.addProxyRule({
                proxyUrl: esriConfig.defaults.io.proxyUrl,
                urlPrefix: app.appConfig.ArcGISServerUrl
            });
        },

var visibleLayers = array.filter(app.mapTOC.getVisibleMapLayers(), function (layer) {
                    return layer.infoTemplate != null;
                });

                //handeka US2325 May 9/2016 popup draw order fix, reverse the array so layers drawn on top will be processed first
                //visibleLayers.reverse();

                var querys = [];
                dojo.forEach(visibleLayers, function (layer, index) {
                    //Identify the features that intersect the point the user selected
                    //When all tasks have returned, load the infowindow and show it on the map
                    //might be faster to use queryTask but domain based fields return the codes not the display values and then you need to also fix those up
                    var identifyTask = new IdentifyTask(layer.mapServiceURL);
                    var identifyParams = new IdentifyParameters();
                    identifyParams.tolerance = 5;
                    identifyParams.returnGeometry = true;
                    identifyParams.layerIds = [layer.layerIndex];
                    identifyParams.layerDefinitions = layer.dynamicLayer.layerDefinitions || [];
                    identifyParams.layerOption = IdentifyParameters.LAYER_OPTION_TOP; //only identify the top most visible layer, we are passing only 1 layer id at a time in so this always works
                    identifyParams.width = app.mapUtil.map.width;
                    identifyParams.height = app.mapUtil.map.height;
                    identifyParams.geometry = mapPoint;
                    identifyParams.mapExtent = app.mapUtil.map.extent;
                    querys.push(identifyTask.execute(identifyParams));
                });

Please suggest to me where to modify the code to get same layerID order in infowindow for all clicks on map.


texts: Convert multiple Shapefiles in Raster in R(and then plot it)

texts:
I'm trying to convert several shapefiles in rasters at the same time. I already was able to read the shapefiles by doing this:

library(maptools)

shps <- dir(getwd(), "*.shp")
for (shp in shps) assign(shp, readShapePoly(shp))
for(j in 1:245)
{
New<-readShapePoly(shps[j])
}

But now, I don't know how to convert these to raster and then plotting it. I tried the commands on this page, but I only obtain errors


texts: Adding clip function to python buffer script

texts:
I have posted my script for buffering and dissolving polygons.

Could someone help me incorporate an Erase function in order to erase the input file from the buffer?

Script:

import arcpy

infc = r'C:\My\File\Input.shp.shp'
outfc = r'C:\My\File\Output.shp'
bufferDistance = 76.2

arcpy.Buffer_analysis(infc, outfc, bufferDistance, "", "", "ALL")


texts: Aerial Image basemap: Problem with QGIS QuickMapServices Plugin MapQuest Layer

texts:
I need a areal image or satellite Image  as a basemap for some maps. Since I have read that the OpenLayers plugin is no longer supported here, here and here (just to name a few), I changed to the QuickMapServices plugin.

However, now I'm trying to get a high-resolution areal / satellite image as a base map and therefore I chose the MapQuest Aerial layer. Yet, this plugin does not work. I am getting the error message

  QuickMapServices: Failed to download all xx files. - MapQuest Aerial

I checked the CRS. It is set to EPSG:3857 (WGS 84 / Pseudo Mercator) and I also tried others.

Do you know how to solve this error? Or is there another plug-in that provides high-res basemap imagery?


texts: Understanding Precision parameter in Select By Location tool of QGIS?

texts:
Is there anybody that can tell what is the purpose of having a "Precision" parameter on
Vector | Research Tools | Select by Location?

Where I can find or read about how this "Precision" parameter works?

I'm using QGIS 2.16.2 running on Ubuntu 16.04.1


texts: Field Calculator Mass Change Freezing issue, Any other options?

texts:
I have a list of ~2300 points, that i need to change a whole field's ("JointUse") attributes from null to "N" (for No). I've tried doing the basic field calculator change but I'm assuming since I'm running through Citrix its a bit much for it to handle (which seems pathetic). I'm not too familiar with scripts and was wondering if there was a way that would avoid this freezing issue.

EDIT:
The data is a feature class
Subsetting was my initial attempt to fix but it will still give me issues at as low as 30 points. Sometimes it works, sometimes it freezes.

I will try some of your other suggestions and post back Branco
Data is taken from an oracle database. I am not used to this style setup so these performance errors and issues are new to me.


texts: Calculating orientation of each side of polygon using ArcPy?

texts:
I want to examine the orientation of each line in a polygon so that I can calculate their solar exposure. Each polygon represents a building, and has an associated height. For the moment, I just want to consider the orientation, and will later consider shading issues.

One approach I thought was to split the polygon into lines, and to calculate the orientation of each line, but the difficulty is that I then have to identify the outer face of that line. Although most of the polygons are simple four-side figures with straight lines, there are a small number where this is not the case (an issue which I just want to consider, but do not have to solve yet).

I'm familiar with python and planned on doing this all from a script.


texts: QGIS 2.14 fails to install on Ubuntu 14.04

texts:
My previously working installation of QGIS 2.14 on Ubuntu 14.04 suddenly failed to start QGIS.  I have been trying to reinstall QGIS without success.  I have tried several ways to completely uninstall first, including this -

sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get -f install
sudo apt-get autoremove qgis
sudo apt-get --purge remove qgis

Then, on trying to reinstall QGIS, install fails with this error -

Setting up qgis-providers (1:2.14.0+20trusty-ubuntugis) ...
/usr/lib/qgis/crssync: symbol lookup error: /usr/lib/libqgis_core.so.2.14.0: undefined symbol: initGEOS_rdpkg: error processing package qgis-providers (--configure): subprocess installed post-installation script returned error exit status 127

So qgis-providers is not getting configured.  I have no idea what the undefined symbol issue might be.

I was using the qgis debian repository (http://qgis.org/debian) + the Ubuntugis repository (ppa.launchpad.net/ubuntugis/ubuntugis-unstable/ubuntu).  Also tried qgis ubuntu repos (http://qgis.org/ubuntugis).  Tried only debian qgis repos (with ubuntugis turned off.  All combinations fail configuring qgis-providers with same error.

I was able to install qgis 2.0 from the standard Ubuntu repository apparently without problem, but I find that my QGIS project files saved from 2.14 will not open in 2.0.

This has me stumped.  I thought for sure I could just reinstall to recover, but after several frustrating hours, I could sure use some help or clues to some resolution.


texts: Have any handler or procedure, that call automatic when the click or unclick menu item or button? Similiar SelChangedHandler.


texts: Can you create a polyhedron (and fill it) in Google Earth?

texts:
I would like to create a polyhedron (3D polygon) in Google Earth/KML. (For example, a cube defined by 8 points.) Is there a specific way to create a polyhedron? Or you just have to create multiple polygons (6 squares for a cube)?

If so, is there also a way to "fill" the polyhedron with a color?


texts: Keeping attribute data when exporting KML to feature class

texts:
I am working on updating kml files into an mxd. I am able to use the conversion tool to change each KML to a layer file, but I am unable to keep the original kml attribute data. When I export point files, it exports as one single point instead of multiple points which does not make sense to me.

Is there a way convert KML/KMZs to a feature class and keep all of the original data?


texts: GRASS - Aligning grids of different rasters

texts:
I am working on a Landsat analysis script using GRASS GIS.

For that, I need to focus on a certain area based on raster "landscape" using r. mask raster="landscape" cat=$foo and then run r.reclass on raster "ndvi". I have realized that the two rasters are not perfectly aligned, as this close up image shows.

I thought that GRASS would take care of this during import!

Can someone tell me how to correct this, and how I can prevent this from occurring?


texts: How to permanently change Arcmap table display?

texts:
At Arc 10.0 I can configure the properties of an Arcmap numeric table field using its Field Properties > Numeric... > and then clicking the "Show thousands separators" checkbox on.

But I would like to make that setting permanent (i.e. always show thousands separators) for every numeric field, across every table, for every map document, forever.

This doesn't appear in the Arcmap Options, nor in AdvancedArcMapSettings.exe.


texts:
I have created a basic mining subsidence likelihood map which contains the variables of depth and distance from lineament using the weighted overlay tool.

From these results I would like to create a Risk Map which takes into account types of road which intersect these areas. I would have different types of road e.g. major, minor, private etc. Each of these types of road would have a different consequence if it were subjected to subsidence. High consequence for major, low for minor.

I know that Risk = likelihood * consequence. So would I be able to just multiply the likelihood results with my reclassified road data or would it be better to include it in the Weighted Overlay analysis?


texts: Remove points with less than two lines connected

texts: I want to delete points created with Network Analyst with less than two lines connected. Is there any smart way to do that? Is it possible to count the number of lines the point is connected to?


texts:
I am using PostGIS 2.0.

I have a data set of national boundaries for the African continent. These are in a multipolygon table in postgis. Each country has multiple entries (rows) such that some of the countries in my table have 20 or 30 rows with individual geometries. I want to combine them multiple rows for each country into a single polygon (if possible).

The main reason I want to do this is because I'm creating a map in QGIS with this as my base layer and want to label the countries. At the moment however I get 20 to 30 labels per country - I just want one!

I have tried ST_Union which I thought would combine all of my individual geometries into one (per Country) But it only produced geometries for the countries where there was only one geom to begin with:( This is my query:

    SELECT
  "africa_ALL".name,
 ST_Union(geom)
FROM
  public."africa_ALL"
  GROUP BY name
  ORDER BY name;

Can anyone help?


texts: QGIS temporal animation with date values in different columns

texts:
I'd like to create a time series animation in QGIS 3.14. My data is structured in a way that the dates are given by the field names. I have field names like "country_name", "1/15/20", "1/16/20", "1/17/20" and so on. For the temporal controller in QGIS it seems as I would need to have the dates all in one field. I can not simply transpose the data (switch columns and rows) in Excel since I would need a seperate country row for every date.
Is there a way how I can make this data usable for QGIS?


texts: Printing select query result in text file in mapbasic

texts:
I want to print a select query having number of records in text file in mapbasic but no successful results as i am using below code:

Open file "E:\Export.txt" for output as #1
Print #1, select Col1, col2 from table1
close #1


texts: Getting *.las file data into SAGA las processing tools?

texts:
How do I get .las files into SAGA las processing tools?

Do I have to convert *.las data to *.sprm format first?
If so, how?


texts: Extract/Split raster dataset by attribute (OBJECTID)

texts:
I have a raster dataset with an attribute table generated from a series of image classification (unsupervised) and processing tools (majority filter + boundary clean). The attribute table shows pixels of the classified image, grouped by classification i.e. the "OBJECTID" field.

I want to extract the portion of the image by "OBJECTID" to divide the classified image into separate rasters and ultimately, separate feature classes. e.g. take all pixels with OBJECTID = 2 and copy into new raster or convert to feature class

This has proved somewhat impossible for me so hopefully there's something simple that I'm missing?


texts: Creating metadata with PostgreSQL for GeoNetwork?

texts:
I am using a function to create metadata with postgres for geonetwork. The goal of the function is to automatically create a metadata with basic information. Moreover, when the data is modified, the metadata will automatically also be updated. The function works and the xml & other information appears in the metadata table in geonetwork.

The problem is when I try to create a new metadata, it doesn't appear in the geonetwork catalogue. All the information appears in the metadata table but not in the geonetwork interface. If I modify the xml directly in the metadata table, then the modification appears in the geonetwork catalogue... Also there are no error in the xml.

Anyone can help me?


texts: ST_Distance is not delivering right results

texts:
I want to calculate the distance between lat/lon points.
I tried the following queries:

Select
ST_DISTANCE(ST_GeomFromText('POINT(-73.97923 40.75571)', 4326), ST_GeomFromText('POINT(-73.974509 40.757108)', 4326))

which gives 0.00492364143698933 as a result.

and

Select
ST_DISTANCE_SPHERE(ST_GeomFromText('POINT(-73.97923 40.75571)', 4326), ST_GeomFromText('POINT(-73.974509 40.757108)', 4326))

which gives 426.951968421872 as result.

If I look at the distance between this point in Google Maps http://goo.gl/maps/GvhFM I get 1,1 miles (~1770m) as a result. Why this mismatch? How can I get the real (Google Maps) distance?


texts: QGIS use relations in expressions (for symbol and print composer)

texts:
I have a shapefile layer a relation linking data from a csv file. This is a one to many relationship where a parcel could have multiple entries from the csv.

How do I reference that data in expressions and print? In my print composer I want to list an attribute for each referenced entry attached to a parcel, and I also want to reference the data in symbology.


texts: path in openstreetmap or google maps based on path in svg

texts:
I'm about to create an application that should try to create a path in openstreetmap or google maps based on a given path in a svg. For example, I've got the following svg:

What tools to use and how to start such project? I've already checked overpass and openlayers. Nonetheless, it's not quite obvious for me how to start. One main problem for me is: How to determine the angle between two lines in osm or google maps? Or even: How to determine the angle of one single line? Let's take for example the only line above with the angle 135°. Determining a perfect vertical or horizontal line seems simple as the latitude or longitude keeps its value. But what about anything else?

Three important notes:

the path in the svg can be scaled arbitrarily on the map. Thus, on a map the path can have a perimeter of 1 mile or 100 mile.
the rotation of the path on the map can be arbitrary as well. It's about finding the shape of the svg-path which can also be rotated
and even the shape can be distorted to a certain degree. This means, all the relative lengths of the lines to one another don't have to be perfectly exact. Even the angles can differ to some extent.

Are there any experts on this particular subject that could give me some helpful hints how to master that task?


texts: Displaying lat long values from XLS in ArcGIS Desktop?

texts:
I have a .xls spreadsheet with about 60,000 rows. Most of them have Latitude and Longitude.
I simply want to display these as points in Arc10.

I've tried making a .dbf in arccatalog and creating a feature class from XY data. The first times I tried this the rows that had no lat/long were given 0,0. The problem is the scale is about 1:1e200+ feet... so the points with correct lat/long are all together but so tiny I can't even zoom into them.

So the second time I just took out all the rows without lat/long. Now the points show up but compared to the old points and the counties they are not lined up and they are tiny...

I've also tried using it as a .csv and as the .xls and in QGIS. I went through all the rows and took out the lat/long points that were entered incorrectly (not in decimal degrees) as well...

On the map there little red point way off where it should be, and it is actually 40,000 points on a scale of 1:19 feet instead of 1:3,000,000ish... The projection is the same as the other layers and when I click on individual points they have the same lat/long, just in different spots.


texts: Using Data Driven Pages, Graphs and selections in ArcMap?

texts:
In ArcMap 10.1 is it possible to create a selection set based on the extent from a Data Driven Page (DDP)?

I have a layout view with a map and a graph.  The graph is set to only plot the selected set of features.  Right now I am paging through the DDP and drawing the selection box manually.  I would like to have the DDP also select point FC within the feature extent.


texts: qgis ver 2.0 vector layers not visible over raster

texts:
This seems like a simple thing, but I cannot get it to work in 2.01. I've done it extensively in 1.8.
I have vector line layers and raster layers. I put the vector line layer in order "above" or on top of the raster, but the lines do not display. If I turn off the raster, the line vector layer appears within the raster area. Lines outside of the raster boundary are always seen with the raster layer on. I've tried changing the order of the layers and nothing happens.

If I make the raster layer transparent I can see the vector lines. Either I'm doing something wrong or this is a bug.


texts:
I'm having some trouble getting the following things straight with , does this make sense?

EPSG:4326 WGS84
Coordinate system: WGS84
Datum/Ellipsoid: WGS84
Projection: longlat


texts:
According to @Mourner in this gihub issue regarding filtering cluster in Mapbox here.

  "you'll have to filter manually and run setData to reset the whole
  dataset..."

I have also found an example of this in this fiddle.

But how do I set a filter in the .setData method?

My html:

        Arrive

my js:

$(".filter").click(function () {
  var filter_key = $(this).attr("alt");
  var filter = ["==", 'navtag', filter_key];
  map.getSource('points').setData(**filtered data**);
..
});


texts: QGIS 3.0 - Creating a dot map with multiple categories

texts:
I'd like to create something almost identical to this:

I'd like to display what languages are most spoken within each neightbourhood. My data has 6 languages. Is this possible for a novice like myself? I've put together some maps with 1 category of data (eg. population, income, etc), but never with 6 categories.

My data table looks like this:

Is there a relatively easy way to do this? Is my data organized properly to do so? Is there a better way to represent this data? I've tried using the Random Points Inside Polygons but I can't get it to work.

Here's my error message:
Traceback (most recent call last):
File "C:/OSGEO4~1/apps/qgis/./python/plugins\processing\algs\qgis\RandomPointsPolygons.py", line 165, in processAlgorithm
pointCount = int(value)
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

Execution failed after 0.10 seconds

My data does not have lat & long for each point.


texts: Feature count continues after turned off

texts: I have several vector layers for which I had at one point turned on "show feature count"   I've since turned it off, but every time I work on one of my layouts, I get constant pop-up messages that say "Task complete - Counting features in xxy". It seems to be really slowing down my project and is really annoying (I am aware I can turn off notifications).   So is there some feature I may be unaware of that will cause QGIS to count features, other than the "show feature count".


texts: Creating/drawing "freehand" polygon features in QGIS?

texts:
I installed the Freehand Editing plugin but it doesn't seem to work with the latest version of QGIS; the icon appears on the Ditizing Toolbar but the icon is disabled.

Is there any way to use a freehand drawing/editing using a Wacom tablet and a pen in QGIS 2.2?


texts: Unable to edit PostGIS DB using QGIS 2.10, works on 2.8

texts:
I have data in PostGIS DB which I need to edit with QGIS. I created a project file with QGIS 2.10. I was able to connect and open the PostGIS database, but ran into problems when I tried to edit DB with QGIS 2.10. Editing tools are greyed out and I can only add more polygons. After adding new polygons I'm unable to remove them. I tried to open this DB with same project file on QGIS 2.8 and found out that it works like a charm. I was able to edit data (like reshape polygons and change attributes) with QGIS 2.8 but not with 2.10. I installed 2.10 through OSGeo4W (64-bit) and 2.8 from standalone package and I'm running this circus on Windows 7 64-bit.

What might be the problem? Is it PostGIS related or is there something wrong with QGIS 2.10 settings?


texts:
While I know I can annotate within a map, what is being used for documenting your work:sources of data, choices of color/per layer with each map made ( thinking along the lines of templateing, so as not have to deconstruct a map after the fact ).

laundry list of what makes up the map, font selections, color choices.


texts: postGIS views, qGIS, qGIS python console

texts:
Using a win 7 machine, I have been revising tables in postGIS, then looking at the results in qGIS: with following script and run it in the qGIS python console.

import random
uri = QgsDataSourceURI()
myLayer = "layer_name"
myPrimaryKey = "the_key_name"
uri.setConnection("localhost","5432","database_name","user","password")
uri.setDataSource("public",myLayer,"geom","",myPrimaryKey)
vlayer= QgsVectorLayer(uri.uri(),myLayer+str(random.randrange(0,600)),"user")
QgsMapLayerRegistry.instance().addMapLayer(vlayer)

The problems I am running into are twofold:

Sometimes if I do not change the name of the table, the above script does nothing.  (The random # is there so that I can see if the script has added a layer and with a new name.)
More importantly, the above script rarely works with postgis "views," meaning that each time I want to revise a table, I must first drop it.  I'd rather be replacing views.  The problem relates to this line:

uri.setDataSource("public",myLayer,"geom","","apn")

It let's me specify a schema, "public;" but I cannot figure out a way to say whether a table falls under the next level, namely postGIS tables or postGIS views.  If I could do this, I would then be able to specify the name of the view.  Yes, DBManager is "aware" of postGIS views.  But I would like to know if the qGIS python console can work with postGIS views.


texts: ModelBuilder continually overwrites instead of creating new file?

texts:
I am working on building a model that uses this tool to convert Points into GPX files for use in my GPS units.

I've built a simple model that seems to work, except that the final output is constantly overwriting with the same instead of iterating to the next Name entry.

The model looks like this

Geodatabase holding file is a parameter that lets me select the GDB with all the various point layers. Name of File is basically R:\FilePath\GPX\%Name%_GPX.gpx

When I run the model, it will iterate down the line of files inside the GDB, but they all just get the name of one of the files.

The results window looks like this, repeated.

Executing (Features to GPX): FeaturesToGPX "R:\FilePath\2016ST_AllPoints.gdb\ST2016IA131" R:\FilePath\GPX\test1\ST2016IA201_GPX.gpx # #
Start Time: Tue Oct 25 10:35:20 2016
Running script FeaturesToGPX...
Completed script FeaturesToGPX...
Succeeded at Tue Oct 25 10:35:21 2016 (Elapsed Time: 0.76 seconds)
Executing (Iterate Feature Classes): IterateFeatureClasses "R:\FilePath\2016ST_AllPoints.gdb" # POINT NOT_RECURSIVE
Start Time: Tue Oct 25 10:35:21 2016
Succeeded at Tue Oct 25 10:35:21 2016 (Elapsed Time: 0.27 seconds)
Executing (Features to GPX): FeaturesToGPX "R:\FilePath\2016ST_AllPoints.gdb\ST2016IA156" R:\FilePath\GPX\test1\ST2016IA201_GPX.gpx # #
Start Time: Tue Oct 25 10:35:21 2016

Anyone have an idea why my model is overwriting and not moving on?


texts: Elevation and Volume relationship curve in QGIS

texts:
Is there any tool in QGIS3 or any open source tool which does a Volume against Elevation curve when you provide a polygon?

For clarity enter link description here has a good way to calculate the volume from one elevation but if you need the elevation vs volume curve between two elevations this can be time consuming. For example if you need to know the volume vs elevation between 400m and 700m at 0.1m intervals you will need (700 - 400)/0.1 = 3000 surfaces.

I'm trying to calculate the a reservoir dam capacity where I need to know the total volume at a certain elevation of an irregular surface.

What I'm trying to do is something like this:
How To Calculate Surface/Cut Volume QGIS - Advanced

However this process is time consuming especially with RL's small resolutions (0.1 m)

There are some commercial tools available to do this such as Global Mapper:

Cut and Fill Tool - Global Mapper


texts: Problem generating Geodatabase Diagrammer

texts:
I am using ArcGIS 10.1 and Visio 2010.  When I am trying to generate the diagram using the geodatabase diagrammer it has the following to error messages:

Source at Microsoft.Office.Interop.Visio.DocumentsClass.Add(StringFileName) at GeodatabaseDiagrammer.VisioDiagram.OpenVisioDrawing(String fileName, String pathName) in C:\agis\Tools\ArcGIS\10x\GeodatabaseDiagrammer\AddInSourceCode\Version1.2\GeodatabaseDiagrammer\Helpers\VisioDiagram.vb:line 102

Msg: File not found.

Then it would pop up another dialog box and say
Source: at GeodatabaseDiagrammer.VisioDiagram.SectionHeader() in C:\agis\Tools\ArcGIS\10x\GeodatabaseDiagrammer\AddInSourceCode\Version1.2\GeodatabaseDiagrammer\Helpers\VisoDiagram.vb:line 160

Msg: Object reference not set to an instance of an object.


texts: How to configure osm2po to ignore certain class types?

texts:
I'm trying to import data using osm2po but am only interested in driving distances, so I'd like to omit all footway, cycleway, steps, etc. in the imported dataset.  How can I configure osm2po to do this ?

The documentation isn't completely clear... I tried leaving the config of wtr.finalMask as only car, which I interpreted it to mean it should only create ways which include the car type.

# only convert ways containing one of these flags
wtr.finalMask = car

But this is not the case in the resulting dataset.  The ways with class types for just bike, foot, and ferry are all present.

Do I need to just remove these lines from osm2po.config ?

wtr.tag.highway.pedestrian =     1, 62, 5,   bike|foot
wtr.tag.highway.track =          1, 71, 10,  bike|foot
wtr.tag.highway.path =           1, 72, 10,  bike|foot
wtr.tag.highway.cycleway =       1, 81, 15,  bike
wtr.tag.highway.footway =        1, 91, 5,   foot
wtr.tag.highway.steps =          1, 92, 5,   foot
wtr.tag.route.ferry =            2,  1, 10,  ferry
wtr.tag.route.shuttle_train =    2,  2, 50,  rail|car
wtr.tag.railway.rail =           3,  3, 50,  rail

Or is there some other mechanism for excluding them ?


texts: Applying consistent symbology across all fields of layer using ArcPy?

texts:
I have a shapefile of a country with 50 fields. Each field contains values (-3 to 3) for a particular month. I would like to create a for loop that iterates through the fields, updates the map, uses a common symbology and exports to a PNG file.

The symbology I would like to use is one color per number. -3 = dark orange, -2 = light orange, -1 = light yellow, 0 = grey, 1 = light green, 2 = dark green, 3 = very dark green. I've assigned these colors to the layer in the .mxd, and created a .lyr.

So far, I have this:

import arcpy
mxd = arcpy.mapping.MapDocument(r'path/to/mxd')
shp = r'path/to/country_shapefile'
outdir = r'path/to/out/directory'
symbology = r'path/to/symbology.lyr'

df = arcpy.mapping.ListDataFrames(mxd)[0]
fields = [field.name for field in arcpy.ListFields(shp)]
fields = fields(17:len(fields) # I only need to display the data in fields 17 onwards
layer = arcpy.mapping.ListLayers(mxd, 'country')[0]
symbol = layer.symbology

for field in fields:
    symbol.valueField = field
    symbol.classValues = [-3,-2,-1,0,1,2,3] # The range of values in the symbology
    arcpy.ApplySymbologyFromLayer_management(layer, symbology)
    arcpy.RefreshActiveView()
    arcpy.RefreshTOC()
    arcpy.mapping.ExportToPNG(mxd, outdir+'\\'+field+".png")

---

When I try this, I get a map displaying the values in every field, but not with the correct symbology.


texts:
I have a couple of terabytes of 3in GeoTIFFs that I would like to host on my GeoServer (used by a non profit during disasters when there is no Internet). I have read that the best way to host these images is my creating mosaic overviews so that the client is not trying to load terabyes of data at a time. I have looked at gdal_retile but that appears to be doing the opposite of what i am trying to do. I have the most zoomed in image and want to create the mosaics for overviews.

I am using GeoServer and QGIS as my client.


texts: Scale in printed map (mxd) is different in code to manual printing

texts:
This question is related in part to a previous question I have asked.

I have tried printing an A3 mxd with the Print Active View code as published by ESRI and have changed only one line of code and that is, to change it to A3 size.

docPaper.FormID = 8;

This forces it to a size of A3 instead of the default 0 Letter size (esriPageFormLetter).

The map prints out fine(ish) but it is not to scale i.e. the map is supposed to be 1:10000, but the space between the graticule grids is 9.7cm, not 10cm as it should be.

If I print the EXACT same mxd out, but via the manual method i.e. in ArcMap itself, File -> Print. The scale is correct and it measures 10cm.

Important to note that I have not changed any of the Page and Print Setup settings between the two prints.

Why would it do this?

See pic below to help understand whats going on.

http://img819.imageshack.us/img819/1959/scalemapcomparison.jpg