texts:
I've developed an application on Vue JS which loads the services from the ArcGIS Server via REST API.

When I load a service by the URL http://arcgis/.../query?f=json&outFields=*, the layers are added with a given color.

Is there a way to change the color of the features on the map, without editing on the server? It's done somehow here via the Change style option.

Now I'm solving this by adding the polygons with chosen colors on the features, however, this is awful regarding the performance.


texts: Spatialite err no such function CastToMultiPolygon

texts:
I downloaded three windows binary files (executable, library and gui) and put them in the same folder. When I execute this spatialite command in command line prompt:

INSERT INTO Highways_Buffer (PK_UID, Name, Geometry)
SELECT NULL, PK_UID, CastToMultiPolygon(Buffer(Geometry, 300))
FROM HighWays WHERE PK_UID = 1;

It gives me this err:

SQL error: no such function: CastToMultiPolygon

How can I enable cast functions?


texts: How to parse xsd:schema file using openlayers?

texts:
I got layer column names using this thread. But I am stuck parsing it. How to parse this xml using openlayers?

<xsd:schema elementFormDefault="qualified" targetNamespace="http://www.openplans.org/topp">
    <xsd:import namespace="http://www.opengis.net/gml" schemaLocation="http://localhost:11032/geoserver/schemas/gml/3.1.1/base/gml.xsd"/>
    <xsd:complexType name="statesType">
        <xsd:complexContent>
            <xsd:extension base="gml:AbstractFeatureType">
                <xsd:sequence>
                    <xsd:element maxOccurs="1" minOccurs="0" name="the_geom" nillable="true" type="gml:MultiSurfacePropertyType"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="STATE_NAME" nillable="true" type="xsd:string"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="STATE_FIPS" nillable="true" type="xsd:string"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="SUB_REGION" nillable="true" type="xsd:string"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="STATE_ABBR" nillable="true" type="xsd:string"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="LAND_KM" nillable="true" type="xsd:double"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="WATER_KM" nillable="true" type="xsd:double"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="PERSONS" nillable="true" type="xsd:double"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="FAMILIES" nillable="true" type="xsd:double"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="HOUSHOLD" nillable="true" type="xsd:double"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="MALE" nillable="true" type="xsd:double"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="FEMALE" nillable="true" type="xsd:double"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="WORKERS" nillable="true" type="xsd:double"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="DRVALONE" nillable="true" type="xsd:double"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="CARPOOL" nillable="true" type="xsd:double"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="PUBTRANS" nillable="true" type="xsd:double"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="EMPLOYED" nillable="true" type="xsd:double"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="UNEMPLOY" nillable="true" type="xsd:double"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="SERVICE" nillable="true" type="xsd:double"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="MANUAL" nillable="true" type="xsd:double"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="P_MALE" nillable="true" type="xsd:double"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="P_FEMALE" nillable="true" type="xsd:double"/>
                    <xsd:element maxOccurs="1" minOccurs="0" name="SAMP_POP" nillable="true" type="xsd:double"/>
                </xsd:sequence>
            </xsd:extension>
        </xsd:complexContent>
    </xsd:complexType>
    <xsd:element name="states" substitutionGroup="gml:_Feature" type="topp:statesType"/>
</xsd:schema>


texts: why gdaldem is not producing any result?

texts:
I have a geotiff file with class values (0, 1,  2, 3, and 4).
I want to show each class as different rgb color.

So, I created the text file (color_relief.txt) which contans the following:

0 55 78 94
1 98 23 64
2 112 35 99
3 34 67 72
4 78 250 60

Then I run the following code using python:

import subprocess
in_file =  'single_band.tif'
text_file = 'color_relief.txt'
gdaldem = 'C:\\Python27\\Lib\\site-packages\\osgeo\\gdaldem.exe'
out_file =  'result.tif'
subprocess.call([gdaldem ,'color-relif',in_file,text_file,out_file,'-exact_color_entry','-b','1'],shell=True)
in_file, out_file = None, None

Unfortunately, no result file is obtained.
What is wrong with my code?


texts: Openlayers get list of all layers in Geoserver

texts:
How can I get a list of all layers deployed in Geoserver separated by Vector/Raster?
Similar to how Geoserver itself does this when one uses the WPS Request Builder (it then shows a complete list of all available Vector or Raster layers - depending on the service one wants to use).

I can only get a list of all layers when I know the workspace (the name of the WMS) they are running in by calling the capabilities of the WMS. I want to be able to recieve the workspave and the name of the layers.

Edit: I just found out one can use the rest API. Thats a nice thing. I can get all layer names by calling http://localhost:8080/geoserver/rest/layers.json but how can I than seperate those by Vector/Raster?


texts: I want to use QGIS to make several views of bold colors for one same map. I've been using the layers in order to keep one on top of another. How could i make a composition on the print composition where i toggle through layers in order to view the different layers I've built?


texts: Zoom to polygon bounds on click. Leaflet ´, GeoJSON

texts:
I have a leaflet map with a lot of polygons (borders). I would like to zoom to the bounds on the polygon, when the user click.

Until now its only possible for me to zoom to the the bounds of all the polygons in the GeoJSON file.

var map = L.map('map')
    .addLayer(mapboxTiles)
    .setView([50.444508, -80.499491], 10);

var markers = new L.geoJson(null, {
    pointToLayer: function (feature, latlng) {
        return L.marker(latlng, {})
    }
});

markers.on('click', function() {
    map.fitBounds(markers.getBounds());
});

markers.addTo(map);

$.getJSON('contry.php', function (data) {
     markers.addData(data)
});

what to change here?

markers.on('click', function() {
    map.fitBounds(markers.getBounds());
});


texts:
I'm having an issue with geolocation from OpenLayers. I used the example from http://openlayers.org/en/latest/examples/geolocation.html It works fine until I leave the page I'm on and then try to enter the page again. I don't get my location until I refresh the page. I get the following error:

 angular.js:14362 Possibly unhandled rejection: Your maps are not found we have checked the maximum amount of times. :)

I'm using an Angular,

 <a href="" ui-sref="venues.create">  Create New Venue   </a>

Map code when I am on the venues create page :

var map,geolocation;

    var view = new ol.View({
        projection: 'EPSG:4326',
        center: [0, 0],
        zoom: 17
    });

    var raster = new ol.layer.Tile({
      source: new ol.source.BingMaps({
        key: 'ApwK1WfFWCTGox_FfcbOJrt5b0UBoem7K87N0lXgy6H9vC2ygvEg4iDP4dtFP6_o',
        imagerySet: 'Road',
        maxZoom: 19
        }),
        preload: Infinity,
    });

    var source = new ol.source.Vector({wrapX: false});
    var vector = new ol.layer.Vector({
      source: source
    });

            map = new ol.Map({
              layers: [raster, vector],
              // Improve user experience by loading tiles while dragging/zooming. Will make
              // zooming choppy on mobile or slow devices.
              loadTilesWhileInteracting: true,
              target: 'map',
              view: view,
              controls: ol.control.defaults({
                attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
                  collapsible: false
                  })
              }),
          });
var init = function (){

        geolocation = new ol.Geolocation({
            projection: map.getView().getProjection(),
            tracking: true,
            trackingOptions: {
                enableHighAccuracy: true,
                maximumAge: 2000
            }
        });

        // handle geolocation error.
        geolocation.on('error', function (error) {
            console.log = error.message;

        });
        var iconFeature = new ol.Feature();
        var iconSource = new ol.source.Vector({
            features: [iconFeature]
        });

        var iconStyle = new ol.style.Style({
            image: new ol.style.Circle({
                radius: 6,
                fill: new ol.style.Fill({
                    color: '#3399CC'
                }),
                stroke: new ol.style.Stroke({
                    color: '#fff',
                    width: 2
                })
            })
        });

        var iconLayer = new ol.layer.Vector({
            source: iconSource,
            style: iconStyle
        });
        map.addLayer(iconLayer);
        geolocation.on('change', function (evt) {

            var pos = geolocation.getPosition();
            iconFeature.setGeometry(new ol.geom.Point(pos));
            view.setCenter(pos);
            view.setZoom(18);
        });

    }
    init();

I created a plunker to demonstrate the issue/

Plunker will open Route 1 as default, if you go to Route 2 the map will load with your location, then go back to route 1 and then back to route 2 location will not show/

https://plnkr.co/edit/s4gLV3xaENThGiXhCi1D


texts: Distance Point x,i from nearest Point x,j report Point x,j ID in r

texts:
I have a sample of points villages x,i, and I want to know the distance between each village x,i and the nearest village x,j. The i, and j depicts two different samples. I am able to find the distance but in addition to the distance I would like to get the name of the nearest village j for each village i. Name is the first column village_j$name.

village_i <- readOGR(~path/village_i)
coordinates village_i <- c('x1', 'x2')
proj4string(village_i) <- CRS("+init=epsg:4326")
village_i = spTransform(village_i, CRS("+init=epsg:4326"))

village_j <- readOGR(~path/village_j)
coordinates village_j <- c('x1', 'x2')
proj4string(village_j) <- CRS("+init=epsg:4326")
village_j = spTransform(village_j, CRS("+init=epsg:4326"))

require(FNN)
g1=get.knnx(coordinates(village_j), coordinates(village_i), k=1)
g1 <- data.frame(g1)
colnames(g1)[1] <- "village_j"
g1$ID <- seq.int(nrow(g1))
pixels <- merge(village_i,g1,by="ID")
remove(g1, village_j)
names(village_i)[names(village_i) == "nn.dist"] <- "dist_village_j"

Any idea?


texts: Triggering QGIS action when plugin button is clicked?

texts:
I tried calling the select free hand tool by below snippet of code.

iface.actionSelectFreehand().trigger()

I dnt have any idea how to call this when i am pressing a button in GUI. my gui is attached below

When Select Area from Map is pressed i want the select free hand to be called in my plugin. FYI the name of Select Area from Map in QTDEsigner is areapushbutton.


texts: ArcObjects/VBA to python Network edge to junction lookup IEdgeFeature equivalent in arcpy

texts:
In an effort to migrate a script that transfers attributes from a geometric network to a feature class (on a given network edge segment, what are the up and downstream junctions?) I would like to determine what the equivalent function in python for the following VBA/.Net IEdgeFeature Interface:

FromJunctionFeature
ToJunctionFeature


texts: Difference between Envelope and BoundingBox

texts:
As you know GeoTools uses OpenGIS declared APIs; BoundingBox and Envelope for example.

picture from geotools docs.

BoundingBox

  Represents a two-dimensional envelope. This interface combines the ideas of GeographicBoundingBox with those of Envelope. It provides convenience methods to assist in accessing the formal properties of this object. Those methods (for example getMinX()) match common usage in existing libraries like Java2D.

Envelope

  A minimum bounding box or rectangle. Regardless of dimension, an Envelope can be represented without ambiguity as two direct positions (coordinate points). To encode an Envelope. it is sufficient to encode these two points. This is consistent with all of the data types in this specification, their state is represented by their publicly accessible attributes.

I read the docs. Both of them describe a bounding region, but what is the difference?And what need to declare both? Where do you use them?


texts: QGIS raster calculator error: cannot convert float infinity to integer

texts:
I just made a simple subtraction between two raster layers and got the error:

  Traceback (most recent call last):
    File "C:/Users/user/.qgis2/python/plugins\raster_transparency\rastertransparency.py", line 150, in layerChanged
      maxValue = int(stat.maximumValue)
  OverflowError: cannot convert float infinity to integer

Both layers are Geotiff 32 bit pixel depth and floating point pixel type.

Is this a bug in the raster calculator or does anyone have suggestions to why I cannot subtract the two layers?
Running QGIS 2.10.1


texts: Batch Exporting MXDs using Python script tool?

texts:
I am trying to put together my second tool so pretty new to this.  What I want it to do is batch plot MXD's layouts to PDF found in a specific folder, without having to be in ArcMap.  I'm trying to run the tool from ArcCatalog solely.  When I run the Python script on its own in ArcCatalog and replace the parameter with the folder location, it works just fine.  When I try to make it into a tool with the only input being the folder location, it doesn't work.  All it does is pop up my script in notepad and says the process is complete.

Can someone tell me what I'm doing wrong?

import arcpy, os

ws = arcpy.GetParameterAsText(0)

mxd_list = arcpy.ListFiles("*.mxd")

for mxd in mxd_list:

    current_mxd = arcpy.mapping.MapDocument(os.path.join(ws, mxd))
    pdf_name = mxd[:-4] + ".pdf"
    arcpy.mapping.ExportToPDF(current_mxd, pdf_name)

del mxd_list


texts: Area Solar Radiation tool in ArcGIS - Outputs for all time intervals vs One Output

texts:
I aim to create output (solar map) every 15 minutes for the whole day and because I am not quite sure how it works, I wanted to validate the sum of radiation: I have created first output with 0.25h interval for each interval and second one with same hour interval (0.25h), but with unchecked "Create outputs for each interval" option. Rest of the options are set in the same way for both cases.

I am a little bit confused because total sum of radiation differs for the outputs (as on the picture):

What am I doing wrong?

I assume it is too big difference to skip it. Maybe the way I am calculating it is not correct.

Is it possible to have such outputs?


texts: Transforming single QgsGeometry object from one CRS to another using PyQGIS?

texts: I have a polyline layer with roads in WGS84 that covers several UTM zones. For every road I need to place a set of points at different distances (in metres). To do so I want to reproject each road to respective UTM zone, create points in this UTM zone, reproject points to WGS84 and add them to respectful layer. There is aQgsCoordinateTransform() class that allows to perform transformation for individual points, but it doesn't accept polylines. I guess I could manually disassemble polylines into the set of points, transform each of them and recreate a polyline, but I hope that there is a build-in method or class that I overlooked, that allows to transform individual polylines.


texts: Wrong typeName generated by wfs-t update request in xml

texts:
I am editing features on a map using Openlayers 3 and Geoserver 2.8 linked to a postgresql Database. for adding features there is no problem but when it comes to update features I get a wrong xml code when I run writeTransaction, here is my code :

var wfst=new ol.format.WFS({
            featureNS: "myNameSpace",
            featureType: "myLayer"
        });
        var node = wfst.writeTransaction(null, [clone], null, {
            featureNS: "myNameSpace",
            featureType: "myLayer"
        });
        alert((new XMLSerializer()).serializeToString(node));

The xml generated is :

<Transaction xmlns="http://www.opengis.net/wfs" service="WFS" version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Update typeName="feature:myLayer" xmlns:feature="myNameSpace">
<Property><Name>geometry</Name><Value>
<Polygon xmlns="http://www.opengis.net/gml"><exterior><LinearRing><posList>-7.741584777832031 33.52100372314453 -7.789649963378906 33.498687744140625 -7.758750915527344 33.45954895019531 -7.70416259765625 33.48186492919922 -7.741584777832031 33.52100372314453</posList></LinearRing></exterior>
</Polygon></Value></Property>
<Filter xmlns="http://www.opengis.net/ogc">
<FeatureId fid="164"/></Filter></Update>
</Transaction>

the problem is here typeName="feature:myLayer" in the Update line of the xml, once I change feature to myNameSpace the request works fine.

and if I leave it like that I get a java.lang.NullPointerException error.

What am I missing here?


texts:
I'm trying to download QGIS 3.10.5 64-bit to my Windows 10 Laptop, but for some reason, the installation decided to cancel.

It stopped nearly 4/5 of the way when running the 'Extract:qgis_zh-Hans.qm'. I got a notification that the Installation was aborted and that the setup was not completed successfully.

I have enough space on my hard drive, so I'm not sure what the problem is here. Anyone that can help me out?


texts: Increase Line Spacing between Key Numbering Items

texts:
I am using ArcMap 10.3 and labeling parcel features by using the Key Numbering option. The key numbering list items appear too close together and overlap.  I want to have more vertical space between each of the numbered items.

Here's what I get:

What I have tried:

Leading: I tried increasing the font leading from 0 to 3 (in the Label tab, Text Symbol dialog).

This causes the labels that are not using Key Numbering to have a greater leading distance, but it has no effect on the items in the Key Numbering list.
Offset: I tried increasing the offset of the text from 0 to 3 (in the Label tab, Text Symbol dialog).

This causes the labels to shift down but not increase the spacing, like this:

How can I increase the vertical distance between the Key Numbering items?

Edited to add:

Per an answer, I tried using a label expression to add additional spaces after each label.  The label expression seems to only have affected the individual labels, and not the key numbering labels.

This is the expression I used (the "a" is added just so I could see the space that is actually being added):

[OWNER] & vbnewline & vbnewline & " a"

And here's the result I got (Notice how the "regular labels" have two lines and an "a" added, while the key numbering labels only add two spaces and then an "a"):


texts: Where can I find QGIS cartogram plug-in?

texts: Can anyone point me in the right direction of the cartogram plugin please? I've had a look on the net but can't find what I'm looking for.


texts: ArcGIS Pro SDK for .Net loading dlls and app.config settings

texts:
I am trying to use some third party dlls (Entity Framework and EntityFramework.SqlServer) in my arcgis Pro sdk module. However, whenever my code runs inside ArcMap pro, I get errors like this:

No Entity Framework provider found for the ADO.NET provider with
invariant name 'System.Data.SqlServerCe.4.0'. Make sure the provider
is registered in the 'entityFramework' section of the application
config file.

I have several stand alone apps with exactly the same app.config file "entityFramework" section which all work fine:
<entityFramework>
    <providers>
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
      <provider invariantName="System.Data.SqlServerCe.4.0" type="System.Data.Entity.SqlServerCompact.SqlCeProviderServices, EntityFramework.SqlServerCompact" />
    </providers>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlCeConnectionFactory, EntityFramework">
      <parameters>
        <parameter value="System.Data.SqlServerCe.4.0" />
      </parameters>
    </defaultConnectionFactory>
</entityFramework>

During debug, I can see that the modules have loaded. In my program output I get messages like this:

C:\Users<username>\AppData\Local\ESRI\ArcGISPro\AssemblyCache{05b82a89-759c-4123-b178-75b72b968646}\EntityFramework.dll'.
Skipped loading symbols. Module is optimized and the debugger option
'Just My Code' is enabled.

'ArcGISPro.exe' (CLR v4.0.30319: ArcGISPro.exe): Loaded
'C:\Users<username>\AppData\Local\ESRI\ArcGISPro\AssemblyCache{05b82a89-759c-4123-b178-75b72b968646}\EntityFramework.SqlServer.dll'.
Skipped loading symbols. Module is optimized and the debugger option
'Just My Code' is enabled.

'ArcGISPro.exe' (CLR v4.0.30319: ArcGISPro.exe): Loaded 'Anonymously
Hosted DynamicMethods Assembly'.

Loaded
'C:\WINDOWS\assembly\GAC_MSIL\System.Data.SqlServerCe\4.0.0.0__89845dcd8080cc91\System.Data.SqlServerCe.dll'.
Skipped loading symbols. Module is optimized and the debugger option
'Just My Code' is enabled.

I wonder if anyone else has had a similar problem, if there is some reference or app.config setting I am missing. Or if ArcGIS pro sdk for .Net doesn't read the app.config?


texts:
Does anyone know of a way to batch convert shapefiles to jpegs or another common image format?

edit: I should have clarified that I would like to apply a styling to each shapefile, and then export the shapefile with that styling to an image.

For example, I have census tracts in a county, and I want an image of each individual tract highlighted while the other tracts are all the same color.


texts:
The problem is that the main site uses the HTTPS protocol, and the GeoServer does not accept requests over the protocol
https://test.geoportal.samgau.com/geoserver/AkmolaRegion/wfs,
gives an error message
<?xml version="1.0" encoding="UTF-8"?><ows:ExceptionReport xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ows="http://www.opengis.net/ows" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/ows http://test.geoportal.samgau.com/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd">
<ows:Exception exceptionCode="InvalidParameterValue" locator="typeName">
    <ows:ExceptionText>Could not locate {https://test.geoportal.samgau.com}001_1132201_ads_lin in catalog.</ows:ExceptionText>
</ows:Exception></ows:ExceptionReport>....

If I change the protocol to HTTP, then everything is ok
GeoServer message:
2020-09-22 18:24:06,311 ERROR [geoserver.ows] -
org.geoserver.wfs.WFSException: Could not locate {https://test.geoportal.samgau.com}001_1132201_ads_lin in catalog.
I can't figure out which direction to look in.
There is very little information on the Internet about this.
What should I do and how should I organize the work?


texts: Image not visible in a webmap from QGIS2WEB

texts:
I have got a map created in QGIS where there are some pictures linked to a different polylines. Those pictures are stored in an image hosting, therefore I got a field in the polyline´s attribute table with the url to those images. Afterwards, I have created a webmap with QGIS2WEB. So far, all ok, I guess.
My issue is that in the popup window in the webmap does not show the images. How could I fix this?
As I said, I got my pictures stored in a image hosting and I would like keep them there.


texts: Georeferencing CAD Causing Close Out/Shut Down of ArcMap?

texts:
I am currently running ArcGIS 10.2.2 for Desktop.

I have no other georeferencing issues regarding TIFFs shapefiles, or otherwise.

However, when I introduce a CAD (or DWG) file into the map and attempt to georeference the file with links, ArcMap immediately freezes for a moment and closes out.

If I move the CAD file using shift or scale, there are no issues, only when I attempt to use links.


texts: I've been searching on how an address score is calculated, but didn't find anything that clearly defines how the score is calculated. So what score value is acceptable to assume that a result is close enough to input address?


texts: Keep receiving query error in Flex Viewer for Search Widget in ArcGIS Server

texts:
I am not sure what is going wrong, but I keep receiving this query error http://i.imgur.com/XXSpEpH.png

Here are the settings for the search widget

     <?xml version="1.0" ?>
<configuration>
    <zoomscale>50000</zoomscale>
    <shareresults>false</shareresults>
    <layers>
        <layer>
            <name>Lumos Fiber</name>
            <url>http://vdi-standard103.lumosnet.com:6080/arcgis/rest/services/Type2CircuitsOffNet/AllType2MapCircuitsOffNet/MapServer/11</url>
            <expression>FiberRingID.RingName LIKE upper('%[value]%')</expression>
            <textsearchlabel>Type in Ring ID</textsearchlabel>
            <titlefield>FiberRingID.RingName</titlefield>
            <fields>
                <field name="FiberRingID.RingName" alias="RingName"/>
                <field name="FiberRingID.FiberID" alias="FiberID"/>
            </fields>
            <orderbyfields>FiberRingID.RingName ASC</orderbyfields>
        </layer>
        <layer>
            <name>IRU Fiber</name>
            <url>http://vdi-standard103.lumosnet.com:6080/arcgis/rest/services/Type2CircuitsOffNet/AllType2MapCircuitsOffNet/MapServer/12</url>
            <expression>FiberRingID.RingName LIKE upper('%[value]%')</expression>
            <textsearchlabel>Search Ring ID</textsearchlabel>
            <titlefield>FiberRingID.RingName</titlefield>
            <fields>
                <field name="FiberRingID.RingName" alias="RingName"/>
                <field name="FPAIRUFiberMerge.FeatureID" alias="FeatureID"/>
            </fields>
            <orderbyfields>FiberRingID.RingName ASC</orderbyfields>
        </layer>
    </layers>
</configuration>


texts: I have only basic knowledge of using SQL code in QGIS. I am trying to use Query Builder to hide some specific line features. I have tried using =! and the id field reference for the particular features I want to hide but this results in zero features being selected. The column is text. I have tried creating a new column as text and identifying the fields I want as 'yes'and then writing a query identifying those fields not yes. I then did the same but this time as a integer but this doesn't work. Can anyone help. I'm sure its a simple task to do. Interestingly the text fields are all blank rather than null. How do you select a field that is empty


texts: Python - Convert csv with unknown number of columns to shapefile

texts:
I have this script that converts a csv file to a shapefile. In this case I am specifying manually the name of columns header. Since now I have files with a big and always different number of columns, I'd like to automatize the script, i.e. making it reading the number of columns and their respective header. Any suggestions?

These are the first 3 line of the csv file:

id  longitude       latitude    D_20150403  D_20150521
1   -16.01746368    17.95987892 11.89926434 15.17788696
2   -16.01752663    17.95999527 16.99330902 15.84250259

    # initialize data lists
ID_n,lon,lat,D_20150403,D_20150521=[],[],[],[],[]

# read data from csv file and store in lists

with open(in_file, 'rt') as csvfile:
    r = csv.reader(csvfile, delimiter=',')
    for i,row in enumerate(r):
        if i > 0:
            ID_n.append(int(row[0]))
            lon.append(float(row[1]))
            lat.append(float(row[2]))
            D_20150403.append(float(row[3]))
            D_20150521.append(float(row[4]))

# set up shapefile writer and create empty fields
w = shp.Writer(shp.POINT)
w.autoBalance = 1
w.field('ID','C')
w.field('Lon','F',10,8)
w.field('Lat','F',10,8)
w.field('D_20150403','F',10,8)
w.field('D_20150521','F',10,8)

# loop through the data and write shapefile geometry and attributes
for i,j in enumerate(lon):
    w.point(j,lat[i])
    w.record(ID_n[i],j,lat[i],D_20150403[i],D_20150521[i])

# save output shapefile
w.save(out_shp)

# create output projection file
prj = open(out_prj, "w")
epsg = spatialreference = "GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]];-400 -400 1000000000;-100000 10000;-100000 10000;8.98315284119522E-09;0.001;0.001;IsHighPrecision"
    #getWKT_PRJ("4326")
prj.write(epsg)
prj.close()

I tried with this, which seems to replicate the data structure but something is wrong in the creation of the shapefile. Any idea?

# read data from csv file and work on the header

with open(in_file, 'rt') as csvfile:
    rh = csv.reader(csvfile, delimiter=',')
    field_names_list = next(rh)
dim_header = [[]]*len(field_names_list)
dic = dict(zip(field_names_list,dim_header))
print(field_names_list)

n_col = len(field_names_list)
print(n_col)

with open(in_file, 'rt') as csvfile:
    r = csv.reader(csvfile, delimiter=',')
    for i,row in enumerate(r):
        if i > 0:
            for j in range(0, n_col-1):
                dic[field_names_list[j]].append(row[j])

# set up shapefile writer and create empty fields
w = shp.Writer(shp.POINT)
w.autoBalance = 1
#write ID
w.field(dic[field_names_list[0]],'C')
#write all the other fields
for j in range(1, n_col-1):
    w.field(dic[field_names_list[j]],'F',10,8)

# loop through the data and write shapefile geometry and attributes
for i,j in enumerate(dic[field_names_list[0]]):
    w.point(j,dic[field_names_list[0]][i])
    for k in range(0, n_col-1):
        w.record(dic[field_names_list[k]][i])

# save output shapefile
w.save(out_shp)

# create output projection file
prj = open(out_prj, "w")
epsg = spatialreference = "GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]];-400 -400 1000000000;-100000 10000;-100000 10000;8.98315284119522E-09;0.001;0.001;IsHighPrecision"
    #getWKT_PRJ("4326")
prj.write(epsg)
prj.close()


texts:
I am trying to use the "Go to XY Coordinate: tool. It used to zoom directly to the coordinates and now it is zooming to 1:38000. I am not sure why it has changed.
Any ideas on how to fix it?


texts:
I have a series of GPS points recorded at an interval from a crop dusting/ aerial topdressing aircraft. They are all time stamped so sequencing is no issues.

When the aircraft is spraying/spreading an attribute is recorded as either '0' for off or '2' on (gate is open).

I have created a subset of data so only have the points for '2' (On).  I now want to create lines linking these points but there are gaps in between spread runs ie the pilot will shut off (not spread) over roads, rivers, bush areas etc (see attached image).  The data points also record things like altitude, speed, heading etc

I have tried Points to Paths but this just creates one continuous set of lines.  Thats not I want as I want to buffer for swath width ie 20m to create a proof of release map.

I have tried the solution provided in this answer on some spread data and works great.

But running the code on the large file failed..

Error Message:


texts:
I'm trying to get events on the client side and showing changes (new markers) in realtime on a leaflet map with socket.io.

The problem is in defining data that comes from socket.. I don't know the propriate way for getting data:

L.layerJSON({
   url: "msg"

I'm trying with url property, but it doesn't work.

Here is the code:

angular.module('app')
.controller('MapController', [ '$scope', '$http', '$interval', 'leafletData', 'socketio',  function($scope, $http, $interval, leafletData, socketio) {

        var map = L.map('map', {
            zoom: 8,
            layers: L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'),
            useCache: true
        });

        var markers = new L.MarkerClusterGroup().addTo(map);

        socketio.on('mapCoord', function (msg) {
            L.layerJSON({
                url: "msg",
                propertyLoc: ['latitude','longitude'],
                propertyTitle: 'name',
                minShift: Infinity,
                caching: true,
                layerTarget: markers
            })
            .addTo(map);
        });

        map.addLayer(markers);
    }])


texts: Select all cities in Germany from city and country layers?

texts:
I have 2 layers:

"layer_1": countries of Europe
"layer_2": cities of Europe

I want to create (and then save) a "layer_3" which would be all the cities of Germany.

Is there any good tutorial of how can I write spatial queries?


texts:
I'm new in QGIS and in GIS.
I want to calculate distance between two points in meters using WGS 84 coordinates. I'm working with QGIS 2.0.1 Dufour and Python 2.7

The code is the following (based on http://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/geometry.html?highlight=measureline#geometry-predicates-and-operations):

point1 = QgsPoint(-46.443077,-67.51561)
point2 = QgsPoint(-46.4446,-67.512778)

#Create a measure object
distance = QgsDistanceArea()

#Measure the distance
m = distance.measureLine(point1, point2)

Using this coordinates I'm getting 0.00321554863126
And in Google Maps is aproximately 290m)

Any help?


texts: I am setting up a GeoServer instance to serve up a few different PostGIS databases. I have GeoServer up and running however, it takes me forever to enter the SLD into GeoServer by hand. Is there a better way to generate SLD for GeoServer via some GUI based application?


texts: How to Average neighboring county data and store in original?

texts:
I have data for several rain stations, i have averaged the data and given each county a value. Some counties have null values and I would like to pull the data from the all the bordering counties and use that to create an average for the null data county.

here is what i have so far

#Make Feature layer of counties that have 'NULL' for TCPT MNTM
#Select all counties that touch the boundaries of a single NULL county
#Average TCPT and MNTM values for selected counties
#Store average back in original counties layer

arcpy.MakeFeatureLayer_management(countyData,"badRows","\"MNTM\" = 'NULL'")
arcpy.MakeFeatureLayer_management(countyData,"goodRows","\"MNTM\" >= 0")

# a snippet i pulled from model builder and exported python code snippet

arcpy.SpatialJoin_analysis("Dissolved_Counties",climateData,"Average_Temperature_For_Texas_Counties","JOIN_ONE_TO_ONE","KEEP_ALL","""FIPS "FIPS" true true false 5 Text 0 0 ,First,#,Dissolved_Counties,FIPS,-1,-1;Shape_Length "Shape_Length" false true true 8 Double 0 0 ,First,#,Dissolved_Counties,Shape_Length,-1,-1;Shape_Area "Shape_Area" false true true 8 Double 0 0 ,First,#,Dissolved_Counties,Shape_Area,-1,-1;TPCP "TPCP" true true false 4 Long 0 0 ,Mean,#,Climate_Data_for_Texas,TPCP,-1,-1;MNTM "MNTM" true true false 4 Long 0 0 ,Mean,#,Climate_Data_for_Texas,MNTM,-1,-1""","INTERSECT","#","#")

###

i guess i am stuck here,  i had before used the arcpy.GenerateNearTable_analysis to generate the values for the 4 nearest counties (but they werent always bordering and it needs to be bordering counties)

anyway if anyone would give me a little help i would much appreciate it


texts:
I'm trying to upgrade QGIS to the latest (3.0.3) under Lubuntu 18.04 LTS. However, the apt-get upgrade stopped working:

$sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  libqgis-customwidgets python-qgis python-qgis-common qgis qgis-common
  qgis-plugin-grass qgis-plugin-grass-common qgis-provider-grass
  qgis-providers qgis-providers-common
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.

I checked that nothing is kept back with sudo apt-mark showhold.

However, the install command:

sudo apt-get install qgis

seems upgrade qgis to the latest version without an issue. The entry in /etc/apt/sources.list is:

deb https://qgis.org/debian bionic main

Any idea what could be preventing the upgrade from working? (And is it safe to force the upgrade with install?)


texts: Mosaicking of rasters after upgrading to ArcGIS 10.1 for Desktop?

texts:
I just updated my ArcGIS to version 10.1. When using ArcMap, I've not been able to perform mosaicking without getting an error when I use the "Mosaic" tool in Data Management Tools -> Raster -> Raster Dataset. The error does not tell me anything. When using "Mosaic To New Raster" I don't get an error, but it also does not create the mosaic.

I've checked Environments settings to see if there was a problem there, but they seem to be correct. I'm using elevation rasters for the mosaic. Is there something that I need to do since the upgrade in order to correct this problem?


texts: Standards for adding versioning to geoprocessing scripts?

texts:
Is there a standard way to add versioning for geoprocessing scripts and tools?
Currently, I have a folder for each geoprocessing tool which contains:

the python script: this is the script that is run by the tool
the toolbox: this contains the settings for parameters
README: which has information on how to run the tool

These are geoprocessing tools that are published as a service. These aren't really python packages, and the individual scripts aren't really modules since they aren't meant to be imported.
A rudimentary way of implementing versioning would be to just manually keep track of them in the README or python script, but I want to know if there are standards or best practices or suggestions for geoprocessing script versions.
I am already using github. Ideally I am looking for a solution that allows someone to tell which version of a geoprocessing script is published as a service or deployed in some environment, something that can easily be discerned, like version 2.0.4, as opposed to a commit hash. I am deploying and patching geoprocessing services to multiple machines, so I need a way to tell if a geoprocessing service is up to date.


texts: Export only one value from a one-band raster

texts:
I have a PostGIS database with a georeferenced raster, with one band which contains values from 0 to 255.
I should export it to a transparent GeoTiff picture in which the only visible pixels are those of value 100.
How can I do this?


texts: OpenLayers 4 does not display vector layer from geoJSON

texts:
I am using OpenLayers 4.0.1 and here is my json in pastebin, because it is too large for embedded code: http://pastebin.com/VfLn0RR0
Projection of vector data is 4326 LineString.

html code:

and here is my JS code for OpenLayers:

var routeJSON = {...}; // json which I uploaded on pastebin

var vectorSource = new ol.source.Vector({
    features: (new ol.format.GeoJSON()).readFeatures(routeJSON)
});

var vectorLayer = new ol.layer.Vector({
    source: vectorSource,
    style: new ol.style.Style({
        stroke: new ol.style.Stroke({
            color: 'red',
            width: 3
        })
    })
});

var map = new ol.Map({
    target: 'map',
    layers: [
        vectorLayer,
        new ol.layer.Tile({
            source: new ol.source.OSM()
        }),
        vectorLayer
    ],
    view: new ol.View({
        center: ol.proj.fromLonLat([22.00, 48.82]),
        zoom: 10
    })
});

Base map is displayed OK, on it I want fill my route from geojson.

Can you tell me where I have a mistake?


texts: Using ArcPy to set field values for all features within each polygon of separate feature class?

texts:
I am trying to set a field value in one feature class (TRU) based on the value of a field in a separate feature class (DerivedBoundaries) that contains the first, using python in ArcGIS 10.1.

I have written a script that iterates through each site boundary, selects all of the TRU features inside of it, and does that pretty well.  However, I cannot seem to get my head around how the arcpy.CalculateField_management() function operates.

#Build an array and fill it with all the TempIDs numbers present in the data table
rows = arcpy.SearchCursor(lyr_DerivedBoundaries)
row = rows.next()

TRU_rows = arcpy.UpdateCursor(lyr_TRU)
TRU_row = rows.next()

while row:
    a = row.TempID
    TempIDs.append(a)
    row = rows.next()

    #Set Count equal to the length of the array created in the while loop
    Count = len(TempIDs)

while Position < Count: #iterate through each individual feature by using a definition query
    query = "[TempID] = " + "'" + TempIDs[Position] + "'"
    lyr_DerivedBoundaries.definitionQuery = query

    #center on feature
    df.panToExtent(lyr_DerivedBoundaries.getSelectedExtent())

    #Select all of the TRU Cells within the active Site Boundary
    arcpy.SelectLayerByLocation_management(lyr_TRU,"COMPLETELY_WITHIN",lyr_DerivedBoundaries,0,"NEW_SELECTION")

    #Set [Assoc_Site] equal to lyr_DerivedBoundaries.[TempID]
    hopper = '""""' + str(TempIDs[Position]) + '""""'
    arcpy.CalculateField_management("TRU","Assoc_Site",hopper,"VB","#")

I have been attempting to make the third argument in the CalculateField function operate based on the syntax I am seeing from copying a successful CalculateField operation as a python snippet from the results window in ArcMap.

Any help is greatly appreciated, I'm open to the possibility that I am going about this is a roundabout way and that there is a better way.

Thanks!

Edit:  Just in case, here is the text of the error message I get when the script hits the line with the CalculateField function on it:

  Runtime error  Traceback (most recent call last):   File "", line 43, in    File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\management.py", line 3129, in CalculateField     raise e ExecuteError: ERROR 999999: Error executing function. Expected end of statement Failed to execute (CalculateField).


texts: PyQGIS standalone script does not work. Error "QGraphicsScene::addItem: item has already been added to this scene"

texts:
I try to test a PyQGIS standalone script which should just show one Shapefile.
Sounds pretty simple but does not work.

Here is my script:

from PyQt4 import *
from PyQt4 import *
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from qgis.core import *
from qgis.gui import *
from qgis.utils import *
import sys
import os

qgishome = "C:\OSGeo4W64\apps\qgis"

app = QgsApplication([], True)
QgsApplication.setPrefixPath(qgishome, True)
QgsApplication.initQgis()

canvas = QgsMapCanvas()
canvas.setCanvasColor(Qt.yellow)
canvas.enableAntiAliasing(True)
canvas.show()

layer = QgsVectorLayer(r"C:/daten/polygons.shp", "Testdaten", "ogr")
reg = QgsMapLayerRegistry.instance()
reg.addMapLayer(layer)
canvas.setExtent(layer.extent())
canvas.setLayerSet([QgsMapCanvasLayer(layer)])
QgsApplication.exitQgis()

app.exec_()

app.exitQgis()

The Window openes, I can see the yellow background but the Layer is not shown. instad of that there is an error message:

QGraphicsScene::addItem: item has already been added to this scene
QObject::connect: Cannot connect (null)::repaintRequested() to QgsMapCanvas::ref
resh()
QObject::connect: Cannot connect (null)::layerCrsChanged() to QgsMapCanvas::laye
rCrsChange()

Sometimes this also brings python to crash, so that a windows error reporting is opened.

I loaded the neccessary environmental variables, which should be ok, as I can import qgis.core and qgis.gui without problems.

does anyone has an idea what's the problem?


texts:
I'm new to GeoServer andI want to buffer an area around a point. I'm using a DWithin WFS filter but not getting any results. Please tell me the correct format to use DWithin.

My GET request:

http://localhost:8085/geoserver/wfs?request=GetFeature&version=1.0.0&service=WFS&outputformat=json&cql_filter=DWITHIN(the_geom,POINT(76.7,8.5,osm_id=16173236))&CQL_FILTER=typein(hospital)&typename=india_road_nw:points&

Result obtained:

no buffering is done.. all the points are obtained. What to do?


texts: Stitching Bathymetry and DEM data together in ArcMap?

texts:
I have a DEM built from Lidar data and bathymetry survey points for a river which flows on the DEM surface.

My understanding is that Lidar data is not able to capture bathymetry under the river flow.

How can I stitch survey points and DEM together and build a new DEM?


texts: Identify the nearest feature from a GeoJSON file to a given point?


texts: Displaying coordinate references in GeoTools?

texts:
I'm using this library to finish my final project and I have to say I'm no familiar with the maps worlds. My question is if geotools has a method to show automatically the coordinates references in the map, and how use it? That would be really helpful because I spend a lot of time trying to find it without success.
I use the quickstart example to show a shapefile with the worlds map. The user can select a rectangular zone of interes and then the application draw the Sea Surface Temperature. The map generated needs the references of where are positioned because we export it to a png image.

One example of what I am looking for are the blue lines in the map below.


texts: PyQGIS: Speed up for adding features and attribute arrays?

texts:
Context:
I'm writing a dynamic import tool for QGIS (2.2 to 2.5) with python.
Datatype: Binary Datasets with environmental simulations from HPC which might contain millions of features and terabytes of attributes.

Current status:
I wrote some python that extracts the features and attributes at a certain time step.

Loading Data for 100000 features takes < 0.5s via python.
Displaying them takes 30s.
Data structure: Double precision arrays

Now my question in short:
Is it possible to speed up the change of attributes?
Can I change 10 attributes for 100 000 features in one step?
Rather then doing 1000000 loops, one per attribute?

I know QGIS would be fast enough, because:
If I save my imported data as shapefile and reload it, the shapefile reader takes only ~2.5sec for 1 000 0000 attributes.

Here is my current code:

#---------------------------------------------------------------
# Create features
#
#
vl = QgsVectorLayer("polygon", myFile + " | Triangles", "memory")      # New memory layer
pr = vl.dataProvider()                                                 # Dataprovider

# Enter editing mode
vl.startEditing()

#------
# Attribut col
pr.addAttributes( [ QgsField("ID",  QVariant.Int) ] )

#------
# Paint Triangles
i = 0
for TRI in mesh.ELE:
    i += 1
    feat = QgsFeature()
    ep1 = TRI.P1-1
    ep2 = TRI.P2-1
    ep3 = TRI.P3-1
   feat.setGeometry(QgsGeometry.fromPolygon([[ \ QgsPoint(mesh.HEAD.X_origin+mesh.x[ep1],mesh.HEAD.Y_origin+mesh.y[ep1]), \
    QgsPoint(mesh.HEAD.X_origin+mesh.x[ep2],mesh.HEAD.Y_origin+mesh.y[ep2]), \
    QgsPoint(mesh.HEAD.X_origin+mesh.x[ep3],mesh.HEAD.Y_origin+mesh.y[ep3]), \
    QgsPoint(mesh.HEAD.X_origin+mesh.x[ep1],mesh.HEAD.Y_origin+mesh.y[ep1])]]))
    attrdict = [i,]
    feat.setAttributes(attrdict)
    (res, outFeats) = pr.addFeatures( [ feat ] )

vl.commitChanges()

#---------------------------------------------------------------
# Append attributes
#
vl.startEditing()

col_id = 0
for n in self.dlg.selectionlist:

    col_id += 1

    # Load Values (1 String, 1 Double, Double Array with mesh.head.npoin values)
    aName,aTime,aVALUES = ReadSelafin_OneParaSet(n[0],n[1],mesh)

    # New Attribute Col
    pr.addAttributes( [QgsField(aName, QVariant.Double) ] )

           #------
           # Add Values to Triangle Features in Values
           i = 1
           for TRI in mesh.ELE:

               ep1 = TRI.P1-1
               ep2 = TRI.P2-1
               ep3 = TRI.P3-1
               eleval = (aVALUES[ep1]+aVALUES[ep2]+aVALUES[ep3])/3

               attrs = { i : {col_id : eleval}}
               pr.changeAttributeValues( attrs )
               i += 1

#---------------------------------------------------------------
# Commit changes
vl.commitChanges()
vl.updateExtents()
QgsMapLayerRegistry.instance().addMapLayer(vl)
iface.mapCanvas().refresh()


texts: How to map factors and their relative importance in ArcGIS 10.1 for Desktop?

texts:
I want to know how I can calculate a map from a set of factors (in the form of raster layers) and Their relative importance for example:
slope 20%
lithology 10%
.
.
.


texts: Registering a database on Arcgis with operating system authentication

texts:
I have a ArcGIS server and ArcMap on the same machine.  I have a sql database that I have been using on ArcMap that I would like to register with the server for the purpose of publishing services.

When I try to register the database I get the error "Machine:machine name[Servername: The connection property set was missing a required property or the value was unrecognized.  Bad login user]

However the domain\administrator account is registered with the server in ArcCatalog.  How do I get the server to acknowledge the database user?


texts:
I am new to GIS and R leaflet, and I am trying to plot the starting points of protected rivers in Spain. Example of coordinates from the original file:

Nombre.de.los.cauces.principales Coordenada.X.inicio.cauce..UTM..ETRS.89. Coordenada.Y.inicio.cauce..UTM..ETRS.89.
1 Río Burbia 679349 4742582
2 Río Porcarizas 677311 4737191
3 Río de Tejera 675899 4735382
...

The coordinates are in ETRS89, so I am using EPSG:25828 for the plot (the proj4def has been copied directly from the EPSG-page). I defined the CRS as follows:

epsg25828 <- leafletCRS(
     crsClass = "L.Proj.CRS", code = "EPSG:25828",
     proj4def = "+proj=utm +zone=28 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs",
     resolutions = 2^(13:-1), # 8192 down to 0.5
 )

This is used in leaflet as follows:

leaflet(options = leafletOptions(csr = epsg25828)) %>%
addTiles() %>%
addMarkers(lng = 675899, lat = 4735382)

The result is a world map with a marker at the top:

What am I doing wrong?


texts: How to add shapefile as layer to map using Python and ArcPy?

texts:
I am working on an application and I am a beginner in Python :(

I want to add a shapefile, the execution is successful and everything but no result appears on ArcMap, here is the code I use:

import arcpy

try:

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

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

    newlayer1 = arcpy.mapping.Layer(E:\DATA SF\SFcircuit\shape_zizo\batiment.shp")
    print newlayer1
    arcpy.mapping.AddLayer(df, newlayer1, "TOP")

    arcpy.RefreshActiveView()
    arcpy.RefreshTOC()

    # save the map to persist the added layer
    mxd.save()

except Exception as ex:
    print ex.args[0]


texts:
I have a 90 MB GML with about 3000 features but QGIS only shows the first three. The fourth feature is a multipart polyline. This an the extract of the feature:

<?xml version="1.0" encoding="UTF-8"?>
    <FeatureCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:gml="http://www.opengis.net/gml/3.2" gml:id="id-87c8d6ee-112c-4408-a26e-3d7158f27c2b">
<featureMember>
  <Feature gml:id="id-54a7d56e-ce1f-404e-b875-fd06e74f8ee5">
<attribute1></attribute1>
[...]
      <geometry>
             <gml:MultiCurve gml:id="id-fdb29aca-2c23-48a1-a513-168f6e711bb0-0" srsName="EPSG:3035" srsDimension="3">
               <gml:curveMember>
                 <gml:LineString gml:id="id-fdb29aca-2c23-48a1-a513-168f6e711bb0-1">
                   <gml:posList>Coordinates</gml:posList>
                 </gml:LineString>
              </gml:curveMember>
              <gml:curveMember>
                <gml:LineString gml:id="id-fdb29aca-2c23-48a1-a513-168f6e711bb0-2">
                  <gml:posList>Coordinates</gml:posList>
                </gml:LineString>
              </gml:curveMember>
      </geometry>
  </Feature></FeatureCollection>

Is the geometry tag well formed? Or it is just that QGIS cannot render? BTW, the GML was generated with FME and I have no problems to render in FME.


texts: Replacing attribute table entries using Python script

texts:
I am using ArcMap 10 from ArcGIS 10.2.1 package.

I got an attribute table, with few collumns. I need to replace some column "String_A" entries with newer "String_B" entries, in the same row.
In both "String_A" and "String_B" columns are some  values.
Some entries in column "String_A" dont need to be changed, only those, where "String_B" entries not .
Both columns are strings.

I am doing it by hand for now, but it would be nice to have a script in Python that can do it for me, because from time to time I need to update table with some new entries.

I am learning Python, but with my knowledge for today I can't do this task.
So, I need some help with Field calculator and Python.

From "String_B" to "String_A" replace entries, example in the picture:


texts: Leaflet not pulling in unique GeoJSON attributes

texts:
I am building an app in Leaflet where a user can click on a GeoJSON feature and it will show the unique value of the feature in the popup. The attributes shown are each in an input box so that the user can edit them. Originally my table was inside my popup with the value of each property set to feature.properties.property but that didn't seem editable so I put it in a
 element. I'm a novice to HTML and JavaScript so it's possible I'm taking the wrong approach. But when I click on a feature instead of it pulling that feature's unique attributes, it appears to be picking up the attributes of the last feature in my GeoJSON.

I know that it won't update automatically without a web server. I don't know if I would be allowed to set one up if I knew how, so I have a workaround where I added a button that exports the GeoJSON. Previously I copied the code in this Plunker but pointed it to one of my feature attributes: http://plnkr.co/edit/VzUfSD?p=preview.

Clicking a feature gave me its unique value and upon editing it and clicking the button, it downloaded a new GeoJSON file with the edited value changed, so I know my workaround works (but it doesn't permanently change my GeoJSON until I save my downloaded file over it).

So why won't it give me the attributes of the feature I click but (apparently) those of the last feature in my GeoJSON file?

Here is the HTML code for the popup:

      Pipe Size:
<input id="PS1">

      Pipe Type:
<input id="PS2">

      Pipe Material:
<input id="PS3">

      Mylar File Name:
<input id="PS4">

      Mylar Tablet

      Mylar Desktop

And here is the JavaScript Code for the popup:

function pop_WaterPipe(feature, layer) {
    var popupContent = document.getElementById("popup");
    PS1 = document.getElementById("PS1");
    PS1.value = feature.properties['PipeSize'];
    PS1.addEventListener('change', function () {
        feature.properties['PipeSize']= PS1.value;
    });
    PS2 = document.getElementById("PS2");
    PS2.value = feature.properties['PipeType'];
    PS2.addEventListener('change', function () {
        feature.properties['PipeType'] = PS2.value;
    });
    PS3 = document.getElementById("PS3");
    PS3.value = feature.properties['PipeMateri'];
    PS3.addEventListener('change', function () {
        feature.properties['PipeMateri'] = PS3.value;
    });
    PS4 = document.getElementById("PS4");
    PS4.value = feature.properties['Service_Ca'];
    PS4.addEventListener('change', function () {
        feature.properties['Service_Ca'] = PS4.value;
    });
    PS5 = document.getElementById("PS5");
    PS5.href = '"W:/DPW' + '/' + 'Water_&_Sewer' + '/' + 'App' + '/' + 'Street Mylars' + '/' + (feature.properties['Service_Ca'] !== null ? Autolinker.link(String(feature.properties['Service_Ca'])) : 'None') + '"';
    PS6 = document.getElementById("PS6");
    PS6.href = '"W:/DPW' + '/' + 'Water_&_Sewer' + '/' + 'App' + '/' + 'Street Mylars' + '/' + (feature.properties['Service_Ca'] !== null ? Autolinker.link(String(feature.properties['Service_Ca'])) : 'None') + '"';
    layer.bindPopup(popupContent);
    }


texts: Change GeoPandas column value from PostGIS query

texts:
I have some QGIS layers and I am performing some spatial queries with them using GeoPandas. I'm using psycopg2 to make a connection to a local PostgreSQL/PostGIS database. Then I use the read_postgis() function from GeoPandas to make a spatial query with my layers. Here is my code to get started.
import psycopg2
import geopandas as gpd

postgres_connection = psycopg2.connect(host="localhost", port=5432, database="BRE_2019_Test", user="my_username", password="my_password")

Now I do a few spatial queries, this all works correctly.
#this is a bunch of tax parcels in my study area
all_2019_parcels = gpd.read_postgis(('SELECT * FROM public."All_Parcels_2019" '), postgres_connection)

#these are parcels from the All_Parcels_2019 table which are spatially within the shape of Zone 1a
zone_1a_parcels = gpd.read_postgis(('SELECT ap.* FROM public."Zone1a" AS z1a, public."All_Parcels_2019" AS ap WHERE st_intersects(z1a.geom, ap.geom)'), postgres_connection)

zone_1a_parcels returns 1671 records, which is correct. Just to give you a visual, here is a screenshot of the same operation in QGIS using 'select by location'

Now that I have all_2019_parcels as a GeoPandas dataframe, I want to make a new column called 'Zone' and update the values for these selected parcels as 'Zone1a'.
Here is my best attempt so far and it works, sort of.
all_2019_parcels['Zone'] = zone_1a_parcels['parno'].isin(all_2019_parcels['parno'])
all_2019_parcels.loc[all_2019_parcels['Zone'] == True, 'Zone'] = 'Zone1a'

This labels the correct number of parcels as 'Zone1a'. However I have other zones (1b, 1c, and so on). When I run the same lines to select all parcels within Zone 1b for example, then the 'Zone1a' values in that column are overwritten.
I feel like I am going about this incorrectly. There must be a way to make a SQL query and label values in the 'zone' column of all_2019_parcels without creating the zone_1a_parcels object.


texts: In OL3 can I adjust the georeferencing of layers I source from elsewhere

texts:
I have an OL3 application that works well, and I can source raster maps from many sources. They are already georeferenced by their suppliers and work well in general. However my application is aimed at the very local level and some of the rasters are different by a few metres.

You can see the effect in this example where the Bing Aerial layer is about 3 metres north of a 25 inch Ordnance Survey map (use the slider on the left to compare the layers - the roads and many of the buildings have not changed on the ground between 1924 and now, but the layers do not align exactly). I am using the maps to explore how buildings have changed over the years, so need extreme accuracy. I do not need to cover a wide area (just my village) so my idea is that I could supply an 'x/y adjustment factor' that would make the layers exactly match for this locality.

I cannot see anything like this in the OL3 documentation. I do not want to have to re-do any georeferencing, and in many cases (eg Bing Aerial) I cannot.

On the other hand, if the issue I am facing is caused by factors that I am less familiar with (eg projections?) then I will probably need some guidance.


texts:
Is it possible to manipulate the pixel values of a GDAL VRT and, if so, how? The original data must remain unchanged.

I have a dataset which might be a bit rotated so that there are no data values on the edges. I use region growing to find that parts on the edge to not touch no data values in the actual area. I want to interpolate in the actual area in a next step. Sometimes I might have e.g. a very large dataset or ASCII data which can not be overwritten.


texts: Editing NetCDF file to create eddies on map?

texts:
I have a netcdf file about Sea Level Anomalies in the global range, and I can open this file in Arcgis using "Multidimension tools - Make NetCDF Raster Layer" as a map, now I want to create some eddies as circles and also set radius of these eddies by myself on this map, but when I use "Editor - Create Features", it shows "There are no templates to show" and I cannot edit it.

Data can be downloaded on this website: ftp://ftpsedr.cls.fr/pub/oceano/AVISO/SSH/duacs/Data_Test/global/delayed-time/grids/msla/all-sat-merged/h/2008/

How can I edit this netcdf file?


texts: Excluding stations from IDW interpolation?

texts:
I have the following problem:
I need to calculate an average precipitation amount on a catchment using an IDW interpolation. The interpolation is performed in a loop since each precipitation station contains several years of daily measurements (10000 and more interpolations). I have managed to solve this problem by overwriting precipitation value in attribute table of the station shapefile using UpdateCursor().

The problem is that some of the stations have missing values. In this case I would like to interpolate only those stations with measurements and thus I need to somehow exclude stations with missing values from interpolation. This is my code:

import arcpy
from arcpy import env
from arcpy.sa import *

# Check out the ArcGIS Spatial Analyst extension license
arcpy.CheckOutExtension("Spatial")

# Set environment settings
env.workspace = r"C:/Users/peter.valent/Documents/ArcGIS/Data/Vah po LM/Test"

# Set local variables
inPointFeatures = r"zrazkomerne_stanice_buffer_0km.shp"
zField = r"P"
cellSize = 100
power = 2
searchRadius = RadiusVariable(10, 150000)
extent=r"polygon_okolo_povodia.shp"
mask=r"Vah_po_LM.shp"
prec_table=r"tabulka.gdb\bez_udajov2"
rows = arcpy.SearchCursor(prec_table)

# Get names get names of all fields in prec_table
field_names = []
sFields=arcpy.ListFields(prec_table)
for field in sFields:
    field_names.append(field.name)
field_count=len(field_names)

field_names=field_names[2:field_count]
station_count=field_count-2

# Main
# Get precipitation amounts for one day
prec_list=range(station_count)
day_count=int(arcpy.GetCount_management(prec_table).getOutput(0))
meanP=range(day_count+10)
j=0
for row in rows:
    for i in range(0,station_count):
        prec_list[i]=row.getValue(field_names[i])

    idx=0
    uptShape=arcpy.UpdateCursor(inPointFeatures)
    for station in uptShape:
        station.P=prec_list[idx]
        uptShape.updateRow(station)
        idx=idx+1

    del station
    del uptShape

    outIDW = Idw(inPointFeatures, zField, cellSize, power, searchRadius)
    outIDWMask=ExtractByMask(outIDW, mask)
    meanPrec=arcpy.GetRasterProperties_management(outIDWMask, "MEAN")
    meanP[j] = meanPrec.getOutput(0)
    print meanP[j]
    j=j+1

How do I exclude some stations from interpolation?
Is there a way how to write nodata to the attribute table?


texts: DotSpatial M and Z values not displaying in ArcGIS Desktop?

texts:
I'm making a polyline with M and Z values using DotSpatial.

The M an Z values are displayed when the shapefile is dropped in QGIS, but in ArcGIS, though the attribute table indicates that its a PolylineZM shape, only the X&Y shows up in the Edit Sketch Properties, while Z and M are displayed as NaN.

I assume it might be a property that ArcGIS requires, but is having trouble finding. Code below:

IFeature myFeature = new Feature();

FeatureSet fs = new FeatureSet(myFeature.FeatureType);

fs.CoordinateType = CoordinateType.M;

List<Coordinate> liVertices = new List<Coordinate>();

for (int i =0; i< 3; i++)
{

  liVertices.Add(new DotSpatial.Topology.Coordinate(dEast[i], dNorth[i], dDepth[i], dKp[i]));

}

myFeature = new Feature(liVertices);

fs.CoordinateType = CoordinateType.M;

myFeature.ShapeType.Equals(23);

myFeature.Envelope.HasZ();

myFeature.Envelope.HasM();

myFeature.Envelope.Maximum.M = dMmax;

myFeature.Envelope.Minimum.M = dMmin;

myFeature.UpdateEnvelope();

myFeature.Envelope.SetExtents(dXmin, dYmax, dZmin, dXmax, dYmax, dZmax);

fs.Features.Add(myFeature);

fs.SaveAs("Test.shp", true);


texts: Why does the "local maxima" module in SAGA GIS put so many "maxima" points on lakes and plains?

texts:
SAGA GIS puts too many maxima points on plains and lakes. Why does it happen? Is there a way to avoid this? It's not really a big problem (the value is correct) except for the size of the SHP files in certain areas, and it does not look very nice. The Global Mapper for example ignores the "plain" areas. Can this be fixed?

Below is the effect of local maxima module through Sextante in QGIS:

The purpose is to provide a nice and optimal SHP terrain model for WindPro, with inflection points, and it does not like large files.


texts: QGIS doesn't recognize numeric cell content (xls)

texts:
I want to join Excel data (numeric) to a Shapefile in QGIS. Although the cells are defined as numbers in Excel, QGIS recognizes them as string. I tried also csv, csv (windows), txt, xls, xlsx, none of them worked out.

I remember 3 years ago I used a csvt-file in order to help QGIS to recognize the data. But aI also remember that I could join Excel sheet content as numbers 6 months ago without creating a csvt file...


texts: QGIS Python not resampling when using gdal warp reproject

texts:
I've got a Python script which, so far, is creating a nice DEM. I need to reproject it and then run a slope analysis on it.
For the reprojection part, as I've found in a few places, I'm using gdal:warpreproject as below:
processing.run("gdal:warpreproject",
{'INPUT':'DEM_gaussian',
'SOURCE_CRS':None,
'TARGET_CRS':QgsCoordinateReferenceSystem('EPSG:3577'),
'RESAMPLING':1,
'NODATA':None,
'TARGET_RESOLUTION':None,
'OPTIONS':'COMPRESS=NONE|BIGTIFF=IF_NEEDED',
'DATA_TYPE':6,
'TARGET_EXTENT':None,
'TARGET_EXTENT_CRS':None,
'MULTITHREADING':False,
'EXTRA':'',
'OUTPUT':export_path})

The line breaks are mine. This normally is on a single line.
However, for some reason when doing this using the Python console it will not take into account the 'RESAMPLING':1 parameter, meaning that the resulting image isn't what I want. When I run the command manually through the toolbox and look at the history, it does and the image is perfect.
Command from the toolbox and history:
processing.run("gdal:warpreproject", {'INPUT':'C:/temp/my_dem_gaussian.sdat','SOURCE_CRS':None,'TARGET_CRS':QgsCoordinateReferenceSystem('EPSG:3577'),'RESAMPLING':1,'NODATA':None,'TARGET_RESOLUTION':None,'OPTIONS':'COMPRESS=NONE|BIGTIFF=IF_NEEDED','DATA_TYPE':6,'TARGET_EXTENT':None,'TARGET_EXTENT_CRS':None,'MULTITHREADING':False,'EXTRA':'','OUTPUT':'C:/Users/me/AppData/Local/Temp/processing_9b1c06f875804ebe9136843a5b2b393e/09bb8386582a4bd8b17f954b2518eb06/OUTPUT.tif'})

So why doesn't it take the 'RESAMPLING':1 parameter into account in my code?
EDIT and answer - not really an answer but an issue with my workflow. I was exporting one of the intermediate results to a tif, which gave me some weird hatching patterns. Instead, exporting to an sdat did the job and retained all the graphical fidelity I wanted.


texts:
I have a raster table and a geometry table in postgis. My goal is to create a single raster merging elements from both:-

WITH geom_raster AS (

    SELECT wkb_geometry, ST_AsRaster(wkb_geometry, 200,200,ARRAY['8BUI', '8BUI', '8BUI'], ARRAY[118,154,118], ARRAY[0,0,0]) as rast FROM geometry_table
),
raster AS (

    SELECT ST_Union(rast) from raster_table,geom_raster where wkb_geomtry && rast
)
   SELECT ............

What is the last step to merge the two into a single raster so I see the geometry on top of the raster? I tried ST_Union but get an error about alignment which I suspect means the grids or SRIDS or something else are not in unison?


texts: QgsSpatialIndex crash my deploy C++ QGIS custom application on windows

texts:
When I use the QgsSpatialIndex class, after leaving the method, my application crash. Looks like the object QgsSpatialIndex class works, it brings QgsFeatureId list, but from what I noticed something in the "destruction" of the object makes the application crash. I'm using Windows 7. I installed qgis with osgeo4w-setup-x86.

qgis-dev: 2.9.0-3

void MainWindow::addLayer(){
    QString myLayerPath         = "C:\\Users\\osgeos4w\\Documents\\desktop_gis_data";
    QString myLayerBaseName     = "world_borders";
    QString myProviderName      = "ogr";
    QgsVectorLayer * mypLayer = new QgsVectorLayer(myLayerPath, myLayerBaseName, myProviderName, true);
    QList<QgsMapCanvasLayer> myLayerSet;
    QList<QgsMapCanvasLayer> myLayerSet;
    if (mypLayer->isValid()) {
        qDebug("Layer is valid");
    } else {
        qDebug("Layer is NOT valid");
        return;
    }
    QgsMapLayerRegistry::instance()->addMapLayer(mypLayer, TRUE);
    myLayerSet.append(QgsMapCanvasLayer(mypLayer));
    mpMapCanvas->setExtent(mypLayer->extent());
    mpMapCanvas->setLayerSet(myLayerSet);

    QgsSpatialIndex index(mypLayer->getFeatures());
    QgsPoint p = QgsPoint(-33.33,-5.97);
    QList<QgsFeatureId> featuiresIds = index.nearestNeighbor(p, 2);
    qDebug() << "fdis count = " << featuiresIds.count();
}

The output console is: "fdis count = 2"

it worked but crashes the application soon after the end of the method, and this only execute without crash if I comment the follow line:

QList<QgsFeatureId> featuiresIds = index.nearestNeighbor(p, 2);
qDebug() << "fdis count = " << featuiresIds.count();

If I execute the same code in the python conselo inside the QGIS Desktop 2.9.0, it works perfectly

Do anyone have any idea what might be happening?


texts: QGIS actions: copy to clipboard some attributes

texts:
When I click on "execute action entity"
=>Copy to clipboard a preconfigured set of attributes of my layer.

Here's what I've done so far:

Open the Layer Properties dialog and head over to the Actions tab
Set up a new action using the following properties for the action

Type: Windows
Name: Copy Attribute
Action :  "copy to clipboard [%name%] - [%value1%] - [%value2%]"

but I'm not familiar with actions script semantic.

what would be the correct redaction of the action code above?


texts: ArcGIS Server Only Accessible From Local Machine

texts:
I have an ArcGIS server set up. It works, but only when I access the server (or server manager) via a web browser from the server machine itself. I am unable to access the server (using the same url) from another machine (Chrome: "This webpage is not available").

I have a website set up on the same domain (mydomain.edu), which works just fine. I am only having problems with the ArcGIS server (mydomain.edu:port_number/arcgis). Am I attempting to access this website incorrectly? Is there a setting which needs to be changed in order to allow remote access?

The main problem is that I want to be able to publish map services to the server remotely, which I am unable to do at the moment. ArcMap is unable to connect to the server.

Any advice from the gurus?


texts:
Is it possible to visualize EPSG:102020 and EPSG:3857 at same time in QGIS?
If is possible, how?

Why some EPSG permit on the fly transformation and visualization and other don`t?


texts: Display uMap map background at higher zoom levels?

texts:
Context

A really quick question as I'm trying to set up a map for showing GIS capabilities to beginners using uMap.

If I personalize the zoom level by increasing the highest value from 20 (which is the default maximum initial value) to 24, the map background is no more displayed when I actually zoom beyond 20 (the map background simply becomes gray):

Question

Is there something I can do to display the map background while zooming to closer zoom levels (greater than 20)?


texts:
I need to show in QGIS the a flow map of commuters in a municipality of Italy, Bari. In a CSV file I know the place they come from (a field called ORIG) and the place where they go (the field DEST) and the total number of them QGIS (TOTALE). In a shapefile I have the points with the coordinates; in this file the reference field is called SEZ.
Since I'm a bit ignorant in Python and SQL, could you please tell me a simple way to write few lines that would let me show in the map with lines where they come from and where they go? I would also crate lines with different width depending on the total number of commuters (the field called TOTALE).
I tried to create a virtual layer selecting, from the CSV, the fields I would like to show, then joining the CSV with the shapefile. But it didn't work. I think I'm not writing the code in the correct way. I saw there is a plug-in as well, Map Flow, but I need to create a matrix that is too long to write down.


texts: TileMill: inset line with negative line-offset property value produces strange artifacts

texts:
I'm trying to create an inset line in TileMill within a polygon using a negative value with the line-offset property.  However, it looks like the a line's cap doesn't get shifted, causing strange artifacts to appear on the outside of each polygon.  Guessing it has something to do w/ how mapnik handles line-offset.

See the bottom left corner of each polygon in following image

produced by the following cartocss code:

@mining: #f1dd06;
#mining {
  polygon-fill: @mining;
  polygon-opacity: 0.6;
  line-color:#666;
  line-width:0.8;
  ::doublestroke{
    line-cap: butt;
    line-color: @mining;
    line-comp-op: multiply;
    line-opacity:0.8;
    line-width: 6.0;
    line-offset: -3.0;
  }
}

Curious to know:

if there's a way around this by writing better carto, or if not?
if there's some other way around it, possibly by doing some pre-processing on the source data?


texts: PostGIS: Convert meters to arbitrary spatial reference units?

texts:
I'm writing a query that needs to be able to work with data of any SRID.  The basic problem is very simple - I get two pieces of information:

A point (SRID = 900913)
A distance (unit = meters)

I [would like to] transform these into the native SRID, and then run a query to find features within the given distance of the point:

proj_point = ST_Transform(point, (SELECT ST_SRID(geom) FROM table LIMIT 1));
proj_dist  = Something...  But what?

SELECT * FROM table
    WHERE ST_Distance(geom, proj_point) < proj_dist
    ORDER BY geom <-> proj_point
    LIMIT 10;

My problem is the conversion of the units.  I can look up the SRID of the native data and transform the point no problem.  But how do I do the same with the distance?

I've seen answers to related questions, but they have all involved reprojecting the queried data.  Holy overkill!  This should be doable with a single lookup and multiplication...

Pointers, anyone?  Thanks very much in advance!


texts: Dynamic menu actions from sqlite database QGIS using python

texts:
I want to have names for menu actions from sqlite database for QGIS Plugin dynamically.

       try:
            os.chdir(newPath)
            con = sqlite3.connect("db.sqlite")

            cur=con.cursor()
            cur.execute("""select queryLabel from custom_query;""")
            cursor=cur.fetchall()
            for row in cursor:
                self.menu = QMenu( row[0], iface1.mainWindow().menuBar() )
                self.menu.setObjectName( row[0] )
                self.actionAttribute_Data=self.menu_WB_Query.addAction(row[0])
                #self.actionAttribute_Data.triggered.connect(self.attribute_data)
        except sqlite3.Error, e:
            if con:
                con.rollback()
                print "Error %s:" % e.args[0]
                #sys.exit(1)
        finally:
            if con:
                con.close()

Putting this in initgui() I achieved the desired output, but as initgui() is called only once, the menu actions don't get refreshed if db is edited during execution of plugin.


texts:
I have been supplied .gdb data and have extracted directories, but when I follow all directions from multiple sources I still get this error. have updated from 3.16 to 3.18, still cannot get it to import.
Would it be a problem with the data I have been provided? They told me I can open in QGIS and have set projection to the one the specified.


texts:
Does QGIS support multiple languages? I have some shapefile with
Arabic names in its attributes, and they appear as: ????

If I want to see the names in Arabic, do I need to purchase multi-language supporting GIS software or is there any other option?

I am using QGIS 1.8.0.


texts:
I am a bit new in python now working in qgis to automates some task. I have an excel pre-written template file where I have to add different data in different columns.

outpufFile = open('d:/template.xlsx','w')
for layer in QgsMapLayerRegistry.instance().mapLayers().values():
    print layer.name() +","+ str(layer.featureCount())
    line = layer.name()
    unicode_line = line.encode('utf-8')
    outpufFile.write(unicode_line)
outpufFile.close()

I get this so far but it corrupting my template while I also don't know how to access specific column or row of my file In order to write at exactly column and row to full my template.


texts: PostGIS: Creating Polygon from lots of other geometries and then returning list of ID's in the same query

texts:
I am fairly new to all of this but in simplistic terms I have the following problem:
I need to create lines from points, and from said points group all of those within n distance of one another. From this grouping I need to return the concave hull nice and tight. This bit is easy but I need to retain an understanding of the attribution of the points I originally manipulated.
In the table I have the following:
point_1, point_2, ID_1, ID_2
from this I have designed the query for the aggregation as follows:
SELECT
ST_AsText(
    ST_ConcaveHull(unnest(
        ST_ClusterWithin(
            ST_MakeLine(table.point_1, table.point_2),0.00010008999
        )
    ),0.99)::geometry
) AS aggr
FROM tb1 AS table

This appears to meet my requirements however how could I also return a list of all ID_1's and ID_2's whose geometries have gone through the aggregation process for example:
aggr            |    ID_1s    |    ID_2's    |
_____________________________________________

POLYGON(123...) | 1,2,3,4,5.. |  66,33,45...
POLYGON(566...) | 9,3,5,0,2.. |  21,53,65...

I have struggled to ask the question almost as much as I have to solutionize my problem (without success).


texts: ArcObjects C# : What are the valid inputs for IGxObjectProperties.GetProperty()?

texts:
The function IGxObjectProperties.GetProperty() takes in a string, i.e. "ESRI_GxObject_Name".

So far, the ones I know are:

ESRI_GxObject_Name, ESRI_GxObject_FileSize, ESRI_GxObject_FileTime, ESRI_GxObject_FileMode, ESRI_GxObject_Type

What other strings are valid? There doesn't seem to be a complete list anywhere


texts:
I have dozens of vector layers that I want to join together in QGIS.

They have identical fields.

How do I do this?


texts: Bind polygon centroid to polygon attribute data

texts:
I am trying to bind a dataframe containing polygon centroids to the polygon attributes.

Here's what I've done so far to create the centroids:

library(rgdal)
library(PBSmapping)
library(maptools)
library(sp)

gisCentroids<-coordinates(gisPolygons)

I am wanting to combine the resultant centroids to the attribute data from gisPolygons. How do I go about achieving this? I have tried over from sp package but it does not seem to work giving me error messages. The code used is shown below:

ID<-over(SpatialPoints(gisCentroids),gisPolygons)
CentroidPolys<-cbind(gisCentroids,gisPolygons)

I want to do further intersection and overlap analyses once I have the centroids information bound to the polygon attributes.

Any suggestions?


texts: How to add a Google/OSM/Bing etc. style map layer to Quantum GIS

texts:
I am just getting started using QGIS. I am aiming to create a heat map of Census tracts in Georgia based on population. I have all of the data - the population for each census tract in Georgia.

I've been able to create the heat map successfully by importing a census tract shapefile and following this tutorial: http://qgis.spatialthoughts.com/2012/03/using-tabular-data-in-qgis.html

However I am stuck on how to add a nice looking map layer underneath which will show common geographical features - highways, cities, water courses etc. I have tried importing OSM data from cloudmade but there is far too much detail. The map is supposed to be fairly high level but the shapefiles from there show every single road. I am trying to replace MS MapPoint (no 2010 census tracts). The functionality I am trying to get would allow for different levels of detail depending on how far I zoom. Generally just showing major roads / cities etc. I don't mind if this is automatic or manual.

Could anyone point me in the right direction?  Any help would be much appreciated.


texts: Building shapefile for Naples region, Italy

texts:
I have been searching high and low for a building data layer for the Naples region of Italy (Campania). I am studying volcanic risk from a volcano called Campi Flegrei and have to see how this volcano could affect the resident population. Any suggestions for building/structure polygons and census data would be great. Any sites or open access databases people recommend?

I have been trawling through Italian geo sites for days and cannot seem to find the info as shapefiles. Some previous research has used 133 regional level Campania Region, scale 1:5.000 digitised from pdf, however, their data is not freely available. I could try and digitilise from these pdfs, however, I think this would take months and not be accurate.


texts: Connect points from two SpatialPointsDataFrames in R, considering the closest distance

texts:
I have two SpatialPointsDataFrames. In SpatialPointsDataFrame one (dat1) I have three points (A, B and C). In SpatialPointsDataFrame two (dat2), I have eight points with temperature measurements. I must connect each of those eight points to the closest point from dat1 and then calculate the average temperature for each point. How can I do that in R?

library(sp)
library(tmap)

# SpatialPointsDataFrame 1
dat_orig <- read.table(text="
point   lat   lng
A   15.6  80.9
B   20.9  10.9
C   1.2   81.8", header=TRUE, stringsAsFactors=FALSE)

dat1 <- dat_orig
coordinates(dat1) <- ~lng+lat

# SpatialPointsDataFrame 2
dat2_orig <- read.table(text =
"temp   lat   lng
18   15.6  81.9
18.5   19.9  10.9
12.3   11.2   81.8
14.2   15.6  85.9
13.1   1.2  60.9
18.5   20.8  40.9
17   14.6  10.9
18.1   14.6  11.9", header=TRUE, stringsAsFactors=FALSE)

dat2 <- dat2_orig
coordinates(dat2) <- ~lng+lat

# tmap plot
tm_shape(dat1, ylim = c(-10, 35), xlim = c(-10,100)) + tm_dots(col = "red", size = 0.2) + tm_text("point") +
  tm_shape(dat2) + tm_dots(size = 0.1)


texts: PostGIS functions: mixed CRS as arguments

texts:
Does PostGIS support different CRS (coordinate reference system) as arguments in functions?

I tried this example:

SELECT ST_Intersects(
ST_SetSRID(ST_MakePoint(7.96491, 63.39051), 4326) ,
ST_MakeEnvelope(108233, 6983413, 259214, 7102542, 25833)
)

It should return TRUE, but it returns FALSE. But I do net get a error message either.


texts: Indexing from first row of attribute table with Python

texts:
I'm just trying to extract the variable value of the 7th column of the first row in a vector layer. I'm not sure how to index the table exactly though. I included the lines I wrote, which I imagine are pretty close. I think the third line is what needs tweaking?
 lyr = iface.activeLayer()
 features = lyr.getFeatures()

 attrs = features.attributes()
 var = attrs[7]

I found solutions where they go through a loop of all the features but I'm trying to avoid this if possible.


texts: How can I enable PostGIS Shapefile and DBF Loader 2.0 plugin in PgAdmin III?

texts: I am on Windows and I want to download/enable the plugin "PostGIS Shapefile and DBF Loader 2.0". I installed PostGIS 2.0 using StackBuilder of PostgreSQL installer.


texts: Converting Aspect degree to westness using ArcGIS Desktop?

texts:
I have extracted Aspect values in degree from DEM in ArcMap 10.2 full license.
I want to investigate effect of Westness in my model so I was using conversion formula of  Folded Aspect : ABS (180- ABS(Aspect-270))
But it seems like this works when we deal with radiation and sunlight.
There is another formula to calculate southwestness of aspect yet it gives degree between 0-200 with ((cos(aspect-255)+1) * 100). (( And why 255?Shouldn't be 225?))

Do you have any idea of the formula for converting to "Westness" from 0-180?

My model is not water-related so that formula having catchment area is also not useful for me.


texts: GeoServer Point Stacker: does identify work on non-clustered points?

texts:
I'm a newbie to use GeoServer and SLDs so, sorry in advance if my question is stupid.

I'm trying to use the Point Stacker rendering transfomation for to cluster my point layer.
I've a POSTGIS point layer with more than 514.000 points (all the OSM addresses in Italy ....), and so I can't to render them with a simple "red point" in my map and I can't render them using a clustering in the browser using Leaflet, OpenLayers, ecc ...

The structure of my POSTGIS layer is the following

If I try to use a default point symbol to render my layer the visualization is obviously slow but it works right and I can also to identify my point as I can show to you here

The field I'm interested on is "field_4"

I've tried to use the SLD that I've found here http://suite.opengeo.org/opengeo-docs/cartography/rt/pointstacker.html for clustering server side and it's working for mapping my layer as clustered points as I can show to you

I shoud add more classes in my SLD style and I'll do it, but at the moment the issue is that, using cluster, I can't identify points, not when they'are clustered (I don't want this ....), but when they are rappresented as single point. Here you are the case trying to identify the lowest triangle in the picture

The error is "internal error occurred Property 'count' could not be found in osm_civici": I haven't that field in my layer but I've seen that is a "field" used in the SLD style ....

NOTE: I'm using the SLD style found in OpenGeo Suite documentation at http://suite.opengeo.org/opengeo-docs/cartography/rt/pointstacker.html "as-is" and probably there is something to change but I don't know what ....

I'm using OpenGeoSuite Version 4.0.2 on Windows 7 (GeoServer 2.4-SNAPSHOT Git Revision f295d37d70c3b1f0e51942e8b031253e4d75459 Build Date 20-Jan-2014 22:29)


texts: How to show and access SAGA not shown in Processing Panel in QGIS 2.18.4?

texts:
How to get SAGA modules to show and be usable within QGIS, i.e. from within the Processing Panel?
I have tried reinstalling SAGA (now = Version: 2.1.2 64 bit) through the OSGEO4w installer and tried reconfiguring the "SAGA Folder" but to no avail.
(i.e. as per http://docs.qgis.org/2.14/en/docs/user_manual/processing/3rdParty.html?highlight=saga#saga)
I am not sure when or why SAGA stopped displaying in the Processing Panel, but I had used SAGA from this location not too long ago.
I note also that the standalone version of SAGA (Version: 2.1.2 64 bit) now reinstalled works, but can not find how to access though QGIS via either the processing toolbox or graphical modeller etc.
Using QGIS 2.18.4 on Win7_64


texts: Select markers via a polygon and get the name

texts:
I created a map with OpenLayers where I am able to select markers, and make their names appear in a field.

Now here is my problem: I want to be able to select markers with a polygon, draw my polygon and make the names of all the markers contained in my polygon appear in my external field.

I succeed creating the polygon I created a drawend event on it in order to get all the data of my markers at the end of my selection, but the part that I can't resolve is how to create the function that "take back all the markers selected in the polygon and return them the name"

I already try something like load the marker feature in my function and  get the name like I did the first time, but nothing, I try to find documentation too but I don't find something that works with me.

Here is my code:

var rasterLayer =  new ol.layer.Tile({
            source: new ol.source.OSM()
        });

var vectorLayer = new ol.layer.Vector({
  source: new ol.source.Vector({
    format: new ol.format.GeoJSON(),
    url: 'http://localhost/osgis-ol3-leaflet-master/ol3/data.geojson'
  }),
  style: new ol.style.Style({
    image: new ol.style.Icon(({
          anchor: [0.5, 1],
          anchorXUnits: 'fraction',
          anchorYUnits: 'fraction',
          src: 'marker-airport.png'
      }))
  })
});
 var source = new ol.source.Vector({wrapX: false});

      var vector = new ol.layer.Vector({
        source: source,
        style: new ol.style.Style({
          fill: new ol.style.Fill({
            color: 'rgba(255, 255, 255, 0.2)'
          }),
          stroke: new ol.style.Stroke({
            color: '#ffcc33',
            width: 2
          }),
          image: new ol.style.Circle({
            radius: 7,
            fill: new ol.style.Fill({
              color: '#ffcc33'
            })
          })
        })
      });

// Map creation

var map = new ol.Map({
  layers: [rasterLayer, vectorLayer, vector],
  target: document.getElementById('map'),
 view: new ol.View({
        center: [0, 0],
          zoom: 3
    })
});
// Call the input to show the airport code and name
var input = document.getElementById('input-airports');

// Interactions with the map
var select_interaction = new ol.interaction.Select({
 style: new ol.style.Style({
    image: new ol.style.Icon(({
          anchor: [0.5, 1],
          anchorXUnits: 'fraction',
          anchorYUnits: 'fraction',
          src: 'marker-icon.png'
      }))
  })
});
map.addInteraction(select_interaction);

// Event for codes and names of all airports shown in the field
select_interaction.on('select', function(evt) {
  var feature = select_interaction.getFeatures();
  var value = '';
  feature.forEach(function(feature){
    value += feature.get('name') + ' ' + '(' + feature.get('code') + ')' + ', ' + ' ';
  });

  input.value = value;
});

var typeSelect = document.getElementById('type');
var  draw = new ol.interaction.Draw({
      source: myDrawSource,
      type: "Polygon",
    });

map.addInteraction(draw);

draw.on('drawend',function(e){
  myDrawSource.clear();
  mySelectionsSource.clear();
  var extent = e.feature.getGeometry().getExtent();
  var geomA = e.feature.getGeometry();
  vectorLayer.forEachFeatureInExtent(extent,function(aa){
    console.log("forEachFeatureInExtent",aa.getGeometry());
    if (polyIntersectsPoly(geomA,aa.getGeometry()) === true){
      mySelectionsSource.addFeature(aa);
    }
  });
});

/**
* check whether the supplied polygons have any spatial interaction
* @{ol.geometry.Polygon} polygeomA
* @{ol.geometry.Polygon} polygeomB
* @returns {Boolean} true||false
*/
function polyIntersectsPoly(polygeomA, polygeomB) {
 var geomA = new jsts.io.GeoJSONReader().read(new ol.format.GeoJSON().writeFeatureObject(
        new ol.Feature({
            geometry: polygeomA
       })
   )
   ).geometry;
var geomB = new jsts.io.GeoJSONReader().read(new ol.format.GeoJSON().writeFeatureObject(
        new ol.Feature({
            geometry: polygeomB
        })
    )
    ).geometry;
return geomA.intersects(geomB);
};


texts: Updating committee name based on a spatial join within a trigger in postgis

texts:
Updating committee name based on a spatial join within a trigger in Postgis. It appears right to me and it runs and executes successfully but still comes up with an error when I try to create a new feature.

CREATE OR REPLACE FUNCTION tf_committee()
  RETURNS trigger AS
$BODY$

BEGIN

NEW.committee := c.committee_name
        FROM housing_development_prospectus.committee as hdp, committee.committee_name as c
        WHERE hdp.wkb_geometry && NEW.wkb_geometry AND
        ST_Intersects(NEW.wkb_geometry, c.wkb_geometry);

RETURN NEW;
END;
$BODY$


texts: Add button to custom standalone QGIS application

texts: Im able to implement zoom in and zoom out functionality as described in the PyQGIS developer cookbook using a tool bar. I would like to have buttons that display above my map canvas layer and have the same functionality as oppose to using a toolbar


texts: Custom range value and colour thematic in mapbasic

texts:
I'm working on a tool to help my work. I managed to make a thematic, but the range of values and colors appear automatically. Here is the code:

Dim fRangeLimitsArray() As Float
Dim bBrushStylesArray() As Brush

'Create ranges on selected column
Create Ranges From TABLE_NAME With COLUMN_NAME Use "Equal Count" Number TOTAL_RANGE Round 1 Into Variable fRangeLimitsArray

'Create styles for the specified number of ranges
Create Styles From Brush (2,15597520,16777215) To Brush (2,32768,16777215) Vary Color By "RGB" Number TOTAL_RANGE Into Variable bBrushStylesArray

'Apply thematic
Shade Window FrontWindow() TABLE_NAME With COLUMN_NAME Ranges From Variable fRangeLimitsArray Style Variable bBrushStylesArray

Please help me how to custom value and color range, not automatically.


texts: Is it possible to create .OVR (like by gdaladdo) as smooth as QGIS oversampling feature of raster layer?

texts:
I found Hugolpz's tutorial for creating a GeoTIFF that contains grayscale with an alpha band.

Creating transparent hillshade?

# filter the color band, keep greyness of relevant shadows below limit
gdal_calc.py -A ./hillshade.tmp.tif  --outfile=./color_crop.tmp.tif \
    --calc="255*(A>220) +      A*(A<=220)"
# filter the opacity band, keep opacity of relevant shadows below limit
gdal_calc.py -A ./hillshade.tmp.tif  --outfile=./opacity_crop.tmp.tif \
    --calc="  1*(A>220) +(256-A)*(A<=220)"
# gdalbuildvrt -separate ./final.vrt ./color_crop.tmp.tif ./opacity_crop.tmp.tif
# gdal_translate -co COMPRESS=LZW -co ALPHA=YES ./final.vrt ./final_crop.tif

I wonder if it's posible to have also the .OVR that contains each zoom level's alpha band? I have tried this

gdaladdo -r bilinear -ro -b 1,2 --config COMPRESS_OVERVIEW DEFLATE --config PREDICTOR_OVERVIEW 2 --config ZLEVEL 9 GrayWithAlpha.tif 2 4 8 16 32 64

I found out that if the command lacks of -b 1,2, it doesn't work at all. Then the result still doesn't match the smoothness of QGIS raster layer oversampling feature. Despite beauty of oversampling, it's very very slow.

So I wonder if I can create .OVR that is as smooth as what presented by QGIS oversampling feature?


texts: WMS Single Tile Requests are not displaying in right location?

texts:
I'm querying an ArcGIS Server in OpenLayers v5.2.0 to try to get a single tile WMS returned to minimize requests to the server. I have been able to get the data to plot, but it's displaying in the wrong location.  I've checked the bbox and imagery size and those appear to be ok - just the positioning is off. I'm monkeyed with the ratio, adding server types, but haven't found the right combination to get it to properly return and place the image in the right location. Is this a bug or am I doing something wrong? P.S. I'm using the export option of ESRI rather than the WMS since the layer is time-enabled (I've excluded the times below, but the service should still return an image).

I'm using this call:

 var testESRI = new ol.layer.Image(
  {
    source : new ol.source.ImageWMS(
    {
      params :
      {
        'LAYERS' : 'show:1,3',
        'F' : 'image',
        'FORMAT' : 'png8',
        'TRANSPARENT' : true,
        'BBOXSR' : '102100',
        'IMAGESR' : '102100',
        'DPI' : 96
      },
      ratio: 1,
      url : 'https://nowcoast.noaa.gov/arcgis/rest/services/nowcoast/radar_meteo_imagery_nexrad_time/MapServer/export',
      serverType: 'mapserver'
    })
  });
  map.addLayer(testESRI);

The call that worked in OpenLayers 2 was this:

new OpenLayers.Layer.ArcGIS93Rest("ESRI", "https://nowcoast.noaa.gov/arcgis/rest/services/nowcoast/radar_meteo_imagery_nexrad_time/MapServer/export",
  {
    layers : "show:1,3",
    transparent : true,
    format : 'png8'
  }, {
    singleTile : true
  });


texts: Uploading Rasters to ArcGIS Online from ArcMap using .kmz, webpage and share as service

texts:
How do I upload rasters in my map document to ArcGIS Online?
I have done the following:

Share as map did not work because of the rasters, it caused a general function error
ArcGISonline only allows (rasters as .kmz's from a webpage.  I tried dropbox with my .kmz's and could not get it to read the URL
Logged in to arcgisonline through arcmap. Then file -Share as service- publish a service then I get to image svc0 where use gis services is greyed out
I then publish next and I get to svc1, I choose connection and get stuck on svc2  It will not accept the displayed url, and I have no idea of another to use. I get a bad address error


texts:
I have a list WRL_ID = ['NW-E8-105151', 'NW-E8-105138'] and I am trying to search these values in a field called ID.
If the value exist, print 'It's in SDE', if not, print 'Not in SDE'.

Right now the first value NW-E8-105151 is in SDE and the second value NW-E8-105138 is not. When I try to run the script below, it prints out both are in SDE. What am I missing?

Fieldname = "ID"
flag = False
qry = """ID IN {0}""".format(str(tuple(WRL_ID)))
with arcpy.da.SearchCursor(AR_Master, Fieldname, qry) as theseRows:
    for row in theseRows:
        flag = True
        print "It's in SDE"
    if not flag:
        print "Not in SDE"
>>>
['NW-E8-105151', 'NW-E8-105138']
It's in SDE
It's in SDE
>>>


texts: Convert "Get Raster Properties" output to long

texts:
I am building a model in ArcGIS (10.7.1) and I would like to use the maximum value of a raster as the "number of output zones" input to the Slice function. I used the Get Raster Properties tool to extract the max value from my raster but I am confused about how to convert this to a Long variable type (because that's the input variable for number of output zones in the slice function).

Does anyone know how to do this?


texts:
i am using Mapserver map file and  Openlayers to display a polygon layer on the Google map.
layer is displaying but that layer is not on the center.
i have used map.setcenter, but i do not know the lat lon values of the polygon layer
how do Io get these polygon values?