texts: How do I apply symbology from a layer to both features and labels with arcpy?

texts:
I am trying to apply symbology to a layer from another layer. The layer's features (lines) get  symbolized perfectly. My only issue is that the labels do not get any symbology, although the reference symbology layer has symbolized labels. How can I get both the features and lables symbolized?

cont5FT = arcpy.mapping.Layer("5FT_Cont") #A feature layer created on the fly
cont5FTSymb = arcpy.mapping.Layer(cont5) #The symbology file
arcpy.ApplySymbologyFromLayer_management(cont5FT, cont5FTSymb)
arcpy.mapping.AddLayer(dataFrame,cont5FT)

Note that I have already tried using a direct link to the symbology layer file. I have also tried UpdateLayer. I tried adding the fields I want to symbolize the labels from but maybe I am doing it wrong. The field to symbolize on is called "Elevation" so would would what I have below be correct?

arcpy.ApplySymbologyFromLayer_management(cont5FT, cont5FTL.[["VALUE_FIELD","#","Elevation"]])


texts: ArcGis Javascript api detect one second hover

texts:
For reference I am using arcgis_js_v33 api.

I am trying to figure out a good way to detect if a user has hovered over the map for at least one second and if they have to pop up the info box identifying what is under their cursor. My issues seems to be that I cannot find a good way to start a timer if they stop moving their mouse and to kill the timer if they move their mouse before the timer reaches its time.

Any ideas?


texts: Raster calculator creates strange output

texts:
I am trying to combine two raster layers (one is nighttime satellite data, the other is the GPW population density data). I am using raster calculator to combine the two (the following is for a division operation, but the same problem occurs even for addition or subtraction) but get stripes of values, which tend to be either 0 or nodata. I attach a screenshot to show what this looks like:

Why is this happening? I have made sure the raster layers are georeferenced with the same system (WGS84) and have even tried aligning the rasters, but to no avail. Sorry if this is a rookie question - I'm fairly new to the software.

EDIT: http://beta.sedac.ciesin.columbia.edu/data/set/gpw-v4-population-density gpw is 2015 version of this data

satellite data is here: http://ngdc.noaa.gov/eog/dmsp/downloadV4composites.html
particularly the stable lights layer of 2013


texts: Changing data type in attribute table in QGIS?

texts:
I have county data in which the FIPs (actually State FIPS and County FIPS combined). I have data imported as CSV with the sames FIPS data titled STCounty.  However, the shapefile FIPS is listed as a Real and the CSV came in as an Integer and the Join function does not seem to work.  The drop boxes are greyed out/empty.

So the bigger questions is how do you change the attribute type in a table?

I tried to create a new column in the shapefile (county data) and set it to an integer and then multiply the FIPS*1, but got a column full of "NULL".

I am new to QGIS and have a lot of experience in MapInfo, so the join concept is not new to me, just the syntax in QGIS.


texts: How to run PyQT code inside python console(editor) in QGIS?

texts:
I have built a simple PyQt application(inserting list item in QListWidget) which runs outside the QGIS environment.I want to integrate that inside the
QGIS so that all the map layers will be inside list while pressing the push button.


texts: Interpolation of categorical data from a polygon surface with gaps

texts:
I have built a vegetation map from a set of historical photographs from 1912. The photographs were taken from the ground (ridges and peaks of mountains), and I have developed a method of georeferencing these images and extracting gridded data of the vegetation types visible.

However, there are many portions that were not visible in this landscape due to being obscured behind ridges. These locations were not visible from other camera photo points. This is not a dissimilar problem to aerial photography with lots of obscuring clouds. The difference is there are not other photos to use to fill in the gaps. I need to use some sort of interpolation routine to fill the gaps.

I am currently using ArcGIS 10.2.2 and would like a solution that works within Arc, but if it is not possible, I will entertain using R or QGIS or other packages.

I need to interpolate the vegetation categories in the obscured areas. My hypothesis is that it is driven by aspect/slope/elevation and of course influenced by the nearby vegetation. I think this is some variant of co-kriging, but I have not been able to track anything down that deals simultaneously with categorical and polygon data. The data below in the image is in 100m square cells.

Does anyone have any suggestions of approaches to take? I would like to bootstrap the data so that I can test its predictive power, rather than just interpolate what is missing.

Attached is a map showing what I am dealing with. THe different colours indicate different vegetation categories (ie coniferous forest = dark green, deciduous = pale green, shrubs = orange,  grassland = tan, open canopy forest = black). The grey areas are the obscured areas.


texts: Get Values of Pixels Inside Polygon (MODIS)

texts:
I am working on a problem where I have polygons for features and I want look at daily data from MODIS on, and I am looking for suggestions on how to determine which pixels it is that I need to look at. I have tried gdallocationinfo however this only gives me a single pixel, and I am looking to get all the pixels that are at least 80% inside of the polygon. I am looking for a coding based solution as I have about 8,000 polygons I'm looking to process.

One other thing that makes the process a bit more complicated, the MODIS bands I'm using at at 500m resolution, while the cloud-mask for it is at 1km (int the state_1km band) so I will need to keep the two data-sets in alignment throughout the process.


texts: How to assign elevation values to contours derived from a raster elevation file

texts:
I extracted contours from a raster elevation file (SRTM). The contour layer does not contain elevation values. How can I use qgis to assign elevation values to the contour layer?  Is there a better way to obtain contours with elevation values?

I performed the following steps to extract the contours:
Raster - Extraction - Contour

Additional information:
Windows operating system
WGS84 projection
Raster filetype: .tif
Resolution: 1 arc-second


texts:
I have Python 2.7 (installed together with ArcGIS 10.1). Via OSGeo4W I have installed QGIS and Orfeo ToolBox (OTB) applications. I was able to connect QGIS and OTB and it's working fine. Through OSGeo installer I also installed otb-python and otb-wrapping, but I have no idea, how to import otbAplication into Python while writing script.

Could you please help?


texts: ArcMap labels that come from different fields

texts:
I am trying to make labels for a feature class called m_GraveLotSingle. I have a field that is called "Raised_Flat". If the field is "RAISED" I would like it to show the label of another field called "Grave_Posi". If the field is "FLAT" I would like it to show the "Lot_1" field.
Is this possible?


texts: What is the primary use of database in Q-Gis? How to connect to a database in Qgis?


texts: Prepopulating Survey123 form field inputs from related tables in file geodatabase

texts:
I have a Survey123 survey. I am trying to prepopulate fields for from ArcGIS Collector and am having great difficulty.
To explain, I created a file geodatabase in ArcGIS 10.X, (relationship classes based on GlobalIDs), and published it as a feature service to ArcGIS Online (AGOL). This geodatabase has a point feature class and five related tables. I created a Survey123 from the feature service that submits results back into one of the related tables.
In the web map I created for Collector, I configured the popup to link the Survey123 survey to the Collector app (so that when the user has the map open in the Collector app, all they do is click the link and it sends them automatically to the Survey123). My goal is, that when the user selects a point on the map and follows the popup link to the survey123 form, that some of the survey123 field inputs are already populated from the same fields in the related tables from the file geodatabase.
I followed this article a lot for my overall process:
https://support.esri.com/en/technical-article/000021198
This is an example of what my popup link in the web map looks like:
arcgis-survey123://?itemID=c5exampleitemid243284232599&field:ParentGUID={GUID}&field:NAME={relationships/0/NAME}

I saw on this article, that someone used the backward-slash \ symbol instead of the forward-slash / mark in the attribute names, so it would look like &field:NAME={relationships\0\NAME} instead:
https://community.esri.com/t5/arcgis-survey123-questions/populating-survey123-answers-with-related-tables/m-p/797787
That didn't work for me either, though.
I haven't been able to find much other documentation on this one particular problem. Not sure if it just doesn't work on my apps on my particular device (Android Galaxy phone), or if there's something wrong with my URL link in my web map popup, or maybe something else altogether.


texts:
I wish to view the bathymetry point for any given coordinate (e.g. as I move the cursor, coordinates are displayed in the status bar) I would like to see next to coordinates in the status bar the bathymetry data. I created a layer using WMS to connect to Global Multi-Resolution Topography @ http://www.marine-geo.org/services/wms_2.0_merc?request=GetCapabilities&service=WMS&version=1.0.0. The GMRT apparently contains the bathymetry data.

Another application, GeoMapApp, provides the feature described above but I need QGIS to draw shapefiles (e.g. paths) that meet certain bathymetric requirements.

Can this be done in QGIS?


texts: Counting number of polygons line intersects using ArcGIS Desktop?

texts:
I have a line shapefile and a polygon shapefile. I would like to add a field to the line shapefile that specifies which polygons each line feature crosses (comma-separated ID's or another field, for example), and another field that is the count of polygons. Doing the inverse for the polygon layer would also be insightful (how many and which lines intersect each polygon).

Is there an easy way of doing this in ArcGIS Desktop?


texts: Arcmap legend: select only part of the elements

texts:
I have to export a map. In my map, I unified several features under the same colour because because for my job they are exactly the same. My problem is that, when I create a legend, I get something like this:

What I would like to do is to get rid of this long list of features and have in my legend only 4 elements: one marked by a green colour, one by blue color, one by pink and the last one by brown (and then to rename them).
How can I remove the legend items I do not want?


texts: Can I set a max zoom for a search in CartoDB.js

texts:
I made a map with a search box that is related to a country. Entering a postal code will zoom completly in to the asked postal code. I would like to center the map to this asked postal code, but not to zoom further in.

I saw several example maps with a maxZoom. Therefore I tried to set maxZoom in CartoDB.js. But it doesn't work. What am I doing wrong? You can see html so far here


texts: How to transform from a SRID to another?

texts:
How can I transform a geometric column of table from "SRID=4326" to "SRID=32650".
I saw "ST_Transfom" and " ST_SETSRID" operator before. To do so, I used follow construction operator, But it dosen't work. Any suggestion please?

select ST_Transform(ST_SetSRID(geom_line , 32650), 32650)
from my_Table;


texts: How to get the header values for an ASCII raster if the input raster is QgsRasterLayer type?

texts:
I'm trying to develop a QGIS plugin for converting the input raster to QgsRasterLayer type and, however, I don't know how to get all the header information to write it in the output raster.

This is an example of the beginning of the input raster:

ncols        1914
nrows        1316
xllcorner    511542.500000000000
yllcorner    4660867.500000000000
cellsize     5.000000000000
NODATA_value  -999
-999.0 -999 -999 -999 -999...

I know how to get cols, rows and nodatavalue but I need to know how to get xllcorner, yllcorner and cellsize too.

This is the code that I wrote for that:

def inversion(self):

    lyr=self.inRaster

    cols = lyr.width()
    rows = lyr.height()
    dpr = lyr.dataProvider()
    bl = dpr.block(1, dpr.extent(), cols, rows)
    nodatavalue=bl.noDataValue()

    elevation = []
    for i in range(rows):
        elevationline = []
        for j in range(cols):
            elevationline.append(bl.value(i, j))
        elevation.append(elevationline)

    headerdem={'ncols':cols,'nrows':rows,'NODATA_value':nodatavalue}


texts: Ignoring feature with featureIdentified with Pyqgis

texts:
I am using the QgsMapToolEmitPoint and QgsMapToolIdentifyFeature classes in my QGIS project.

I created 2 variables:

self.pointTool = QgsMapToolEmitPoint (self.canvas)
self.linetool = QgsMapToolIdentifyFeature (self.canvas)

The first variable connects to a function that generates lines in a layer.
Next, I call the second function, which identifies the end point of the lines where I click.

My problem is, after making a line, calling the second function:

self.pointTool.canvasClicked.connect (self.criar_line)
self.linetool.featureIdentified.connect (self.identify)

this function captures the end point of the line
created earlier, but I don't want that.
I want to choose the line I want to capture the endpoint.


texts: Is it possible to load automatically a customization file in QGIS?

texts:
I have customized QGIS menu and toolbars thanks to the customization option and I have created a configuration.ini file that I can load on several machines.

Now, is it possible to create a project and automatically load a specific config.ini file for that project?

I didn't found anything in the project properties or in the option menu, but maybe there is another way.

BTW: QGIS 2.1 Master with Debian 7.2


texts: deck.gl react base map appears jittery and shaky

texts:
I'm going through the tutorial to get started with deck.gl working in react.
I managed to get the underlying map to appear.
But I get an issue where the react page is visually shaky and jittery (hurts the eyes just looking at it), I had this happen also in the process of development on one of the error messages but it went away.
Here is the code for It's mostly based on
https://deck.gl/docs/get-started/using-with-react
But I also had a look at and the dependencies used here
https://medium.com/weekly-webtips/an-introduction-into-deck-gl-f5c8ae84d9a5
Here is app.js
import React from "react";
import DeckGL from "@deck.gl/react";
import {LineLayer} from '@deck.gl/layers';
import {StaticMap} from 'react-map-gl';

const MAPBOX_ACCESS_TOKEN = <removed token>;

// Viewport settings
const INITIAL_VIEW_STATE = {
  longitude: -122.41669,
  latitude: 37.7853,
  zoom: 13,
  pitch: 0,
  bearing: 0
};

// Data to be used by the LineLayer

const data = [
  {sourcePosition: [-122.41669, 37.7853], targetPosition: [-122.41669, 37.781]}
];

function App({data}) {
  const layers = [
    new LineLayer({id: 'line-layer', data})
  ];

  return (
    <DeckGL
      initialViewState={INITIAL_VIEW_STATE}
      controller={true}
      layers={layers}
    >
      <StaticMap mapboxApiAccessToken={MAPBOX_ACCESS_TOKEN} />
    </DeckGL>
  );
}

export default App;

Does anyone, know why the app goes jittery what have or could I have missed?
I couldn't find anything on it.
It seems like it works in firefox and edge just not chrome, but I need it to work in chrome.  No extensions are enabled.


texts: How do I display dynamic map service in ESRI Flex Application?

texts:
I am working with ESRI's sample Flex viewer, and am having an issue with displaying our dynamic map service. I found this question on the site, but it hasn't helped me with my issue, so I thought I would try the question in a different form. I have added the url for my service to the operational layers tag in the config file, but the service does not display in the application.  The code is below.  My dynamic map service is in NAD 83.  From what I've read I should be able to display a dynamic map service on top of a tiled map service, as long as the tiled base layer is the first layer loaded in the map. I guess my main question is what am I missing?

<map initialextent="-8936000 4149000 -8751000 4256000" wkid="102113" top="40">
    <basemaps>
        <layer label="Streets" type="tiled" visible="true"  alpha="1"
                    url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>
        <layer label="Aerial"  type="tiled" visible="false" alpha="1"
                    url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"/>
        <layer label="Topo"    type="tiled" visible="false" alpha="1"
                    url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/>

    </basemaps>
    <operationallayers>
        <layer label="Moore" type="dynamic" visible="true"  alpha="1"
                            url="http://servername/ArcGIS/rest/services/test_map/MapServer"/>
        <layer label="Boundaries and Places" type="tiled" visible="false"
               url="http://server.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places_Alternate/MapServer"/>
    </operationallayers>
</map>


texts: How to add or remove layers using ArcGIS API for JavaScript?

texts: I want to use javascript and dojo to add and remove layers.


texts: Converting QGIS 3.6 Templates for use in QGIS 2.18?

texts:
How do I convert QGIS 3.6 Templates for use in QGIS 2.18?

I have found plenty of stuff on converting the opposite way around.


texts: Feature Class Unique Fields For ESRI Collector Survey

texts:
I have a suite of empty feature classes I use for ESRI Collector surveying. They are in a FGD. I want the PhotoID field in my Photos feature class to contain unique records, so fieldworkers don't keep accidentally re-using numbers. I am having a lot of trouble establishing this.
Any suggestions how to best do this?


texts: Measure tool has disappeared/not showing up

texts:
i am trying to measure distance in mine, everything worked fine until yesterday when suddenly the measure box didnt show up, thereforr i cant see the results.

As you can see on the picture, the measure line can be seen, but not the results. As i said, everything worked fine until yesterday.

Any help?


texts:
I tried to export a track as GPX for my Garmin using QGIS. Here you can see the result:

The original Track is saved as PostGIS multiline. I exported the track by "Save As" -> GPX, WGS84 (default options).

Whats the reason for that and whats the right way to export a multiline as GPX?


texts: Total great circle distance along a path of points

texts:
I am looking for an SQL query that sums the distances between a series of points using PostGIS.

The situation is as follows:

I have 2 tables: tracks and points.
Points belong to a track and thus each points record has a track_id field.
Points also have geom field (in WGS84 = GPS coordinates) and a timestamp.

What I would like to do is calculate the total (geographically correct) distance for each track.

In orther words, I need a query that, when given a certain track_id, looks up all the points for that track, orders them by timestamp and than calculates the distance between each consecutive pair of points and sums these distances to give me the total distances of the track in question.


texts: How to add OpenSeaMap to QGIS QuickMapServices?

texts:
I'd like to add OpenSeaMap to QuickMapServices. Their wiki  http://wiki.openseamap.org/index.php?title=De:OpenSeaMap_in_Website has some usage examples and lists the following tile servers:

http://t1.openseamap.org/seamark/
http://tiles.openseamap.org/seamark/

But all attempts to configure these servers in QuickMapServices have resulted in layers that look like scrambled noise / confetti.


texts:
I'm trying to find a "standard" map projection for Brazil, by which I mean one that Brazilian users would be familiar with.

This is how Brazil maps look in Infogram, can anyone suggest which projection it might be?


texts: Differences between jpg and jpeg - tif and tiff in QGIS

texts:
I'm running QGIS 2.18.21 but this has been an issue in a few versions; is there any reason why QGIS offers both jpg and jpeg as well as tiff and tif options to export images?
Apart from being annoying (I've exported many files twice because the browser set to jpg doesn't show existing jpeg files) is there any good reason for these options?


texts: PostGIS: Get portion of length in polygon. Aggregate value by this portion

texts:
I have a table that has two points (made into a line) and a value per row. I have another table that is a grid that has a geometry and id per row. I'd like to aggregate the data in such a way that each grid geometry has the sum of the portion of values that are in each grid geometry.

this_bin_value = SUM[(Line length in this bin) / (Length of Line) * (Some Value) ]

Sort of like this:

SELECT
    grid.gid,
    grid.geom,
    sum(ST_Length(ST_Intersection(grid.geom,data.line)/ST_Length(data.line) * data.my_value
FROM
    geo.grid_rough LEFT JOIN data
ON ST_Intersects(grid.geom, data.line)
GROUP BY grid.gid;

Problem is I keep getting divide by zero when Point 1 == Point 2. Is there a better way to do this? I got this working a couple months back but, like an idiot, I didn't save the code and can't recreate it.

MORE INFO- In the hope that someone can figure this out from the first table:

The data table has Vehicle_ID, time and position in it. I'm using a window function to create time, lead(time), position and lead(position) on Vehicle_ID. The "value" I want to spread over the grid is (lead(Time) - Time) so that I can get "amount of time vehicles spent in grid(x,y)".


texts: Can rgdal use an external GDAL installation?

texts:
The README for rgdal contains the following text:

file.show(system.file("README", package="rgdal"))

  For additional drivers, users of the CRAN Windows and CRAN OSX
  binaries can either convert to an available GDAL driver externally,
  read using CRAN rgdal binary - here you factor out mismatches,
  especially 32/64-bit questions among others, and can check the stages of
  the workflow. You can script the first step in R through system(). The
  PATH environment variable will need setting correctly to detect the
  external software properly.

But I can't find more detail about how to accomplish this, or what is entailed in setting the PATH environment variable "correctly".

I realize that rgdal binaries exist, but I need access to the PostgreSQL/PostGIS driver, so the internal GDAL that is statically linked is insufficient.


texts: To Reduce zoomDuration value defined in zoomMethod in OpenLayers.js

texts: How do I override zoomMethod so that i can reduce the zoomDuration value from 20(Default) to 2?


texts: Applying ArcGIS Field Calculator on New Records?

texts:
I'm using the Field Calculator in ArcMap 10.1 to populate a field with a string version of an existing integer field.  This is working correctly on existing data.

I am looking for a way to have that field populate on new records.

Is it possible to have the Field Calculator automatically populate a field based on a calculation?


texts: Ordnance survey boundary line .shp files?

texts:
I would like to make a shapefile of Great Britain's counties.

I have downloaded the boundary-line data from ordnance survey:

The unzipped file appears to contain two file types: .lyr and .qml.

How do I convert one of these into the shp format, or where can I get hold of the shp equivalents?


texts:
I am looking to create unit tests for component below mainly on checking addLayer and removeLayer being called,
function App (()=>{
    const marker = useRef<L.Marker | undefined>( undefined);
    const fg : L.FeatureGroup<any> = fg();

    useEffect(()=>{
    var myIcon = L.divIcon({className:'my-div-icon',html:renderToStaticMarkup(<ArrowRight/>)});
    marker.current = L.marker([50.5, 30.5], {icon:myIcon});
     if(fg) fg.addLayer(marker.current);

Text
;

     return (){
    if(marker.current && fg)
    {fg.removeLayer(marker.current);}

    }
    },[fg]);

    });

RTL test:
const mockOnClick = jest.fn();
const mockAddLayer = jest.fn();
describe("Test Leaflet methods",()=>{
it("Test add Layer",()=>{
const {wrapper} = render (<App/>);
expect(wrapper.getByText('Text')).toBeTruthy();
expect(mockAddLayer).toBeCalled();
});
});

The above test is failing with
expect(jest.fn()).toBeCalled()
expected number of calls: >= 1
received number of calls: 0

It is possible to test fg.addLayer() and fg.removeLayer() are being called? I am a beginner in unit testing with leafletjs.


texts: Split point shapefile by date attribute using ArcGIS for Desktop?

texts:
I have a point shapefile composed of points created on a Garmin in 2012 and 2013.  They are in the format mm/dd/yyyy (there are other fields, but this is the one of interest).  I was wondering if there was a way that I could split them from one shapefile into two (one with all 2012 dates, one with all 2013 dates).

Could I just create another field and label it "1" for all the 2012 points and "2" for the 2013 points, and then split by attribute and delete the field when finished?

Which tool can I use?


texts: ArcGIS IOS not displaying all layers of a TPK file

texts:
I have an ArcGIS tpk file with 12 layers in it (Created a Tile package with 12 levels of detail). I used the tpk file as a local tiled layer and added it to my mapView but when i debug it, it seems that there were only 8 layers loaded in the tiled layer.

Is there a reason why it was only able to load 8 layers? Do i have to configure something?

Thanks.


texts: Inaccurate results when converting coordinates to EPSG:53004 with geotools and

texts:
I am not very well aquainted with geographic data, but I'm working on a student project, where I have to position points from GPS coordinates around Warsaw on a particular shapefile map. It came with a .PRJ file with WKT like this:

  PROJCS["Sphere_Mercator",GEOGCS["GCS_Sphere",DATUM["D_Sphere",SPHEROID["Sphere",6371000,0]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Mercator"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",0],PARAMETER["Standard_Parallel_1",0],UNIT["Meter",1]]

It appears to match EPSG:53004, as creating a transform from the WKT and the code gives the same results. Testing it on epsg.io gave me expected results. For Example (21.062044°, 52.273152°) gives (2341987.98976740, 6842001.69919374) which matches my data. Hovewer, when i try to do this the same in geotools in java, I get (5812509.302119869, 2381184.7122050473). When I Put the coordinates in a reverse order, like in the example, the result is (2341992.4375644685, 6808202.108284715) which is still significantly to the south.

I seek any solution or a different way to do this.

I don't really need the map do display nicely, so if there would be a way to transform the map itself so it matches the GPS data, even with an external program, it would also be a solution.

I used code like this:

import org.geotools.geometry.jts.JTS;
import org.geotools.referencing.CRS;
import org.locationtech.jts.geom.Coordinate;
import org.locationtech.jts.geom.Geometry;
import org.locationtech.jts.geom.GeometryFactory;
import org.locationtech.jts.geom.Point;
import org.opengis.referencing.crs.CoordinateReferenceSystem;
import org.opengis.referencing.operation.MathTransform;

public class Example {
    public static void main(String[] args){
        GeometryFactory gf = new GeometryFactory();
        try {

            CoordinateReferenceSystem outCRS = CRS.decode("EPSG:53004");
            CoordinateReferenceSystem inCRS = CRS.decode("EPSG:4326");
            MathTransform transform = CRS.findMathTransform(inCRS, outCRS, true);
            Point p = gf.createPoint(new Coordinate(52.273152,21.062044));
            Geometry g = JTS.transform(p, transform);
            System.out.println(g.getCoordinate());

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

Edit: The code is actually ESRI defined, geotools finds it under EPSG:53004 but it requires gt-epsg-extention plugin loaded.


texts: Getting different results of fullscreen mode in OpenLayers?

texts:
My original application is not viewing correctly (in all browsers) in fullscreen mode, which is OpenLayers 3 functionality. The problem is with that map  does not cover all of my screen and it still displays my header/sidebar/footer (but only with one color).

I have everyting positioned absolutely:

#map {
    position: absolute;
    top: 100px;
    right: 300px;
    bottom: 30px;
    left: 0px;
    opacity: 1;
    border-bottom: 2px solid black;
    border-top: 2px solid black;
}

#header {
    position: absolute;
    top: 0px;
    right: 300px;
    left: 0px;
    height: 100px;
    margin: 0;
    background-color: white;
    opacity: 1;
} ... etc for sidebar, footer...

ONLY FIREFOX fullscreen mode displays everything correctly, Chrome and explorer are not OK.

Is this the question of CSS?

Is this the question of fullscreen javascript API in browsers?

Is this Openlayers fullscreen mode bug?

There is an example of original application in windowed mode.

Firefox - version 34.0

There is an example of fullscreen in Internet explorer.

Internet explorer - version 11.0.9600.17416

and last is Google Chrome - Version 39.0.2171.71 m


texts: QGIS GeoTIFF layer styling - category labels

texts:
I've created a raster object x in R, which is a categorical classification. I've used levels(x) <- RAT with a properly formatted raster attribute table to give the categories names, and then used writeRaster to export to GeoTIFF.

Running gdalinfo on the tiff, I can see the categories in the band information. Looks like:

Band 1 Block=799x5 Type=Int16, ColorInterp=Gray
  Min=1.000 Max=5.000
  Minimum=1.000, Maximum=5.000, Mean=2.364, StdDev=2.147
  NoData Value=-9999
  Categories:
    0:
    1: typeA
    2: typeB
    3: typeC
    4: typeD
    5: typeE
Metadata:
  STATISTICS_MAXIMUM=5
  STATISTICS_MEAN=2.364214323665
  STATISTICS_MINIMUM=1
  STATISTICS_STDDEV=2.1472654314354

So that's great, but QGIS can't seem to access that category info when I'm styling the layer. Is that even possible? They should act as legend labels.


texts: Avoid scientific notation in custom grid labels in QGIS 3

texts:
In previous versions of QGIS I used this expression to make 3-figure coordinates for my maps:

substr(  @grid_number , length(  @grid_number ) -4,3)

At the 4000000 mark this used to give me a value of 000.

In this version of QGIS the value I get is 4e+.
All the other coordinates are correct.

Anybody knows why this happens or how I can remedy this?


texts:
This is my solution - I needed this as function, to use it in select-statement:

CREATE DEFINER=`root`@`localhost` FUNCTION `deg2utm`(`lat` FLOAT, `lng` FLOAT, `utmzone` INT)
    RETURNS text CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci
    LANGUAGE SQL
    NOT DETERMINISTIC
    CONTAINS SQL
    SQL SECURITY DEFINER
    COMMENT ''
BEGIN

# Konstruktor
#große Halbachse/äquator.Radius (a), kleine Halbachse/Polarradius (b), Abplattung (iflat), Abweichung (e, e1sq), Skalierungsfaktor (k0)
DECLARE a, b, iflat, e, e1sq, k0 FLOAT;

# r curv 2 (nu), delta Long (p. sin1)
DECLARE latitude, nu, v1, p, sin1 FLOAT;

#Calculate Meridional Arc Length
DECLARE S, A0, B0, C0, D0, E0 FLOAT;

#// Koeffizienten für UTM Koordinaten
DECLARE K1, K2, K3, K4, K5 FLOAT;

#andere Variablen
DECLARE longZone, latZone TEXT;
DECLARE val INT;

#UTM-Koordinaten
DECLARE utmhoch, utmrechts TEXT;

SET a = 6378137;
SET b = 6356752.3142;
SET iflat = 298.257223563;
SET e = SQRT(1 - POW(b / a, 2));
SET e1sq = e * e / (1 - e * e);
SET sin1 = 4.84814E-06;
SET k0 = 0.9996;
SET A0 = 6367449.146;
SET B0 = 16038.42955;
SET C0 = 16.83261333;
SET D0 = 0.021984404;
SET E0 = 0.000312705;

#Input is validated?
    IF lat < -90 OR lat > 90 OR lng < -180 OR lng >=180 THEN RETURN FALSE; END IF;

#Variablen setzen
    SET latitude = RADIANS(lat);
    SET nu = a / POW(1 - POW(e * SIN(latitude), 2), (1 / 2.0));

    IF lng < 0
    THEN SET v1 = FORMAT(((180 + lng) / 6.0) + 1, 0); ELSE SET v1 = FORMAT((lng / 6) + 31, 0);
    END IF;

    IF utmzone=32
    THEN SET v1=32;
    END IF;

    SET p = (lng - ((6 * v1) - 183)) * 36 / 100;
    SET K1 = A0 * latitude - B0 * SIN(2 * latitude) + C0 * SIN(4 * latitude) - D0 * SIN(6 * latitude) + E0 * SIN(8 * latitude) + k0;

    SET K2 = nu * SIN(latitude) * COS(latitude) * POW(sin1, 2) * k0 * 50000000;
    SET K3 = ((POW(sin1, 4) * nu * SIN(latitude) * POW(COS(latitude), 3)) / 24) * (5 - POW(TAN(latitude), 2) + 9 * e1sq * POW(COS(latitude), 2) + 4 * POW(e1sq, 2) * POW(COS(latitude), 4)) * k0 * (10000000000000000);
    SET K4 = nu * COS(latitude) * sin1 * k0 * 10000;
    SET K5 = POW(sin1 * COS(latitude), 3) * (nu / 6) * (1 - POW(TAN(latitude), 2) + e1sq * POW(COS(latitude), 2)) * k0 * 1000000000000;

    SET utmrechts = 500000 + (K4 * p + K5 * POW(p, 3)) ;
    IF utmzone=32
    THEN SET utmrechts= concat(32,utmrechts);
    END IF;

    SET utmhoch = K1 + K2 * p * p + K3 * POW(p, 4);
   IF lat < 0
   THEN SET utmhoch = 10000000 + utmhoch;
    END IF;
    SET utmhoch=FORMAT(utmhoch, 0);

RETURN utmrechts;
#RETURN utmhoch;
END


texts: QGIS Zonal Statistics (Variety) returns zero or keymap error depending on QGIS version

texts:
I need to calculate Variety of pixels for every polygon in a shapefile but the analysis returns zero.

Polygons are much bigger than a raster cell which is 10 m. Polygons are completely covered with raster cells. Raster cells have 8 categories - from 1 to 8 (reclassified aspect). No Data from original aspect raster were converted to 0 (at least this was set in a reclassification dialog). Polygons, raster and project have the same coordinate system (EPSG 5514) and are stored on a disk, no temp layers. Polygons have valid geometry with no errors. Raster is a geoTIFF.

I have searched all the questions with "Zonal stats returns zero or empty values", tried the solutions in there but with no luck. I have no idea what´s wrong.

The analysis doesn´t work for me in QGIS 3.10.4 LTR, the log says nothing wrong, it just doesn´t do what it should.
When I tried the same in QGIS 2.18 the analysis fails with a KeyError:

Any tips?


texts: How to export a IDW raster while keeping the search radius data

texts:
I want to export my IDW rasters that I made in ArcGIS to QGIS, however when I export my raster, the values are there but are no longer displayed. They are stored within each cell and are not incorporated in a IDW search radius.

How is it possible to make sure that I can create the same image as my original.

Original

Export version


texts: Getting address or location from Google Maps?

texts:
How can one get the street address and/or coordinates of any location on Google Maps with a minimum of fuss?

Google Calendar will spawn a window with a map to the location one specifies in the "where" field, however a lot of the time the location it picks is wrong. If you append the "where" with coordinates in the form of "Whitehorse Fish Ladder @60.69635,-135.0404" or use a street address it gets it right, but what if you don't have the address at the tip of your fingers?


texts: WFS with EPSG:3301 projection using Leaflet

texts:
I am adding WFS points to Leaflet map, but don't see them on the map, however in console I see that all points I wanted is here with all properties and geometries.
But the problem here is in projection I think.

So I define a projection like this

var crs = new L.Proj.CRS('EPSG:3301',
    '+proj=lcc +lat_1=59.33333333333334 +lat_2=58 +lat_0=57.51755393055556 +lon_0=24 +x_0=500000 +y_0=6375000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs',
    {
        resolutions: [
            1024, 512, 256, 128,
            64, 32, 16, 8, 4, 2, 1, 0.5
        ],
        transformation: new L.Transformation(1, -40500, -1, 7017000)
    });

Then define a map

var map = L.map('map', {
        layers: [hybrid,base,satellite],
        continuousWorld: true,
        maxZoom: 13,
        minZoom: 1,
        maxBounds: new L.latLngBounds([
            [56.42, 20.87],
            [60.9, 29.23]
        ]),
        crs: crs
    }
);

And then ask Geoserver for points

    var geojsonLayer = new L.GeoJSON();

function getJson(data) {
    console.log(data)
    geojsonLayer.addData(data);
}

$.ajax({
    url: "http://loom-gis.geo.ut.ee:8040/geoserver/ermas/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=ermas:testdata_geopnt&maxFeatures=50&outputFormat=text/javascript",
    dataType: 'jsonp',
    jsonpCallback: 'parseResponse',
    success: getJson

});

This is what I get in console:

Object {type: "FeatureCollection", totalFeatures: 36458, features: Array[50], crs: Object}

Could someone help me please?


texts: Adding description to layer package via arcpy

texts:
I am trying to add description to layer and then make a layer package of multiple files at once. Everything works just fine, but the formatting of description is just wrong.

I want to add new lines after each line. What i tried is adding \n, \r \n, '\n', '\r \n', \u000d, .

None of these are working.I simply ran out of ideas. In help there is nothing about the formatting.

files = arcpy.ListRasters()

name = "Hazard Index"

description = "Hazard Index  \
   \
   Ranges of depths for different level of hazard \
   \
   Depth (d)\
   \
   not flooded     No Hazard    0"

for file in files:
   raster_layer = arcpy.MakeRasterLayer_management (file, file[:-4])

   #raster_layer.name = file[:-4]
   arcpy.ApplySymbologyFromLayer_management(raster_layer, layer)

   lyr = arcpy.SaveToLayerFile_management (raster_layer, output + file[:-4] + ".lyr")

   raster_lyr = arcpy.mapping.Layer(str(lyr))

   raster_lyr.description = description
   raster_lyr.name = file[:-4]

   arcpy.PackageLayer_management(raster_lyr, output + file[:-4], "PRESERVE", "", "", "", "", "", "", summary, tags)
   print "Package created for: " + file
   os.remove(str(lyr))

result is (I did not copy all of the text here, but you get the idea)


texts: Finding data on how users interact with web GIS?

texts:
I’m developing a geospatial data viewer that connects to various services (WMS, WMTS). I have a server that clients connect to. When a client makes a request, I cache it on the server. However, I would like to start prefetching likely to be requested by the client tiles. In researching this I’ve come across many prefetching algorithms in research papers: Retrospective Adaptive Prefetch is a user driven algorithm that applies heuristics to recent user actions to determine what tiles need to be prefetched. Tile Prefetching Based on Previous k Movements prefetches tiles based on recent user movement. Distributed Caching System Based on Spatiotemporal applies a heuristic based on when user movements occurred.

The issue I’m running into is these all these algorithms require user interaction data to get started.

Is there a source that has user interaction data with GIS sources?

I know places like OpenStreetMap have data that shows the total amount each tile was accessed in a day, but they don’t share the user trace of accessing those tiles.

I’m working in Python and it’s possible I’ve missed some great package that does geospatial prefetching tile prediction. I seek any easy solutions like this.


texts: Reading netcdf sub variables and converting them to raster grid in R?

texts:
I want to open the fs variable which is under Retrieval category and convert that into raster grid.

library(ncdf4)
file <- "http://co2web.jpl.nasa.gov/thredds/fileServer/OCO-2/B7101Ar_r02/2014/09/06/LtCO2/oco2_LtCO2_140906_B7101Ar_150909171225s.nc4"

var <- nc_open(file,"Retrieval/fs")


texts: How to retain Field Name / Alias on Export of Table?

texts:
Is there a way I can modify the Field Name or to make him keep the Alias when a table is exported?

Or is there a way to keep the Alias instead of the Field Name, when exporting for example to .dbf ?

I want to be able to do this in ArcMap.


texts: gdal_translate GeoTIFF to NetCDF: values

texts:
I have a GeoTIFF file of sea ice concentration.

When I use gdal_info it gives a series of values like:

  Metadata:
      COLORINTERP=Palette   Color Table (RGB with 65536 entries)
      0: 9,60,112,255

1: 9,60,112,255

2: 9,60,112,255

3: 9,60,112,255

4: 9,60,112,255

5: 9,60,112,255

6: 9,60,112,255

7: 9,60,112,255

8: 9,60,112,255

9: 9,60,112,255

When I use gdal_translate to convert to netcdf:

gdal_translate -of netCDF test.tif test.nc

and I look at the values in the test.nc file I get:

  ...

  3662500 4187500 2540

  3687500 4187500 2540

  3712500 4187500 2540

  3737500 4187500 2540

  -3837500 4212500 0

  -3812500 4212500 0

  -1712500 4212500 16

  -1687500 4212500 0

  -1612500 4212500 36

  -1587500 4212500 48

  ...

My question is: When gdal_translate converts to NetCDF, what does the value in the third column represent?
Points that are equal to 2540 seem to be land cells, while points with 0 value are ocean cells.

Are points with value ranging from 0 to 1000 (where sea ice concentration exists) in per thousands? (i.e 100 = 10% sea ice concentration, 1000 = 100%?)

File test.tif: https://www.dropbox.com/s/dru7nygzglyh9hd/test.tif?dl=0

File test.nc: https://www.dropbox.com/s/nidn1rz38na5np5/test.nc?dl=0


texts: Select by attributes in feature layer changes original shapefile

texts:
I recognized something strange.
Currently I am working with the modelbuilder.
I have a shapefile, "Add a field" use the "Make feature Layer" tool and then "selecet by attributes" to select some attributes. Finally I use the "field calculator" to set in the new created field values for the just selected attributes.

Saving the feature layer through "copy features" it saves only the rows with the selected attributes with all the columns.

BUT

Having a look at the attributetable of my shapefile, which I converted into a feature layer, the performed calculation is in it! It changed my inputfile.

Is that supposed to happen? It is changing the original data - the Inputdata!


texts: Mapnik: Can you draw outline/ strokes on Polygon geometries?

texts:
My data consists of a lot of polygons which need to be outlined. Unfortunately I cannot find any option on the PolygonSymbolizer - and my LineSymbolizer seems to be without effect. Here is my stylesheet with the important parts being in ll3-4:

<Map background-color="transparent">
    <Style name="productStyle1">
        <LineSymbolizer stroke="#000000" stroke-width="10" stroke-linejoin="round" stroke-linecap="round"/>
        <PolygonSymbolizer fill-opacity="1" fill="#868CFF"/>
    </Style>
    <Layer name="productlayer">
        <StyleName>productStyle1</StyleName>
    </Layer>
</Map>

Is it not possible to draw outlines on polygons in Mapnik?


texts: Where can I find shapefiles for OECD Regions?

texts:
Does anyone know where shapefiles for OECD (Organisation for Economic Co-operation and Development) Regions might be found?

The regions are defined in this document:

http://www.oecd.org/regional/regional-policy/42392313.pdf (Warning: ~10MB file)

There is a screenshot from that document showing the regions in Ontario below.

Ideally, what I need is a way to link OECD regional identifiers (like 'CA3560' below) to places on a map I will create in QGIS. Strict boundaries would be nice, but they are not necessary -- geographic long / lat from the centre of each region would also work.

Thoughts?


texts: Global Basin Delineation Across Dateline

texts:
I'm trying to delineate all river basins on a global 1/16 degree grid.  The algorithm that the Basin tool in the Spatial Analyst Toolbox works well (fast) except it doesn't know how to handle the International Dateline (-180/180 degree line).  See example image below...

It is important that I process the entire globe at once because I need each basin to have a unique identifier.  Can anyone suggest a way of doing this?  I'd be open to modifying the Basin tool script if necessary and if I can get my hands on it.

I'm using ArcInfo 10.0 and all standard python tools.


texts: Network Analyst Vehicle Routing - Point Barriers not diverting route

texts:
I'm using network analyst in ArcMap 10.3 to do a vehicle routing problem (I have all the extensions). I have a depot location and an order point. I can run the tool and it will run the route along the road from the depot to the order location. However, I am trying to add a point barrier to the road to simulate a road closure.

When I place the barrier on the road and click "solve" it runs the route along the road right through the barrier as if the barrier is not even there.

I know this is a hard question to answer without seeing my data, but does anyone have suggestions for me to start troubleshooting?


texts: Is there a way to decrease redraws in ARCGIS?

texts: I'm using a huge database on arcgis desktop 9.3.1 and every time I do a pan/zoom I have to wait 0.5-1 minute for the whole database to redraw itself. Is there any way to decrease the amount of redraws ( like making the program redraw only once every five pan actions)?


texts: Determining if polygon not enclosed by other polygons

texts:
Does anyone know of a routine/function or transformer that would identify if a polygon is not fully enclosed/surrounded by other polygons?
The polygons have no gaps or slivers between them so if a certain section of polygon is not attached to another polygon then these are the ones I want to keep.
I am happy to use any of PostGIS/FME/QGIS I just cannot seem to find a function or transformer that would do it.
I have added a picture to help explain:

I am after the purple polygons and ignore the yellow ones as they are not fully enclosed by other squares


texts:
I need help with qgis flow path length.

I try to run the program and when I run the program I get a raster with 0 values, as input I'm using filled raster, I don't now if I'm doing something wrong or not but i can´t get any map.


texts: Why do the Natural Earth shapefiles like ne_110m_countries_admin_0.shp have a geometry-type POLYGON, while it should be MULTIPOLYGON (at least when I understand Understanding difference between Polygon and Multipolygon for shapefiles in QGIS? correct. E.g. USA48 + Alaska + Hawaii is Multipolygon)


texts: Shapes from different sources are offset

texts:
I am looking for a reliable shapefile of the Seoul Capital Area (SCA), comprising Seoul, Incheon and Gyeonggi-do provinces. One common source is GADM. However, the coastline is not up-to-date so I have found another source in Korea's NSDI (in Korean) which includes a more up-to-date coastline. (I attach the files, as they are not accessible outside Korea.)

However, I find that the datasets are substantially non-aligned, so I wonder if I have made a mistake or whether the problem lies in one of the sources. As can be seen on the map below, the GADM regions (black outline) display a significant shift to the south of the NSDI regions (red outline). The shift appears to increase in the eastward direction, westernmost Incheon being well aligned, which makes me suspect that this is a projection issue. Perhaps, the wrong CRS is being applied somewhere.

Here's my code:

library(sf)

#***1 GADM data processing***

#Load GADM shapefile
sca_gadm <- readRDS("gadm36_KOR_1_sf.rds") #class "sf" "data.frame"

#Subset SCA
sca_gadm <- sca_gadm[sca_gadm$NAME_1 %in% c("Seoul", "Incheon", "Gyeonggi-do"),]

#Flatten coordinate system
sca_gadm <- st_transform(sca_gadm, 5179)

#Remove Incheon outlying polygon error (courtesy of https://gis.stackexchange.com/a/359722/88704)

#Inspect coordinates of bounding box
(bb <- st_bbox(sca_gadm)) #class "bbox"
#xmin      ymin      xmax      ymax
#844186.2 1677674.0 1141187.7 2024763.7

#Add 50000 to ymin to make sure outlying area is outside coordinates
bb[2] <- bb[2] + 50000

#Crop SCA with bb polygon
sca_gadm <- st_intersection(sca_gadm, st_as_sfc(bb))

#***2 NSDI data processing***

#Dissolve NSDI sub-regions for comparison with GADM (courtesy of https://gis.stackexchange.com/a/361510/88704)

#Load, buffer, dissolve, reverse buffer: Seoul
sel_nsdi <- cbind(st_read("LARD_ADM_SECT_SGG_11.shp"), Name="Seoul")
sel_nsdi <- st_buffer(sel_nsdi, 35)
sel_nsdi$geometry <- st_union(sel_nsdi$geometry)
sel_nsdi <- st_buffer(sel_nsdi, -35)

#Load, buffer, dissolve, reverse buffer: Incheon
inc_nsdi <- cbind(st_read("LARD_ADM_SECT_SGG_28.shp"), Name="Incheon")
inc_nsdi <- st_buffer(inc_nsdi, 25)
inc_nsdi$geometry <- st_union(inc_nsdi$geometry)
inc_nsdi <- st_buffer(inc_nsdi, -25)

#Load, buffer, dissolve, reverse buffer: Gyeonggi-do
ggd_nsdi <- cbind(st_read("LARD_ADM_SECT_SGG_41.shp"), Name="Gyeonggi-do")
ggd_nsdi <- st_buffer(ggd_nsdi, 50)
ggd_nsdi$geometry <- st_union(ggd_nsdi$geometry)
ggd_nsdi <- st_buffer(ggd_nsdi, -50)

#Combine sub-regions into SCA
sca_nsdi <- rbind(sel_nsdi, inc_nsdi, ggd_nsdi)

#***3 Overlay GADM and NSDI regions***

#Both datasets share same EPSG:5179
st_crs(sca_nsdi, parameters=T)$epsg==st_crs(sca_gadm, parameters=T)$epsg

#Plot Overlaying regions
plot(sca_nsdi$geometry, border="red")
plot(sca_gadm$geometry, add=T)


texts: Get UTM coordinate from mouse click in ArcMap using ArcObjects?

texts:
I am using ArcObjects C# tool in ArcGIS that identifies map coordinates when a user clicks on a location within a map. Here's the code that I have used:

 protected override void OnMouseDown(MouseEventArgs arg)
    {
        Fr1.Show();

        IMxDocument pMxDoc =(IMxDocument)ArcMap.Application.Document;
        IPoint pPoint = pMxDoc.ActiveView.ScreenDisplay.DisplayTransformation.ToMapPoint(arg.X, arg.Y);
        MessageBox.Show("Map X: " + pPoint.X + "\nMap Y: " + pPoint.Y);
    }

My map use units of Meters so the tool displays the Meters coordinates. How can I have this tool return UTM ?


texts: ENVI 5.1 - ANN Classification - Background was classified into one of the class

texts:
I'm new to Remote Sensing and I'm having trouble in ENVI 5.1 where the background was classified as one of the classes in the ROI I used, which is not right. How can I exclude the background or at least make it classified as "unclassified". I've tried the trick in here, but it doesn't work. I've also tried to make and apply a mask into it, but it also doesn't work.

I'm using Landsat 8 OLI as my raster data and classic Neural Network as my classifier, here are the parameters I'm using:

Activation Method: Logistic (Sigmoid Function)
Training Threshold Contribution: 0.05
Training Rate: 0.1
Training Momentum: 0.05
Training RMS Exit Criteria: 0.001
Hidden Layer: 1
Iterations: 5000
Min Output Activation Threshold: 0.5


texts:
Is it possible to add a user-defined path to plugins outside of the standard paths at %UserProfile%\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins or C:\Program Files\QGIS 3.x\apps\qgis\python\plugins?

I am working with a team on a git package that includes a QGIS3 plugin.  It is highly impractical to develop the plugin outside of the git environment, performing commits, merges, pull, rebases, etc. on a git folder that is not the active plugin and transferring the changes back and forth between there and the plugin folder.  I have not been able to determine how - or if - I can set a reference somehow to the path on my computer where the local git files reside.


texts:
I am trying the following command to get info on the NDVI MODIS layer stored in HDF file. I always receive an error. the command and error as below: gdalinfo HDF4_EOS:EOS_GRID:MYD13A2.A2015297.h16v05.005.2015314081208.hdf:MODIS_Grid_16DAY_1km_VI:1 km 16 days NDV

error:
FAILURE: Too many command options.


texts: Colour a polygon depending on the number containing of point feature

texts: I have 2 different shape files, polygon and points.I am using QGIS 2.14 as a software. The points are distributed inside of the different polygon shapes. I try to do a categorized map using different colours depending of the number of points inside each polygon:


texts: Importing UK Land Registry data into Quantum GIS

texts:
We have purchased data from the UK Land Registry to import into Quantum GIS however when I do so using the Coordinate referencing systems of OSGB 36/ British National Grid (EPSG:27700) the data appears to be stretched compared to our existing paper OS maps.

I assume that I have a setting somewhere which is incorrect but being new to GIS and Quantum GIS I do not know where to look. Can anyone help?


texts: How to delimit hinterland boundaries among multiple city centers?

texts:
I need to delimit city boundaries basing on centers'magnitude. CenterA's employment/CenterB's employment = (Distance from centerA to break-point E/Distance from centerB to break-point E)^2. AB=AE+BE.

I have multiple centers. I need to create a buffer-like irregular boundary to delimit adjacent cities. And how do i illustrate the influence among non-adjacent cities?

Is there any tools that I can use in ArcGIS 10 to do this?


texts: "Session has expired" Problem in Geoserver as WAR in Tomcat

texts:
I have Geoserver installed as WAR in Tomcat. My html/openlayers files are served from the www folder of /webapps/geoserver/data and I had "beautiful moments" experiencing WMS from there.

The problem is this: Each time, after working nicely and smoothly for only minutes, GeoServer user interface becomes too slow and get blocked. When I want to edit sth I get msg like "The session has expired..." So I need then to force the "org.apache.catalina.bootstrap" to quit as it doesn't respond to "/Library/Tomcat/bin/shutdown.sh" command, then I restart it "/Library/Tomcat/bin/startup.sh". This didn't happen before, but I don't know what I did that caused such thing.

Also I don't think it's related to WFS because I've tried this and it worked fine:


texts: Regenerate Geowebcache Tiles on PostGIS change

texts: I am using Geoserver with Geocache to get WMS tiles and a PostGIS backend. There are 2 systems using the PostGIS database: one that is with Geoserver and one that is an old system that just uses the database. All changes made to the geometry using either system need to cause the tiles to be recreated, and we can't change the code in the old system. I think I need to use a trigger in PostGIS. I understand how to create the trigger, but how do I make it regenerate the tiles that include the point that was changed?


texts:
I have a geojson file in UTM coordinates (WGS_1984_UTM_Zone_39N) and I'm trying to load it via openlayers.

I have the below code and it's working with long/lat coordinates but not with UTM:

proj4.defs('ESRI:53009', '+proj=moll +lon_0=0 +x_0=0 +y_0=0 +a=6371000 ' +
    '+b=6371000 +units=m +no_defs');

// Configure the Sphere Mollweide projection object with an extent,
// and a world extent. These are required for the Graticule.
var sphereMollweideProjection = new ol.proj.Projection({
    code: 'ESRI:53009',
    extent: [-9009954.605703328, -9009954.605703328,
        9009954.605703328, 9009954.605703328],
    worldExtent: [-179, -89.99, 179, 89.99]
});

var map = new ol.Map({
    keyboardEventTarget: document,
    layers: [
        new ol.layer.Vector({
            source: new ol.source.Vector({
                url: 'countries.json',
                format: new ol.format.GeoJSON()
            })
        })
    ],
    target: 'map',
    view: new ol.View({
        center: [0, 0],
        projection: sphereMollweideProjection,
        resolutions: [65536, 32768, 16384, 8192, 4096, 2048],
        zoom: 1
    })
});

new ol.Graticule({map: map});

My geojson file:

{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[241247.75229999982,3356026.0593],[241247.52570000011,3356022.5901999995],[241266.4857999999,3356003.4778000005],[241253.77740000002,3355990.8706],[241240.8663999997,3356005.2499],[241228.51240000036,3355995.1236000005],[241214.33559999987,3356010.1105000004],[241241.2714999998,3356034.1602999996],[241247.75229999982,3356026.0593]]]},"properties":{"RefName":"15"}},

I did a search and found that I have to use 'ESRI:32639', but it's still not working.

I'm totally new on web GIS and openlayers and I don't understand what is wrong in my code.


texts: Feature move animation in OpenLayers 3.11.2

texts:
I'm looking for a way to re-use the technique underneath this OpenLayers example but I don't really understand its structure, especially this part:

// This long string is placed here due to jsFiddle limitations.
// It is usually loaded with AJAX.
var polyline = [
'hldhx@lnau`BCG_EaC??cFjAwDjF??uBlKMd@}@z@??aC^yk@z_@se@b[wFdE??wFfE}N',
'fIoGxB_I\\gG}@eHoCyTmPqGaBaHOoD\\??yVrGotA|N??o[N_STiwAtEmHGeHcAkiA}^',
'aMyBiHOkFNoI`CcVvM??gG^gF_@iJwC??eCcA]OoL}DwFyCaCgCcCwDcGwHsSoX??wI_E',
'kUFmq@hBiOqBgTwS??iYse@gYq\\cp@ce@{vA}s@csJqaE}{@iRaqE{lBeRoIwd@_T{]_',
'Ngn@{PmhEwaA{SeF_u@kQuyAw]wQeEgtAsZ}LiCarAkVwI}D??_}RcjEinPspDwSqCgs@',
'sPua@_OkXaMeT_Nwk@ob@gV}TiYs[uTwXoNmT{Uyb@wNg]{Nqa@oDgNeJu_@_G}YsFw]k',
'DuZyDmm@i_@uyIJe~@jCg|@nGiv@zUi_BfNqaAvIow@dEed@dCcf@r@qz@Egs@{Acu@mC',
'um@yIey@gGig@cK_m@aSku@qRil@we@{mAeTej@}Tkz@cLgr@aHko@qOmcEaJw~C{w@ka',
'i@qBchBq@kmBS{kDnBscBnFu_Dbc@_~QHeU`IuyDrC_}@bByp@fCyoA?qMbD}{AIkeAgB',
'k_A_A{UsDke@gFej@qH{o@qGgb@qH{`@mMgm@uQus@kL{_@yOmd@ymBgwE}x@ouBwtA__',
'DuhEgaKuWct@gp@cnBii@mlBa_@}|Asj@qrCg^eaC}L{dAaJ_aAiOyjByH{nAuYu`GsAw',
'Xyn@ywMyOyqD{_@cfIcDe}@y@aeBJmwA`CkiAbFkhBlTgdDdPyiB`W}xDnSa}DbJyhCrX',
'itAhT}x@bE}Z_@qW_Kwv@qKaaAiBgXvIm}A~JovAxCqW~WanB`XewBbK{_A`K}fBvAmi@',
'xBycBeCauBoF}}@qJioAww@gjHaPopA_NurAyJku@uGmi@cDs[eRaiBkQstAsQkcByNma',
'CsK_uBcJgbEw@gkB_@ypEqDoqSm@eZcDwjBoGw`BoMegBaU_`Ce_@_uBqb@ytBwkFqiT_',
'fAqfEwe@mfCka@_eC_UmlB}MmaBeWkkDeHwqAoX}~DcBsZmLcxBqOwqE_DkyAuJmrJ\\o',
'~CfIewG|YibQxBssB?es@qGciA}RorAoVajA_nAodD{[y`AgPqp@mKwr@ms@umEaW{dAm',
'b@umAw|@ojBwzDaaJsmBwbEgdCsrFqhAihDquAi`Fux@}_Dui@_eB_u@guCuyAuiHukA_',
'lKszAu|OmaA{wKm}@clHs_A_rEahCssKo\\sgBsSglAqk@yvDcS_wAyTwpBmPc|BwZknF',
'oFscB_GsaDiZmyMyLgtHgQonHqT{hKaPg}Dqq@m~Hym@c`EuiBudIabB{hF{pWifx@snA',
'w`GkFyVqf@y~BkoAi}Lel@wtc@}`@oaXi_C}pZsi@eqGsSuqJ|Lqeb@e]kgPcaAu}SkDw',
'zGhn@gjYh\\qlNZovJieBqja@ed@siO{[ol\\kCmjMe\\isHorCmec@uLebB}EqiBaCg}',
'@m@qwHrT_vFps@kkI`uAszIrpHuzYxx@e{Crw@kpDhN{wBtQarDy@knFgP_yCu\\wyCwy',
'A{kHo~@omEoYmoDaEcPiuAosDagD}rO{{AsyEihCayFilLaiUqm@_bAumFo}DgqA_uByi',
'@swC~AkzDlhA}xEvcBa}Cxk@ql@`rAo|@~bBq{@``Bye@djDww@z_C_cAtn@ye@nfC_eC',
'|gGahH~s@w}@``Fi~FpnAooC|u@wlEaEedRlYkrPvKerBfYs}Arg@m}AtrCkzElw@gjBb',
'h@woBhR{gCwGkgCc[wtCuOapAcFoh@uBy[yBgr@c@iq@o@wvEv@sp@`FajBfCaq@fIipA',
'dy@ewJlUc`ExGuaBdEmbBpBssArAuqBBg}@s@g{AkB{bBif@_bYmC}r@kDgm@sPq_BuJ_',
's@{X_{AsK_d@eM{d@wVgx@oWcu@??aDmOkNia@wFoSmDyMyCkPiBePwAob@XcQ|@oNdCo',
'SfFwXhEmOnLi\\lbAulB`X_d@|k@au@bc@oc@bqC}{BhwDgcD`l@ed@??bL{G|a@eTje@',
'oS~]cLr~Bgh@|b@}Jv}EieAlv@sPluD{z@nzA_]`|KchCtd@sPvb@wSb{@ko@f`RooQ~e',
'[upZbuIolI|gFafFzu@iq@nMmJ|OeJn^{Qjh@yQhc@uJ~j@iGdd@kAp~BkBxO{@|QsAfY',
'gEtYiGd]}Jpd@wRhVoNzNeK`j@ce@vgK}cJnSoSzQkVvUm^rSgc@`Uql@xIq\\vIgg@~k',
'Dyq[nIir@jNoq@xNwc@fYik@tk@su@neB}uBhqEesFjoGeyHtCoD|D}Ed|@ctAbIuOzqB',
'_}D~NgY`\\um@v[gm@v{Cw`G`w@o{AdjAwzBh{C}`Gpp@ypAxn@}mAfz@{bBbNia@??jI',
'ab@`CuOlC}YnAcV`@_^m@aeB}@yk@YuTuBg^uCkZiGk\\yGeY}Lu_@oOsZiTe[uWi[sl@',
'mo@soAauAsrBgzBqgAglAyd@ig@asAcyAklA}qAwHkGi{@s~@goAmsAyDeEirB_{B}IsJ',
'uEeFymAssAkdAmhAyTcVkFeEoKiH}l@kp@wg@sj@ku@ey@uh@kj@}EsFmG}Jk^_r@_f@m',
'~@ym@yjA??a@cFd@kBrCgDbAUnAcBhAyAdk@et@??kF}D??OL'
].join('');

http://openlayers.org/en/v3.11.2/examples/feature-move-animation.html

How can I put my own data into the polyline variable?
How could I use directly a GeoJSON or a KML file to do so?


texts: Apply Style to raster through QGIS Processing

texts:
I have to apply style(qml file) to raster . I am doing this with Qgis processing script ,

 import processing
 input ='E:/data/input.tif'
 style_layer='E:/data/newStyleqgis.qml'
 output_file = 'E:/data/abcde.tif'
 processing.runalg("qgis:setstyleforrasterlayer", input,style_layer)

but their is not a option to generate output, style is set but not applied.

  ALGORITHM: Set style for raster layer
  INPUT <ParameterRaster>
  STYLE <ParameterFile>
  OUTPUT <OutputRaster>

is their any option to save it with the style loaded raster or to pass output as a parameter ,so it will save at path specified.
Using the script from c# program.

Updates Script :

  from PyQt4.QtCore import *
  from qgis.core import *
  import qgis.utils
  import processing
  layer = "E:/data/abc.tif"
  output = "E:/data/xyz.tif"
  fileInfo = QFileInfo(layer)
  baseName = fileInfo.baseName()
  filename ='abc.tif'
  rlayer = QgsRasterLayer(filename, baseName)
  # Define the minimum extent of the region
  style_layer='E:/data/newStyleqgis.qml'
  processing.runalg("qgis:setstyleforrasterlayer", layer, style_layer)
  extent = rlayer.extent()
  xmin = extent.xMinimum()
  xmax = extent.xMaximum()
  ymin = extent.yMinimum()
  ymax = extent.yMaximum()
  width =  rlayer.width()
  height =  rlayer.height()
 renderer = rlayer.renderer()
 provider= rlayer.dataProvider()
 crs = rlayer.crs().toWkt()
 pipe = QgsRasterPipe()
 pipe.set(provider.clone())
 pipe.set(renderer.clone())
 file_writer = QgsRasterFileWriter(output)
 file_writer.writeRaster(pipe,width,height,extent,layer.crs())

showing error :NoneType' object has no attribute 'clone'


texts: Copy/pasting QGIS features between two layers with linestringZ() geometry gives linestring()

texts: I'm puzzled: when I copy-paste a feature with linestringz() geometry to another layer I get linestring() and the elevation attribute is lost. Although when I paste to a text editor I see a linestringz(). Can anybody please tell why I see this behavior? Addendum: both layers have linestringz() geometry type. The file I'm copying to, is saved as geojson.


texts: Use output of Add Field as input for Calculate Field in ModelBuilder

texts:
I have created a simple model in ArcGIS 10 which, after some initial processing of a feature class, outputs outputfc and adds a field to it. Regardless of the feature class input (which the user specifies), the field newField that is added is always the same. I then need to do some calculations in this newly added field, but because I know this field will only have the name that I specified, I select outputfc as the input table for Calculate Field, and an input variable field with the name of the field newField as the value.

This works fine to achieve the outcome I want, but if I allowed the user to specify the name of the added field, how would I connect this to the next Calculate Field process?


texts:
When I load a TanDEM GeoTIFF in ER Mapper, the coordinates of the cells are correct, i.e. the top left corner is the correct Lat/Long. When the same data are loaded in QGIS, the cells are all moved by 1/2 cell width (45m). The centre of the cell is the correct Lat/Long, not the corner.

I have checked the metadata for TanDEM, and each dataset should fit in an exact 1 degree square, so ER Mapper is correct, not QGIS.

I have to Warp the data in the same projection, with the correct XY max/min specified. When I reproject the data from WGS to UTM the error comes back, so I have to reproject again.

This looks like a bug in QGIS, as I can not find anywhere that allows me to specify cell centre or cell corner. This possibly needs to be an option to add unless someone can point me to an immediate solution. Am I missing an option somewhere?


texts: Does render caching in QGIS save permanently or is it only temporary?

texts:
I know there are a few questions similar to this on the forum such as:
Is the QGIS cache directory automatically created? and Can QGIS cache a PostGIS layer for faster rendering?

but I am still struggling to understand how the caching of shapefiles, geopackages, rasters and PostGIS works in QGIS.

Is the caching a temporary thing that isn't permanently stored in the user .qgis2 file path, and if so are there plans for this to be a thing in future releases?


texts: Quickest Way to Calculate Land Area by Grid Cell in PostGIS

texts:
I have a grid vector table that covers the entire world and want to calculate the land area within each grid cell using another table that contains a single polygon for all continents.

I tried the following query:

CREATE TABLE ch01.cell_area AS SELECT ogc_fid, a.gid, xcoord, ycoord, "col", "row", area, wkb_geometry
    FROM ch01.priogrid AS a
      LEFT JOIN (SELECT a.gid, ST_Area(ST_Intersection(a.wkb_geometry, b.wkb_geometry)::geography) AS area
                 FROM ch01.grid AS a, ch01.landmass AS b
                 WHERE st_intersects(a.wkb_geometry, b.wkb_geometry)) AS e
        ON a.gid = e.gid;

However this is very slow. I interrupted the procedure after around 8 hours. The query plan looks as follows:

Hash Left Join  (cost=34.13..38314.90 rows=70953 width=168)
Hash Cond: (a.gid = a_1.gid)
->  Seq Scan on priogrid a  (cost=0.00..2360.53 rows=70953 width=160)
->  Hash  (cost=33.83..33.83 rows=24 width=166)
      ->  Nested Loop  (cost=4.33..33.83 rows=24 width=166)
          ->  Seq Scan on landmass b  (cost=0.00..1.01 rows=1 width=32)
          ->  Bitmap Heap Scan on priogrid a_1  (cost=4.33..32.80 rows=2 width=134)
                Recheck Cond: (wkb_geometry && b.wkb_geometry)
                Filter: _st_intersects(wkb_geometry, b.wkb_geometry)
                ->  Bitmap Index Scan on gd_geom_idx  (cost=0.00..4.33 rows=7 width=0)
                      Index Cond: (wkb_geometry && b.wkb_geometry)

I am using Postgis 2.3/Postgres 9.6.0 as local host on a relatively new macbook pro (2.8 GHz, 16 RAM).

I will need to speed things up as much as possible, because I am planning to do a series of these calculations. I have already indexed the geometry columns (using a brin index on the grid table). I am aware that intersections are costly, but I don't see how I can avoid them in this particular case.

I also tried this method (described here), but this does not seem to be much faster:

CREATE TABLE ch01.cell_area
AS SELECT a.gid,
 CASE WHEN st_intersects(a.wkb_geometry, b.wkb_geometry)
   THEN ST_Area(ST_Intersection(a.wkb_geometry, b.wkb_geometry)::geography)
 ELSE NULL END AS area
 FROM ch01.priogrid a
 LEFT JOIN ch01.landmass b
   ON st_intersects(a.wkb_geometry, b.wkb_geometry);

I am pretty new when it comes to improving query performance in general so any ideas on how I can do this are most welcome!


texts: Why does arcpy.TableToDomain_management require exclusive schema lock?

texts:
I'm talking about arcpy.TableToDomain_management, ArcGIS Server 10.2

It seems that this function requires exclusive SDE database schema lock. Something that we can't accept.

We have ESRI domains but we want to extend them with additional attributes. (I think we are not alone doing this). So when user updates our "extended domains" we store values to our tables and then update domains by invoking our tbx with python code that simply calls TableToDomain_management.

That fails because exclusive SDE database schema lock can't be acquired because other users have the database open (in arcmap, mostly on web).

It's strange because first natural guess was to test if we can edit domains in arccatalog while other users have the sde database open. No problem: we could.

So why does arcpy.TableToDomain_management lock SDE DB?
Do you know any NIMs, hotfixes, ets. that can help us?

More details.

The guy with ArcGIS 10.1 tells that it happens only if he runs it on server, e.g. published sd (service definition file). If he runs it on 32 bit desktop (arcmap, arcatalog), tbx file is used of course, he doesn't get schema lock.

== Edit 1

How do we update domains (or given the issues: How do we want to update domains)? Plain code-value domains; no magic here. User story below.

Web user that has (enough) administrative rights edits domain values (not codes). (S)He also deletes unnecessary code-value pairs. And also adds new code-value pairs.

Therefore we use TableToDomain_management, not AddCodedValueToDomain_management.


texts: openlayers multiple layers with different projection

texts:
My page contains two layers: 1. Open Street Map as a basic layer and WMS layer from mapserver as a overlay layer. My map show this two layers but in a wrong position. I spent a lot of time trying everything but it doesn't work. I changed mapfile and file to EPSG4326 projection but it doesn't work to.
This is my mapfile

MAP
IMAGETYPE   "png24"
EXTENT     20.682299 52.148211 21.078846 52.337025
UNITS DD
SHAPEPATH "C:\ms4w\Apache\htdocs\projekt3\dane"
SIZE 800 600
DEBUG ON
FONTSET "C:\ms4w\Apache\fonts\fonts.txt"
PROJECTION
'proj=longlat'
'datum=WGS84'
'no_defs'
END
IMAGECOLOR 255 255 255
IMAGEQUALITY 95
IMAGETYPE png

OUTPUTFORMAT
NAME png
DRIVER 'GD/PNG'
MIMETYPE 'image/png'
IMAGEMODE RGBA
EXTENSION 'png'
END

SYMBOL
NAME "circle"
FILLED true
TYPE ellipse
POINTS 1 1 END
END

LAYER

NAME kilometraz_popr
DATA kilometraz_popr
STATUS ON
DUMP false
TYPE POINT
TRANSPARENCY 100
 EXTENT 458986.052854 392913.684787 757412.357297 535008.411398
PROJECTION
'proj=tmerc'
'lat_0=0'
'lon_0=19'
'k=0.9993'
'x_0=500000'
'y_0=-5300000'
'ellps=GRS80'
'towgs84=0,0,0,0,0,0,0'
'units=m'
'no_defs'
END
CLASS
    STYLE
     SYMBOL "circle"
     SIZE 7.0
     OUTLINECOLOR 0 0 0
     COLOR 90 23 223
    END
END
END

LAYER

NAME etykiety
DATA kilometraz_popr
STATUS ON
TYPE annotation
PROJECTION
  "init=epsg:2180"
END
LABELITEM OPIS_KM
TRANSPARENCY alpha
CLASS
    LABEL
        COLOR    0  0  0
        FONT  arial
        #BACKGROUNDCOLOR 255 255 255
        ENCODING "CP1250"
        TYPE  truetype
        SIZE  7
        POSITION  AUTO
        PARTIALS  FALSE
        BUFFER  5
        OUTLINECOLOR  255  255  255
        ANTIALIAS true
    END
END
END
END

My index.html file is below:

<html lang='pl'>
<head>
<meta charset='utf-8' />
<title>Wawa</title>
<script type='text/javascript' src='OpenLayers.js'></script>
<script src="proj4js-combined.js"></script>
<script type='text/javascript'>
var map;
function init() {
        epsg4326 = new OpenLayers.Projection("EPSG:4326");
        epsg900913 = new OpenLayers.Projection("EPSG:900913");
        epsg2180 = new OpenLayers.Projection("EPSG:2180");
var option = {
    projection: new OpenLayers.Projection("EPSG:900913"),
    displayProjection: new OpenLayers.Projection("EPSG:4326")
};
       map = new OpenLayers.Map('mapa', option);

olmapnik = new OpenLayers.Layer.OSM("OpenStreetMap Mapnik",    "http://tile.openstreetmap.org/${z}/${x}/${y}.png");
map.addLayer(olmapnik);
map.setBaseLayer(olmapnik);

var warstwa_wektor = new OpenLayers.Layer.MapServer("OpenLayers Mapserver", "http://localhost/cgi-bin/mapserv.exe", {map: 'C:/ms4w/map/map_test1.map', layers: 'kilometraz_popr', srs:'EPSG:4326', projection:epsg900913,
isBaseLayer: false,
    visibility: true, transparent: true, format:'image/png'}, {opacity: 1});
map.addLayer(warstwa_wektor);

map.addControl
(new OpenLayers.Control.Scale());
map.addControl(new OpenLayers.Control.Navigation());
map.addControl(new OpenLayers.Control.MousePosition());
map.addControl(new OpenLayers.Control.PanZoomBar());
map.addControl(new OpenLayers.Control.SelectFeature());
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.addControl(new OpenLayers.Control.Permalink());

extent = new OpenLayers.Bounds(19.50,51.50,21.50,52.7).transform(new  OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:900913"));
map.zoomToExtent(extent,5);
}

</script>
</head>

<body onload='init();'>
<div id='mapa' style='width: 800px; height: 400px;'>
</div>
</body>
</html>

Please tell you me my mistake.

Yes I know what I should do. I really greatfull for your yelp. My main mistake was projection. I use 3857 and everything works. Thank you very much


texts: Openlayers 3 Cluster Strategy not projecting properly

texts:
My Openlayers map is not displaying clustered points properly and I'm not sure why. My code is pretty simple and straight forward, here it is:

JSfiddle: http:// jsfiddle.net/1z5zyu4d/13/)

 <!doctype html>

<link rel="stylesheet" href="http://openlayers.org/en/v3.5.0/css/ol.css" type="text/css">

<title>AIS Map</title>

Cluster map of ships broadcasting AIS data

I'm basing this heavily off of the examples here: https:// openlayersbook.github.io/ch05-using-vector-layers/example-02.html and here: http:// openlayers.org/en/v3.2.0/examples/cluster.html. The problem I'm having is that the cluster shows up as one point centered at (0,0) like this. Upon zooming in, the cluster expands, as it should. What's weird though(besides it not mapping it right in the first place) is that when you zoom in the points are projected like this. The points are projected to the same locations they should be as if that one single tile is being treated like the whole world. The real locations of the points looks like this: http:// imgur.com/TLARMra. See how the x/y locations of the ships when overlayed on the whole world are the same as the x/y locations when overlayed on that one tile.  There's a few less points on the one with boat icons but you can see the clusters around China, France/Germany, and the Eastern US coast all translate to the incorrect projection, along with all the others that are on both maps(The cluster data has a few more points than the non cluster data added for testing specific cases). So I'm almost positive that this is an issue with projection EPSG, etc. but I think I've tried every EPSG code in all different combinations(like including the projection in the layer itself caused the layer to not appear) to no avail. Firebug gives me no errors and it says ol.js is loading fine along with the ol.css. So basically I don't know what is causing this and I don't know how to fix it.

I would also like to mention that I'm using OL3 and specifically 3.2

My GeoJSON looks like this:

 {
"type": "FeatureCollection",
"features":[
{
    "type": "Feature",
    "geometry": {
        "type": "Point",
        "coordinates": [
            0.13138,
            49.4756
        ]
    },
    "properties": {
        "MMSI": "227006760",
        "NAVIGATION STATUS": "0"
    }
},//...about 30 of those^
]
}

Working jsfiddle, still the same problem http:// jsfiddle.net/1z5zyu4d/13/


texts: MODIS AQUA Data - Stacking / Mosaic data with python GDAL

texts:
Is there a way to use the GEO data contained in a HDF4 file so one could look at the same area over many years?

Hence, can an area be cut out of the data and how?

I plotted MODIS Data and as you can see below the river moves downwards (rectangular structure top left corner). So over a whole year it's not the same location that I'm observing.

There's a directory in the subdatasets called Geolocation Fields with Long and Alt directories. So is it possible to access this information or lay it over the data to cut out a specific area?

For example, If we take a look at the NASA picture below would it be possible to cut it between 10-15 alt. and -5 to 0 long.

You can download a sample file by copying the url below:

https://ladsweb.modaps.eosdis.nasa.gov/archive/allData/6/MYD021KM/2009/034/MYD021KM.A2009034.1345.006.2012058160107.hdf


texts: Distance between two points within a polygon (or raster value) in R

texts:
I'm trying to get the shortest distance between each point in a a set of coordinates (lat/long) within a body of water. However, straight line distances don't work because the points represent the movement of an animal, and the body of water is curved. Thus, straight line distance results in impossible movements overland.
Is there anyway to get the distances within the boundaries of the polygon (shapefile)? Or is there a function that will calculate distance within a specified value of a raster (or ignoring NA) such that I can set the entire body of water to one value, the land to another, and it will calculate the distance only within the value for the water?
I have quite a few data sets that I need to do this for, so I really need a way to quickly process them automatically.
What function would work would this?
This is the same problem that was described here, but I am trying to do it in R not QGIS
Calculating shortest distance between points within polygon using QGIS?


texts: Trigger - Calculate area of a layer inside feature

texts:
I'm trying to create a trigger to auto-fill a field of a table in postGIS based on two polygon layers geometry. I'm using QGIS for geometry updates.

The first layer (lotes) has bigger polygons and the second one (areaconstruida) has smaller polygons completaly contained in one polygon of first layer.

CREATE OR REPLACE FUNCTION area_constr()
RETURNS trigger AS
$BODY$
BEGIN
NEW.areaconstr := sum(ST_area(st_intersection(NEW.geom,public.areaconstruida.geom)))
from public.areaconstruida, public.lotes
where ST_intersects(NEW.geom,public.areaconstruida.geom);
RETURN NEW;
END;
$BODY$
LANGUAGE plpgsql;

CREATE TRIGGER area_constr BEFORE INSERT OR UPDATE ON public."lotes"
 FOR EACH ROW EXECUTE PROCEDURE area_constr();

But the results I'm receiving are much bigger than expected. Anyone can help-me to find where is the error in my code?


texts:
I have created a number of cloudmade maps which I use in my opensource webstack using OpenLayers.

I have been asked if the cloudmade maps could also be shown in ArcMap 9 or 10, but have not seen any way to be able to do this?

Does anyone know if this is possible with a normal ArcGIS Desktop (ArcView) licence?


texts: Remove empty geometries from geodataframe

texts:
Since geopandas can't perform overlay/intersection with lines, I found a workaround:

import geopandas as gpd
import fiona
from shapely.geometry import shape, MultiPolygon, LineString, MultiLineString

lines = gpd.read_file('lines.shp')
polyons= gpd.read_file('polygons.shp')
pol_f = fiona.open('polygons.shp')

pol_shp = MultiPolygon([shape(x["geometry"]) for x in pol_f])

lines2 = lines.geometry.apply(lambda x: x.intersection(pol_shp))
lines2.to_file('lines_int.shp')

But it does not let me because there are the empty geometries are GeometryCollections.

I tried this to filter, but it won't work.

lines3 = lines2[lines2.geometry != np.nan]
lines3 = lines2[lines2.geometry == LineString]
lines3 = lines2[lines2.geometry == LineString()]
lines3 = lines2[lines2.geometry == MultiLineString()]
lines3 = lines2[lines2.geometry == MultiLineString]
lines3 = lines2[lines2.geometry != GeometryCollection]

Any ideas?


texts: Making point move to right or left using ArcObjects?

texts:
I want to make a point and the point can move to the right or to the left. To make the point I can handle it , but I can already confused in the movement of the point.

This code for draw point

public void DrawPoint(ESRI.ArcGIS.Carto.IActiveView activeView, System.Int32 x, System.Int32 y)
    {
        if (activeView == null)
        {
            return;
        }

        ESRI.ArcGIS.Display.IScreenDisplay screenDisplay = activeView.ScreenDisplay;
        screenDisplay.StartDrawing(screenDisplay.hDC, (System.Int16)ESRI.ArcGIS.Display.esriScreenCache.esriNoScreenCache);
        ESRI.ArcGIS.Display.ISimpleMarkerSymbol simpleMarkerSymbol = new ESRI.ArcGIS.Display.SimpleMarkerSymbol();
        ESRI.ArcGIS.Display.ISymbol symbol = simpleMarkerSymbol as ESRI.ArcGIS.Display.ISymbol;
        screenDisplay.SetSymbol(symbol);
        ESRI.ArcGIS.Display.IDisplayTransformation displayTransformation = screenDisplay.DisplayTransformation;
        ESRI.ArcGIS.Geometry.IPoint point = displayTransformation.ToMapPoint(x, y);
        screenDisplay.DrawPoint(point);
        screenDisplay.FinishDrawing();
    }


texts: Determine tile identity of tile set displayed on Google Maps/OpenStreetMap

texts:
I'm not sure if this is best way of approaching this, so I will explain where I'm coming from first.

I want to load data onto my webpage containing a map based off a lat/long point. The only way I know how to do this is to constantly be getting the a lat/lng point in the displayed map. Obviously this isn't very efficient since I either need to keep track of this point, or constantly be polling it. Each time I had the updated this point, I'd have to do some sort of processing to determine it's map location, which would add even more inefficiency. When I had that, I could then proceed to load my data.

My idea was that if I could pull down an id of map tiles of a particular region at a set zoom level, then I wouldn't need to do the crazy/complicated lat/lng processing. But, my stumbling block is that I don't know of any way this is possible.


texts: Field parameter in Modelbuilder - empty?

texts:
I have built a model, as input parameter I have a 2 parameters: a Feature Layer and a Field
But when I run the model, the Field-Parameter has no values to select.
How can I tell the model builder, that I want the Fields from the selected Feature Layer as values in the Field parameter?


texts: How to reproduce Smoothing from Generalizer Plugin in v.generalizer in Processing Toolbar using QGIS?

texts:
I´d like to reproduce the smoothing operations done with the Generalizer Plugin inside the v.generalizer Toolbox so I can use them on a polygon layer instead of only on a line layer.

I tried different values for different settings but I just don´t see how to get the same results using the v.generalizer algorithm in the Processing toolbar.

Simply said: To which values in the v.generalizer algorithm window do the settings I see in the generalizer plugin correspond to?

Here are the settings I´d like to use and the results I get:

1)  Hermite

2)  Chaiken

Now in the v.generalize windows there are so many options and values but nothing there is named the same as the ones in the generalizer plugin…

I hope you can help me, I´m also grateful for hints to other ways to smoothen my polygons in a way that produces results similar to those in the pictures above.

I tried using the v.generalizer toolbox after reading these two question:

Is there a QGIS bezier curve tool?

Is there a way to render lines with a smooth (bezier) curves in QGIS?

I'm using QGIS 2.4.


texts:
Is it possible to add Cartodb map in the Qgis2web plugin in Qgis?

I tried but I couldn't choose CartodB maps like a basemap


texts: HERE Isoline API V8 doesn't account for traffic

texts:
I am playing with HERE Isoline API v8.4.0 and it works pretty well. The documentation mentions that setting departureTime parameter will include traffic in isochrone calculation. However, the results returned for me have the exact same geometries for any given times (tested in Berlin, Warsaw times 5AM and 5PM). The requests are properly structured. Anyone else knows this problem?
Example parameter values:
'departureTime': '2021-01-03T17:00:00'
'departureTime': '2021-01-03T04:15:00'


texts: Adding records to existing attribute table but labelled points will not visibly appear?

texts: I am a relative newcomer to ArcGIS. I am adding records to an existing attribute table (basically coordinates of towns) but after I save they do not appear on my map desktop. They are entered as points.


texts: Calculate distance between two coordinates along lines

texts:
I have a map with two layers: a map of the streets of Montevideo, and a map of shops with the lat long location. I would like to calculate the distance between each shop and the nearest one, along the streets (not a line between the locations).

Is there any tool that could help me with this? I am using gvSIG.


texts: How to autocollapse featuregrid table (OpenGeo Suite SDK Client)

texts:
I was working on the OpenGeo Suite tutorials to develop web applications using Geoexplorer. When I launched Geoexplorer from dashboard, I could see readily available 'query' tool embeded there along with other tools. When I click query tool, I can see a collapsible table at the bottom along with  with query tool. Here is the screenshot,

Fifure: 1

Now I followed the tutorials to build complete application using SDK client. Tutorials say about making a 'Featuregrid' which is not collapsible as shown in the upper image (Figure : 1). Also they did not include query tool using SDK client. I write the following code to add query tool,

{
  ptype: "gxp_queryform",
  featureManager: "states_manager",
  outputConfig: {
    title: "Query",
    width: 320
  },
  actionTarget: "map.tbar"
}

Now I can see query tool on ly map toolbar. But if I select this, I don't see any collapsible table, but only the query box. Here is the screenshot:

Figure : 2

My question is , how can I implement a query tool using SDK client that will also output a collapsible table like in Geoexplorer (Figure:1). And can I auto  hide the featuregrid table in Figure 2?


texts: Adjusting map pointer image to exact location?

texts:
I am trying a add map pointer image when the user clicks on the map . I was unable to drop the image at the exact location of the click. Instead, the center of the image is at the location not the bottom of it . How do I readjust such that I get the map pointer to it .

 coordinateGraphic = new esri.Graphic(globalCoordinate, new esri.symbol.PictureMarkerSymbol("./images/mappointer.png", 15, 35));
    globalMap.graphics.add(coordinateGraphic);


texts: DEM Reconditioning / Stream Burning with ArcHydro

texts:
I have a specific question concerning ArcHydro. I'm using ArcGIS 10.4.1.
My goal is to burn water/streams (a shapefile) 2 meters into a DEM that I have acquired from USGS (see image).

The cell size of the DEM is 30, Columns is 518, Rows is 620.

What would be appropriate values in order to lower the streams 2 meter?

Stream Buffer (Number of Cells)
Smooth drop/raise (DEM z-unit)
Sharp drop/raise (DEM z-unit)


texts: Geoserver :Is it possible to cluster polygons in sld?

texts:
Is that even possible?

This is my work area:

And I want this to be clustered when I zoomed out. Like this:


texts: OpenLayers dynamically label polygon segments

texts:
My requirement is to show dynamic label on polygon feature's segments with some offset. The label text should have the rank of each segment. If it is a square which starts at top left corner it will look as

     1
  -------
  |      |
 4|      |2
  |      |
  --------
     3

Can anyone give me some pointers in achieving this using OpenLayers?


texts:
I have a collection of points in a .CSV which are currently in OSGB36 and have been through the OSTN02 transformation.

I would like to put them through the OSTN15 transformation in bulk, using the CSV as a source.

I've read that one way to do it is OSTN02 - ETRS89  - OSTN15.

I have been struggling to find a way to do this efficiently with minimal chance for human error.  I have used Grid InQuest and Grid InQuestII but these do not give me an output in a usable format, the same was said for OS' online batch transformer.

I only have access to , ArcMap 10.2, FME up to 2016.1, QGIS  2.16.1, Python (anaconda distribution).


texts: I want to use a drop-down menu to select a province from an array in Google Earth Engine

texts:
I have an array of provinces that I want to be able to select from a drop-down in Google Earth Engine. However, it keeps returning the following error message:
"Items must be a string or an object containing a label and value property."

I want to be able to use the selected province as the boundary for time series graphs later in the function. Does anyone know why I get this error message?

//Create filters for each province

var Blekinge =
     table.filter(ee.Filter.eq('Prov_name','Blekinge'));

var Dalarna =
    table.filter(ee.Filter.eq('Prov_name','Dalarna'));

var Norrland =
    table.filter(ee.Filter.eq('Prov_name','Norrland'));

var Gotland =
    table.filter(ee.Filter.eq('Prov_name','Gotland'));

var Medelpad =
    table.filter(ee.Filter.eq('Prov_name','Medelpad'));

var Provinces3 = [Blekinge, Dalarna, Norrland, Gotland, Medelpad];

//Province selection

var panel = ui.Panel();

panel.style().set({
width: '400px',
position: 'top-left'
});

Map.add(panel);

//Add drop-down selection for the provinces
var aoi = panel.add(ui.Select({

  items: Provinces3,

}));


texts: Remote sensing software options for creating structure footprints from aerials

texts:
As shown in screen shot here, just wondering what other software options for creating polygons based on structure footprints are available.

Something cheaper than ENVI but still versatile would be ideal. Typically need a swath of about 1000 feet on either side of polyline ranging from 1 to 1000 miles.

It has been about a year since a similar question was asked and thought there might be some new technology around now.

same screen shot as in above link attached here:


texts: How to change the symbology of the layer with python script in ArcGIS?

texts:
Possible Duplicate:
  Change Symbology of layers from within ArcMap

I need to write a script to change the symbology of the layer. I've read all the topics about symbology in ArcGIS-help and still haven't find the solution. I made my own symbol in Corel, imported it to ArcGIS then I made a layer file (.lyr)..

ArcGIS help says:
" When a model is run from its tool dialog box, you can specify how model outputs are to be symbolized when added to the ArcMap table of contents. This can be performed in two ways:

Using a layer symbology file
Using the Apply Symbology From Layer tool"

So I need to do it by the first method.  There is also topic "Setting output symbology in scripts" (I guess its nearly that what I'm trying to do). It says:

Set the symbology of the output.

#   output    = the output value
#   params[2] = the output parameter
#
params = arcpy.GetParameterInfo()
desc = arcpy.Describe(output)
if desc.shapeType == "Polygon":
    params[2].symbology = "c:/Tools/Extractor/ToolData/polygon.lyr"
elif desc.shapeType == "Polyline":
    params[2].symbology = "c:/Tools/Extractor/ToolData/polyline.lyr"
else:
    params[2].symbology = "c:/Tools/Extractor/ToolData/point.lyr"

I can't understand that. How to use it. The layer I want to change the symbology of is named "Three" so in the place of (output) I have to choose this layer... but what next? If I only have a layer with one kind of shape (point)

Can somebody help me? ( I have no idea about creating the scripts :) )


texts:
QGIS 2.14.1 opened .ECW files simply via the open raster menu, without any problems. In 2.14.3, the entire ERDAS Compressed Wavelets option has disappeared from the file type drop down, and QGIS returns an error if opening an .ECW is attempted.

How do I open a .ECW file now, in 2.14.3? Have the capabilities been removed or do I need to follow a new technique?


texts: Can I use a QGIS geometry in a Python PostGIS query?

texts:
I have a "Python Init function" for the attribute form in QGIS, which is called when I add a new geometry.

I can access the geometry of the newly created feature like this

geom = feature.geometry()

Now, can I use this geometry in a PostGIS query, like for ST_Intersects?

Regards,
tkr


texts: How to show neighboring polygons and polygon in which point exists

texts:
We have a table which has polygon related data stored.

For finding if a point (long,lat) is within that polygon I am using following query in mysql

SET @vasantKunjSectorC =  'polygon((77.161266 28.546614, 77.16029 28.545304))';
CREATE TABLE poly (g polygon);
insert into poly values (GeomFromText(@vasantKunjSectorC))
select * from poly

select * from poly where st_within(point(77.143780, 28.539104), g); -- should return 1 record
select * from poly where st_within(point(77.125835, 28.541724), g); -- shouldn't return any record

I have following question related to some of the scenario depicted from the diagram below:

You can assume that the data in the poly table is like:

1- If the point lies in society 6 then my query should return society 6 and neighbouring societies (with in some km radius defined by user).

2- It should not return Area A (which is also a polygon).


texts:
I'm trying to get GeoNetwork working but no success. Here is the workaround I did to install GeoNetwork :

Install Tomcat
Download geonetwork.war
Deploy the war inside Tomcat
/geonetwork folder created
Run http://localhost:8080/geonetwork

It took several minutes to render this error :

This XML file does not appear to have any style information associated with it. The document tree is shown below.

<apiError>
runtime_exception
<description>Handler dispatch failed; nested exception is java.lang.OutOfMemoryError: Java heap space</description>
<message>NestedServletException</message>
</apiError>

Can't figure out what may cause this error.


texts: SQL expression to select specific month across years

texts:
What is the ArcGIS SQL expression to select all rows containing the month of May across several years?

Desired records highlighted in Excel:

The source table is in a file geodatabase and I'm using ArcGIS Pro v2.2.4.

Attempts so far

I tried using the wildcard characters for strings listed in the Pro SQL reference but they (unsurprisingly) yield "invalid syntax" error:

SAMPLE_DATE = date '%-05-%'
SAMPLE_DATE = date '__-02-__'

KB article How To: Search for specific parts of a date stored in a Date-Time field offers EXTRACT(MONTH ...) = nn but that returns zero records.

EXTRACT(MONTH FROM SAMPLE_DATE) = 05


texts: Transform Coordinates from Mercator to Local Coordinate System using ProjNet

texts:
What i am trying to accomplish is essentially i have a mapbox static image, and i'm trying to project from the center of that map to a local coordinate system.

So i have the center longitude and latitude, and the center is also at (0,0) in the local coordinate system, but when trying to move an object that is associated with a GPS coordinate i cannot figure out how to implement projNet to convert from Mapbox's EPSG:3857 to a local coordinate system using ProjNet.

The goal is to make it look like the object is moving around on the static image map.

The documentation is severely lacking https://projnet.codeplex.com/ and their FAQ skip key steps in which i cannot reverse engineer to figure out what they are doing.

I would even accept more pseudocode on what needs to happen, i am just not able to figure this out.


texts: Adding shape of defined dimensions in metres on an WGS84 ellipsoid using PyQGIS in QGIS 3.4

texts:
How can I place the shape of defined dimensions (in metres, 5000m X 2000m) measured around the WGS84 ellipsoid at a location on the ellipsoid (51 degrees N 2 degrees W)?

Joseph provided a very thorough answer to a previous question (link below) clarifying how QGiS makes measurements. This helped me to form this question.
Adding shape of defined dimensions using PyQGIS in QGIS 3.4


texts: Request WFS data using GeoServer's viewparams with PyQGIS?

texts:
Using PyQGIS how can I request WFS data using GeoServer's viewparams request parameter?

I can use the viewparams request parameter to obtain the filtered WFS data I require via my web browser but not via PyQGIS.

The below returns the results I require via a browser and this appears to  be valid WFS GML
(Where <LDS_API_KEY> is the auth key generated by registered users via https://data.linz.govt.nz/. Please let me know if you can help and don't want to register and perhaps I can generate a temporary key to share)

https://data.linz.govt.nz/services;key=<LDS_API_KEY>/wfs?
SERVICE=WFS&VERSION=2.0.0&
REQUEST=GetFeature&
TYPENAMES=data.linz.govt.nz:layer-53353-changeset&
viewparams=from:2018-12-23T01:41:20.703998Z;to:2018-12-30T01:46:55.913620Z

via PyQGIS when trying to create a WFS vector layer with the same URL with the viewparams I get a invalid layer:

url = 'https://data.linz.govt.nz/services;key=<LINZ_API_KEY>/wfs?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAME=data.linz.govt.nz:layer-53353-changeset&viewparams=from:2018-12-23T01:41:20.703998Z;to:2018-12-30T01:46:55.913620Z'
layer = QgsVectorLayer(url, 'test', 'WFS')
layer.isValid()
>>> False

How can I request my WFS data with a viewparams filter?


texts: Grouping points by attributes from field with possibly many values

texts:
I have a shapefile "cities" with one unique city_id for each city (geometry polygon, although not relevant here) :

city_name ; city_id
New-York  ; 0001
Paris     ; 0002
London    ; 0003

And a shapefile "points" (geometry single point), each with a unique point_id, and a field possible_city containing a string of at least one or more city_id (if more than one, they are separated by "-") :

point_id ; possible_city
p1       ; 0001
p2       ; 0002
p3       ; 0001-0002-0003
p4       ; 0001-0003

I am aware this is a terrible method for simulating a 1-n link compared to a true database system; however I am stuck with these shapefiles.

I would like to create an atlas for each city_id, with every point mentioning that city_id in the possible_city field. For that I need to create a coverage layer with one feature for every city_id (polygon or multipoints does not matter for me).

Following this question I tried creating a virtual layer. However I seem to be unable to link the cities.city_id and points.possible_city fields. Here is what I tried :

SELECT st_union(p.geometry) as geometry, c.city_id
FROM points p, cities c
WHERE '%'||p.possible_city||'%' LIKE c.city_id
GROUP BY c.city_id ;

I wonder if I should use a JOIN and/or a WHERE clause here. I feel this other question may be useful too, however my problem seems to lie in the fact that I am trying to link two shapefiles with two fields in this weird, non-database-approved way.

Feel free to edit the question of the post for added clarity.