texts: Export styled vector layers as TIFF raster?

texts:
I have contours that need to go on a TIFF file.  They are both georeferenced and in the correct location.  I am currently trying to use QGIS to bring them in and change the linetype/lineweight of the contours on the TIFF.  I have achieved how to bring them in through the Raster > Conversion > Rasterize tool and then changing the color to what is desired which can be found On My Other Post.

I was wondering if there was a way to bring styles that are on the vector layers onto the TIFF file through the rasterize tool but from looking at the code in the rasterize tool Here.

Also, on a previous post Here, Joseph pointed out that it is probably not possible to bring the style of a vector layer through using the Rasterize tool but only through its attributes.

Ultimately, I want the contours brought in to have a dashed linetype and/or be thicker than what it currently is.

EDIT: If I have polygons through the buffer tool am I able to rasterize the polygons onto a TIFF?  It seems only line vectors can.


texts: What free or open source cloud-based software is recommended by/for the GIS community?

texts:
Note: This question is intended to complement an earlier question on installed, desktop software.

What GIS-related, or even non-GIS-specific, web- or cloud-based software/tools/services -- that are free -- do you find useful, whether for GIS development or application?

For example, I'm finding that Google Docs (aka, Google Drive) increasingly useful for general productivity and Google Maps is always useful as an street atlas or as a globe.

A specialized example is Q-Cogo, useful for coordinate geometry.


texts: How do I remove only coastlines in marine shapefiles and be left with only polylines in the ocean?

texts:
I have numerous marine shapefiles that need to be simplified for display purposes.

I need to eliminate the coastlines of land entirely and be left with just polylines in the ocean, as the Large Marine Ecosystems dataset already does:

I'm using QGIS for this.


texts:
How can I dissolve a shapefile with polygons and keep the information of the polygons that have the bigger area in QGIS?
example:
two polygons with the same field values but one of them is bigger than the other --> dissolve into one polygon that contains the attribute values of the bigger polygon.


texts: Preventing new layers being added to groups automatically in QGIS?

texts:
In QGIS I can happily bring in layers and then group them together.

Problem:  Once a group has been created and I load a new layer into QGIS, that layer is then automatically placed in that group.  And if I have multiple groups, the new layer is added into the most recently created group or the last selected group. I've tried selecting the white space of the layers panel to deselect any layer but that hasn't any effect.

Is there a method to either freeze groups so that nothing happens to them so no new layer can be added, or is there a way to deselect everything in the layers panel so that new layers are just added to the top/bottom of the list?


texts: How to return only lines that intersect for a certain length instead of just

texts:
Basically I have 2 line layers that intersect.
If I run:
SELECT objectid, object_class FROM table1 d WHERE st_intersects(d.geom, (SELECT geometry FROM table2 WHERE id = 75259) )

I get at least 10 rows, but that isn't helpful because it includes many lines from table1 where they only cross the table2 line once, instead of sharing part of the same geometry.
So I thought about st intersection and used:
SELECT objectid, object_class FROM table1 d WHERE st_intersects(d.geom, (SELECT geometry FROM table2 WHERE id = 75259) )
AND st_length(st_intersection(d.geom, (SELECT geometry FROM table2 WHERE id = 75259))) > 0.1

Problem is that I get no results returned, despite having at least 3 lines that intersect more than 1 meter. How to fix my query ?


texts: Getting Default symbology in a feature class with subtypes

texts: I was wondering if there was a way to get default symbology in a GDB feature class with subtypes?  I don't want to create a layer file for each feature class.  Is there a way to have the symbology built in?


texts: HTML ArcGIS Online inserting image issue?

texts:
Within a story map application I am trying to add a picture to the title. I am adding the picture through HTML code and it works, but for some reason it adds a maximize button to the image.  This maximize button doesn't even work.

How do I remove the maximize button?

Here is the HTML code?  Here there any thing wrong with it?

<IMG src="http://www.healthynorthland.org/media/site_6/images/health_care_setting_80.png">Clinical Care

Thats what the image looks like.  I need to get rid of the maximize button.


texts: How can I download a layer from a website map based on the google mymaps?

texts: On this website https://www.magticom.ge/en/useful-info/offices you see a map with a layers (4.5G, 4G, 3G and 2G) that are uploaded in Google Mymaps, I asked the company if they can give these layers but operators have no idea about that. Now I have to find other ways to get the layers for my GIS. Is there any possibility?


texts: Site to download al USGS Topo Maps in bulk

texts:
I am trying to create seamless topomap WMS or TMS layer that covers the entire US (not interested in geo-pdfs). To do that, I need either the rasters (geo-tiffs, etc) or preferably vectors (whatever vector format readable by ArcGIS or GDAL/OGR) that are used to generate those maps - and I want to download it them in bulk (without having to click through one thousand interfaces to get each 1 degree quad).

Hard drive disk space is not an issue

Any link? :)

Update: this is what the terraserver images look like and hence my preference for the vector data.

The TopoOSM layer generation looks promising,

but it seems the data for the entire US is not available from one location.


texts: Converting bbox when importing GeoTIFF with Geotools?

texts:
Here is my code:

String EPSG4326 = "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994328,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]]";

File geoTiffFile = new File( "/home/user/files/1geotiff.tif" );

CoordinateReferenceSystem crs = CRS.parseWKT(EPSG4326);
GeoTiffFormat format = new GeoTiffFormat();
Hints hint = new Hints();
hint.put(Hints.DEFAULT_COORDINATE_REFERENCE_SYSTEM, crs );
hint.put(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER, Boolean.TRUE);

GeoTiffReader tiffReader = format.getReader( geoTiffFile, hint );
GridCoverage2D coverage = tiffReader.read(null);
Envelope env = coverage.getEnvelope();

double minX = env.getLowerCorner().getOrdinate(0);
double minY = env.getLowerCorner().getOrdinate(1);

double maxX = env.getUpperCorner().getOrdinate(0);
double maxY = env.getUpperCorner().getOrdinate(1);

System.out.println(coverage.getCoordinateReferenceSystem2D().getName().toString() + " " + coverage.getName() + ": " + minX + "," + minY + "  " + maxX + "," + maxY );

When I run this code, I get the following output:

EPSG:WGS 84 1geotiff: -6345422.834303701,-4399127.000735723  -2688622.8343037013,965672.9992642764

But when creating a Store in my GeoServer with this same GeoTIFF file, I can't preview the Layer until I do a "Compute from data" and "Compute from native bounds", when Geoserver changes the coordinates to:

-58.999479314465475,-38.00123605669721 || -24.998704016910057,9.001542880512202

How can I get the same values using Geotools in my code?

This is the WKT of the TIFF file ( I get this by using geotools toWKT() method):

GEOGCS["WGS 84",
  DATUM["WGS_1984",
    SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]],
    AUTHORITY["EPSG","6326"]],
  PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],
  UNIT["degree", 0.017453292519943295],
  AXIS["Longitude", EAST],
  AXIS["Latitude", NORTH],
  AUTHORITY["EPSG","4326"]]

Added GDALINFO output:

Driver: GTiff/GeoTIFF
Files: 1geotiff.tif
Size is 6530, 9580
Coordinate System is:
PROJCS["unnamed",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.257223563,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4326"]],
    PROJECTION["Mercator_1SP"],
    PARAMETER["latitude_of_origin",-15],
    PARAMETER["central_meridian",0],
    PARAMETER["scale_factor",1],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]]]
Origin = (-6345422.834303701296449,965672.999264276353642)
Pixel Size = (560.000000000000000,-560.000000000000000)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_DATETIME=2013:04:25 10:34:09
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
  TIFFTAG_SOFTWARE=Produced by CARIS++ 3.0
  TIFFTAG_XRESOLUTION=254
  TIFFTAG_YRESOLUTION=254
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (-6345422.834,  965672.999) ( 58d59'58.13"W,  9d 0' 5.55"N)
Lower Left  (-6345422.834,-4399127.001) ( 58d59'58.13"W, 38d 0' 4.45"S)
Upper Right (-2688622.834,  965672.999) ( 24d59'55.33"W,  9d 0' 5.55"N)
Lower Right (-2688622.834,-4399127.001) ( 24d59'55.33"W, 38d 0' 4.45"S)
Center      (-4517022.834,-1716727.001) ( 41d59'56.73"W, 15d51'37.35"S)


texts: How do I extract pixels of specific values from a raster in Google Earth Engine?

texts:
Say in this example, the classified results are: water (2), vegetation (1) and urban (0). I want to extract water only, i.e. pixels with the value 2. I couldn't find a function in GEE that would let me specifically extract out pixels of a certain value, so I tried to carry out the following:

utilised .lte() function to extract pixels of value 1 and 0 i.e. not water
mask out non-water pixels (i.e. 1 and 0) from the classified results such that only water pixels will show

However, it failed and I'm not sure where I went wrong. So my questions are as follows:

Where did I go wrong with the above workflow?
Is there a more straightforward way to directly extract pixels of a specific value, say in this case 2, without having to go through the hassle of masking etc? What if I wanted pixels within a certain range, say 1-2? Would it be the same function?

Many thanks.

// Make a cloud-free Landsat 8 TOA composite (from raw imagery).
var l8 = ee.ImageCollection('LANDSAT/LC08/C01/T1');

var image = ee.Algorithms.Landsat.simpleComposite({
  collection: l8.filterDate('2018-01-01', '2018-12-31'),
  asFloat: true
});

// Use these bands for prediction.
var bands = ['B2', 'B3', 'B4', 'B5', 'B6', 'B7', 'B10', 'B11'];

// Load training points. The numeric property 'class' stores known labels.
var points = ee.FeatureCollection('GOOGLE/EE/DEMOS/demo_landcover_labels');

// This property stores the land cover labels as consecutive
// integers starting from zero.
var label = 'landcover';

// Overlay the points on the imagery to get training.
var training = image.select(bands).sampleRegions({
  collection: points,
  properties: [label],
  scale: 30
});

// Train a CART classifier with default parameters.
var trained = ee.Classifier.smileCart().train(training, label, bands);

// Classify the image with the same bands used for training.
var classified = image.select(bands).classify(trained);

var random = classified.lte(1);
//extracting out pixels less than or equals to 1, i.e. not water
var notWater = classified.updateMask(random);

var onlyWater = classified.updateMask(notWater);

// Display the inputs and the results.
Map.centerObject(points, 11);
Map.addLayer(image, {bands: ['B4', 'B3', 'B2'], max: 0.4}, 'image');
Map.addLayer(notWater,
             {},
             'not water');
Map.addLayer(classified,
             {min: 0, max: 2, palette: ['red', 'green', 'blue']},
             'classification');
Map.addLayer(random,
             {},
             'random');
Map.addLayer(classified.updateMask(random),
             {},'classified masked with random');

// to display only water pixels
Map.addLayer(onlyWater,
             {},
             'only water');


texts: Problem in polygon division using the union tool from QGIS

texts: I am trying to overlay two polygon layers using the union tool from QGIS, to then compute the areas from the resulting polygons. However, in the resulting layer some polygons are not divided as expected. Attached you will find two figures showing the layers I want to overlay (orange and green) and the resulting one (pink). Has anyone had a similar problem? Do you know what is due to?


texts:
I am using QGIS 3.4.2 and trying to access this WMS from the USGS (orthoimagery):
https://raster.nationalmap.gov/arcgis/services/Orthoimagery/USGS_EROS_Ortho_1Foot/ImageServer/WMSServer

The connection times out and capabilities won't load. Any help? Think it's a proxy server issue? If so, what do I need to do?


texts:
How can I export multiple raster attribute tables at once, using the batch grid control tool mentioned here?
Batch Export feature attribute to ASCII in ArcGIS for Desktop?

I can't seem to find how to access the tool in ArcMap 10.0.


texts: How to install grass addons when offline?

texts:
Can anyone tell me how can I install GRASS (v.7) addons on a windows PC when offline?

I manually downloaded the files from http://svn.osgeo.org/grass/grass-addons/grass7/ and copied:
- the .py file to ...\GRASS GIS 7.0.svn\scripts
- the .html file to ...\GRASS GIS 7.0.svn\docs\html

But the GRASS GUI does not recognize them.


texts: lat, lon in Google (static) Maps vs Google map with globe view

texts:
I am trying to find latitude and longitude of some visual feature using Google map and I found that switching between globe view and flat (not globe) view (like in Google static maps) changes the position of the feature for the same latitude and longitude.
Can someone explain why is this happening?
And is there a way to convert latitude and longitude from globe view to flat view so that it corresponds to the same visual position.
Please see attached images.


texts: Splitting one line into two segments in QGIS using Split Features

texts:
I have a line. It is one feature. I want to cut it in two, so that it becomes two features.
When I use "Split Features", after enabling editing, by drawing a cutting line across the line with two right mouse clicks, I end up with 135 segments at once. What am I doing wrong?
I am using QGIS version 3.10.8-A Coruña.


texts: Creating a large amount of convex polygons using existing coordinates

texts:
I downloaded the georeferenced event dataset (top left) from this website: http://ucdp.uu.se/downloads/ It consists of coordinates of violent conflicts which differ in time and space. My aim is to connect the coordinates of one country during the same time (say a month) in a way that it forms a convex area. In other words, I want to create a polygon by connection only the outer coordinates with each other. I want to do this for every country for each time period; therefore, only an automatised process will do.

If you would like to see a picture, you can have a look at the code book of the top right(!) dataset. In case you wonder why I don't simply download the top right dataset: The data is only available until 2010, but I need it until 2014.

I work with the trial version of ArcGIS Pro 1.3

I have worked with ArcGIS before, but this is a few years ago and I used it for quite basic procedures.


texts: Anyone have a link for IN-DEPTH ArcGIS Toolbox documentation

texts: I am looking for in-depth links for documentation on parameter data types for adding custom scripts to a custom toolbox.  For example, a parameter data type "Extract Values".  What does this do?  What configuration options are, there and so on...


texts:
The below sld passing attribute5 having 3.09 or 5.56. But not 1690.98 or 10923.34 which is just opposite of what we need.
How to parse the string attribute5 data as number here..

      <ogc:Filter>
     <ogc:PropertyIsGreaterThan>
       <ogc:PropertyName>attribute5</ogc:PropertyName>
       <ogc:Literal>20</ogc:Literal>
     </ogc:PropertyIsGreaterThan>
      </ogc:Filter>


texts: ARCGIS Integration with Adobe flex Builder

texts:
we have values ZONE,STREET,PLOT,PIN and ARCGIS MAP Server on plot Layers 67 , 68 , 69.
our Business logic as below.

Get Electricity or Water No from customer
Query Electricity or Water No from METER_MASTER and ZONE,STREET,PLOT,PIN details

Apply Spatial query on Feature Class: Urban Physical Development Plot based on ZONE,STREET,PLOT Values
URL hqwgis04/ArcGIS/rest/services/WaterGIS/MapServer/68
Feature Class Field Names: ZONE_NO,STREET,PLOT
If this query return polygon, this is the customer location plot

If spatial query on Urban Physical Development Plot in step No: 3 did not return polygon feature, then
Apply Spatial query on Feature Class: Cadastre Plot based on PIN

URL hqwgis04/ArcGIS/rest/services/WaterGIS/MapServer/67
Feature Class Field Name: PIN
If this query return polygon, this is the customer location plot

5 If Spatial queries on Urban Physical Development Plot,Cadastre Plot in step No 3,4 did not return polygon feature,then
 Apply Spatial query on Feature Class: "History Plot" based on PIN

URL hqwgis04/ArcGIS/rest/services/WaterGIS/MapServer/69
Feature Class Field Name: PIN
If this query return polygon, this is the customer location plot

We can't locate customer location If no polygon feature return after applying spatial queries in step No: 3,4,5

The Issue:

right now er have 4 URLs(Layers 67 , 68 , 69) for each of the above field and there is no relation between each of those

The Question is how we can Run the Query to retreive from the 4 URLs or find a relationship between them while searching and show the location View in the MAP.

Otherwise How I can Generate this 4 values to Table Database or Excel from ARCGIS MAP Server.

Please advise .

Thanks


texts: Skipping empty tiles in Google Earth Engine

texts:
I have some randomly distributed, sporadic rectangles from which I want to extract images. Think of rectangular holes in a Swiss cheese. I'm not interested in any information between these rectangles, and when exporting would like to restrict exports as good as possible to only these areas. Since they are far apart at times, the last I want would be to also export a large number of fully empty tiles in between. But exactly this is happening, and generally many very small files are created carrying no information.

I have by now tested various combinations of clip/updatemask/region/cliptocollection etc; none of it was working. I append a quick example of the problem within the context of cloud masking via averaging (relevant part starts after the median function):

var geometry =
    ee.Geometry.MultiPolygon(
        [[[[6.73624171642598, 51.437187561586065],
           [6.73624171642598, 51.32404630910745],
           [6.938115495722855, 51.32404630910745],
           [6.938115495722855, 51.437187561586065]]],
         [[[8.234502214472855, 51.57395370805751],
           [8.234502214472855, 51.409785059265026],
           [8.591557878535355, 51.409785059265026],
           [8.591557878535355, 51.57395370805751]]]], null, false);

function maskS2clouds(image) {
  var qa = image.select('QA60');

  // Bits 10 and 11 are clouds and cirrus, respectively.
  var cloudBitMask = 1 << 10;
  var cirrusBitMask = 1 << 11;

  // Both flags should be set to zero, indicating clear conditions.
  var mask = qa.bitwiseAnd(cloudBitMask).eq(0)
      .and(qa.bitwiseAnd(cirrusBitMask).eq(0));

  return image.updateMask(mask).divide(10000);
}

var dataset = ee.ImageCollection('COPERNICUS/S2')
                  .filterDate('2018-01-01', '2018-12-31')
                  .filter(ee.Filter.lt('CLOUDY_PIXEL_PERCENTAGE', 20))
                  .map(maskS2clouds);

var img = dataset.median();
var slctd = img.select(['B2','B3','B4', 'B8']);

Export.image.toCloudStorage({
  image: slctd.clip(geometry),
  description: 'skipexample',
  bucket: 'XXXXXX',
  fileNamePrefix: 'skipexample/test',
  scale: 10,
  region: geometry,
  maxPixels: 1e13,
  fileDimensions: 1024,
  skipEmptyTiles: true
});

What am I getting wrong here? It feels to me like skipEmptyTiles is exactly what I need, but still many tiles are generated empty.


texts: ogr2ogr: convert osm.pbf to SpatiaLite - error messages

texts:
I have downloaded a .osm.pbf file from extract.bbbike.org and am interested in all highways/line features of my downloaded pbf-file.

I also changed the osmconf.ini to choose wich TAGs I would like to get (that they are not all put together in the "other_tags" field). This seems to work.

Therefore I would like to convert the .osm.pbf file to a spatialite db, to use the data in QGIS, convert them to a shapefile and so on.

I entered the following command:

 ogr2ogr -f "SQLite" -dsco SPATIALITE=YES targetsqlite.db bbbikefile.osm.pbf

This seems to work, I can use the output and it looks good, but I get some error messages which I am worried about:

Do you have an idea how I could remove these error messages (for example change my command), or aren't they problematic?

I am just interested in the highways/roads, so I don't care about polygons (or points), I guess the polygon errors are not important then? What about the requsted DLL errors 126?

Also, why do I receive some lines as "lines", and some as "multilinestrings", which are overlapping usually: the "multilinestrings" are also included in the "lines", so I guess I can ignore the "multilinestrings"?


texts: Relative path in layer styles in spatialite

texts:
is there way to store default style in relative path in spatialite??it has layer styles table,and a column  'f_table_catalog'.and in this column pathes are absolute,In Qgis project options i set relative path.
If i move .sqlite to another directory and load the data then qgis doesn't see default style. and this "hand-made" procedure to load styles for every layer is annoying.


texts: Calculating azimuth values relatively along line for its segments using PostGIS

texts:
I'm trying to make this calculation in SQL with PostGIS:

azimuth_1 + (Sum rel_azimuth_2 to rel_azimuth_7)

rel_azimuth_x is always the angle beetween the actual subsegment_x and one subsegment_x-1 before.


texts:
following  [this improvement][1],

[1]: http://oslandia.com/en/2017/10/07/refresh-your-maps-from-postgresql/ and the video inside the link,
I am trying to refresh automatically a layer.
I select the option in the render tab in the properties, but did not use any message for now.
I insert a new polygon in my postgres database.
Then I use the psql command NOTIFY qgis ;
Nothing happens in Qgis.
The question is why the canevas does not refresh despite the notify executed from the psql shell.
Postgres 9.3
Qgis 2.99 4a2da5006b


texts: How to identify understorey forest structure using airborne full waveform lidar data?

texts: I am learning how to use lidar to study forest structures, but I cannot find any methodology on how to map understory trees. It is for a school project where I am mapping forest developmental phases in a specific area of interest which is a beech forest.  The lidar data I have is airborne full waveform taken during leaf-off conditions.  I am working on QGIS 2.18.25 and LAStools. Does anyone have any suggestions on how understory trees could be identified?


texts: Fusion Tables API advanced visualizations

texts: From the google example; i want to  replace the column bar chart with a dynamic pie chart. How do i do that. What codes do I need to change?


texts:
I have a GIS layer that has thousands of Facility IDs. For each Facility ID there can be multiple Chemical ID's. For each chemical ID there is a maximum of 3 zone types. Zone A, B, C. But there is not always 3 Zone types, it varies. And the amount of chemical ID's for each Facility ID can vary from 1 to many.  What I am attempting to do, is Dissolve this layer down to display which Facility ID Zone has the largest Buffer Distance while including the ZoneType(important)

Here are the fields

                FacilityID, ChemicalID, ZoneType, ZoneDistance
ex rows:        1              2           A          1000
                1              2           B          900
                1              2           C          500
                1              5           A          1200
                1              5           B          900
                1              7           B          2000
                1              7           C          900
                2              13          A          200
                2              13          B          300
                2              13          C          600

What i have tried:

I tried using the Dissolve tool to dissolve based on the FacilityID, ZoneType and my statistic field was the Max for the ZoneDistance. So the output of this dissolve is the Facility ID with the Max ZoneDistance for each ZoneType. I just want the Max ZoneDistance for all the ZoneTypes at a FacilityID.

I also tried SQL statement which I got the same results.

SELECT max(ZoneDistance), ZoneType, FacilityID
FROM AllZones group by ZoneType, FacilityID;

I am semi new to SQL, and I cannot seem to figure out the logic to get my results.


texts: Inserting legends and co-ordinates in ndvi

texts:
I would like to know how to insert legends for the calculated ndvi in qgis.
Also how to mark the co-ordinates in the ndvi calculated in qgis.


texts: Alternative solution to ESRI's Geometric network for wet Infrastructure

texts:
I'll be glad for some help with "market research" on GIS for water pipes networks
what are the differences between these solutions in compere to ESRIs geometric network

GHydraulics

WaterCAD V8i

WaterGEMS V8i

are they based on graph and connectivity table ?, do they allows flow simulation and finding the nearest valve (isolation trace) ? is there any more solutions ?


texts: Letting user select multiple fields from input layer for field calculator using QGIS Python Script

texts:
I am trying to build a script (python 3) where a user can select a number of numeric fields, define a set of numbers, and the script will create a new field after multiplying the field with the numbers. For instance, a user can select 4 different fields A, B, C, D, then define 4 corresponding float numbers 0.2, 0.3, 0.1, 0.4. The script will then use field calculator to create 4 new fields of A x 0.2, B x 0.3, C x 0.1, D x 0.4.
So far I'm able to make it work if I specify how many fields at start of the script, but is there any way to build this script that can allow the user to pick however many fields they want?


texts: Checking if two layers of features exists on same location using QGIS Python?

texts:
I have two layers named Layer1 and Layer2 containing some features. Layer2 features are overlapped on Layer1 features.

Using python I want to check if a feature exists on layer2 when i select a feature in layer1. Is there any method to do that?


texts: Reclassify a raster to floating point values range

texts:
I have an interpolation map for my NDVI data values ranging from 0.16 to 0.83. Example 4 classes, (0.16-0.28,0.29-0.36,0.37-0.53,0.54-0.83). But when I do spline interpolation classification goes from -11 to 16. How can I have same classification class as given in example ?
I have tried reclassify but it takes only integer values.


texts: Leaflet geolocation alternative for if access is denied

texts:
I have the following that prompts the user to give location access. On granting permission the user's location is shown and the map loads. I'm trying to find a solution for if the user accidentally denies location access. Can anyone advise?
function onLocationFound(e) {
  var radius = e.accuracy / 4;

  L.circle(e.latlng, radius).addTo(map);
}

function onLocationError(e) {
  alert(e.message);
}

map.on("locationfound", onLocationFound);
map.on("locationerror", onLocationError);

map.locate({ setView: true, maxZoom: 16 });


texts: calculate the population inside a buffer with census data

texts:
I have population data matched with polygons and a set of points that I have drawn buffers around. Assuming that the population within each geographical area, i.e. the polygons, is evenly distributed, how do I calculate the population within each buffer in ArcGIS? Some of the buffers are overlapping.

If you need I could send you the data.


texts: Which georeferencing method for Himalayan Awifs-Awifs registration

texts:
I would like to know which georeferencing method would provide the best result for Himalayan region in-case of Awifs(Raw) to Awifs(master) georeferencing..

I have already tried polynomial transformation but it shows shift and doesn't match accurately..

I tried rubber sheeting though and it give me comparatively good results with good matching but I am not sure it may cause distortion too at places and also cut the image from the outer GCP points..

kindly guide me if there is any other method where image is not cut and still I get good matching with the master image..I use ERDAS imagine for above operation


texts: Return the intersection geometry from a GeoServer WFS service

texts:
The behavior I'm looking for

Suppose I have a layer called 'states' in GeoServer exposed as a WFS. With the attributes 'name' and 'geometry'. Ex: Name: 'Texas', Geometry: 'a polygon representing Texas'
I send a WFS request sending a polygon
GeoServer returns the states that intersects the polygon and the intersection geometry (operation similar to ST_Intersection in PostGIS).

Is this possible?


texts: Create network from shapefile without ArcGIS?

texts:
I want to perform shortest-path analysis on a network whose edges represent real-world roads and whose nodes are buildings or other locations.

I have the shapefile for the area I'm interested in.

How can I represent the shapefile data as a network? I have the NetworkX package for performing analysis in Python, but I don't actually know how to create the network in the first place.

I'm using Grass GIS and don't have access to ArcGIS.

Thanks.

EDIT: I should add that this is my first experience with anything GIS-related whatsoever.


texts: How do I translate gps sports data into a representative plane

texts:
I'm hoping to use qgis and postgis for a project but I'm unsure of, how to not only frame the question but accomplish the task.

If I have gps data from 1 runner on an oval track but who has run on ovals at multiple locations how do I transform/translate/format the gps data so that I can represent the traces accurately on a "representative" oval using qgis and storing the data in postgis ?

The representative oval doesn't necessarily have to exist in the real world (or should I pick an oval track and translate or map the other locations to it) so for example I could see the traces from a run in New York and LA on the same generic oval be that a real location or not


texts: Create a attribute based on what polygon point features are located inside of

texts: I have two polygons that delineate two site boundaries. I have a bunch of point features inside the polygons. Is there a way to create a attribute that indicates what polygon boundary the point feature is located in?


texts: Extracting pixel values for specific point locations in WGS 1984 / EPSG: 4326 image

texts:
I have a remote sensing image with GCS WGS 1984 / EPSG: 4326.

I need to extract pixel values from this image which corresponds to specific point locations. For that purpose, I defined these locations by entering their latitude and longitude in degrees. (I am using QGIS, I added the remote sensing image by using "add raster layer" and I defined the point locations by uploading a .csv file through "add delimited text layer"). Afterwards by using "identify features" tool in QGIS, I could access the pixel values of these locations.

My first question is, is the workflow I did follow correct? I am new in the field, and I am not sure if I missed some steps.

My second question is, (I am a bit confused how I can ask this, so please let me know if I need to clarify more) since the image I use is not projected to 2D, will this workflow give accurate results for the pixel values of these point locations? Or I need to project it first before extracting the pixel values?


texts: Getting area of shapefile polygons in square kilometers using R?

texts:
Firstly, my shapefile has an undefined projection:

library(raster)
x <- shapefile('file.shp')

Warning message:
In .local(x, ...) : .prj file is missing

crs(x)
CRS arguments: NA

I know that my coordinates needed to be in latitude/longitude or have a distance unit in meters. For now, I still went ahead and applied my area calculation:

x$area <- area(x)/1000000

But when I calculated the total area, I got a concerning result:

sum(x$area)
[1] 3236.118

The reason for my concern is that I know for a fact that my shapefile has a total area of approximately 300 km^2

I therefore decided to define a projection using a recommended espg for where my shapefile is located (espg = 2314).

crs(x) <- CRS("+init=epsg:2314")

crs(x)
CRS arguments:
 +init=epsg:2314 +proj=cass +lat_0=10.44166666666667
+lon_0=-61.33333333333334 +x_0=86501.46392052001
+y_0=65379.0134283 +a=6378293.645208759 +b=6356617.987679838
+towgs84=-61.702,284.488,472.052,0,0,0,0 +to_meter=0.3047972654
+no_defs

However, when I reapplied my area calculation I am getting the same result as before. What am I missing?

Edit:
I'm sorry for the lack of details in the question. When I run the function print(x) I get the following properties for the shapefile (note I removed the min values and max values):

print(x)
class       : SpatialPolygonsDataFrame
features    : 67
extent      : 66065.81, 183871.1, 74657.79, 151865.5  (xmin, xmax, ymin,
ymax)
crs         : NA
variables   : 16
names       : ORDER, AREA, PERIMETER, TGOLOC_, TGOLOC_ID, NAME,
COMM_NAME, NO_HH, MALES, FEMALES, TOTPOP, NO_BLG, NO_DWELL, NO_BUS,
NO_INSTIT, ...

One of the attributes was indeed labelled AREA, as shown, but all values for this attribute was NA, hence the reason why I decided to try to calculate the areas myself.


texts: Converting ModelBuilder to Python Script?

texts:
I have exported a ModelBuilder into a Python script. I am not able to figure it out at which point of the python script I need to make changes so that I can completely run the python script in Python IDE

Here is the ModelBuilder screen shot

Here is the ModelBuilder script exported to Python Script.

 # Import arcpy module

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

# Load required toolboxes
arcpy.ImportToolbox("Model Functions")

# Local variables:
ElevationContourRingSimply = "W:\\Projects\\FacilityProcessingtest\\ShpPython\\HobokenFlood.gdb\\ElevationContourRingSimply"
Value = "20"
fdcb_Value_ = "W:\\Projects\\FacilityProcessingtest\\ShpPython\\HobokenFlood.gdb\\fdcb%Value%"
fdcb_Value___2_ = fdcb_Value_
fdcb_Value___3_ = fdcb_Value___2_
fdcb_Value___4_ = fdcb_Value___3_
fdcb_Value___5_ = fdcb_Value___4_
fdcb_Value___6_ = fdcb_Value___5_

# Process: For
arcpy.IterateCount_mb("1", "20", "1")

# Process: Select
arcpy.Select_analysis(ElevationContourRingSimply, fdcb_Value_, "GRIDCODE <= %Value%")

# Process: Add Field
arcpy.AddField_management(fdcb_Value_, "WaterLevel", "LONG", "", "", "", "", "NULLABLE", "NON_REQUIRED", "")

# Process: Calculate Field
arcpy.CalculateField_management(fdcb_Value___2_, "WaterLevel", "%Value%", "VB", "")

# Process: Calculate Field (2)
arcpy.CalculateField_management(fdcb_Value___3_, "GRIDCODE", "%Value% - [GRIDCODE] + 1", "VB", "")

# Process: Alter Field
arcpy.AlterField_management(fdcb_Value___4_, "GRIDCODE", "FloodDepth", "FloodDepth", "", "4", "NON_NULLABLE", "false")

# Process: Delete Field
arcpy.DeleteField_management(fdcb_Value___5_, "FID_FloodAllW")


texts: How can I flip over the values in my raster legend

texts: I want to flip over the values in my legend so that I have Low : 0 at the top, and High : 199998 at the bottom. I have manually edited the text in the table of contents, however this doesn't change the data values, they remain the same. I have gone to the symbology properties to try and edit the labels, but when I try to edit the  in  'labelling' it reverts back to the original value when I go to change the next value.


texts: Add Attachments tool failing for some features

texts:
In ArcMap 10.5, I have a feature class in a personal geodatabase, with Attachments Enabled. I have made a match table linking the feature class to the folder where are the photos are stored that I want to attach. This step works well.

When I run the Add Attachments tool, it runs until completed, and some attachments work like expected, but many of the attachments fail with the message:
"Cannot add file 'C:\Users\SJC GIS\Desktop\Photos\482917100019_2016_7.jpg' to feature with OID = 28"

I am unable to notice a difference in photos that do and do not attach. Perhaps file size? The photos range is size from 1 to 6 MB. I don't know the maximum attachment file size ArcMap supports.

Some of the features have multiple photos each, some only have one. There does not appear to be a pattern to when they attach and when they fail. For example, a feature might correctly get 3 of 4 photos attached to it, while another feature gets 0 of 4 attached to it, while another gets 4 of 4 attached to it. They all follow a similar naming convention.

The feature class I want to add attachments to and the match table are in the same geodatabase, the photos are on my desktop. I don't think this is an issue since many of the photos do attach correctly.

This question is similar to https://gis.stackexchange.com/questions/164948/cannot-load-attachments-with-add-attachment-tool-using-generate-attachment-match?rq=1

Any suggestions why some photos won't attach and some will?


texts:
Does anyone know a workable and stable program which converts csv extension files to kml?

There are many tools available online but none of them worked for me.
I tried many including

kmlcsv
Choon-Chern Lim

I will be grateful if someone can direct me to something working.


texts: Sed or Awk like took in the iterative %Name% output

texts:
I have a large number of raster images that need processing and eventually summing of layers. But first I need to convert "no data" values then reduce the number of decimal places in said raster. I have a simple model of the process and am using the iterative module for file input. The input filenames are some 28 characters long. The raster map calculator does not allow over 13 characters on the output. Obviously the model returns a file naming error in this situation.

I need to be able to pass the right 13 characters of the left twenty from the %Name% variable of iterative module, i.e. using field calculator language,

right(left(name, 20), 13)

Is it possible to use some of the UNIX line commands like sed or awk, or some python code of which I have no clue how to write or apply?


texts: gdal_polygonize creating empty line file instead of polygon

texts:
I'm not sure what I'm doing wrong here. I suspect it is something simple and a duh moment. I'm just trying to get gdal_polygonize.py to make a polygon shapefile of a raster with a single value. It creates a SHP, but it is an empty line file.

Thoughts?

from osgeo import gdal, ogr
import os
import subprocess
"""
# Utility function to polygonize a raster with only 1 value
# @param
#     [in_raster] - full path to a GeoTIFF
#     Example: rast = r'C:\Temp\MyRast.tif'
#     [shp] - full path to a shapefile to be created
#     Example: shp = r'C:\Temp\MyShape.shp'
#     [region] - integer indicating which connectedness setting to use
# Example call: polygonize(r'C:\Temp\MyRast.tif', r'C:\Temp\MyShape.shp', 4)
"""
def polygonize (in_raster, shp, region):
    ## Open the raster as a GDAL object
    raster = gdal.Open(in_raster)
    ## Get the projection of the raster
    prj = raster.GetProjection()
    ## Create a spatial reference system object from the projection
    shp_srs = osr.SpatialReference(wkt=prj)
    ## Set the driver for writing the SHP
    driver = ogr.GetDriverByName('ESRI Shapefile')
    ## Specify the output SHP dataset
    out_dataset = driver.CreateDataSource(shp)
    ## Create a layer object for GDAL to write to with the PRJ set the same as input raster
    out_layer = out_dataset.CreateLayer(os.path.basename(shp)[:-4], srs=shp_srs)

    if region == 4:
        ## Create a variable to hold the command syntax for 'gdal_polygonize' operation
        cmd = ['python', r'c:\Program Files\QGIS 2.18\bin\gdal_polygonize.py', in_raster, '-f', 'ESRI Shapefile', shp, out_layer, 'DN']
        ## Execute the command using subprocess
        process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
        ## Wait for the process to finish
        out, err = process.communicate()
        ## Let user know what is happening
        print ("Finished polygonizing: {0}".format(os.path.basename(shp)))
        ## Get error code
        errcode = process.returncode
        ## Print error information if wanted
        #print (out, err)
        ## Return the error code if needed - non-zero is error
        #return errcode

Here is an example input raster.


texts: Migrating from 2.8 to 3.4 i stumble on what seems a simple task: closing programmaticaly an opened composer. To open it is no trouble with the layout manager but to close it is another story. the composeurWindow() method is nowhere to be found (or the equivalent).


texts: Can I create an XYZ Tiles connection to terracolor imagery product in QGIS 3?

texts:
I would like to add a Terracolor basemap to my QGIS 3 project (http://www.terracolor.net) as an XYZ Tiles connection.

Is there URL service for this?


texts:
I have the following problem: I have a script * .py and I added it to a toolset. When using another computer and add my toolbox, it appears as an "invalid tool"

and when I enter it to "edit" it, the script appears with the X.

The idea is that this does not happen since the tool will be used by people without experience in GIS (the user of the toolbox should not enter to "edit" the toolbox). The script is inside another toolset in the same toolbox.

How should the toolbox be "packed" so that this does not happen when sharing it?


texts: Get index of QgsAttributeEditorField from QgsVectorLayer

texts:
I have a QgsVectorLayer and right now I'm retrieving it's fields like that:

for index in layer.attributeList():
        print(layer.fields()[index].name(), layer.attributeDisplayName(index))

Now I changed the Attributes Form to "Drag and Drop Designer" defining my own Form Layout.

I need to retrieve the same fields but maintaining the order, which is represented in the QGS project file as <attributeEditorForm> element. So I'm looking for the index of these <attributeEditorField> elements, or directly use this list (instead of attributeList) to get the fields in the order defined in the "Drag and Drop Designer".


texts: How to store Python Add-In menu customization/configuration in *.esriaddin file?

texts:
There is a gap in my understanding of Python Add-Ins.

When I create a Python Add-In it is easy to see where buttons, tools and extensions are implemented as Classes in the *_addin.py script of the Install folder, and how these get written into the shareable *.esriaddin file.

However, I find the ArcGIS 10.2 Online Help for Creating an add-in menu to be more than minimalist.  By some trial and error I have figured out, within ArcMap, how to drag add-in menus, buttons and tools from the Customize dialog onto an add-in toolbar to achieve a menu like below.

What I am unable to figure out is how this "layout" of the add-in toolbar, with its add-in menu and add-in button and add-in tool gets written into the *.esriaddin file.

Is the way to get add-in menu customization/configuration written into the *.esriaddin file by editing the config.xml, and if so, is the syntax used to do that documented anywhere?


texts:
I have tried to pipe several osmiums processes like this:
osmium tags-filter central-america-latest.osm.pbf r/admin_level=2 -f pbf | osmium tags-filter /dev/stdin -F pbf r/type=boundary -f pbf

But i get error:

PBF error: blob does not have expected type (OSMHeader in first blob,
OSMData in following blobs)

If i save output of first process in .pbf file, and read that file in second process there is no error and I get valid output result. Working on WSL2, Debian 9.
What did I do wrong with redirecting?


texts: Displaying GeoJSON using Ajax and Leaflet?

texts:
I have been trying for days to load a GeoJSON file using Ajax and Leaflet. I can get the map & index.html to load using an Apache server and such but the GeoJSON itself does not show up.

Here is my Head:

<link rel="stylesheet" href="https://unpkg.com/leaflet@1.4.0/dist/leaflet.css"
  integrity="sha512-puBpdR0798OZvTTbP4A8Ix/l+A4dHDD0DGqYW6RQ+9jxkRFclaxxQb/SJAWZfWAkuyeQUytO7+7N4QKrDh+drA=="
  crossorigin=""/>

Heres is my Script:

var mymap = L.map('mapdiv')
            mymap.setView([19.4,-99.1],11);

          var bl =  L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png');
          mymap.addLayer(bl);

        var geojsonLayer = new L.GeoJSON.AJAX('attractions.geojson', {pointToLayer:
              function(feature, latlng) {
              var str = "
"+feature.properties.name+"

";
              str += "<a href=' " + feature.properties.web+ " ' target = 'blank'";
              str += "<img src='img/"+feature.properties.image+" ' width='200px'";
              str += "";
              return L.marker(latlng).bindPopup(str);
            }});
            geojsonLayer.addTo(mymap);

Chrome developer tools gives me this error:

  GET http://localhost/webmap101/htdocs/webmap101/leaflet.ajax.min.js 404 (Not Found)

  index.html:95 Uncaught TypeError: L.GeoJSON.AJAX is not a constructor
      at index.html:95


texts: How to triger a function after draw delete?

texts:
I'm using Leaflet draw and I want that after the user remove the path he created it will trigger a function.
After the user finished drawing a path I also do something:

map.on('draw:created', function (event) {});

Any idea?

Also, I want to let the user upload a gpx file, how can I convert it to GeoJSON in order to display and store it in my db?


texts: Actions undertaken in QGIS somewhere stored as Python code in a history file?

texts: For practioners that are not willing to study all the methods for each class, it would be helpful if every action that was made within the QGIS interface can be looked up afterwards in a history file with the according python code. In ArcGIS something like that exists. Is it available in QGIS as well?


texts:
Please Note I am using viewer.scene.pickPosition as I need to draw on the terrain and I am NOT using viewer.camera.pickEllipsoid

I am using the following code

 var earthPosition = viewer.scene.pickPosition(event.position);

the earthPosition object is as follows

Cartesian3 :{
x: -2356447.208926279
y: -3743919.310632037
z: 4582152.746595793
__proto__:
clone: ƒ (result)

After converting the above using below

var cartographic = Cesium.Cartographic.fromCartesian(cartesian3);

the output lat long are not correct.

I want to know is this "Cartesian3"  a standard GIS EPSG co-ordinate system or its cesium projection system ?


texts:
I load a delimited text layer and it get's visuialized. Unfortunatly I don't know why I can't switch to edit mode. I already worked with similar .CSV files in edit mode before, under the same setup :(

I already checked that files aren't write protected.
A workaround is to copy to a shapefile, but I like to work native with CSV.


texts:
var vectormap = new OpenLayers.Layer.Vector('Overlay',
    {
        styleMap: new OpenLayers.StyleMap(
        {
            "default": new OpenLayers.Style({
                           externalGraphic: 'girl.png',
                           graphicWidth: 50,
                           graphicHeight: 50,
                           graphicYOffset: -24,
                           title: 'marker'}),
            "select": new OpenLayers.Style({
                           externalGraphic: 'boy.png',
                           graphicWidth: 16,
                           graphicHeight: 26,
                           graphicYOffset: -24,
                           title: 'marker_select'})
        })
    });
featurearray = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(113.950,33.019));
vectormap.addFeatures([ featurearray ]);

This is my vector layer, but a bit wrong, my png image title attribute can not be displayed when the mouse to move up, I checked the official website the "OSM with Marker and Popup.html" code, exactly the same, you know why.


texts: ArcGIS for Javascript API - How to add WMS layer from geoserver

texts:
I'm trying to add a WMS layer from a geoserver using the ArcGIS for Javascript API. I've gotten there example working from there sample codes but I'm unable to load my layer from the geoserver succesfully. When I load the web application I receive no errors so I don't even know what I might be doing wrong I just get the basemap and my search when the application is loaded the WMS layer just doesn't appear.

var map;
require([
  'esri/map', 'esri/dijit/Search', 'esri/layers/WMSLayer', 'esri/layers/WMSLayerInfo', 'esri/geometry/Extent',
  'dojo/_base/array', 'dojo/dom', 'dojo/dom-construct', 'dojo/parser',
  'dijit/layout/BorderContainer', 'dijit/layout/ContentPane', 'dojo/domReady!'
], function(Map, Search, WMSLayer, WMSLayerInfo, Extent, array, dom, domConst, parser) {
  parser.parse();

  map = new Map('map', {
    basemap: 'streets',
    center: [-96, 37],
    zoom: 4
  });

    var jira_issues = new WMSLayerInfo({
    name: 'postgis:jiraissues_reports',
    title: 'jiraissues_reports'
  });

  var resourceInfo = {
    extent: new Extent(-126.40869140625, 31.025390625, -109.66552734375, 41.5283203125, {
      wkid: 4326
    }),
    layerInfos: [jira_issues]
  };
  var wmsLayer = new WMSLayer('http://opsengapp03.core.in.here.com:9999/geoserver/postgis/wms', {
    resourceInfo: resourceInfo,
    visibleLayers: ['jira_issues']
  });

    wmsLayer.spatialReferences[0] = 4326;
  map.addLayers([wmsLayer]);

    var s = new Search({
        map: map
     }, "search");
     s.startup();

});


texts:
Is it possible to get ArcGIS to show the EPSG code for a coordinate system as dynamic text?

The default text is quite verbose (see below), and I think just showing the "Coordinate System" is probably enough. However, it would be quite useful if I could also show "EPSG:32632" in addition to this.

Coordinate System: WGS 1984 UTM Zone 32N
Projection: Transverse Mercator
Datum: WGS 1984
False Easting: 500,000.0000
False Northing: 0.0000
Central Meridian: 9.0000
Scale Factor: 0.9996
Latitude Of Origin: 0.0000
Units: Meter

The documentation for ArcGIS 10.1 doesn't mention it, but I'm hoping it's just been missed out, or there is a work-around.


texts:
Using OpenLayers with Bing maps, I'm trying to load JSON data from a service URL and assign  an array of clustering strategies to the resulting layer. There are plenty of examples of using cluster strategies with OpenLayers.Format.GeoJSON loaded via OpenLayers.Protocol.HTTP, but my data is Plain Ol' JSON, not GeoJSON (and I have no control over the format of it).

So using this code, the points load on the map correctly. But I get an error:
"Uncaught TypeError: Cannot call method 'read' of null". When I open up the OpenLayers source code to the error-causing line, it's this:

 layer.protocol.read(OpenLayers.Util.applyDefaults({

and indeed, protocol is null.

So my question is: How to use OpenLayers cluster strategies without using a Protocol?

Here's the code I'm using:

map = new OpenLayers.Map("project-map");
osm = new OpenLayers.Layer.Bing({ name: 'street', type: 'Road', key : bingApiKey});
map.addLayer(osm);
var cp = new OpenLayers.LonLat(0,20).transform(fromProj, toProj);

var pointLayer = new OpenLayers.Layer.Vector("Markers",{
            strategies: [new OpenLayers.Strategy.Fixed(),
            new OpenLayers.Strategy.Cluster({distance: 25})]
});

OpenLayers.Request.GET({
    url: "ServiceHandler.json",
    success: function(response) {
      var jsonReader = new OpenLayers.Format.JSON();
      var sparkle = jsonReader.read(response.responseText);
        $.each(sparkle, function(i,f){
          var point =
             new OpenLayers.Geometry.Point(f.Long, f.Lat).transform(fromProj, toProj);
          var pointFeature = new OpenLayers.Feature.Vector(point, null,
        {
          externalGraphic: "http://localhost:8081/Icons/175.png",
          pointRadius: 8
        });
            pointFeature.attributes = f;
            pointLayer.addFeatures(pointFeature);
        });
        }
    });

    map.addLayer(pointLayer);


texts: Launching processing when opening / closing QGIS project

texts:
Is there a way to automatically run any processing models when you open or close a QGIS project? (or maybe a layer?)

I have a model that I run to update multiple fields in multiple shapefile layers, and I would like it to run each time the project is opened and/or closed so that it's not forgotten.


texts: Which Geographic Transformation to use for WGS_84 to D_Sphere?

texts:
I have a shapefile for world countries and I want to reproject it from GCS_WGS_1984 to Sphere_Eckert IV. However, it asks for Geographic Transformation; it says this is optional but it is required in order to proceed. I saw that the datum is D_Sphere but I cannot find a combination between this and WGS in the provided list.

Can please someone tell me what the right choice is? I use ArcGIS 10.1.


texts: How do I view ovl files on Geogrid or Top50 then convert the data to shapefiles?

texts:
I have some .ovl files which can only opened on Geogrid or Top50 viewer which shows me where everything is. How do I take these ovl files and convert the properties to Shapefiles to be used on ArcMap 10.1?

I also have access to FME but that does not seem like it can straight up open ovl files.


texts:
I have a .adf file which contains altitude data.

Is it possible to read and convert this file in JSON format for a next loading on mongoDB?

My directory structure is:

SRTM_1km_GRD

| --- info

      | --- arc.dir

      | --- arc0273.dat

      | --- arc0273.nit

      | --- arc0274.dat

      | --- arc0274.nit

      | --- arc0275.dat

      | --- arc0275.nit

      | --- arc0275r.001

      | --- arc0273.dat

| --- srtmv4_30s

      | --- dblbnd.adf

      | --- hdr.adf

      | --- log

      | --- metadata.xml

      | --- prj.adf

      | --- sta.adf

      | --- vat.adf

      | --- w001001.adf

      | --- w001001x.adf

Can I read this data with ArcGis ?


texts: Improving performance of Update Column in MapInfo?

texts:
I have two files in MapInfo Professional:

A mapped 'Network' file
A non-mapped 'data' file.

They have similar data in terms of their 'link ID'

I have created a number of columns in the 'network' file which are blank. These mirror exactly the type and name of the columns in the 'data' file. I'm updating the columns of the network file e.g. 'SumObs' from the 'SumObs' in the 'data' file.

This works with the 'Update Column' tool.

However, it is painfully slow, even with FASTEDIT ON. It took overnight to complete one column, and considering I have 8 columns for 4 similar files this will take all month!

Is there a quicker way?


texts: How to Add FileGDB driver to PyGDAL installation

texts: I installed ArcGIS 10.0 and it installed Python 2.6.5 with it.  Later, I installed pyGDAL using the windows installer within that Python installation.  I cannot find a specific place where GDAL is installed.  Is there a way to add FileGDB support to the GDAL libraries that are being referenced by my PyGDAL installation?


texts:
WHat is the workflow to downsample a GeoTIFF.  These instructions, the Warp dialog displayed is not the same as shown in my current QGIS as there's no resolution settings?

https://dominoc925.blogspot.com/2015/04/resampling-single-geotiff-image-in-qgis.html


texts: How can we save vector layer as a file in OpenLayers

texts:
I'm using MapServer + OpenLayers for GIS API and I'm new to GIS. I'm done with drawing line, point and polygon features in OpenLayers, but not being able to save it in some shapefile afterwards. I got to display the particular shapefile in map on click event. I have got no idea about how to do it.

Click here to see my code


texts: Creating line from existing point in specific compass bearings using QGIS?

texts:
I am trying to measure the distances from points in the ocean to land and these distances need to be measure from the point at different compass bearings (i.e. every 5 degrees).

I am using QGIS V2.18.21

I am working from an estimated central location of London array, Longitude 1.4950, Latitude 51.6270. I would like to understand how to measure the distances from this point to the coastline, which I have as a vector polygon layer, at a every 5 degrees on a compass.


texts: Getting "isWebMercator" Error When Trying To Draw a Circle On Graphics Layer

texts:
can you please take a look at this snippet and let me know why I am getting this Error message

  Uncaught TypeError: Cannot read property 'isWebMercator' of undefined

from the Circle.js module?

var graphicsLayerPoint = new esri.layers.GraphicsLayer();
map.addLayer(graphicsLayerPoint);

var graphicsLayerCircle = new esri.layers.GraphicsLayer();
map.addLayer(graphicsLayerCircle);

$("#btnAddJunctionFlag").on("click", function () {
        toolbar = new Draw(map);
        toolbar.activate(Draw.POINT);
        map.hideZoomSlider();
        toolbar.on("draw-end", addToMap);

        function addToMap(evt) {
        circle = new Circle({
            center: evt.mapPoint,
            geodesic: true,
            radius: .6,
            radiusUnit: "esriMiles"
        });
    }
    var cgraphic = new Graphic(circle, circleSymb);
    graphicsLayerCircle.add(cgraphic);

    var pgraphic = new Graphic(evt.geometry, config.symbolPointJFlag);
    graphicsLayerPoint.add(pgraphic);
}


texts: Styling polygon dash-dot borders in GeoServer using SLD

texts:
I want to draw polygon borders using a pattern of dashes and other symbols like triangles or circles but most polygons share borders so I get an undesired result.

Using this SLD code:

  <se:PolygonSymbolizer>
    <se:Fill>
      <se:SvgParameter name="fill">#cf72be</se:SvgParameter>
    </se:Fill>
  </se:PolygonSymbolizer>
  <se:LineSymbolizer>
    <se:Stroke>
      <se:GraphicStroke>
        <se:Graphic>
          <se:Mark>
            <se:WellKnownName>circle</se:WellKnownName>
            <se:Fill>
              <se:SvgParameter name="fill">#333333</se:SvgParameter>
            </se:Fill>
          </se:Mark>
          <se:Size>6</se:Size>
        </se:Graphic>
      </se:GraphicStroke>
      <se:SvgParameter name="stroke-dasharray">6 18</se:SvgParameter>
    </se:Stroke>
  </se:LineSymbolizer>
  <se:LineSymbolizer>
    <se:Stroke>
      <se:SvgParameter name="stroke">#AA0000</se:SvgParameter>
      <se:SvgParameter name="stroke-dasharray">10 14</se:SvgParameter>
      <se:SvgParameter name="stroke-dashoffset">14</se:SvgParameter>
    </se:Stroke>
  </se:LineSymbolizer>

I get this result in GeoServer:

Is there any way to avoid having two overlapping border lines or to make symbols perfectly overlap?


texts: Put an image file on the map in QGIS without coordinates

texts: Is there any way to put an image file on the map in QGIS 3.12.1 and move it anywhere. For example, there is a map with national parks and I want to add an image (SVG) as a symbol, without coordinates  in it?


texts: Query regarding connectivity in network preparation - sDNA manual

texts:
I am creating a network dataset using the roads polylines contained in the OS Meridian 2 data set, in order to eventually calculate road journey distances. I have been considering connectivity and elevations, and have been using the sDNA manual - network preparation module as guidance. This suggests that the 'link-node rule' applies to the Meridian 2 data set whereby "Intersections are not allowed in the data at all; ALL lines where they touch MUST have coincident endpoints. Where links don’t join at their endpoints this is shown by providing elevation or grade separation data – endpoints are assumed not to join unless their elevation and grade separation match. This data is provided in a separate layer of points, cross-referenced to the lines whose elevations they represent (OS Meridian does this)." - I have the separate layer of points (link nodes) which contains a 'levels' field. For example, if a road over a bridge can be accessed then a level value of 0 is used; a value of 1 is used when there is no access from one road to the other at an intersection.

It is then recommended  to convert from this format to a network with a 'coincident endpoint connectivity rule'. However, the guidance seems to stop there. In order to do this for 'link-node rule' data, the manual simply suggests that I get in touch with the sDNA via this website, as there are tools available for doing this conversion.

Can anyone offer advice on this issue? I'm not sure what I can do next.

For reference, here is the full article provided by sDNA: http://www.cardiff.ac.uk/sdna/wp-content/downloads/documentation/manual/sDNA_manual_v3_3_alpha0/network_preparation.html


texts: Vehicle routing multiple vehicles, multiple trips, finite vehicles in ArcGIS Network Analyst?

texts:
I am working on a problem where I have 30 vehicles who can all make at most 6 stops in a day. They have to service more than 500 shops.

I can get Network Analyst to do a Vehicle Routing Problem easily, but I can't figure out how to make the vehicles do multiple trips. The Network Analyst only lets me do one trip for each vehicle so that they only serve 180 shops.

How can I get ArcGIS to allow me to do multiple trips?

I am interested in distance of routes. I can measure this if I create enough vehicles to visit all the shops, but it is extremely tedious to create 75+ vehicles by hand ("Add Item") and will be impossible in my target case of more than 2000 shops.


texts: Create star map with polar projection from Right Ascension and Declination

texts:
I'm hoping this is the right place to find help with this. Here's a brief description of what I have so far and the context for what I need.
I'm creating a star map within Unity 2D, consisting of one rectangular map, with an equirectangular projection, showing the stars from declination -45 to +60. To make this I've used the HYG star database found here, filtered out the stars I don't need then converted the RA value to longitude (-RA * 15), and used the Dec value as latitude. This is then pulled into unity, scaling the long/lat by (a/360) * 24 where l is long/lat to give X co-ordinates between 0 & 24.
The trouble is replicating this for the polar map. I need the stars above declination 45.
I've tried using QGIS to project the stars as polar, but this is not working, I'm not sure why. I've found a different dataset that I can get projected properly for both maps, but exporting the co-ordinate data to a CSV gives me massive numbers and I'm not sure how to go about scaling it correctly.
Ideally, I'm looking for a way of converting RA and Dec to coordinates for a polar projection with a given radius (12), OR a way of scaling the co-ordinates from QGIS.
EDIT: I've found this page with a formula, which looks like what I might need, I just don't understand it.
EDIT: Images for reference.
Polar Map centred on north pole
Rectangular map

EDIT: My (I think correct) makeshift solution.
Each star is pulled into unity, at (0,D) units away from the centre point of the map. Where D = declination/360 * 24 (to scale it correctly). The star is then rotated around the centre point by Rdegrees, where R is -right ascension * 15 (right ascension goes between 0 and 24, so * 15 to scale to 0-360. Negative to flip the image to be correct).


texts: Failure during raster IO in putRasterData when using writeRaster in R

texts:
I have a code where I read in bricks for precipitation, min and max temperature, calculate bioclimatic variables from them, and then write rasters with bioclimatic variables for the time slice of the brick:
library(raster)
library(dismo)
library(parallel)

setwd("/scratch/bntjoa002/chelsa_cmip5_ts/")
options(rasterTmpDir = "/scratch/bntjoa002/rtmp")

# set the number of cores
mc.cores=20

#get model names
modelnames<-c("MIROC5")

#experiment names
experiments<-c("rcp45", "rcp85")

#specify years
start.year<-2030
end.year<-2049

# start the loop to calculate bioclim vars

for (i in 1:length(modelnames)){

  model = modelnames[i]

  for(j in 1:length(experiments)){

    experiment<-experiments[j]

    tasmax<-brick(paste0(getwd(),'/tasmax','/CHELSAcmip5ts_tasmax_',model,"_",experiment,"_",start.year,"-",end.year, ".nc"),
                  varname='air_temperature')
    tasmax<-tasmax-273.15

    tasmin<-brick(paste0(getwd(),'/tasmin','/CHELSAcmip5ts_tasmin_',model,"_",experiment,"_",start.year,"-",end.year, ".nc"),
                  varname='air_temperature')
    tasmin<-tasmin-273.15

    pr<-brick(paste0(getwd(),'/pr','/CHELSAcmip5ts_pr_',model,"_",experiment,"_",start.year,"-",end.year, "_V1.1.nc"),
              varname='precipitation_flux')
    pr<-pr*24*60*60*30

    # make a vector with the years in climate data time series
    years<-seq(start.year,end.year,1)

    nyears=length(years)

    # make index for the year
    ind=sort(rep(1:nyears,12))

    # Calculate bioclim variables for each year using mclapply
    bcbricks=mclapply(unique(ind),function(x){
      #extract just the climate data for each year from the raster brick
      tasmax.year=tasmax[[which(ind==x)]]
      tasmin.year=tasmin[[which(ind==x)]]
      precip.year=pr[[which(ind==x)]]
      # calculate bioclim variables
      biovars(precip.year,tasmin.year,tasmax.year)
    },mc.cores=mc.cores)

    #if you want to save one bioclim var as a stack across all years
    if(experiment=="rcp45"| experiment=="rcp85"){

      # output directory
      outDir=paste0('/scratch/bntjoa002/chelsa_cmip5_ts/MIROC5')

      # stack individual bioclim variables across years
      lapply(1:nlayers(bcbricks[[1]]),function(x){

        bcvar.by.allyears=stack(lapply(bcbricks,function(y){ y[[x]]}))

        writeRaster(bcvar.by.allyears,file=paste0(outDir,'/',names(bcbricks[[1]])[x],'_',model,'_',experiment,'_',start.year,'_',end.year,'.tif'))
      })
    }
    print(j)
  }
  print(i)
}

In this instance (for the years 2030--2049), the code works for the first 22 files (producing bioclimatic variables 1 to 19 for rcp45 and 1 to 3 for rcp85), following which I get the error:
Error in rgdal::putRasterData(x@file@transient, vv, band = i, offset = off) :
  Failure during raster IO
Calls: lapply ... writeValues -> writeValues -> .local -> <Anonymous>
Execution halted

I know that the code in general works because it has worked for other time slices using data from the same source (though I do get this error for a few of the other time slices too). The code seems to have no problem making the bricks and calculating the bioclim variables, but does have an issue when writing the results. If I open the bricks in r for each of pr, tasmax and tasmin, the bricks look fine (same dimensions etc.).
Any hints on how I can go about troubleshooting this?


texts: Converting projected coordinates to lat/lon using pyproj fails

texts:
I have been trying to work on this issue on myself mainly referring to this post (Converting projected coordinates to lat/lon using Python?) but still didn't succeed.

I have some 2-D data function of X, Y projected coordinates (units meters) but no lat/lon information.

Given that I have already the Proj4 string in the file I'm trying to use PyProj to convert these coordinate into lat/lon with a simple script.

import pyproj

p = pyproj.Proj("+proj=stere +lat_0=90 +lat_ts=60 +lon_0=-105 +k=90
                 +x_0=0 +y_0=0 +a=6371200 +b=6371200 +units=m +no_defs")
lon, lat = p(x, y, inverse=True)

Where x and y are the variables taken directly from the file (they are 1-D with 1121 and 881 elements, respectively).
Unfortunately I'm getting a dimensional error given that x and y have not the same dimension (Buffer lengths not the same).

So my question is... Why should they have the same size? I thought that you could have any rectangular subset into a projection.
Am I missing something?


texts:
I'm trying to install plugins on a fresh install of QGIS 2.18.12. I can connect to the plugins repository but trying to install any plugin fails with the error message:

Failed to unzip plugin package. Probably it is broken or missing from the repository. You may also want to make sure that you have right permissions to the plugin directory

I've tried rebooting and and checked permissions on the repository folder. I've also tried setting an http proxy in the network settings.

None of the above have worked.


texts:
After doing a lot of research on different types of clustering coordinates (server side) I am still having problems with choosing the best approach for my project.

My requirements:

Ability to work with more than 1.000,000 coordinates.
Be able to filter coordinates by point of interest.
Support map zooming and dragging.
Fast
I can't use any third party services.

Here is what I found:

Region quadtree seems to the most suitable algorithm.
Geo hashing coordinates + Solr for quick retrieval/filtering of points (might only work with small set of data since the clustering will have to happen on the fly)

I would like to know how to deal with map zooming & dragging while maintaining fast response from the server. How can clusters be cached if the maps is dragged, zoomed? Some clusters can be pre-clustered for large areas (continents) but what if there are 10,000 points within once city?

My software stack is postgresql, python, django.


texts:
I have X,Y,Z points that I can create a surface in arc with. I wanted to know if there is a tool that would show me the shortest path up this surface to the highest point. This could be based off of contours or just the values of the Z(depth) points perhaps.
So the main objective is the shortest path from an actual point location that lies on the XYZ surface to the steepest point on the surface and shortest path.
Does arc have a tool that will create this path as a line or something like this?


texts:
Are there any definitive research papers, web resources, or (text)books on distributed GIS? Topics I'm interested in are:

Parallelism of sequential spatial algorithms
Frameworks for implementing GIS in either the cloud/cluster environment
FOSS and commercial software for the above

I have seen this question, but I want something a bit more definitive. CW status would be beneficial, as well as recommendations for tags.

EDIT: I have entered a number of these terms on Google Scholar, and while I am a graduate student and deal with research papers on a regular basis many of the results are not substantive or encompassing.


texts:
I added KMZ data (points) in QGIS using 'add vector layer'.
Points shows up at the right location.
However, when I use Vector-GeometryTools-Export/AddGeometryColumns, it shows error and doesn't add X Y (lat long) to the attribute table.

Regards


texts: How can I perform an inside clip on a raster file based on another raster file?

texts:
I have a raster file that I would like to use to perform an inside clip on another raster file. I have tried using the extract by rectangle tool, but it gives me values ranging from 3.40282e+038 to -3.40282e+038. I have also tried to export the file using the selected graphics option, but the option is not available when I try and select it.

I am trying to get an average NDVI value for an area while discounting all of the water areas. I was directed to mask out water areas by:

converting everything to NumPy matrices;
reclassifying all water in the NLCD raster to 0 and all other pixels to 1;
multiplying that resulting raster by the NDVI value raster;
using numpy.sum(new-ndvi) / numpy.count_nonzero(new-ndvi) to get the average NDVI value of all non-water pixels.

However, when I try and convert the 13.5 MB NLCD raster to an array using this:

myarray = arcpy.RasterToNumPyArray('Z:\GISDataWarehouse\Land-Cover\LandCover-WI\landcover-wi.tif')

I get the error Runtime error <type 'exceptions.MemoryError'>

Thank you for your help!


texts: PyQGIS: Add user input as parameter/expression in Raster Calculator

texts:
I want to use Raster Calculator in my Python script in QGIS. The expression is easy - I create new raster with two values (0,1) where I get 1 if pixel value is higher than certain threshold ("A > threshold"). My code works perfectly if the threshold value is given in code by default (ex. "A > 0.3"), but I want user to choose the value.
Please do anybody know how to add variable as parameter into expression? Below is my code.
threshold, tOK = QInputDialog.getDouble(parent, "Threshold", "threshold", 0.3, 0.0, 0.9, 3)

input_raster = QgsRasterLayer('path/raster.tif', 'raster')
output_raster = 'path/rastr_calc2.tif'

parameters = {'INPUT_A' : input_raster,'BAND_A' : 1,
    'FORMULA' : '(A > threshold)',
    'OUTPUT' : output_raster}

processing.runAndLoadResults('gdal:rastercalculator', parameters)


texts: How to save numpy array as single band image?

texts:
I'm working on MODIS NDVI composite data (single band). I converted the image to a numpy array and performed filtering operations. When i'm saving the new numpy array as an image I get a 3 band image instead of single band image.
How can I save it as a single band image?

#read an image
img = cv2.imread("D:/trial/MOD09_NDVI.A2017001.tif")

cv2.namedWindow('Unfiltered Image', cv2.WINDOW_NORMAL)

cv2.imshow('Unfiltered Image',img)

cv2.waitKey(0)

#apply filter
myIMG = cv2.blur(img, (5,5))

cv2.namedWindow('Blur Image', cv2.WINDOW_NORMAL)

cv2.imshow('Blur Image', myIMG)

cv2.waitKey(0)

scipy.misc.imsave('D:/trial/blur_55.tif', myIMG)

------------
scipy.misc.imsave('D:/trial/blur_55.tif', myIMG)

saves a 3 band image instead of original single band image


texts: Is it possible to create filters based on attributes for markers in Leaflet?

texts:
I need to create filters based on attributes of markers. I have markers defined this way:

var locations = [
['AB11 5HW','17','A',57.147701,-2.085442 ] ,
['AB11 8DG','3','B',57.129372,-2.090916 ] ,
];

If the user selects for 'A' or 'B' all markers containing attribute A or B should become visible on the map. Something like

var markersA =  a[2] contains 'A'

I thought it is maybe possible with Leaflet Marker groups or something similar.

I'm new to Javascript so I'm interested if it's even possible.


texts: Join by location QGIS and PostGIS -> different results

texts:
I get different results, performing a spatial join with PostGIS and QGIS.
The data can be downloaded here.

I try to join vg2500_krs (402 rows) with vg2500_bld (16 rows). I am interested in writing the information from vg2500_bld into vg2500_krs, keeping all records from vg2500_krs.
In QGIS I select Vector - Data Management Tools - Join Attributes by Location. The resulting shapefile has 402 rows, as expected.

However, when I try to do this with PostGIS, I get a shapefile with 638 rows.

This is the query I use:

CREATE TABLE krs_bld AS
SELECT k.gen, k.rs, k.geom, b.name_bld
FROM vg2500_krs k
LEFT OUTER JOIN vg2500_bld b
ON ST_Intersects(k.geom, b.geom) AND NOT ST_Touches(k.geom, b.geom);

Further, when I look at the Shapefile created by PostGIS in QGIS, especially at the duplicated rows, they "do not exists". When I highlight them and "Zoom to selected Feature", there is nothing highlighted in the mapview. It is as if nothing was selected. But, when I calculate the area for the rows, it does not result in 0.
Where does this behavior come from?


texts: How to add to xarray information about projection while saving to NetCDF?


texts:
How do I tell QGIS that my labels should not cover features in layer 1 and layer 2, while it is OK to cover layers 3 and 4?

qgis version 2.18.7


texts: Raster update error when saving heatmap in QGIS

texts:
I am using QGIS and I recently added a delimited layer and all my coordinates appear fine , however when I add a heatmap I get the error "Raster update error: Could not open the created raster for updating. The heatmap was not generated."

I am confident that I have added me heatmap correctly by specifying a valid output path and saving as .tiff as I previously done in the past but for some reason now I am getting this error . After some research some indicated that it might be bug  or something wrong with the plugin


texts: Generic Mapping Tools: Weird lines created by pscoast

texts:
I'm creating maps using the Generic Mapping Tools (GMT) from the University of Hawaii. I get weird vertical and horizontal lines using pscoast. This is the command to reproduce the problem:

gmt pscoast -JM18c -R43/62/35/49 -G50/255/50 -Df -P > caspiansea.ps
convert -density 300 caspiansea.ps caspiansea.png

The lines are already present in the ps file, so the last step (convert) does not introduce the problem. It happens across all areas, the caspian sea area is just an example.

This is the image that's created by those commands:

Version: GMT 5.2.1 (the most recent version provided by Macports) on Mac OS X 10.11.6.


texts: Loop for cropping, cloud masking Sentinel 2 L2A images

texts:
I have 6 stacks Sentinel 2 images (10m resolution) that I want to crop to my AOI and cloud masking. After which I want to calculate NDVI in R. The stacks are 3 from different months of 2016 and 3 from 2018.
I have read my AOI and different bands to create a stack as shown below
forest_shp <- readOGR(dsn= ".", layer = "forest_fichtelgebirge1")

band2_20160708 <- raster("T32UQA_20160708T101032_B02_10m.jp2")
band3_20160708 <- raster("T32UQA_20160708T101032_B03_10m.jp2")
band4_20160708 <- raster("T32UQA_20160708T101032_B04_10m.jp2")
band8_20160708 <- raster("T32UQA_20160708T101032_B08_10m.jp2")
all_bands_20160708 <- stack (band2_20160708, band3_20160708, band4_20160708, band8_20160708)

#cropping/masking

new_all_bands_2016070 <- mask(crop(forest_shp), all_bands_20160708)

I seek any looping ideas?


texts:
I have ArcMap 10.3 installed on a server.  Everything was going great until recently all the toolboxes stopped working.  They would load but be blank.  I googled this and found McAfee AntiVirus software can cause this issue.

I tried using both the McAfee instructions and Esri instructions for fixing this issue.  I should clarify (I sent the instructions to IT and they tried, I do not have the permissions to perform these fixes, so I cant for sure know how they did it.)  This did not help.  So ArcMap was uninstalled and re-installed on a special server that has no McAfee software.  This server is much slower and ArcMap crashes with the smallest tasks, ect adding a field to a table.  It is technically against corporate policy to not have McAfee running on a workspace, and so this solution is only temporary anyway.

Has anyone else run into this issue, and what was your solution?


texts: Validating data in ModelBuilder with TrackBuilder tool?

texts:
I have FGDB with points feature classes that I want to convert to lines using using a ready-made script called TrackBuilder. I am using model builder:

When I populate the Track Builder script tool with the parameters everything looks fine. But when I validate the tool goes white

WHY?

The beginning of the Track Builder script looks like this:

import arcpy, os, sys, traceback, datetime, math, re

## Input Paramaters
sInputFile = arcpy.GetParameterAsText(0)
sID_Field = arcpy.GetParameterAsText(1)
sDT_Field = arcpy.GetParameterAsText(2)
sOutWorkspace = arcpy.GetParameterAsText(3)
sOutName = arcpy.GetParameterAsText(4)
sLineMethod = arcpy.GetParameterAsText(5)
sMaxTimeMinutes = arcpy.GetParameterAsText(6)
sMaxDistMiles = arcpy.GetParameterAsText(7)
sIntervalHours = arcpy.GetParameterAsText(8)
sAddVoyageData = arcpy.GetParameterAsText(9)
voyageTable = arcpy.GetParameterAsText(10)
voyageMethod = arcpy.GetParameterAsText(11)
sAddVesselData = arcpy.GetParameterAsText(12)
vesselTable = arcpy.GetParameterAsText(13)

According to the TrackBuilder instructions the input point should be a feature class containing a date field and an unique number for each ship.

Everything looks correct here:

The whole TrackBuilder script can be found here


texts: Donut polygons getting filled when exporting to 3d Web Scene

texts:
I have built a model using ArcScene by draping 2D polygon data over an elevation raster and am having issues when using the Export to 3D Web Scene tool.  The tool builds the model successfully, but when I view the model using the CityEngine web viewer the center of donut polygons get filled with gray which ends up covering the interior polygons.  See images below for an example of what I am talking about.  If I cut the donut polygon into two then the issue goes away, however this isn't really feasible to do for my entire model.  I am hoping that someone may have a suggestion of a tool or setting that I should try.  I am new to the 3D mapping world so please bear with me.

Here is what is being hidden by the darker gray "filled" donut hole.


texts: Creating new .lyr file and retain metadata using ArcPy?

texts:
I'm creating a Python Toolbox using ArcGIS 10.5 that ultimately creates a new feature class and .lyr file from the layers in a current .mxd table of contents. I need the new feature class and .lyr file to take on the metadata from the original layer. I can import the metadata to the feature class using arcpy.ImportMetadata_conversion (i,"FROM_ARCGIS",fc_outname), but it isn't working for the .lyr file. The .lyr file metadata remains empty, while the feature class is populated as expected.

Relevant portion of current code:

arcpy.ImportMetadata_conversion (i,"FROM_ARCGIS",feature_class)
if not arcpy.Exists(lyr_outname):
    arcpy.AddMessage("Creating .lyr file: {}\n".format(lyr_outname))
    lyr = arcpy.MakeFeatureLayer_management(feature_class, lyr_disp)
    arcpy.ApplySymbologyFromLayer_management(lyr, v)
    arcpy.ImportMetadata_conversion (feature_class,"FROM_ARCGIS",lyr)
    arcpy.SaveToLayerFile_management(lyr, lyr_outname)`

Even with the .lyr file created, I can't use any of the import metadata tools in desktop to successfully import the metadata. While they complete successfully, it remains empty. I can however manually import the new feature class, and right click on it, and save to layer file. This saves the metadata.


texts: Official term for latitude longitude coordinate system?

texts:
May I know what is the correct specific term for latitude longitude coordinate system?

With "Geographic Coordinate", it seems to be a general term for every other system?


texts: I am trying to calculate the temperature of MOD11A1 and I can't find the expression of band math. How the expression temp < 273 could be written at band math?


texts: Image (Error) Image.constant: Invalid Image.constant type?

texts:
I'm trying to find actual evapotranspiration by use equation

  ETa = ETf*pet

I import image collection of pet from IDAHO_EPSCOR/TERRACLIMATE for 3 years.
When I multiply Etf with pet for finding aet(ETa). I get error

  "Image (Error) Image.constant: Invalid Image.constant type."

var aet = ee.Image(ee.Number(mean_etf))
        .multiply(ee.Number(pet))
        .rename('ETa')
        .cast({'ETa': 'float'});

print(aet);

Map.addLayer(aet) ;

Mylink : https://code.earthengine.google.com/a311d7d5b0994a0dedd66e10661bd6ba


texts:
I'm trying to create a custom HTML Popup using XSL. I can get the attachment JPEG's to show, but cannot seem to integrate the Attachment Manager that you can find when setting the HTML Popup As a table of visible fields.

Does anyone know the XSL code to embed the Attachment Editor?
or
a different approach might be to resize the JPEGS when opened...


texts: Rasterize Point layer Error: Wrong value for -outsize parameter

texts:
I am trying to create a Euclidean distance raster from a point layer (in QGIS 3.0.3).  From reading up on this topic in this forum I found that I should rasterize the point layer first.  I also followed the suggestion in that post that I create a field in the point layer and fill it with '1'.

The parameters and the output are shown below.


texts: Extract coordinates for series of georeferenced files in ArcGIS 10?

texts:
I have a series of 1900 spatially continuous images that are georeferenced. Each image is a tif file paired with a tfw file.

These images are easily open and shown in ArcMap 10. However, I need a way to extract and tabulate all of their associated coordinates (in this case, the centerpoints of each image) into a spreadsheet.

How do I do this? Please note that I have no scripting abilities.

Thanks!


texts: Unions of polygons (Postgis ST_UNION for Geography type)

texts:
I am looking for a function that will return the intersection of 2 or more polygons (geography type).

I am aware of ST_UNION, ST_COLLECT but it works only for geometry type.


texts:
I'm trying to export a simple PostGIS table loaded in QGIS to a geopackage file.
Here's an example:
options = QgsVectorFileWriter.SaveVectorOptions()
options.driverName = "GPKG"
options.layerName = "_".join(myLayer.name().split(' '))

geo_package = 'my_gpkg.gpkg'

if not os.path.exists(geo_package):
    options.actionOnExistingFile = QgsVectorFileWriter.CreateOrOverwriteFile
else:
    options.actionOnExistingFile = QgsVectorFileWriter.CreateOrOverwriteLayer

res, text = QgsVectorFileWriter.writeAsVectorFormatV2(myLayer, geo_package, QgsCoordinateTransformContext(), options)

if res == QgsVectorFileWriter.NoError:
     print("Successfull export of layer {}".format(myLayer))
else:
    print("Fail error {}:{}".format(res, text))

It works fine for Vector layers but for a simple PostGIS table, I get the Error code 8 with no Error message.


texts: Why I can use geodatabase created by 10.5.1 in ArcMap 10.1

texts:
According to http://desktop.arcgis.com/en/arcmap/10.5/manage-data/geodatabases/client-geodatabase-compatibility.htm, if the client is using 10.1, he can open geodasebase up to 10.4.

But, when I save a copy of 10.5.1 mxd to 10.1 and try to use the geodatabase created by 10.5.1, it works.

I am worrying that I missed something. Can anyone confirm it is actually supported?


texts: Limiting the maximum and minimum values of an interpolation surface tool (ArcGIS, Spline)

texts:
I've been using the spatial analyst spline tool in ArcGIS 10.1 and was wandering whether it is possible to limit the maximum and minimum values to those of the z-attribute.
Currently the spline will exceed both these values.


texts: Comparing SAR and SRTM, Which data source can produce relatively accurate DEM?

texts:
How much accuracy could we can expect from producing DEM from SAR using InSAR techniques as compare to available SRTM 1ArcSec data? Specifically in view of the available Sentinel-1 datasets?

Any thoughts?


texts: Where is Summarize Raster Within tool in ArcGIS Pro?

texts:
I am looking for a tool to calculate mean across multiple rasters. I am aware of cell statistics tool that can be used here. I am also aware that raster calculator can also be used here. But, in my research I came across "Summarize Raster Within: Summarize Raster Within— Raster Analysis Tools.

However, I cannot locate this tool in my version of ArcGIS Pro 2.4.3. The tool I could find were for polygons (summarize within), not for rasters.

The Summarize Raster Within tool was refered to at GeoNet.


texts: Getting year from a field of type character varying

texts:
I did an intersection between two tables and the resulting field has an sdate of type character varying (29). An example value is 2012-01-13 05:00:00. How do I get just the year from it?

I want to use a postgres query. I tried extract('year' from sdate) but it didn't work because it's type char varying.


texts: Using Merge_management Geoprocessing tool in ArcObjects?

texts:
I am trying to use Merge_Management Geoprocessing tool in arcobject, I want these tool to use layers named "HT Overhead Line" and "HT Underground Line" and create the output out.shp.

Below is the code I am trying which is not working.

        IMxDocument mxdoc = ArcMap.Application.Document as IMxDocument;
        IMap map = mxdoc.FocusMap;
        if (map.Layer[0] == null)
        { return; }

        IGeoProcessor2 gp = new GeoProcessorClass();
        gp.AddOutputsToMap = true;
        gp.OverwriteOutput = true;
        IVariantArray parameters = new VarArrayClass();

        IGpValueTableObject vt = new GpValueTableObjectClass();
        for (int i = 0; i < map.LayerCount; i++)
        {
            if (map.Layer[i].Name == "HT Overhead Line")
            {
                ILayer HTOverheadLine = map.Layer[i];
                IFeatureLayer fl1 = new FeatureLayerClass();
                fl1 = HTOverheadLine as IFeatureLayer;
                IFeatureClass inFeature1 = fl1.FeatureClass;

                vt.SetColumns(1);
                object obj1 = inFeature1;
                vt.AddRow(obj1);

            }
            else
            {
                if (map.Layer[i].Name == "HT Underground Line")
                {
                    ILayer HTUndergroundLine = map.Layer[i];
                    IFeatureLayer fl2 = new FeatureLayerClass();
                    fl2 = HTUndergroundLine as IFeatureLayer;
                    IFeatureClass inFeature2 = fl2.FeatureClass;

                    vt.SetColumns(2);
                    object obj2 = inFeature2;
                    vt.AddRow(obj2);
                }
            }
        }

        parameters.Add(vt);
        parameters.Add(@"OutPath\Out.shp");

        gp.Execute("Merge_management", parameters, null);


texts: How do I export only additions when running export-diff to a shapefile in geogit (geogig)?

texts:
I currently have two commits in my GeoGit (GeoGig) repository.  I'm running the following command on the two commits to get the differences exported to a shapefile.

geogit shp export-diff [commit1] [commit2] [path] differences.shp

I know doing the diff command that there are X number of Additions, X modifications, and X removals.

The shapefile creating is providing me both additions, removals, and modifications, but what I would like is a shapefile showing only the additions, a shapefile showing only the removals, and a shapefile showing the modifications, or possibly add a column to the shapefile showing what the status of the feature is (A, R, M).  Is this even possible with GeoGit (GeoGig) currently, and if so what arguments should I add to this statement?


texts: Clicking on a polygon-opening a page/link

texts:
I have a many polygons on my map serving through WMS from geoserver. I want to implement the task such that when the user clicks on a particular polygon , he should be directed to a html page about that polygon. Like if I click on my CSE Dept I should be directed to my cse dept home page.

Need help in achieving this...

I have followed http://lyceum.massgis.state.ma.us/wiki/doku.php?id=generate_imagemap as but when I try "http://localhost:8080/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=IITKanpur:halls&styles=iitk_halllinks&bbox=80.226,26.504,80.235,26.512&width=512&height=455&srs=EPSG:4326&format=text/html" I am not getting anything.

My iitk_halllinks sld is :

<Rule>
  <Name>href</Name>
  <PointSymbolizer><Graphic><Size>16</Size></Graphic></PointSymbolizer>
  <TextSymbolizer><Label><PropertyName>halls_link</PropertyName></Label></TextSymbolizer>
</Rule>


texts: How to iterate through each vertex in a line?

texts: I am working with ArcObjects in building functionality for a toolbar inside of ArcMap. Once I start an edit session, I use the tools to manually draw a line. I am trying to loop through this line get (or display in a message box) each point in the line. For ease of use, I was trying to do this on a simple button click from my toolbar. I've been researching and thought of using the IPointCollection Interface but I'm not completely sure if this will work or be helpful in accomplishing my goal. I am looking more so for a starting point to this.


texts: Deleting Picture Element using ArcPy in ArcGIS 10.3 Desktop?

texts:
I'm trying to delete a Picture Element from 45 MXDs. This code is a start for me:

import arcpy
from arcpy import env

env.workspace = r"G:\PROJECTS\landuse\gis"
for mxdname in arcpy.ListFiles("*.mxd"):
    mxd = arcpy.mapping.MapDocument(
                r"G:\PROJECTS\landuse\gis\\" + mxdname)
    for elm in arcpy.mapping.ListLayoutElements(mxd,"PICTURE_ELEMENT"):
        if elm.name == "F:\GIS\practical_shapefile\notes\aer1_logo1.jpg":
            elm.sourceImage =r"F:\GIS\practical_shapefile\general\esd_logo1.jpg"
            mxd.save()
del mxd

I read:

http://desktop.arcgis.com/en/arcmap/10.3/analyze/arcpy-mapping/listlayoutelements.htm
http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-mapping/pictureelement-class.htm

but didn't find any hint how to do it.


texts: IDW succeeded but not visible in table of contents

texts: I used now several times ArcMap 10.7.1 and until now everything worked quite well. For my Masters Thesis I have to work with IDW to interpolate my datas. It worked all the time. Now, I run the IDW with the same dataset and results told me it was successful but it is not visible in Table of Contents and on the map I cannot explain why and what the problem is. Maybe someone is able to help me out of this trouble.


texts: QGIS 2.18.14 valid option for union tool?

texts:
Using QGIS 2.18.14 there is no satisfying Union method.

The integrated QGIS Union tool generates incorrect outputs if complex polygons (e.g. street network) are used.

The SAGA Union Module does not keep the attributes from both layers.

Is there a valid alternative for these tools that result in a correct union of two layers?


texts: Can not install geoserver 2.5.1 on Mac OSX 10.9.3

texts:
I am trying to install geoserver 2.5.1 on my Mac (OSX 10.9.3) but i am getting the error “GeoServer.app” is damaged and can’t be opened. You should move it to the Trash.

Can you pls help?


texts: Python: add a list to vector attribute table

texts:
I have a raster from which I have extracted the zonal statistics using a vector grid (shapefile). As a result, I have now a list containing the mean values extracted from each element of the grid.
However, unlike when running zonal statistics in QGIS, the list is not present (as a new column) in the attribute table of the shapefile.
How can I add such a list to the attribute table of the shapefile?


texts: How to take number of states crossed into consideration while calculating the least cost path between two cities?

texts:
I want to create the least cost path between two cities. I have a cost raster that I can use to create a cost path between two cities. However, a new condition is that the path also should take into consideration that it costs more to cross more states. In between two cities, there are many states of different sizes and shapes. So, I would like to create a path that takes into cost raster as well as goes through the least number of states (polygons) as much as possible.

One of my solutions is to create a buffer around states’ boundaries and assign a high cost for the buffer zone. This will make paths expensive to cross multiple borders. It might work on some level for some but might not for oddly shaped polygons.

Are there any other tools or ways that I can use in ArcGIS to solve my problem?


texts: writeRaster: Error in .local(.Object, ...) : Unable to create dataset

texts:
I received the following warning when trying to write a large raster (global extent) and am not sure how to proceed:

Error in .local(.Object, ...) : Unable to create dataset

Note that I had to change the R temp file location to larger drive using rasterOptions():

rasterOptions(tmpdir="E:\\rTemp")

Also, I've read that removing any underscores from the file name when calling writeRaster() could resolve the issue, but it did not in my case.

The raster layer:

myRaster
class       : RasterLayer
dimensions  : 67200, 172800, 11612160000  (nrow, ncol, ncell)
resolution  : 0.002083333, 0.002083333  (x, y)
extent      : -180, 179.9999, -56.00081, 83.99917  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0
data source : E:\rTemp\r_tmp_2017-09-25_010935_1648_64229.grd
names       : layer
values      : 1, 4  (min, max)

sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] rasterVis_0.41      latticeExtra_0.6-28 RColorBrewer_1.1-2  lattice_0.20-35     dplyr_0.7.2         rgdal_1.2-8         raster_2.5-8
[8] sp_1.2-5

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.12      zoo_1.8-0         viridisLite_0.2.0 assertthat_0.2.0  grid_3.4.1        R6_2.2.2          magrittr_1.5      rlang_0.1.1
 [9] hexbin_1.27.1     bindrcpp_0.2      tools_3.4.1       glue_1.1.1        parallel_3.4.1    compiler_3.4.1    pkgconfig_2.0.1   bindr_0.1
[17] tibble_1.3.3


texts: Putting marker and save location in DB for Leaflet.draw?

texts:
Using Leaflet.draw, I managed to set a marker, but I need to save it to a database, so that when reloading the page again, it shows the marker that was saved.

I'm not an English speaker, but I try.


texts: Working with SRTM DEM that has rectangular cells?

texts:
I am trying to work with the 1 arc second resolution SRTM DEM from USGS's Earth Explorer, with eventual goals of filling its no data areas with an ASTER grid (also of 1 second resolution).  I have an idea of how to complete that step; what I am getting stuck on is the way the SRTM DEM loads in ArcMap.  When I open the grid and inspect its properties, it shows that the cells' XY dimensions are 0.00055555556 x 0.00027777778.  Meanwhile, with the ASTER grids I have, the cell dimensions are 0.00027777778 x 0.00027777778.  I have searched extensively for why the SRTM grid's cell size is rectangular but haven't found much.  I have tried downloading the grid in all 3 available formats (BIL, GeoTiff, and DTED) but all open the same way.

Is there a way to find this grid so that it has square cells?

Should I consider using another grid altogether?

Are there workarounds for my rectangular cell issue so that the two DEMs I am using can work together?


texts:
I'm using QGIS 2.8 and am trying to take a shapefile that has multiple column data and display that as individual shapes.

For example...

I have a soil test data table that includes pH, P, K, Fe, Zn and so on and I need a simple way to explode that info so I can view each one independently.  I have read posts that say I should transpose the data in Excel but is there a simpler way via a script or plugin?