texts: gdalwarp netcdf input file has no raster bands

texts:
I use netCDF data from ftp://podaac-ftp.jpl.nasa.gov/allData/merged_alt/L4/cdr_grid

I call gdalwarp as

  gdalwarp -of netCDF -ts 480 1080 ssh_grids_v1609_2014122612.nc o.nc

and get

Input file ssh_grids_v1609_2014122612.nc has no raster bands.

How can I change the resolution with gdalwarp of a netCDF file from the link above?

Below is gdalinfo output

gdalinfo -sd 4 ssh_grids_v1609_2014122612.nc

Warning 1: dimension #2 (Latitude) is not a Longitude/X dimension.
Warning 1: dimension #1 (Longitude) is not a Latitude/Y dimension.
Driver: netCDF/Network Common Data Format
Files: ssh_grids_v1609_2014122612.nc
Size is 960, 2160
Coordinate System is `'
Origin = (-79.999997454216626,359.999989825117550)
Pixel Size = (0.166666661362951,-0.166666661953832)
Metadata:
  Latitude#axis=Y
  Latitude#bounds=Lat_bounds
  Latitude#long_name=latitude
  Latitude#point_spacing=even
  Latitude#standard_name=latitude
  Latitude#units=degrees_north
  Longitude#axis=X
  Longitude#bounds=Lon_bounds
  Longitude#long_name=longitude
  Longitude#point_spacing=even
  Longitude#standard_name=longitude
  Longitude#units=degrees_east
  NC_GLOBAL#Conventions=CF-1.6
  NC_GLOBAL#date_created=2016-09-11T18:07:15.140757
  NC_GLOBAL#geospatial_lat_max=79.916664
  NC_GLOBAL#geospatial_lat_min=-79.916664
  NC_GLOBAL#geospatial_lon_max=359.91666
  NC_GLOBAL#geospatial_lon_min=0.083333336
  NC_GLOBAL#Institution=Jet Propulsion Laboratory
  NC_GLOBAL#ncei_template_version=NCEI_NetCDF_Grid_Template_v2.0
  NC_GLOBAL#summary=Sea level anomaly grids from altimeter data using Kriging technique, which gives best linear prediction based upon prior knowledge of covariance.
  NC_GLOBAL#time_coverage_end=2014-12-26
  NC_GLOBAL#time_coverage_start=2014-12-26
  NC_GLOBAL#title=Sea Level Anormaly Estimate based on Altimeter Data
  NC_GLOBAL#version_number=1609
  NETCDF_DIM_EXTRA={Time}
  NETCDF_DIM_Time_DEF={1,5}
  NETCDF_DIM_Time_VALUES=10951.5
  SLA_ERR#_FillValue=9.96921e+036
  SLA_ERR#add_offset=0
  SLA_ERR#coordinates=Sea Level Anomaly Error Estimate
  SLA_ERR#long_name=Sea Level Anomaly Error Estimate
  SLA_ERR#scale_factor=1
  SLA_ERR#standard_name=Sea Level Anomaly Error Estimate
  SLA_ERR#units=m
  Time#axis=T
  Time#bounds=Time_bounds
  Time#calendar=gregorian
  Time#long_name=Time
  Time#standard_name=time
  Time#units=Days since 1985-01-01 00:00:00
Corner Coordinates:
Upper Left  (     -80.000,     360.000)
Lower Left  ( -79.9999975,   0.0000000)
Upper Right (      80.000,     360.000)
Lower Right (  79.9999975,   0.0000000)
Center      (       0.000,     180.000)
Band 1 Block=960x1 Type=Float32, ColorInterp=Undefined
  NoData Value=9.969209968386869e+036
  Metadata:
    _FillValue=9.96921e+036
    add_offset=0
    coordinates=Sea Level Anomaly Error Estimate
    long_name=Sea Level Anomaly Error Estimate
    NETCDF_DIM_Time=10951.5
    NETCDF_VARNAME=SLA_ERR
    scale_factor=1
    standard_name=Sea Level Anomaly Error Estimate
    units=m


texts: How to make same installation on multiple machines?

texts: What is the easy way to make the "same" Windows installation of QGIS (same menu, same plugins, same prefs...) on multi-PCs, 10 or 12 laptops?


texts: How to download highways marked with a specific relation from OSM?

texts:
There's an excellent general question about downloading canals here: How do I download specific OpenStreetMap data by tag?

There's also plenty of knowledge about OSM in general, but one thing I always struggle with is downloading 'highways' marked as a specific relation. The cycle network, for example, consists of many types of features joined together with a single relation: http://wiki.openstreetmap.org/wiki/Cycle_routes

How could one, for example, download the entire London Cycle Network in a single command?


texts: Since one can import .osm files into Neo4j Spatial the next natural question is: Does a renderer (like Mapnik) exist that reads from Neo4j Spatial (like Mapnik does from PostGIS)?


texts: Having issues with Leaflet + GIBS + EPSG4326

texts:
I've been having issues getting this to work correctly. Some details:

I need to use Leaflet 1.0 or higher
The map is BlueMarble ShadedRelief Bathymetry from NASA GIBS
The map is EPSG:4326
The map is loaded via TMS as opposed to WMS

Here's the closest I've gotten so far.

It seems to load and tile everything correctly, but some of the map isn't loading. Everything east of like 180 Longitude, and everything south of like -50 Latitude. I'm basing the code on the example on NASA's site, which works well (I got it working myself), but relies on an older version of Leaflet. After upgrading to a newer version, I've just run into a series of issues. I'm hoping someone can help me finally sort this out.


texts: Working with GTFS data, "spatial grid index size invalid"

texts:
I have been attempting to build a network analysis based on GTFS data for the Netherlands. I have obtained this data from transitfeeds.com (OVapi GTFS for the Netherlands), and am working with Esri's Add GTFS to a network Dataset extension (http://www.arcgis.com/home/item.html?id=0fa52a75d9ba4abcad6b88bb6285fae1). I have managed to Generate to transit lines and stops, but when I try to use the tool to Generate Stop-Street Connectors I repeatedly receive a message saying that "The spatial index grid size is invalid".

I have deleted and recreated the spatial index as suggested by Esri (http://desktop.arcgis.com/en/arcmap/10.3/manage-data/geodatabases/modifying-a-spatial-index.htm), but it does not solve the problem. All features related have the same spatial index, both before and after this recreation.

How can I solve this problem?


texts:
I am quite new to d3 and I am trying to make a choropleth map of the US. But my point is how to adjust Alaska and Hawaii in the final map.

In the past I used to do this in Illustrator, but I am not sure how to do this in d3.

Do I need to make these changes first in QGIS and then convert my data sets to TopoJSON?


texts: Merge two feature layers that include photos in ArcGIS Online?

texts:
I have 3 users in ArcGIS Online that students were using to collect data via Survey123 app throught a smiliar survey. They mapped points in a certain area including a photo for each point.  In each user there's a point layer with photo attached to each point. I want to merge all the 3  feature layers from the 3 users to one layer with the photos in my ArcGIS Online user.
I tried to download the layers to my computer as shapefiles and than upload them to my user and merge. This option is working, just the photos got lost in the new layer.

How can I merge the 3 layers to one layer with the original photos taken?


texts: Changing min and max values for raster layer in QGIS

texts:
Following the steps this tutorial (step 6), I'm trying to change the minimum and maximum values in a raster DEM. The current range is -6.24 to 3074.67, and I need it to scale from 0 to 65535. Unfortunately I can't figure out how to do this!

The most promising tool seemed to be r.rescale from GRASS, but it gave me the following error message:

The default nodata value is present in rasterband <output5219bf1d25af4b58b13ce1baeb6dfcd7> and would lead to data loss. Please specify a custom nodata value with the nodata parameter.

and since I cannot figure out how to set the nodata parameter, this obviously didn't work. Can anyone help me figure out how to rescale this raster, using r.rescale or any other tool in QGIS 3.6.2?


texts:
Am new to cartodb and am  following this tutorial (http://docs.cartodb.com/tutorials/create_map_cartodbjs.html) on how to create a map.

When Implement the sql query, i get an error on the console saying "Failed to load resource: the server responded with a status of 400 (Bad Request)". I have included the screenshot of my browser displaying the error.

 var subLayerOptions = {
  sql: "SELECT * FROM my_cartodb_table_title WHERE city = 'CITY X' "
}

cartodb.createLayer(map, layerUrl/*, {no_cdn: true}*/)
.addTo(map)
.done( function(layer) {
  layer.getSubLayer(0).set(subLayerOptions);
  data_layer = layer.getSubLayer(0);
})
.error( function(err) {
  console.log("some error occurred: " + err);
});

      }

What could be the problem?


texts: Categorizing points based on intersection of points with certain attributes with multiple polygons in QGIS?

texts: I have a shapefile with political boundaries of African states and a layer with points with various attributes that are plotted based on latitude and longitude. I would like to be able to use categorized symbology to identify points with specific attributes that intersect with multiple African states. Each point represents an instance of conflict between Party A and Party B. I want to be able to identify each point based on whether or not Party A OR Party B ALSO appeared in an instance of conflict in another country. Party A and Party B are different column headers in the attribute table. Basically, I want to create a binary distinction (red or blue point for ex.) for each point based on whether either (or both) party involved in the instance of conflict also appeared in a different country.


texts:
I need to merge the RGB bands of three TIFF images. I'm trying to use a PIL library (Python Imaging Library), but this execution error happens:

  Traceback (most recent call last):   File "merge.py", line 7, in

      Imagem = Image.merge("RGB", (red, green, blue))   File "/usr/lib/python2.7/dist-packages/PIL/Image.py", line 2367, in merge
      raise ValueError("mode mismatch") ValueError: mode mismatch

The output must to be a new TIFF image with three bands.
This is my code:

import Image

red = Image.open("red.TIF")
blue = Image.open("blue.TIF")
green = Image.open("green.TIF")

out = Image.merge("RGB", (red, green, blue))
out.save("img-out.TIF")

Can anyone help me?


texts: How to convert a jpeg map of borders into a shapefile?

texts:
I have a map of French departments from the 19th century (impossible to find in shapefile format) in jpeg format and I would like to convert it into a shapefile in order to regroup raster data and compute averages by departments.

I know questions like this have already been posted but I am really new to QGIS and I do not understand the answers given to those questions.


texts:
Seem to be having problems adding a geojson featurecollection to Mapbox GL JS.

What is the most efficient way to accomplish this? I've looked through the examples given on their site but they involve only singular objects.

Edit: I've managed to display the geojson using the following code

map.on('style.load', function() {
map.addSource("tom", {
    "type": "geojson",
    "data": mappingStructure
});

map.addLayer({
    'id': 'foobar1',
    'type': 'line',
    'source': 'tom',
    'interactive': true
});


texts: Export to KML (Portland) install fail on .dll load attempt

texts:
I downloaded the Export to KML extension for ArcMap and when I follow the instructions and run the batch file, the cmd comes up and as I hit a key to initiate the install, I get an error that reads:

"The module 'ExporttoKML.dll' was loaded but the call to DllRegisterServer failed with the error code 0x80004005"

OS: Windows 8.1
What I've tried: placing the ExporttoKML.dll file in my System32 folder and restarting; registering the .dll file using the cmd prompt line -

cd \windows\syswow64
regsvr32 c:\filename.dll

I was able to successfully register it, but the install error still comes up. Any thoughts?

ArcGIS version 10.2


texts:
Why is the Vector menu missing upon installation of QGIS 3.0?

Others mentioned that some of the tools were missing from the menu when they installed a previous version, but in my case the entire Vector menu is missing including all of the geoprocessing tools I need.


texts: Selecting polygons not touching other polygons in same feature class using ArcGIS Desktop?

texts:
I have a feature class with a bunch of polygons depicting buildings in it and I'm trying to select all the ones that are by themselves, that means any building that is by itself. There are also buildings that are adjacent to other buildings but I'm not interested in those.

Does anyone have any idea how to accomplish this in ArcMap?

Edit: Here's an example image for context. The red circles would be ones I wouldn't want to select and the green ones are ones I would like to select. The polygons are oddly shaped for fencing, but I just refer to them as buildings.


texts: Why isn't CartoCSS picking my conditional values a carto animated layer?

texts:
I am making an animated layer and the values I want to map range are from 0-1, as a percentage (e.g. 0.33333). I'm trying to change the color and eventually size based on the value.

I tried adding conditional statement based on this example, but it looks like it is only picking up the first value. Maybe I don't understand the order the conditional statements are being evaluated.
I'm adapting code from this example:
Animating quantitative values in Carto Torque Cat?

Map {
  -torque-frame-count: 233;
  -torque-animation-duration: 30;
  -torque-time-attribute: "date";
  -torque-aggregation-function: "CDB_Math_Mode(value)";
  -torque-resolution: 4;
  -torque-data-aggregation: linear;
}
#layer[frame-offset=1] {
  marker-width: 8;
  marker-fill-opacity: 0.5;
}
#layer[frame-offset=2] {
  marker-width: 10;
  marker-fill-opacity: 0.25;
}
#layer [ value <= 1] {
  marker-fill: #21b100;
}
#layer [ value <= 0.8] {
  marker-fill: #E31A1C;
}
#layer [ value <= 0.6] {
   marker-fill: #FC4E2A;
}
#layer [ value <= 0.4] {
  marker-fill: #FD8D3C;
}
#layer [ value <= 0.2] {
  marker-fill: #FEB24C;
}


texts: How can I create a multipoint geometry in QGIS?

texts:
I've got a Spatialite layer in QGIS with geometry type MULTIPOINT. Now I'd like to add some data in this table in the 'usual' way, so by doing multiple clicks in the map (e.g. left-click, left-click, right-click -> enter attribute values in the popup dialog for creating a record with a 3-points geometry. However, QGIS only allows me to add a single point by popping up the attribute dialog right after the first left-click.

How to do this in the GUI? (I don't want to enter coordinates by hand in a query :-) )


texts: Capturing mouse movement on QgsMapCanvas?

texts:
I have a python app that uses QgsMapCanvas as map display. I put it inside a QWidget, which is then inside another control. The problem is that there seems to be no way of tracking mouse move event on the QgsMapCanvas itself. I've tried connect as below:

QtCore.QObject.connect(self.canvas, QtCore.SIGNAL("mouseMoveEvent()"), self.canvasMoveEvent)

it doesn't trigger that event when the mouse is moving inside the canvas area.

How do I trap mouse movement inside a QgsMapCanvas in the above setup?


texts: Why is ArcMap displaying jpgs and geoTIFFs differently than the raw file?

texts:
I have a world jpg file that I am trying to use as a background image in ArcGIS. When I look at the raw jpg through a random picture viewer, it looks like this:

However, when I load the image into ArcMap, the contrast and color appear to change completely:

I couldn't find any documentation online on what causes this or how to fix it. Is this simply an artifact of GIS, or is there a way to make the image appear the same as the raw image in ArcMap?

Edit - Oops, this is a duplicate, but I am leaving it up because it may help someone find the answer they are looking for if the keyword geoTIFF is used.


texts: Setting Alpha Slider and Feature Count ON by default using QGIS?

texts:
In QGIS 3.4, I would like to automatize and uniformize the appearance of each layer.

I would like that each new layer is created:

with the alpha slider activated

with Feature count activated


texts: Eliminating Polygon Parts with ArcGIS Pro ModelBuilder and Basic Level License

texts:
I'm using ArcGIS Pro 2.3.0 Basic.

I'm trying to eliminate holes in an polygon-layer within a certain extent by using ModelBuilder. The generalization-tool (Eliminate Polygon Parts) isn't licensed with Basic...

I'm trying my best but it doesn't work. Anyone have an idea of how to generate polygons within the existing ones to select them afterwards?


texts: ArcGIS Combine Tool Returns Empty Atttribute Table?

texts:
I am attempting to combine six rasters using the ArcGIS 10.5 Combine tool. I ran this on three similar rasters and it worked. However, when I run with the new rasters it returns an empty raster with no records, but the stated value range (-)128 to 127.

The inputs are all 8-bit signed integers, projected using the same snap raster, and were reclassified to have a value 1 (with no "No Value"). I have tried running Combine using the same snap raster as used to project as the extent, and using the intersection of the layers (which theoretically should be identical anyways). However, it still results in the same error.

These two posts came across similar issues, but I have already tried the suggested approaches:

Using Combine function of ArcGIS Spatial Analyst? and
Using Combine tool in ArcGIS Desktop?.

Has anyone seen this behaviour and can suggest a solution?


texts:
I am using ArcGIS to add geotagged images as points to a map which allows me to click on the point and an HTML popup comes up with the photo.

http://www.esri.com/news/arcwatch/0912/import-geotagged-photographs-into-arcmap.html

This works fine. What I would like to do, is export/print the map to a PDF and within the resulting PDF, I would like to be able to click on the points and get the same HTML popup. Does anyone know if this is possible?


texts: Are there alternatives to ESRI Community Analyst?

texts:
Is anybody aware of any commercial products that are equivalent to ESRI Community Analyst? We are in need of a solution that provides similar products/reports dealing with demographics for a variety of areas.

Community Analyst is essentially what we want but the cost structure leaves little to be desired, pay $500 if you have an ArcGIS Online paid subscription...but just about everybody gets a free ArcGIS Online subscription with their licenses on maintenance.

So our problem is we don't have a need to buy ArcGIS Online for $2,500, but if we don't then Community Analyst is $4,000.


texts: Accessing Google Earth Engine background default vector map for use in masking

texts:
The default background vector map of Google Earth Engine has a very accurate and detailed water classification. Much better than most other sources I have seen.

Is it possible to access this resource in order to use it, for example, for masking?

I cannot find it in the data collection of available datasets, but is obviously present in the application itself.


texts:
I downloaded the GDAL complete Framework von Kyngchaos which also includes the GEOS Framework and shapely for python.

I can import shapely without a problem, but when I try to perform some "geo related" operations (like shape()) I get this error message:

  Failed CDLL(/opt/local/lib/libgeos_c.dylib)

This is my echo $PATH output:

/Library/Frameworks/GDAL.framework/Programs:
/Library/Frameworks/Python.framework/Versions/3.3/bin:
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:
/Library/TeX/texbin:/Library/Frameworks/GEOS.framework/:
/Library/Frameworks/GEOS.framework/Versions/3/unix/lib/:
/Library/Frameworks/GEOS.framework/Versions/3/unix/:
/Library/Frameworks/GEOS.framework/Versions/3/unix/bin

I checked, the GEOS framework is in there. Any ideas why shapely is not wirking?


texts: How to convert a PostGIS geometry stored as text back into a geometry?

texts:
I have a geometry column stored as text e.g.:

'010100002091080000000000804D624041000000C066735741'

in PostgreSQL db with PostGIS. This for a point geometry with the EPSG:2193.

How do I convert this text column to a geometry column?

I have seen this question which is essentially the same, but the answer does not work.


texts: Hillshade output looking grided when zooming in

texts: I have mosaic raster files into a new raster and then running hillshade in ArcGIS and I was wondering why do I get this gridded texture when zooming in and how can I fix it?


texts: Using jquery to reset layer in OpenLayers

texts:
I've used a combination html, jquery and cql to redraw layers in Openlayers using specified parameters. This worked fine as seen here:
http://www.dartmoor-npa.gov.uk/index/test-map3

I also want to reset the layer to show all features. I've added a reset button to the top of my page and another jquery finction at the bottom. Unfortunately this doesn't work.

Not sure where I'm going wrong here. Do I need to combine both the jquery functions into one?

Here is my code in full.

<form id="form">
<select id="camping" name="camping">
<option value="All" selected="selected">All Types</option>
<option name="camping" value="Yes"> Permitted</option>
<option name="camping" value="No"> Not Permitted</option>
</select>
<input id="reset" type="reset" value="reset" />
</form>

<script type="text/javascript" src="http://maps.nationalparks.gov.uk/resources/openlayers/OpenLayers.js"></script>
<script type="text/javascript">

(function () {
var map, DNPA_camping;

function initilize() {

    var options = {
        controls : [new OpenLayers.Control.Navigation(),
        new OpenLayers.Control.Attribution(),
        new OpenLayers.Control.PanZoomBar({id: "anpa"})],
        maxExtent : new OpenLayers.Bounds(0, 0, 800000, 1300000),
        projection : "EPSG:27700",
        units : "m",
        id: "anpa",
        theme: null,
        resolutions: [ 200,50,25,10,5,2.5,1.25,0.635,0.156 ]
    };

    //Create the map object
    map = new OpenLayers.Map( 'npmb-map', options );

    var DNPA_camping = new OpenLayers.Layer.WMS('Camping allowed',
      {
              layers : 'DNPA-camping',
              format : 'image/png',
              transparent: true,
              tiled : true
       }, {
              buffer : 0,
              visibility : true,
                      tileOrigin: new OpenLayers.LonLat(0,0),
              isBaseLayer: false,
              transitionEffect: 'resize',
              attribution:''
});

map.addLayers([DNPA_camping]);

var mapContext = OpenLayers.Util.getParameters();
var zoom = mapContext.zoom ? mapContext.zoom : 0;
var centre = mapContext.centre ? mapContext.centre : [280590, 78574];
map.setCenter(new OpenLayers.LonLat(centre[0], centre[1]), zoom);

//Jquery needed to call input
$("#camping").change(function () {
    DNPA_camping.setVisibility(true);
filterval = "use like '%" + $(this).val() + "%'";
    DNPA_camping.params.CQL_FILTER = filterval;
    DNPA_camping.redraw();
});

    //Jquery needed to reset layer
    $("form").bind("reset",function(){
        $('#camping').change(function(){
        DNPA_camping.setVisibility(true);
        DNPA_camping.redraw();
    })
});


texts: How to prevent an IllegalArgumentException with GeoTools WFS GetFeature request?

texts:
I want to retrieve the feature Collection from a WFS server with the Java library GeoTools. I tried this code, but unfortunately the program fails to execute.

public class App {
public static void main( String[] args ) throws IOException{
    String getCapabilities = "http://localhost:8081/geoserver/wfs?REQUEST=GetCapabilities&version=1.0.0";

    Map connectionParameters = new HashMap();
    connectionParameters.put("WFSDataStoreFactory:GET_CAPABILITIES_URL", getCapabilities );
    WFSDataStoreFactory  dsf = new WFSDataStoreFactory();
    try {
        WFSDataStore dataStore = dsf.createDataStore(connectionParameters);
        SimpleFeatureSource source = dataStore.getFeatureSource("Gruen:Gruenflaechen");
        SimpleFeatureCollection fc = source.getFeatures();

        while(fc.features().hasNext()){             //line 33
            SimpleFeature sf = fc.features().next();

            System.out.println(sf.getAttribute("ART"));
        }
    } catch (IOException ex) {
    }
}

By running this code, I get an IllegalArgumentException at line 33.

  Exception in thread "main" java.lang.IllegalArgumentException: Server does not support 'text/xml; subtype=gml/3.1.1' output format: [text/xml; subType=gml/3.1.1/profiles/gmlsf/1.0.0/0]

The output also says that it can't decode CRS EPSG:25832 for Gruen:Gruenflaechen and that I would create a location and a shape with null CoordinateReferenceSystem

I have no idea how to solve this problem and as you might have noticed I am not really a GIS expert. All I want to do is to receive the Geodata from the WFS and save it into an own Java Object.
Would be very grateful for help!

Edit

Okay, I found the solution. I just had to add a connectionParameter:

connectionParameters.put("WFSDataStoreFactory:OUTPUTFORMAT", "text/xml; subType=gml/3.1.1/profiles/gmlsf/1.0.0/0");


texts: Is there an explanation of Root-Mean-Square-Error (RMSE) for Dummies available?

texts:
Having an all-round expertise in GIS is sometimes not enough to fully understand some concepts of GIS Science. To add to this, I am also not a mathematician.

Considering this, would anyone be able to offer a child's explanation of Root-Mean-Square-Error (RMSE) whilst georeferencing an image onto a basemap? Having done this operation a thousand times, my only concern has been to firstly find locations in the target map which are also in the base map. Using common sense as a tool, I would usually find churches, old buildings, and similar objects which are very stable structures and would not have moved in the time difference between the basemap and the target image. After placing as many passpoints as possible, I would then look at the statistics table and either re-do passpoints with a high RMSE or delete them so that the overall RMSE score becomes as low as possible.

Now I know that the rmse is a statistical error calculation, but what has always bugged me, is that sometimes I am 100% sure that the passpoints are placed very accurately on the images...eg. on a church steeple, or another stable structure which is present in both the target image and basemap, but the rmse is still high. Therefore, I would be able to change the passpoints to a location which is further away from the reference structure (ie make the visual transformation less accurate) in order to decrease the rmse! This appears to me to be a paradox, because I would be decreasing the visual accuracy of the operation in order to increase the statistical accuracy.

Sometimes, I ignore the rmse completely because I can SEE that that after the georeferencing operation, the reference map and the target image line up very well...ie all the pass-points are in exactly the right place on both maps.

Could anyone please offer me a better simple explaination as to whether I am doing something fundamentally wrong here?


texts: In ArcSDE, SQL Studio Manager 2012, How to get pixel data using a point layer?

texts:
I was using 'where' and 'ST_Intersects' with polygon data to get values 'under' my point layer.

Example:

Select rd.[FORESTNAME] as Forest, Count(Distinct morel.[OBJECTID]) AS Observations
From [dbo].[RANGERDISTRICTS] rd, [dbo].[ACTUALMOREL] morel
where rd.Shape.STIntersects(morel.[Shape]) = 1
Group by rd.[FORESTNAME]

I think ST_Raster.getValue looks promising but I want to use a point layer to get the data, not enter each coordinate pair for each point.

SO now I have a layer (Slope raster) that I want to find the values under my point layer.

I THINK I was able to get the value using cursors: (I just don't remember which table I get the coordinates from :/ )

Declare morelx double
Declare morely double
Declare morelcoord CURSOR FOR
Select Shape.STX, Shape.STY from table actmorels

Open morelcoord

Fetch next from morelcoord into morelx, morely

while (00FETCH_STATUS=0)
Begin

    SELECT image.getValue(1,0,morelx,morely) Aspect,
    FROM [dbo].[ASPPROJ]
    WHERE image.raster_id = 1;
    Group by Aspect
    Fetch Next from morelcoord into morelx, morely

End


texts: ArcPy - Adding multiple fields with different field lengths

texts:
Instead of doing:

        arcpy.AddField_management(source, "FIELD_1", "TEXT", "", "", 5)
        arcpy.AddField_management(source, "FIELD_2", "TEXT", "", "", 5)
        arcpy.AddField_management(source, "FIELD_3", "TEXT", "", "", 10)
        arcpy.AddField_management(source, "FIELD_4", "TEXT", "", "", 4)
        arcpy.AddField_management(source, "FIELD_5", "TEXT", "", "", 100)
        arcpy.AddField_management(source, "FIELD_6", "TEXT", "", "", 150)

I want to loop through and create all these fields in one step.

So far I have something along the lines of:

        new_fields = ["FIELD_1", "FIELD_2", "FIELD_3", "FIELD_4", "FIELD_5", "FIELD_6"]
        field_length = [5, 5, 10, 4, 100, 150]

        for n in new_fields:
            arcpy.AddField_management(source, n, "TEXT", "", "", field_length)

But I am getting an error: Object: Error in executing tool

I believe it's because I have the field lengths in a list, but I'm not sure on the proper syntax to do this.


texts: OpenStreetMaps Local Server: Mapnik not Rendering Tiles

texts:
Introduction: I've built a local OSM server following this guide https://switch2osm.org/serving-tiles/manually-building-a-tile-server-14-04/. I've gotten through the guide just fine, and the server appears to be rendering because when I type:

  <my server addr>/osm_tiles/0/0/0.png

I get the picture of the world as described in the guide.

The Problem:
I loaded my gis database with data of Indiana, when I test the same file with the coordinates of Indiana like so:

 <my server addr>/osm_tiles/10/41/-85.png

I get 404 Not Found.

I then typed this for more information:

 <my server addr>/mod_tile

and get:

NoResp200: 7
NoResp304: 0
NoResp404: 0
NoResp503: 0
NoResp5XX: 0
NoRespOther: 0
NoFreshCache: 0
NoOldCache: 0
NoVeryOldCache: 0
NoFreshRender: 7
NoOldRender: 0
NoVeryOldRender: 0
NoRespZoom00: 0
NoRespZoom01: 1
NoRespZoom02: 1
NoRespZoom03: 1
NoRespZoom04: 0
NoRespZoom05: 1
NoRespZoom06: 0
NoRespZoom07: 0
NoRespZoom08: 0
NoRespZoom09: 1
NoRespZoom10: 0
NoRespZoom11: 2
NoRespZoom12: 0
NoRespZoom13: 0
NoRespZoom14: 0
NoRespZoom15: 0
NoRespZoom16: 0
NoRespZoom17: 0
NoRespZoom18: 0
NoRespZoom19: 0
NoRespZoom20: 0
NoTileBufferReads: 7
DurationTileBufferReads: 899
NoTileBufferReadZoom00: 0
DurationTileBufferReadZoom00: 0
NoTileBufferReadZoom01: 1
DurationTileBufferReadZoom01: 152
NoTileBufferReadZoom02: 1
DurationTileBufferReadZoom02: 106
NoTileBufferReadZoom03: 1
DurationTileBufferReadZoom03: 74
NoTileBufferReadZoom04: 0
DurationTileBufferReadZoom04: 0
NoTileBufferReadZoom05: 1
DurationTileBufferReadZoom05: 105
NoTileBufferReadZoom06: 0
DurationTileBufferReadZoom06: 0
NoTileBufferReadZoom07: 0
DurationTileBufferReadZoom07: 0
NoTileBufferReadZoom08: 0
DurationTileBufferReadZoom08: 0
NoTileBufferReadZoom09: 1
DurationTileBufferReadZoom09: 194
NoTileBufferReadZoom10: 0
DurationTileBufferReadZoom10: 0
NoTileBufferReadZoom11: 2
DurationTileBufferReadZoom11: 268
NoTileBufferReadZoom12: 0
DurationTileBufferReadZoom12: 0
NoTileBufferReadZoom13: 0
DurationTileBufferReadZoom13: 0
NoTileBufferReadZoom14: 0
DurationTileBufferReadZoom14: 0
NoTileBufferReadZoom15: 0
DurationTileBufferReadZoom15: 0
NoTileBufferReadZoom16: 0
DurationTileBufferReadZoom16: 0
NoTileBufferReadZoom17: 0
DurationTileBufferReadZoom17: 0
NoTileBufferReadZoom18: 0
DurationTileBufferReadZoom18: 0
NoTileBufferReadZoom19: 0
DurationTileBufferReadZoom19: 0
NoTileBufferReadZoom20: 0
DurationTileBufferReadZoom20: 0
NoRes200Layer/osm_tiles/: 7
NoRes404Layer/osm_tiles/: 0

I've also tried reloading Indiana's data and restarting the server with no success.


texts: Joining data points to polygon using ArcGIS Desktop?

texts:
I have precipitation data points separately as a shapefile in one layer and I also have a polygon shapefile from where the precipitation data was collected.

How do I join these two layers and compute a precipitation map within the polygon boundary?


texts:
I have a shapefile and I need to create an OD cost matrix, but I only need the distances between points which are on the same polyline.

Is there any way to do that?

I am not much familiar with ArcGIS and only know the basics.


texts: How to copy paste layers from one QGIS project to another?

texts:
Using QGIS 2.4, how can I copy one or more layers (with its properties, style, and the path of the source data) on QGIS and paste it in a different .QGS project?

I tried to make this, clicking in a layer and drag and drop in the Layers window of another .qgs project but don't take the properties of the first layer.


texts: How to project WGS84 raster in lat/long to WGS84 UTM in ArcMap 10?

texts: I know this is suppose to be simple and I've found similar questions. However when I try to do the same (data management tools > projections and transformations > raster > project) inserting input (GCS_WGS84) and output (WGS84_UTM_Zone23S_SouthAmerica) coordinate systems, ArcMap still requires the choice of a geographic transformation. It shouldn't be this way. How can I transform this lat/long raster to UTM?


texts: Allowing non-schema values during WFT transaction between OpenLayers and GeoServer

texts:
I have a function that manage WFS-T Transaction between a web application client (based on OpenLayers 6) and a GeoServer instance.
import axios from "axios";
import { WFS } from "ol/format";
import { FeatureCollection } from "geojson";
import { WriteTransactionOptions } from "ol/format/WFS";
import Feature from "ol/Feature";

const WFSTransaction = (mode: TransactionMode, featuresArray: Feature[]) => {
    const formatWFS = new WFS();
    const xs = new XMLSerializer();
    const options: WriteTransactionOptions = {
      featureNS: "myDomain",
      featureType: "mylayer",
      srsName: "EPSG:4326",
      featurePrefix: "",
      nativeElements: [],
    };
    let node;

    switch (mode) {
      case "insert":
        node = formatWFS.writeTransaction(featuresArray, [], [], options);
        break;
      case "update":
        node = formatWFS.writeTransaction([], featuresArray, [], options);
        break;
      case "delete":
        node = formatWFS.writeTransaction([], [], featuresArray, options);
        break;
      default:
        console.log(
          "passed transaction mode  did not match any of the supported transactions mode"
        );
        break;
    }
    if (node) {
      const wfsNode = xs.serializeToString(node);
      return axios.post(
        `${this._domain}/ows?service=WFS&typeName=${this.fType}`,
        wfsNode,
        {
          headers: { "Content-Type": "text/xml" },
        }
      );
    }
  };

Everything is working fine.
BUT if I send a feature with some attributes that does not match my table schema in the geoserver store (which is basically a PostgreSQL instance), I got 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://meitarimdb:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd">
<ows:Exception exceptionCode="InvalidParameterValue">
<ows:ExceptionText>No such property: editable</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>

Now the thing is that the property "editable" (that you can see in the error message) is something that I set on purpose and dynamically to the OpenLayers Feature on the flight.
myFeature.set("editable", true);

Well if I unset this property that I added before sending the transaction, my feature gets updated ...
But this not ideal because for each property that I add dynamically for logical purpose of the application, I have to unset it before sending the transaction. And there is a bunch of them...
So I wonder if there is any options to make the GeoServer more flexible with the properties that I send and simply ignore if a property is not present in the schema, and update those that are presents on the schemas
I did not found in the documentation.


texts: Projecting from ArcGIS online to Desktop

texts:
I asked an earlier question about Geocoding (I initially called it Georeferencing, but have since learned the difference) addresses from the Saint Louis Metropolitan Police Department (SLMPD) crime data.  I wound up having to geocode using ArcGIS online to project to a basemap, and then downloaded the resulting projected layers to desktop (ArcMap).  That part is fine.

The part that is NOT working is that when I try to add these layers to my other layers (projected at NAD_1927_StatePlane_Missouri_East_FIPS_2401), by projecting them from their source data (WGS_1984_Web_Mercator_Auxiliary_Sphere) to _1927, it doesn't work.  It consistently projects it to the exact same location it has as _1984, which is slightly higher and to the left of _1927.
I know this can work.  I did it with an earlier section of data from SLMPD via the ArcGIS online method.  The problem is I did not keep a record of how I fixed it, nor do I remember how I did it.  I have tried projection to _1927, projection to _1983(US feet) and THEN projection to _1927, batch projection in the same manner, creating a custom GeoTransformation from _1984 to _1927 and then Projecting, and by defining projection to another source and then projecting to _1927.  None of them have worked.  I think I'm stuck because I'm fixating too much and can't see outside the box, so I thought I'd ask for suggestions from the GIS crowd.


texts: Possibility of attaching non-spatial files to features in QGIS

texts:
I try to open a hyperlink from a feature in QGIS using the Windows options.
I managed to make a hyperlink working, by copying in the edit action tab, the Adobe Acrobat path, the field name and the destination field, but it shows error messages. If I close the messages, I can visualise the document.


texts: Get geometry column back when counting points in polygon using PostGIS

texts:
I have two PostGIS tables: earthquakes and borders, which contain point data on earthquake locations, and polygons of countries in the world respectively.

I want to try and count the earthquakes within each country, and I've managed to do this using the following SQL:

SELECT ch01.borders.name, COUNT(ch01.earthquakes.geom) as count FROM ch01.borders, ch01.earthquakes
WHERE ST_Contains(ch01.borders.geom, ch01.earthquakes.geom)
GROUP BY ch01.borders.name ORDER BY count DESC;

This gives me a nice ordered table showing the number of earthquakes in each country. However, I'd like to produce a map of the world in QGIS, with each country shaded relative to the number of earthquakes occurring within its borders - but to do that, I need to get a geometry column back from the SQL query (it seems that I'll also need a primary key, but I'll cross that bridge later).

I tried simply selecting the geometry column in the SQL:

SELECT ch01.borders.geom, ch01.borders.name, COUNT(ch01.earthquakes.geom) as count FROM ch01.borders, ch01.earthquakes
WHERE ST_Contains(ch01.borders.geom, ch01.earthquakes.geom)
GROUP BY ch01.borders.name ORDER BY count DESC;

but that gives me an error saying:

ERROR: column "borders.geom" must appear in the GROUP BY clause or be used in an aggregate function

The problem is: I don't want to aggregate or group by the geometry, I just want to return the geometry for the rows that I've got. How can I do this?


texts: How to add a label for arcgis 3D map, javascript 4.0

texts:
I am new to ArcGIS map development in javascript, I am trying to add a labelClass for 3D graphic layer.
Can anyone help me how to add a label for 3D map using javascript 4.0


texts: What causes the comand 'd.vect map' to fail in GRASS-GIS?

texts:
I have been having problems with visualizing my data in GRASS-GIS.

I imported my .shp file into the software following all instructions and, after that, I selected the layer I wanted to visualize.

It didn't happen at first, so I went on to the map display screen and clicked on the button that places the map within the view panel.

Unfortunately, this also did not help. I still can't see any data.

Does anybody know how can I fix this issue?


texts:
I am attempting to create a simple distribution map.

I have created a vector layer by importing a table in .tsv file format consisting of a list of named points with latitude & longitude in decimal degrees plus heights. CRS is EPSG:27700 (OSGB 1936 British National Grid), the same as the other layers in the project. I can see the points displayed in the correct positions relative to one another by highlighting and zooming to the layer, but I cannot see any of the other layers. The attributes table has data in it which corresponds to the ’tsv spreadsheet from which it was derived.

I have also saved the file as a .shp file; again, I can zoom to that layer and see the points, and the attribute table looks OK, but I still can’t see any of the other layers, except for the .tsv layer from which the new .shp file was derived. To return to the other layers I have to select one of them and click the zoom to layer tool. But then I can’t see the new layer.

I’ve had several attempts at importing, including importing using CRS ESPG:3857 (WGS 84 / Pseudo Mercator). Result is the same. I have CRS transformation ’on the fly’ enabled in Project Properties.

I would be grateful for advice as to how to solve this problem.

I am using QGIS 2.12.1 on a Mac (OS X 10.11.3 El Capitan)


texts: Showing images with special chars in path in map tips?

texts:
I do show jpg images through map tip's html. But if image's path has special characters (çãõ...) then map tip is not able to render it (the path to the images is directly writen in the html).

If i edit the qml with a text editor i can correctly see the special characters, but when i open proprieties->show it shows strange symbols. if i edit again directly in the proprieties->show box, then i can see the special characters but does not yet work


texts: Adding "cacheControlMaxAge" parameter into sddraft

texts:
I would like adding a new parameter into my sddraft, the value of "cacheControlMaxAge".
For this, I have the following code that modifies the value of already existing parameters :

import xml.dom.minidom as dom
doc = dom.parse(r"Z:\secret_folder\service.sddraft")
configProps = doc.getElementsByTagName('ConfigurationProperties')[0]
configPropArray = configProps.firstChild
configPropSets = configPropArray.childNodes
for configPropSet in configPropSets:
    configPropKeyValues = configPropSet.childNodes
    for configPropKeyValue in configPropKeyValues:
        if configPropKeyValue.tagName == 'Key':
            if configPropKeyValue.firstChild.data == 'cacheControlMaxAge':
                configPropKeyValue.nextSibling.firstChild.data = 604800
                print "OK"
            else:
                print "KO"

However, it seems that the parameter does not exist :

KO

If I am wrong with variable name/parameter, how do I add this parameter in the sddraft ?


texts:
I am using postgres with postgis for spatial data and ArcGIS for visualisation. I am really confused regarding what units the st buffer function uses because when I insert just the value 1 as measurement to be buffered around a line, the line becomes very wide.

Then when I enter a value like 0.00001 the line width would be small. Is there a way where I change or set the units of the value?

How can I have more control on the value I want the line to be wide? Since I am building roads with various width values.


texts: I am trying to query a table in MySQL which contains spatial data. Out of all the columns, I have one column called "pt". Each entry in this field is specified as 'BLOB'. In my MySQL workbench 6.3,when I right click on any of these entries, it takes me to Open Value in Viewer where I can see my data as POINT(X,Y) in Text/WKT format.I am interested to query this data using python but do not know the syntax. Could someone please help?


texts: Google Earth Engine: Same geometry different Areas (PERSIANN-MODIS)

texts:
I was trying to count the number of pixels that are inside my ROI and differs quite a lot one image from the other.

For MODIS image I get a total of 265533 pixels (500x500) spatial resolution and for PERSIANN-CDR I get 75 in total (27000*27000). The total area for both are completely different. Does anyone know why?

var image1 = ee.Image('MODIS/006/MOD16A2/2001_11_17').select('ET');

var c = image1.reduceRegion({
  reducer: ee.Reducer.count(),
  geometry: geometry
  });

print(c);

var image2 = ee.Image('NOAA/PERSIANN-CDR/20011101').select('precipitation');

var c2 = image2.reduceRegion({
  reducer: ee.Reducer.count(),
  geometry: geometry
  });

print(c2);


texts: Issues with QGIS WFS editing/PostGIS rendering

texts:
I want to be able to view and edit spatial data within a postgis database. I have tried using a WFS with Geoserver - but constantly get 'Empty Response' error and the Network log says the request timed out. However it renders great.

I load the same dataset directly from postgis and I can edit, update and delete no problems.....but it renders HORRENDOUSLY slow (only 115 polygons in the dataset at this stage), to the point where panning around the map is totally impractical for day to day use.

I can also display/edit/update/delete fine, with great panning ability (I assume it is cached or turned into a .lyr file) using ST-Links in ArcGIS.

The fact that the same dataset can be displayed and edited using two different methods indicates to me that the database is fine, and that either the settings/bugs in QGIS are causing an issue - or is there something in Geoserver that may be influencing the inability to edit WFS?

NOTE:
The QGIS option for the database 'Use estimated table metadata' is checked and made no difference.
'Use render caching' in the rendering options is checked and made no difference

Can anyone suggest some known issues/areas to troubleshoot to get this fixed - even to stop QGIS from constantly re-requesting data each time I pan would be great!


texts: Interpreting GeoTiff pixel values using Python GDAL?

texts:
I was running python script that queries a GeoTiff file at the coordinates of a centroid of blocks and as a result I got a list of pixel values, which I have trouble interpreting. When I run gdalinfo to obtain basic information about my tiff I get the following (abridged output):

~$ gdalinfo arsenci020l.tif
Driver: GTiff/GeoTIFF
Files: arsenci020l.tif
       arsenci020l.tfw
Size is 10366, 7273
Coordinate System is:
PROJCS["Lambert Azimuthal Equal Area projection with arbitrary plane grid; projection center
100.0 degrees W, 45.0 degrees N",
......(omitted)............
......(omitted)............
Band 1 Block=10366x1 Type=Byte, ColorInterp=Palette
Color Table (RGB with 256 entries)
0: 0,0,0,255
1: 255,255,255,255
2: 132,193,255,255
3: 204,204,204,255

My interpretation of Color Table given by gdalinfo was that every pixel value actually stands for 4 other entries.

The output of python script prints out 2,3,5, etc. How to interpret them? My first instinct was to look at the Color Table above given by gdalinfo, but I'm curious why it talks about RGB value and gives 4 numbers? (don't we represent RGB be in 3 numbers?) Is there an extra column?

Also, the information file about the GeoTiff has the following table:

  Attribute_Label: Arsenic concentration grid cell value.
  Attribute_Definition:
    Each grid cell value is a color definition that represents an
    estimate of the 75th percentile of arsenic concentration in
    that region.  The concentrations were recorded in micrograms
    per liter (ug/L; equivalent to parts per billion), and were
    converted to colors according to the following table.  All
    arsenic concentrations greater than 50 micrograms per liter
    were recoded as 50 micrograms per liter.  There may be
    intermediate colors in the image that are not included in this
    table.
    > Arsenic             Color        RGB values
    > Concentration
    >--------------------------------------------------------------
    >  1 ug/L or less     dark green    50.67328 150.3464   0.67328
    >  3 ug/L             light green  152       251      152
    >  5 ug/L             yellow       255       255        0
    > 10 ug/L             orange       255       165        0
    > 50 ug/L or greater  red          255         0        0
    > Insufficient data   white        255       255      255
    > Non-US land         grey         204       204      204
    > Water               light blue   132       193      255

Here it uses 3 numbers to represent a color. Why then gdalinfo gives 4?

As a side note, how should I programmatically connect pixel value, RGB color and arsenic concentration somehow (without excluding any intermediate colors as this table did). Any advice on how to do that?

This is the first time I'm working with GeoTiff files.


texts:
I am trying to draw a marker by EditingToolbar but I don't know to change style of point.

I want to draw an image instead of a default point.

Could you show me how I do it?


texts: UPDATE geometry in table for a specific row

texts:
GIVEN: gisTable (Table) has a geom (geometry) column defined as follows:

    ALTER table gisTable ADD column geom geometry (Multipolygon, 4326);

I am attempting to run the UPDATE command below which is part of a function I am attempting to debug. The UPDATE command is as follows. my function not shown takes 7 arguments from a vb application (the table name, a primary id , an alternate id and two coordinate pairs (lon/lat) which form the GIS polygon to be inserted.

    UPDATE thisSchema.gisTable SET geom=st_asbinary(st_geomfromtext('POLYGON((37.98 7.51, 38.51 7.51, 38.51 6.98, 37.98 6.98, 37.98 7.51))', 4326)) WHERE mainid = '023456' AND altId = 'ABC';

When I execute the command above the error states that the SRID is not found or is SRID(0); however I am setting it in the st_geomfromtext portion of this clause.

Questions:
Can I use POLYGON even though the geom column was defined as Multipolygon (above)
When I modify POLYGON to MULTIPOLYGON I get a parse error after the first coordinate.

Should the POLYGON clause be wrapped in two (( and )) as shown above.

I have the following function I am using to update each row in gis_table' geom column;


texts: Extract top, bottom, left, and right (as numeric values) from a polygon in MariaDB?

texts:
Is there a way to extract the minimum and maximum x and y values separately from a polygon value in MariaDB (I'm using 10.5.8 with no extensions)?
Eg:
set @poly = ST_GeomFromText('POLYGON((1.2 1.2,2 1,2 0,1 0,1.2 1.2))');

What I want is to extract the top (max_y), bottom (min_y), left (min_x), and right (max_x) values separately. So for example here "top" is 1.2, "bottom" is 0, "left" is 1, and "right" is 2.
I can get a "minimum bounding rectangle" containing the polygon, which might help, but I don't know how to extract the individual X and Y coordinates:
select ST_Envelope(@poly);
# POLYGON ((1 0, 2 0, 2 1.2, 1 1.2, 1 0))

What I'd like is something like
select ST_MinX(@poly);
# 1


texts: Disable radio button for a single overlay layer in leaflet

texts: I have added a bunch layers as a leaflet overlays. How can I remove the radio button for 1 of the overlay layers so that it is by default on and users cannot toggle it on and off?. I have been looking at Layer.control.extend and I am not sure if it is the correct path.


texts: better way to duplicate a layer using ogr in python?

texts:
I'm splitting a large shapefile into many smaller ones using ogr.  I'd like to just copy all of the field and layer config information from the original.  Here's how I'm doing it now:

src = ogr.Open('original.shp', 0)
layer = src.GetLayerByIndex(0)
driver = ogr.GetDriverByName('ESRI Shapefile')
ds = driver.CreateDataSource('file1.shp')
dest_layer = ds.CreateLayer('layer1',
                            srs = layer.GetSpatialRef(),
                            geom_type=layer.GetLayerDefn().GetGeomType())
feature  = layer.GetFeature(0)
[dest_layer.CreateField(feature.GetFieldDefnRef(i)) for i in range(feature.GetFieldCount())]

Is there a more succinct way to do this?


texts: Converting PostgreSQL GeoJSON data into feature services ArcGIS Pro and ArcGIS Online can read

texts: I am having a difficult time converting transforming my GeoJSON data stored in PostgreSQL to feature services ArcGIS Pro can load. I have tried https://github.com/doneill/koop-provider-pg & https://github.com/koopjs/koop-cli with no success.


texts: Finding intersections of features in one line layer using QGIS

texts:
I want to find intersections in the same layer like picture below. All lines are separate features in the same layer.
How can I find these intersections in QGIS?


texts: Is there Python 3 module to read .dbf files written by ArcGIS for Desktop?

texts:
I would like to know whether there are Python 3.x-compatible (preferably Python 3.3) modules to read the kind of .dbf files produced by ArcGIS for Desktop.

All the modules I found were only compatible with Python 2.x. I may have missed something, but I really couldn't find any which was compatible with Python 3.x.


texts: Aligning dropped down list to edit area of combo in ArcMap AddIn?

texts:
I have created the ArcMap addin, according to walkthrough: "Building custom UI elements using add-ins".
Now I don't know how to get rid of annoying "feature": the label of the combo placed to the left, and the dropped down list is aligned to the left, actually under the label, not under the combo edit area, as it intuitively should be.

Can somebody shed a light on this problem ?

Example


texts: Creating a multiple select dropdown list in QGIS?

texts:
Is it possible to create a multiple select dropdown list/select widget  in QGIS which links to a separate txt file?

I want to collect species lists for different locations in qfield but do not want to have to enter hundreds of species names manually.

I am using QGIS 2.18


texts: Installing/defining custom projection Nepal Modified UTN in QGIS?

texts: I need to install/define a custom projection Nepal MUTM in qgis 2.14. But I don't know how to do it? Where will I get the projection code to use during defining?


texts: OGR2OGR call using Python and subprocess call fails on Windows 10

texts:
I have a Python script that batch converts GPX files stored on an older Garmin unit to ESRI shapefiles.  This script use an ogr2ogr command line argument passed from Python using subprocess.call() to do the conversions.  This all works very nicely on my Linux computer that I typically use for script development.  I have full permissions on this computer.
Now I am converting the script to a Windows specific computer to which I do not have administrative rights.  Furthermore, my Python environment is behind a walled-garden using ArcGIS Pro 2.7.  When my script gets to the ogr2ogr conversion and subprocess.call() I get an error message 'ogr2ogr' is not recognized as an internal or external command, operable program or batch file.
A previous post referring to Windows 7 stated that one should either set Environment Path Variables (which I cannot do since I do not have admin rights or run this command line statement  "set path=%path%;C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\osgeo\".  As a test of all this I can run "set path" stuff without error in a Windows Power Shell but when I use the power shell to run  ogr2ogr -f " Shapefile" Waypoint.shp Waypoints_01-OCT-19.gpx in the directory with the GPX I get the error below.
`ogr2ogr : The term 'ogr2ogr' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ ogr2ogr -f "ESRI Shapefile" Waypoint.shp Waypoints_01-OCT-19.gpx
+ ~~~~~~~
    + CategoryInfo          : ObjectNotFound: (ogr2ogr:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException`

How do I get my ogr2ogr command to run using Python and Windows 10?


texts:
I'm trying to use an i-frame to show the attributes from a Geoserver WFS layer. The Geoserver is hosted on example.com:8080/geoserver, and the page that is trying to access it (and server the i-frame) is on example.com.
Now, I'd assume that this would be SAMEORIGIN, and by default geoserver is set to SAMEORIGIN for the x-frame-options (according to The geoserver user guide)
So, I guess my options are to switch to ALLOW-FROM example.com, or disable xframe options.

In the manual it says you can set a web.xml init parameter but doesn't really say how.

Can anyone help me with this?


texts:
Now I am trying to create a field column by using Expression on PyQGIS. The following code allows me to create a column. But, I can't get any values on "budgets_Budgets_county" on the "budgets" column (though I have 0 on this column). Note that the "budgets_Budgets_county" column is string. And, if I use Field calculator and use expression 'CASE...END', I can get values I want. But, I can't get these values if I use PyQGIS. Where is wrong?

county = QgsVectorLayer('[path]/county.json',
                        'county',
                        'ogr')

# Replicating
feats = [feat for feat in county.getFeatures()]

mem_layer = QgsVectorLayer("Polygon?crs=epsg:4326",
                           "mem_layer",
                           "memory")

mem_layer_data = mem_layer.dataProvider()
attr = county.dataProvider().fields().toList()
mem_layer_data.addAttributes(attr)
mem_layer.updateFields()
mem_layer_data.addFeatures(feats)
QgsProject.instance().addMapLayer(mem_layer)

# Replicating

with edit(mem_layer):
    request = QgsFeatureRequest().setFilterExpression('("STATE"=\'02\')or("STATE"=\'15\')or("STATE"=\'72\')')
    request.setSubsetOfAttributes([])
    request.setFlags(QgsFeatureRequest.NoGeometry)
    for f in mem_layer.getFeatures(request):
        mem_layer.deleteFeature(f.id())

pv = mem_layer.dataProvider()
pv.addAttributes([QgsField('fips', QVariant.String)])
mem_layer.updateFields()
expression = QgsExpression('"STATE"+"COUNTY"')
context = QgsExpressionContext()
context.appendScopes(\
QgsExpressionContextUtils.globalProjectLayerScopes(mem_layer))
with edit(mem_layer):
    for f in mem_layer.getFeatures():
        context.setFeature(f)
        f['fips'] = expression.evaluate(context)
        mem_layer.updateFeature(f)

# Table data

budgets = QgsVectorLayer('[path]/county_budgets.csv',
                        'budgets',
                        'ogr')
# Join

shpField='fips'
csvField='fips'
joinObject = QgsVectorLayerJoinInfo()
joinObject.setJoinFieldName(csvField)
joinObject.setTargetFieldName(shpField)
joinObject.setJoinLayerId(budgets.id())
joinObject.setUsingMemoryCache(True)
joinObject.setJoinLayer(budgets)
mem_layer.addJoin(joinObject)

# Construct budget integer column

pv = mem_layer.dataProvider()
pv.addAttributes([QgsField('budgets', QVariant.Int)])
mem_layer.updateFields()
expression = QgsExpression('CASE WHEN "budgets_Budgets_county" IS NULL THEN 0 ELSE "budgets_Budgets_county" END')
context = QgsExpressionContext()
context.appendScopes(QgsExpressionContextUtils.globalProjectLayerScopes(mem_layer))
with edit(mem_layer):
    for f in mem_layer.getFeatures():
        context.setFeature(f)
        f['budgets'] = expression.evaluate(context)
        mem_layer.updateFeature(f)


texts: How to change the font size and color of a certain part of label in ArcGIS

texts:
I am using Arcmap 10.4. Now I have this label formatted in two lines, as shown below

And it's shown in the map like:

Now I want the first line of the label, which is the Order# of the roads, to be bigger and probably with a different color while the second line remains the same.

Is it possible at all?


texts:
I am using ArcGIS software to create a Standard deviation of point pattern, and I know whether Ii need to expect a circle or an ellipse.

Is standard deviation in that context always circular? And if it is, what is the best / normal way to describe it (diameter? radius? and what is the Greek letter for it)? And would mean center always be the center-point of this circle?


texts: Get Coded Value Domains from a Oracle geodatabase using PLSQL

texts:
i'm trying to get all coded value domains from a Oracle geodatabase. I dont have access to arcmap. I only have access to oracle 10g database.

SELECT
 I.NAME Domain, EXTRACTVALUE(CodedValues.COLUMN_VALUE, 'CodedValue/Code') AS Code, EXTRACTVALUE(CodedValues.COLUMN_VALUE, 'CodedValue/Name') AS Value FROM SDE.GDB_ITEMS_VW I

JOIN SDE.GDB_ITEMTYPES IT ON I.Type = IT.UUID, TABLE(XMLSEQUENCE(XMLType(Definition).Extract('/GPCodedValueDomain2/CodedValues/CodedValue'))) CodedValues
WHERE IT.Name = 'Coded Value Domain'

i saw this SQL statement on Return information on coded value domains using ArcSDE 10.x for SQL Server, when i try to run it occurs:

ORA-28575: unable to open RPC connection to external procedure agent
ORA-06512: at "SDE.ST_GEOMETRY_SHAPELIB_PKG", line 1339
ORA-06512: at "SDE.ST_GEOM_UTIL", line 760
28575. 00000 -  "unable to open RPC connection to external procedure agent"
*Cause:    Initialization of a network connection to the extproc agent did
           not succeed. This problem can be caused by network problems,
           incorrect listener configuration, or incorrect transfer code.
*Action:   Check listener configuration in LISTENER.ORA and TNSNAMES.ORA, or
           check Oracle Names Server.

Is there another way to get coded value domains without configure the LISTENER.ORA? I don't have any chance to configure such file. Should i need a external procedure to get this coded value domains?


texts: Calculating percent area of intersection in WHERE clause

texts:
I have a table of polygons (census block groups) in Postgres. I want to tag each block group with the town (another polygon table) it mainly resides within. Is this possible?
I'm thinking I'd need to essentially create something like:
select b.*, t.name
from blockgroups b, towns t
where (st_area(st_intersection(b.wkb_geometry, t.wkb_geometry))/st_area(b.wkb_geometry)) > .5

but this query is taking forever (I've got about 5,000 block groups and 375 towns...). Any suggestions on how to make this query work either at all if it's incorrect, or faster if it is correct?


texts: Re-Calculating Rows in File GDB Feature Classes

texts:
I run the script that I created below, but when it is completed and I check the FC tables, nothing has changed.

The script iterates through each feature class of a database and then iterates through each row of that feature class to check if the first 4 characters of the string record under the field "Photo1" are eqaul to "http". If the characters are "http", then it rewrites the field with the new given path. In other word, if there is already a web link, it rewrites it. This is because some rows do not have links in them.

import arcpy
import os

arcpy.env.workspace = arcpy.GetParameterAsText(0)

parish = arcpy.GetParameterAsText(1)
field = 'Photo1'
path = r"http://website.ca.gov/Photos"

for fc in arcpy.ListFeatureClasses():
    rows = arcpy.UpdateCursor(fc)
    for row in rows:
        photolink = str(row.getValue(field))

        if photolink[0][:4] == "http":

            photolinkMod = photolink.split(r'/')
            photo = len(photolinkMod) - 1

            row.setValue(field, os.path.join(path, parish, photo))
            rows.updateRow(row)

del row, rows


texts: Why does “arcpy.SaveToLayerFile_management” function does not allows me to input a file path?

texts:
I want to create a layer file from a shapefile.

When I do...

arcpy.SaveToLayerFile_management('123.0_NYC_PARKS',value+"_"+"NYC_PARKS.lyr", "ABSOLUTE")

it works because I have this file opened in the table of contents, but when I do

arcpy.SaveToLayerFile_management("C:/ArcGIS/Projects/Value/"+value+"/"+value+"_"+NYCPARKS", value+ "_NYC_PARKS.lyr", "ABSOLUTE")

I get told that the file does not exist

  ERROR 000732: Input Layer: Dataset C:/ArcGIS/Projects/Value/123.0/123.0_NYCPARKS does not exist or is not supported
  Failed to execute (SaveToLayerFile).


texts:
I am interested in building GDAL for iOS. I have managed to build successfully for macOS by building from sources with:

./configure --with-python=python3 --with-proj=/usr/local/Cellar/proj/7.0.1 --with-macosx-framework
make
make install

Like that, I get a libgdal.a static library that I can import successfully into a macOS app. Now, I would like to be able to do the same in an iOS project.

How can I achieve that?


texts: Vectorizing raster with values between 0 and 1 in QGIS

texts:
I am working on QGIS. I have a raster of EVI, in which values are comprised between 0 and 1. I need to vectorize this raster in order to make an intersection with another vector.
My issue is that when I vectorize my raster, the values are either 0 or 1, but I want the values detailed between 0 and 1. The best would be to have the values every 0.1 (0.1, 0.2, 0.3, ...).
Do you have any idea of how I can proceed?
I was thinking that I could multiply the values of the raster by a hundred, but is that even possible?


texts: Geoserver layer styling with multiple geometries

texts:
I've build a table with multiple geometries in PostGIS. This table is published in GeoServer. Now I'm wondering how GeoServer handles this type of layer. specifically the drawing part.

My layer contains all three geometries, points, lines and polygons. In the ideal situation polygons are drawn first, lines second and point third. To prevent polygons overlapping the other geometry types.

The generated WMS looks rather good, all point and lines are visible. My question is: 'Does Geoserver draw objects according to its geometry, in a specific order?'


texts: How do I dissolve to a predetermined number of contiguous geographies based on equal division of a value?

texts:
Let's say I have a layer that is the state of Oklahoma, broken up by county, and I want to dissolve it into contiguous regions of roughly equal population size, and I want to define how many regions there will be.

So, if the state's population is 100, and I want 7 regions, I would get 7 different contiguous regions where the total population is [(100/7) plus or minus one standard deviation or less]

I have the state layer by county, and I have the population numbers in my table.

Is that something QGIS can do? How would I go about this?


texts: How to use IUniqueValueRenderer for empty geodatabase point file with ArcObjects

texts:
I have empty geodatabase file with point geometry created programmatically. I have style file with several symbols.

I basically want to add all these symbols to my shapefile before creating features/geometry in shapefile. So when user starts editing he can select any of those symbols and drop on map (basically part of Add-in).

Using IStyleGallery I loop through all the symbols:

IEnumStyleGalleryItem enumStyleGalleryItem = styleGallery.get_Items("Marker Symbols", filePath, null);
enumStyleGalleryItem.Reset();
IStyleGalleryItem styleItem = enumStyleGalleryItem.Next();

while (styleItem != null)
{
   ISymbol symbol = styleItem.Item as ISymbol;
   IUniqueValueRenderer uniqueValueRenderer = new UniqueValueRendererClass();
   uniqueValueRenderer.AddValue(name, null, symbol);

   ?????
   some code to add all these symbols to layer.
}

I have reference to IGeoFeatureLayer but that does not help in adding all these symbols to layer.

Any help?


texts: Ogr2ogr: how to add values to a database column

texts:
So I have my table named ppb_curp with the following columns
ogc_fid | name | description | wkb_geometry |curp | zip_code

Then I insert the KML file in my PostGis base with ogr2ogr
ogr2ogr  -f PostgreSQL PG:"host=127.0.0.1 dbname=postgis_24_sample port=5432 user=postgres password=123456"   C:\xampp\htdocs\siap-padron\public\uploads/2044492/polygon/1597861175.kml  -nln  ppb_curp  2>&1

but just insert data into column ogc_fid and wkb_geometry.
i am using php as language, the values of name, description, curp,zip_code I have them in a variable:
$name = "My kml file";
$description = "My kml file description";
$curp = "2JJIDEIEIEI";
$zip_code = "89790";

My question is how do I insert these fields with Ogr2ogr?
The command line with ogr2ogr is:
ogr2ogr  -f PostgreSQL PG:"host=127.0.0.1 dbname=postgis_24_sample port=5432 user=postgres password=123456"   C:\xampp\htdocs\siap-padron\public\uploads/2044492/kml/1597889056.kml  -nln  ppb_curp  -dialect sqlite  -sql "SELECT ogc_fid, 'My kml file' as name FROM 'ppb_curp'" 2>&1

but it gives me the following error:
ERROR 1: In ExecuteSQL(): sqlite3_prepare_v2(SELECT ogc_fid, 'Hello Ogr2ogr' as name FROM 'ppb_curp'): no such table: ppb_curp


texts:
I'm running ogr2ogr converting from Shape -> Shape to clean up Shapefiles before they are added to PostGIS via shp2pgsql.

The problem I'm encountering is when the Shapefile contains records that have no geometry which is causing problems with my system.

Does anyone know a way using ogr2ogr to exclude any records with no geometry?

Also is there anyway to remove invalid geometry. E.g. two vertices at the same location?


texts: Interpolating point to nearest polygons to compute street width in postgis

texts:
I am trying to calculate the width of streets (line.shp) in postgis using reference point (ref_point.shp) (yellow point features) and building polygons (building.shp). The red point features are the interpolated points within 30 meter buffer. My initial approach: To select all buildings (using reference point) in a buffer of 30 meter (let say) and then compute the width of the streets using interpolated points opposite to the reference points only.

I used ST_ClosestPoint() to interpolate the reference point to the nearest edge of building polygons. For every reference point, I wanted to the interpolate the reference point to opposite ends only (like the one shown in green rectangle) so that I could use ST_Distance() to compute the distance between the interpolated points along opposite building polygons.

The problem is: When I used ST_DWithin(), the building next to the green rectangle is also in the 30m buffer thereby generating unwanted interpolated points along this building polygon. The desired scenario is explained in this image below in the green rectangle.

What I have tried so far is shown in the following code:

Select ST_ClosestPoint(bu, pt)
From
    (Select
         ref_point.geom As pt,
         building.geom As bu,
         building.gid As id
     From ref_point, building
     Where ST_DWithin(ref_point.geom, building.geom, 30.0)
     Order By id
) As foo;

Is it appropriate to use ST_DWithin() here? Can someone please guide me to more better approach to do this?


texts: MapServer symbology: how to draw a line inside polygons following the outline?

texts:
Is it possible to create a symbology in MapServer/Mapfiles that would draw a line following the outline of the polygon, inside the polygon? Example with a simple rectangle:

I can't find any info in the doc for this kind of symbology...


texts: Why does a cache service need to load first when a dynamic service is involved?

texts:
I notice if you have 2 services 1 cached and 1 dynamic you have to load the cache first for it to display.

Does anyone know why?


texts: pyrcc4 command not recognized as internal or external command?

texts:
The question has already been asked as 'pyrcc4' is not recognized as an internal or external command? but the answers did not fit my own trouble.

I am trying to create a plug-in. I followed the Qgis Cookbook and when I start the OSGeoW4 shell I type the following code (xxx is the name of the Beta plugin) :

cd c:\Users\Guillaume\.qgis2\python\plugins\xxx

then
     make

which doesn't work nor

pyrcc4 -o resources_rc.py resources.qrc

They are not recognized as internal or external command.

So little research lead me to look after the /bin from qgis and I found pyrcc4.exe but no pyrcc4.bat

I have two python version (2.7) one from the ArcGIS package which is working nicely as a shell on pyzo python interpreter, and one downloaded from the python.org.

I'm working with QGIS 2.18.23


texts: Using (area) instead of ({{bbox}}) does not include 2nd REL command

texts:
The following code does not include the result of (LINE 5). Why?
area [name="Hawaii"][admin_level=4];
(
    rel[type=boundary][place~"locality|city|town|village|borough|municipality"](area);
    // WHY the following command is ignored?   when ({{bbox}}) INCLUDES this 2nd REL
    rel[boundary=administrative][admin_level~"7|8|9"](area);  // (LINE 5)
);
out body;
>;
out skel;

The following code behaves like I expect (Honolulu is included)
// >> Position your BBOX Around Hawaii <<
//area [name="Hawaii"][admin_level=4];
(
    rel[type=boundary][place~"locality|city|town|village|borough|municipality"]({{bbox}});
    rel[boundary=administrative][admin_level~"7|8|9"]({{bbox}});
);
out body;
>;
out skel;


texts: Geopandas buffer using geodataframe while maintaining the dataframe

texts:
The objective is to create a geoDataFrame with buffered geometries AND with all the "attributes" of the original geodataframe.

I am able to perform a buffer on my geoDataFrame using:

gdfHybasBuffer = gdfHybas['geometry'].buffer(-0.005,resolution=16)

but the result is a geoSeries and not a geoDataFrame, and therefore does not contain the data from the original geoDataFrame nor does it contain an index to join the data to the original data. Is there a better way to perform a buffer while maintaining the original attribute data?

github Code

It is pretty straight forward to create a buffer on a geopandas geoSeries.


texts:
Possible Duplicate:
  Shapefiles to Text

What is the process of converting geodata in ArcMap 10 to WKT format?
I am not a programmer so much, but will learn if needed. I have a set of shapefiles and need to convert them to WKT format. Please advise on the process required to do this.


texts:
I have an sqlite 3 database with 20K entries each of which has lat long data and I wanted to create a layer from that data.  From what I have read I need to import it into a postrgres DB but I'm not sure how to make sure that each item populates the database correctly (ie has all of the correct attributes completed).

my plan is to have a series of tiles created from the result of the query which would be a transparent background with the points overlayed and then allow clicking on them I still have a lot to learn to get this done but I want to ensure i put the data in the correct place to start with.

Further details.

I am planning to do several things. 1. To render some GEOtiffs into tiles to act as base layer along with using OSM as a layer. I then intend to take my SQLite data and create an overlay layer or points that should be clickable. I wanted everything in a SERVER DBMS for several reasons.

There could be up to 6,000 users accessing the data at any one time so I really wanted a robust DBMS UNDER THE HOOD.
Also if I end up having to do some real time rendering on other data I can still store it in the same repository.
I can exclude points based on certain criterion and create multiple layers from the same data.

My current understanding is that it would work as follows:

Create a DB of points by importing SQLite data into POSTGRES with postGIS extensions (ensuring the correct GIS fields get populated appropriately)
Use that DB and a query to access points and create a layer to render from within tilemill.
Export that layer back into Postgres so that it can act as the layer server for my open layers based client app.

I have tilemill, qGIS, OPENGEO, software.

Please let me know if I have misunderstood how to do this !!!


texts: When adding a new store in store page it is showing an error

texts: "Error creating data store with the provided parameters: Error persisting DataStoreInfoImpl[adm] to workspaces/demo/adm/datastore.xml"


texts:
I want to develop a PyQGIS standalone script only using Ubuntu terminal, so to start I use:

from qgis.core import *
QgsApplication.setPrefixPath("/path/to/qgis/installation", True)
qgs = QgsApplication([], False)
qgs.initQgis()
qgs.exitQgis()

But it gives me the next error:

qt.qpa.screen: QXcbConnection: Could not connect to display
Could not connect to any X display.

I understand that the error is due cause I'm not using a graphic device (I'm working through Ubuntu's terminal and I can't use a graphic device), but the second argument on QgsApplication() disables the GUI so I thought a graphic device wouldn't be necessary.

What does that error mean? Does it have any solution?


texts: Selecting first and last number of consecutive series, then when it finds skip, do same for next series?

texts:
I have a point shapefile which contains integers in a field of the attribute table. It has 1001 consecutive numbers until 1232, then 2001 until 2545, 3001-3240, etc.
I would like to select first and last of each series.
Any expression for that?


texts: Convert x,y coordinates into CRS:84 for GeoJSON

texts:
I have several .tif (GeoTIFF) images each with different CRS and spatial resolutions. For each image (.tif file), I have the CRS, 4 extents, data type and pixel size. I then use these images in an annotation tool to annotate them. The annotation tool doesn't understand the geo-information from the .tif and the output annotations (XML files) from the tool have x,y coordinates.
How do I convert these x,y coordinates into CRS:84 coordinates required for the GeoJSON format? I have multiple such output XML files and would like to do it programmatically.
For example image 1 has the following properties,
Extent  367943.0000000000000000,6148320.0000000000000000 : 371030.0000000000000000,6150549.0000000000000000
Width   3087
Height  2229
Data type   Byte - Eight bit unsigned integer
Dimensions  X: 3087 Y: 2229 Bands: 3
Origin  367943,6.15055e+06
Pixel Size  1,-1

The annotated output of one polygon from the image has the following data,
<polygon label="Label name" occluded="0" source="manual" points="528.36,947.58;627.34,1101.98;730.14,1035.14;626.50,879.89" z_order="0">
      <attribute name="attriute name">Attribute value</attribute>
</polygon>

Each XML file has thousands of such polygons and I have hundreds of such XML files. The points here are x,y coordinates and I want to convert them into CRS:84 format.
Edit: In the original question i asked for help to convert it into EPSG:4326 but as @nmtoken pointed out GeoJSON uses CRS:84 (LONG/LAT) instead of EPSG:4326(LAT/LONG). I've updated the question accordingly.


texts: Table Borders won't print when added to display

texts:
I've encountered this problem every so often over the last few years. When adding tables to the display in ArcMap, the following occurs when printing the map:

All table borders visible on the display but do not print
All Table borders visible on the display, but only top and left border prints
Only top and left table borders visible, yet all borders print
All table borders visible and all print (as it should be)

What frustrates me about this is that it is extremely inconsistent - I can have 4 tables on my display and 2 will print perfectly while the other 2 won't. I can move the tables slightly, then the original 2 won't print right while the other 2 will. Today I can print it perfectly, tomorrow I can open that same mxd and print without making any changes, and the tables will print wrong.

As a workaround I've always had to draw a rectangle around the table, align the borders and group each table with its border (and if its more than 3 tables, this quickly becomes annoying). This problem has "haunted" me since version 9.2.


texts: Update a round numeric scale with atlas page - PyQGIS3

texts:
I would like to add a rounded numeric scale to each map of my atlas, with a blank as thousands separator.
The code below allows to produce this kind of numeric scale but it's not changing with the atlas page, because it takes the scale of the map defined by default into the map item.
numScaleLabel = math.trunc(round(map.scale(), 0)) # get the scale without decimal numbers
numLab = QgsLayoutItemLabel(layout) #define the scale as a label instead of a scalebar item
numLab.setText('1 : ' + str(f'{numScaleLabel:,}'.replace(",", " "))) # set text with thousands separator
layout.addLayoutItem(numLab) # add the numeric scale to the layout

I think that I need to use @map_scale in the text expression to update the scale for each page, but what I tried didn't work. No error is returned, but the expression seems not valid because no text appears.
text = "[% '1 : ' + to_string(round(@map_scale,0))%]"
numLab.setText(text)
layout.addLayoutItem(numLab)

myAtlas.beginRender()
for numLab in range(myAtlas.count()):
    myAtlas.next()

myAtlas.endRender()

UPDATE
I first need to define an id for my map, then the following expression works great. Looks like the math.trunc() function is not required :
map.setId('map1') #id must have no space
text = "[%'1 : ' + to_string( round( map_get( item_variables('map1'), 'map_scale' ), 0 ) )%]"


texts: Integrate QGIS into Hadoop cloud is it possible?

texts:
It might be very basic question.

Can I integrate QGIS +Hadoop cloud?

Currently I am going through similar question and few research articles & researching on my side.

In upcoming ArcGIS 10.2 ESRI announced that there will be cloud extension in ArcGIS. So similarly can I integrate open source desktop gis (like QGIS) with hadoop cloud?

Purpose :  Analyze the social networking  trend.

Any help/suggestion will be great !!

thanks in advance : )


texts:
I'm new to using GIS software's, but does anyone know how to move a polygon in qgis 2.18.8? I use the move polygon feature with an old version, but with the recent updates that feature is not working.

Although the button is available, when I click "Toggle Editing" on a polygon layer, the "move polygon" feature is not available now. Any idea on how to move a polygon in a different method?


texts: Stopping the automatic snap to locator in Arcgis 10.0 reverse geocode

texts:
I built a network application using arcgis 10.0 sdk for wpf. The application uses a locator of highway milestones to reverse geocode (and identify) the "flag" the user clicked on the map.

My Problem is that the locator somehow has a snapping effect - the "flag" moves to the nearest place the locator recognizes (The correct behavior I'm aiming for is the flag staying in the place where it was clicked and its place returned/not returned as a string based on the nearest place the locator recognizes being in the tolerance zone.

How can I disable this snapping behavior ( the automatic moving of the flag)?

Thanks in Advance.


texts: How to join a File Geodatabase table with only one record of Feature Class

texts: I've a Geodatabase containing a Featureclass and some File Geodatabase Tables. Each File Geodatabase Table is actully about the only one record of a featurClass. Can We Join these File Geodatabase Tables with that of the records of FeatureClass respectively. In short, I want to join a complete table not with another table but with only one row of the other table. Is it possible? If yes, how?


texts:
I'm having trouble with two maps, both UTM33N/WGS84. They should be exactly on top of each other but there is a slight shift between them of probably a few hundred meters or so.

I Tried to adjust this with the Vector Affine Transformation Plugin but didn't succeed. I don't know how to use it.


texts:
Trying to run cost distance tool in ArcMap, but I keep getting the following results:

ERROR 999999: Error executing function.
("esriDataSourcesRaster.InMemoryRasterHelper") Failed because of out of memory
ERROR 010029: Unable to create the raster in_memory\CDrast. Cost Distance mapping Failed
ERROR 010067: Error in executing grid expression.
Failed to execute (Cost Distance).

Initial thoughts were memory constraints, but I've ran it on several computers with high ram (~ 16 to 40 GB) and still got the same error codes. The inputs are 4 bit Int TIFFs (~1.8 GiB), which were compressed to 2 bit TIFFs (~930 MiB) again still same error codes. I can successfully save it to a path, but when it comes to in_memory the tool does not work.


texts: ArcGIS Desktop 10 - MyBase.UpdateBitmap()

texts:
I am changing one icon on my extension toggle toolbar in runtime using:

MyBase.UpdateBitmap(New Bitmap(Me.GetType(), bitmapResourceName))

This works fine but I get a border/highlight around my image.
What can I do to prevent that?

I am using ArcGIS Desktop version 10.


texts: QGIS selecting features and using field calculator to update existing field using python

texts:
I am wondering how to select features based on conditions from multiple fields to update an existing field in QGIS.
This is the code I have so far. The expression I want to use to select features is SFHA_TF = T, and the field I want to update is the newly added one.

##layer=vector
##fld_zone=field layer
##zone_subty=field layer
##sfha=field layer

from qgis.core import *
import qgis.utils
from PyQt4.QtCore import *

layer=processing.getObject(layer)
zone_index=layer.fieldNameIndex(fld_zone)
subty_index=layer.fieldNameIndex(zone_subty)
sfha_index=layer.fieldNameIndex(sfha)

layer.startEditing()
provider= layer.dataProvider()

fields_to_delete = [fid for fid in range(len(provider.fields())) if fid !=      zone_index and fid !=subty_index and fid !=sfha_index]
provider.deleteAttributes(fields_to_delete)
layer.updateFields()

provider.addAttributes([QgsField('FLOOD_RISK', QVariant.String)])

layer.commitChanges()


texts: How to Data Defined Override rotation of symbol with autocad map 3D rotation attribute?

texts:
I am exporting a .shp from autocad to QGIS. The drawing in CAD looks like a line with symbols within the line. When exporting to QGIS the symbols turn to points and the line has breaks. Also, the points are no longer parallel to the line it is on and slightly offset.
My current work-around is to create a new field(ROTATION) and select the points that run N to S and assign them 90. I do this for E to W and the few symbols that are aligned diagonally. I then data used defined override to correlate the rotation field with the rotation of the symbols. I finish it off by selecting offset points (basically all of them) and move them.
I tried exporting the .shp with the rotation property but the field values that look like this: ROTATION (0.049377440710162) or (0.068036433659789). These numbers are obviously not going to rotate properly in QGIS.
Is there a workaround Im missing here? Making these edits is time consuming.
Is there a way to assign rotation easily? either within CAD before exporting or in QGIS.


texts: Using St_Intersects to find roads crossed on a journey

texts: Is it feasible to make a query on a spatial database to find out how many main roads need to be crossed on a journey between two point features? I understand there is a ST_Intersects function but can this be used where the intersection is between records on one of the tables and the result of say a distance query.


texts: Creating 30 areas with equal amount of road in irregular polygon using MapInfo?

texts:
The result should be something like this just more polygons.

Does anyone know about a tool, which given a table, can create a number of polygons which will divide the tables object into, for example, 30 amounts of equal length if the object are lines?

I am using MapInfo and can program in Python.


texts: How do I assign elevation labels to a custom set of points in QGIS?

texts: Im trying to create topographic surveys using georeferenced images from a drone and a DEM/orthomosaic which has been created using Photoscan. I've managed to create contours and label them with elevations but for the purposes of architectural design i need to show height levels at individual points which im hoping to chose myself. Below is a screenshot of my DEM, a screenshot of what i've managed to do so far and then an example of what im looking to achieve. Im fairly new to QGIS so my skills are limited (to say the least!) but can anyone tell me if this is possible using QGIS? I'd like to use open source or freeware software on Mac as i don't earn any money from the topos that i do. Finally i'd like to export the product as a .DXF for import into AutoCAD.


texts: How to display pictures / photos in Mapbox?

texts:
I have a website for better cycling in Berlin www.radfahren-berlin.de. there is imported official data and added custom data (how wide is the cycling lane,..). I want to diplay the actual photographs of the various cycling sections and I am neaer desperation: How to do this? What are possible ways (in the end clickable or showing up on hoover)
Section with properties are
{
  "type": "Feature",
  "properties": {
    "CC": "ja",
    "sorvt_typ": "Geh-/Radweg, baulich unterschieden",
    "Oberfläche": 2,
    "Schutz": "",
    "Breite": 130,
    "stor_name": "Pankow",
    "Planungsstand": "",
    "rva_typ": "Radwege",
    "sobj_kz": "03-001592",
    "segm_bez": "B96a",
    "stst_str": "Breite Straße",
    "Farbe": "",
    "ortstl": "Pankow",
    "laenge": 55,
    "fertig": "",
    "b_pflicht": "ja",
    "segm_segm": "46600011_46600027.01"
  },
  "geometry": {
    "coordinates": [
      [13.402111, 52.569315],
      [13.401811, 52.569304],
      [13.401674, 52.5693],
      [13.401555, 52.56931],
      [13.401405, 52.56934],
      [13.401339, 52.56938]
    ],
    "type": "LineString"
  }
}


texts: Using download JavaScript code option of ArcGIS Online without getting basemap too?

texts:
I am trying to create a Web App, using the ArcGIS Online feature of downloading the javascript code, with the map id being used for connecting to the ArcGIS Online. I was able to do that successfully but the only issue is that I do not want a basemap. I only want the overlaying shapefile to be visible. How can I do that? Or is it not possible?

ArcGIS Online does provides an option, where I can make my shapefile as the basemap and then the features of popups cannot be used on it. Any ideas how I can work it out?


texts: How to convert QGIS 2.x composer templates to QGIS 3.x layouts templates?

texts:
The title says it all. I have a bunch of QGIS 2.x composer templates (.qpt) which I would like to use in QGIS 3.x.
I tried to create a layout from template, to add items from template and to copy/paste from QGIS 2.x composer to QGIS 3.x layout, but none succeed.

I had a look inside .qpt files and indeed they dramatically changed, according to the new QGIS 3 layout engine.

Will there be some kind of converter plugin ?


texts: Python stops during band algebra in GDAL calculator within modeler in QGIS

texts:
I'm trying to calculate four greenness indices using the GDAL calculator  within the graphic modeler in QGIS 2.14.7 Essen.

The tool systematically crashes with a Windows message stating that Python has stopped for three of the indices. According to the result processing windows it is related to a division problem.

The indices are as follows:
GRVI=(green-red)/(green+red)
GCC=green/(red+green+blue)
VARI=(green-red)/(green+red-blue)
ExGC=2*Green-(red+blue)

The only index that doesn't make Python crash is the last one.

I have checked the raster and cannot find a single pixel with (red+green+blue)=0 or (red+green)=0, although there are a few with (green+red-blue)=0. Checking the results and comparing the values at single pixels, it seems that it is in fact a 0 in the numerator which is causing the problem, in the three indices. In fact, those pixels with (green+red-blue)=0 are set to inf., while those with a 0 in the numerator are set to nodata.

I don't understand why a 0 in the numerator should cause a nodata value, but I don't get either why this would be a problem for the calculation, as nodata values are common in many raster files.

I should also notice that my original raster is a 4-band (RGB+alpha) geotiff file (byte file with int8), which no data value defined. Before sending it to the calculator I clip it and get a smaller geotiff, which is Float32.

A final note: everything works smoothing when the raster calculator is accessed from the menu.

I provide below an image of the settings for calculating GCC

Edit: new findings! If I set all output as temporal layers after the crashes most of the indices have been correctly done, but with those pixels with the numerator=0 as nodata. The exception is VARI, which appears as all NaN in the legend...and when trying to open its properties I get an Exception error. However, when I set a file name for each of the indices, all of them appear as nodata rasters (although no problem opening the properties this time).

Can someone can give me a hint?


texts:
I am trying to figure out how to put in seismic shot points using ArcMap 9.3  I don't have 10.0 yet, but a project is coming up where I have to add shot points.  My PM is asking if I can add to the current shot points (or pre-plots).  The client has not yet supplied the preplots since the project is suspended til fall (she wants it done though).  I don't have any extensions such as Survey Editor, just the core ArcMap 9.3

Is there a way to do that with the current shp files of the current preplots and add to it?


texts: I have a single-band raster (a GeoTIFF) with hue values in the band. I'd like to render it, preferably in QGIS but another open-source GIS would be acceptable as well. The saturation and value should be held constant at 255.


texts: Is it possible to show Pie charts in QGIS Legends?

texts:
I would like to display some pie charts on my map. They show in the map frame perfectly but in legend on the print composer I am unable to show the legend for the pie charts. QGIS just shows the style of the point underneath the pie.

Is it possible to get these shown?

Using QGIS v1.8 from OSGEO4W on Windows XP


texts: How to calculate raster class metrics by polygon zone?

texts: I have a raster of morphology data where each bin has a code. I want to count the number of each code that fall under a polygon from another file. Zonal stats as table only gives me the min/max occuring codes and not count of each code. Can anyone suggest how to get count of each code for each polygon?


texts: How to calculate skewness, kurtosis and quartiles with zonal statistics?

texts: I would like to calculate the skewness, kurtosis and quartiles for the elevation of a raster and for a point feature class inside the area of some polygons. I used the zonal statistic tool in ArcGis but with this tool I can just calculate the mean, stddev, max, min. Hope someone can help me? I read that there is a tool in Grass Gis to calculate skewness etc. but I hope I can do it in ArcGIS so i don't have to switch between the programms all the time


texts: Turn Points with lat and long into polygon

texts:
I have a CSV file in which each row has a latitude and longitude. Each row is associated to a name of a polygon that the points form together.

How do I upload this file into QGIS?


texts: Generating C# classes for gml.xsd using MS Visual studio xsd tool

texts:
With Microsoft Visual Studio 2010 comes a tool called xsd which can automatically generate C# source code to easily deal with XML files corresponding to a given schema. I have a very complex XSD schema based on the GML schema. But after several days I had not even success to parse the GML schema standalone (without trying to parse my own 'custom schema').

Somehow the xsd tool seems to have problems following the included references for other referenced xsd schemas. Several forums advise to add these xsd files as command line parameter to the xsd call. But this doesn't work because suddenly some types are already defined. I suppose that the include happens in a circle. In the meantime I have already downloaded about 70 xsd schemas that are somehow used by GML schema (gco, gmd, gsr, gss, gts, ows, xlink). So I'm asking me if someone already successfully generated classes of the GML schema before?


texts:
I have a XML file which I created from the overpass API. I'd like to load this data from this file into a MySQL database. I've been using this code to test, but none of the data loads.

LOAD XML LOCAL INFILE '/home/jay/Downloads/interpreter1'
into table jayDB.xml1 (id);

I'm new to XML so not sure if this is possible.

Here is some sample data from the file. What I'd like populated is: id,lat,lon,addr:housenumber, etc

<osm version="0.6" generator="Overpass API">
<note>
The data included in this document is from www.openstreetmap.org. The data is made available under ODbL.
</note>
<meta osm_base="2013-03-07T14:54:02Z" areas="2013-03-07T10:37:02Z"/>
<node id="240486180" lat="50.9744274" lon="3.0152858">
<tag k="addr:housenumber" v="9"/>
<tag k="addr:street" v="Marktplaats"/>
<tag k="amenity" v="cafe"/>
<tag k="email" v="vandaelekoen67@skynet.be"/>
<tag k="name" v="Paviljoentje"/>
<tag k="opening_hours" v="Mo-Su 09:00+; Tu off; Th 09:00-14:00"/>
<tag k="phone" v="+3251636211"/>
<tag k="website" v="http://www.paviljoentjestaden.be"/>
</node>
<node id="244312208" lat="51.2461401" lon="5.4390455">
<tag k="amenity" v="cafe"/>
<tag k="created_by" v="JOSM"/>
<tag k="name" v="De Club"/>
</node>

However I think due to the format of the file it thinks K and V are the columns. Where as I wanted amenity to be column and cafe to be the value

I tried to look at the details https://dev.mysql.com/doc/refman/5.5/en/load-xml.html


texts: How to avoid cutting labels along the map border?

texts:
I am labeling areas on a map (for example, forest (coniferous, deciduous trees), swampland, and so on).  A cartographer has criticized it because labels which extend beyond the boundaries of the specific areas are cut off.  Therefore, I would like to show only those labels that are completely contained within the area.

(I tried to work around the problem by masking the area with an internal buffer of the area's border, but that only cuts the labels along the buffer boundary.)

I would appreciate any ideas about how this could be accomplished with QGIS 1.80.

Thank you, whuber,  for your assistance*


texts: What is causing this QGIS processing model to fail at r.mapcalculator

texts:
I can't figure this out. I can run a number of tools from the processing toolbox separately with success but when I string them together in a model it keeps failing (image of log below).

It looks like it is falling over at the r.mapcalculator algorithm and some Googling tells me that the error is likely a function or call somewhere that has either failed or returned an unexpected result.

However I am having trouble debugging this problem, this log doesn't tell me too much and the additional logs from the processing toolbox "History and Log" doesn't shed anymore light on the issue because I don't understand what it's saying.