Questions tagged [php]
PHP is a Server-Side Scripting language designed initially for web programming, but is also used as a general-purpose programming language.
341
questions
0
votes
0
answers
20
views
Openlayer map disappears after returning a PHP request through events
I generated an OpenLayers map using the 'QGIS2WEB' plugin in QGIS.
I am working on a program that, depending on the coordinates where the user clicks, will send them to a PHP controller. The ...
0
votes
0
answers
83
views
Converting EPSG:3346 to WGS84
I am trying to work with some coordinates which are in EPSG:3346 format. Now my understanding is that if I want to do something with these coordinates in Google Maps API, the format i need is WGS84 (...
1
vote
1
answer
345
views
PHP library to get center of the polygon center
I have the folloging example GeoJSON data stored in a PostgreSQL PostGIS database:
{"geoJSON":{"type":"Feature","properties":[],"geometry":{"type&...
1
vote
0
answers
75
views
Save WMS layer directly on the server every day
I use PHP, PostGRES and GeoServer with OpenLayers and I have a WMS layer that is loaded from an external URL in GeoServer.
I would like to be able to somehow save the layer received from the external ...
0
votes
0
answers
52
views
convert exif of a photo to a lower version?
I am using wordpress, and I found that the exif_read_data() PHP function cannot read the GPS info in exif from Images with Exif Version 2.32 , but it can read from Exif Version 2.20. Is there any ...
0
votes
0
answers
112
views
Call current position in onEachFeature leaflet
How can I call my current location inside onEachFeature in Leaflet.
It's working outside but I just want to call it inside L.Controler.Layers.
var cauayan = L.geoJSON(cauayan, {
onEachFeature: ...
0
votes
0
answers
118
views
Create a PostGIS table through HTML, PHP and the GeoServer REST API through a specific script
I need to create a HTML page that allows for creating a new PostGIS table in a specific database, through the GeoServer API. So I'm specifically interested in the Creating a PostGIS table part of this ...
0
votes
1
answer
206
views
Recovery GPS information with exif_read_data (php)
I am struggling to understand the EXIF feedback produced by my camera.
Indeed in the Latitude and Longitude fields I receive a figure in this form:
Latitude: 4294967295/341858021
Longitude: 4294967295/...
1
vote
1
answer
202
views
Access forbidden during the installation of the Lizmap server on Windows
How can I successfully install Lizmap? I have exhausted all the means of research without success. In fact, for more than a week I have tried to install lizmap on Windows. At the step of the Apache ...
1
vote
0
answers
117
views
Is it possible to "copy" one layer from WMS and create another WMS only with this layer automatically?
I'm using Lizmap and QGIS to create WMS service with multiple layers. Now I need to find a way to create WMS containing only one layer that the 'main' WMS contains.
Is there any way to do it without ...
1
vote
0
answers
244
views
How to calculate the daylight saving time given a latitude and longitude [closed]
I've been using an algorithm (https://gist.github.com/assaflavi/fc8cf83c167558ebf3ab159b5c5b0df2) to calculate sunrise and sunset times given a latitude and longitude and it works fine but this ...
3
votes
2
answers
281
views
"Unsupported GeoJSON type" from AJAX request to PostGIS database
I'm trying to use a GeoJSON to build a layer on an OpenLayers map of MultiPolygons from my PostGIS database.
However the following error is thrown:
Uncaught Error: Unsupported GeoJSON type: undefined
...
0
votes
1
answer
188
views
GeoServer StoreDefinition - "Markup im Dokument nach dem Root-Element muss ordnungsgemäß formatiert sein."
I try to set up a GeoServer WFS-rerouting using a local PHP script that creates the GetCapabilities-document which should then be interpreted by the GeoServer.
I get the following error: (german)
&...
1
vote
1
answer
184
views
How to format PostgeSQL query results in PHP to return GeoJSON object?
I'm building a small map application with Leaflet and PostGIS. I'm having an issue similar to this post where using pg_fetch_all is returning the data I want, but buried in an associative array.
When ...
1
vote
1
answer
113
views
Location Based KNN script on Leaflet works for Chrome but other browsers and mobiles cause parse error - invalid geometry
As many of you know I have been producing a Leaflet map with a KNN function to show the closest pubs to a user's location.
Live example to test for yourself: https://ces-web2.southwales.ac.uk/students/...
1
vote
2
answers
2k
views
How to output GeoJSON file from MySQL database shapefile?
I have a MySQL spatial database ('mydb') of one table ('tst'), I mean by spatial. I need to output the GeoJSON file from this spatial MySQL table. I downloaded geoPHP library and also MySQL to GeoJSON ...
0
votes
0
answers
138
views
Getting a GeoServer created style to Leaflet markers via PHP
How can I use a point/marker style created on GeoServer within my Leaflet map when I am drawing data from the server using PHP.
I am currently PHP to draw geodata from my GIS server, however I would ...
-1
votes
1
answer
1k
views
GeoJSON custom marker for different data sources
I need help how to show markers with two different colors for two different GeoJSON data sources.
Here's first source geojson.php:
{
"type": "FeatureCollection",
"...
0
votes
2
answers
548
views
Dynamically load data from a GeoJSON
I ask a new question about the problem I have, because I tried it but I don't know how to solve it.
(I'm learning OpenLayers, and I see that it isn't that easy).
Using a html select, I run a PHP query ...
1
vote
1
answer
1k
views
Unsupported GeoJSON type
I run a query and I get a GeoJSON file, but when I try to load the file into the map, I get the error that it's an Unsuported GeoJSON type.
this is the PHP file that generate GeoJSON :
$element = $...
0
votes
1
answer
2k
views
Saving data of Leaflet Draw using PHP into MySQL
How do I insert Leaflet Draw coordinates in the MySQL database with id longitude-latitude columns?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8&...
1
vote
1
answer
775
views
Call marker color in Geojson to apply to leaflet.js in php
I have a geojson file which has marker-color properties in it.
In this case I want to call the marker color contained in the GeoJSON file, to change the marker color.
how to do this?
GeoJSON data:
...
1
vote
0
answers
139
views
GeoJSON cluster, group points with the same id
I want to make a cluster with a GeoJSON, to obtain the file I query a table in PostgreSQL and I save the file. The same point can have several associated images, but according to the GeoJSON, it makes ...
2
votes
1
answer
404
views
How to calculate Night Flight time for a given flight between 2 locations?
I am currently working on a project (web app) at university to be able to calculate the amount of time spent during night flying. Currently, I have, Departure Lat and Long and Departure Time in UTC ...
0
votes
0
answers
72
views
Plot something on lat long in PHP
Is there some sort of plotting system which lets you do this? (in PHP):
ex. plot(lat,long,data_show_onhover)
My CSV file that I want to plot on the map looks like this:
something,something,something,...
0
votes
0
answers
579
views
Installing QGIS Server on existing Apache/PHP on Windows 10
Using OSGeo4W installer, I installed QGIS server while having already Apache/PHP on my computer. And I got this message: The requested URL was not found on this server when I tested the QGIS Server ...
1
vote
0
answers
147
views
Binding Popup from database to a marker
I am trying to add popup to markers from database. Markers are showing unable to add title to popup.
function add_markers(coordinates) {
var geojson = (saved_markers == ...
1
vote
1
answer
202
views
SELECT * will not work with table containing geodata
The following will not run... I get ORA-00932 error every time..
$sql = 'SELECT * FROM app.table_1';
however, this will work (specifying a column name, i.e. objectid):
$sql = 'SELECT objectid FROM ...
1
vote
0
answers
516
views
Ogr2ogr: how to add values to a database column
So I have my table named ppb_curp with the following columns
ogc_fid | name | description | wkb_geometry |curp | zip_code
Then I insert the KML file in my PostGis base with ogr2ogr
ogr2ogr -f ...
2
votes
1
answer
251
views
ogr2ogr error loading KML file in PostGIS with PHP
So I have a KML file that I want to save to my PostGIS database,
Currently I have the following code using PHP:
$file = $request->file("item");
$name = time();
$name = $name . '.' . $...
1
vote
0
answers
417
views
Loading google maps API from php file [closed]
I've been trying to load some GeoJSON data into a map, using Google Maps API.
When I save my file as .html the map shows up just fine, and it shows the data I want to see (a Linestring). I'm using ...
1
vote
1
answer
448
views
Open QGIS project using PHP command
We are using a intranet geoloket (html). I would like to share some QGIS projects using PHP.
This is the code I start with:
header("Content-disposition: attachment; filename=MapInQgis.qgz");&...
0
votes
1
answer
354
views
Getting meters from pgr_dijkstra
I imported http://download.geofabrik.de/europe/germany/baden-wuerttemberg.html into my PostgreSQL database which supports PostGIS.
Now I wrote a PHP script which gets two points (lon, lat, which are ...
2
votes
1
answer
460
views
Updating PostgreSQL database with PHP language
I want to update the text information contained in my database for a specific layer. This layer is called via a WFS stream.
At first I displayed my layer with an Overlay with OpenLayers, and with a ...
1
vote
1
answer
14k
views
PHP: Call to undefined function pg_connect() with MS4W for PostgreSQL
I am trying to add dynamic interactions with my PostgreSQL 12 database to my web page with the PostGIS extension that I use with PgAdmin 4. I use an Apache web server that I installed with MS4W. For ...
1
vote
0
answers
273
views
how to put the data on the map from database
I wanted to display a polygon with the coordinated on my map and each time i click the button.
This is my database:
I get the data from the database with php
$sql = "SELECT * FROM ...
1
vote
1
answer
6k
views
How to display the GeoJSON from PHP on the map?
I am using MapboxGLJS. I retrieve the coordinates from my database and I put it in GeoJSON format on PHP which look like this:
<?php
$sql = "SELECT * FROM waypoint";
$...
0
votes
0
answers
67
views
Reading GeoJSON from external file in Leaflet [duplicate]
I found the following script on the web but I don't know how to change the way to read JSON code.
In the script the JSON code is included in a var called sitec but I need to read that code from an ...
2
votes
2
answers
898
views
Loading points from an array given by PHP query from MySQL db to OL
New to OpenLayers and JS in general. I have some coords stored as lat long, then PHP script which load these points from MySQL db and simply print it as follows:
var points = [[49.66356869941062, 16....
1
vote
0
answers
53
views
CARTO update existing table from external MySQL database
I would like my Carto data to be updated, using external data (MySQL database, I run and manage locally using PHP scripts), so that the Carto table gets updated with the most recent data, whenever the ...
0
votes
0
answers
150
views
Using PHP on Webservers and PostgreSQL
I'm creating a general webapp that is displaying data from a Postgres database hosted on Digital Ocean.
My problem is that I can't get the PHP script to run on my webserver(hosted by Hostgator) to ...
0
votes
1
answer
780
views
Use PHP form to insert geometry from WKT into SQL Server 2017
I have a PHP 7.3 form that asks the user for a Name, a WKT and an SRID. I would like to upload the WKT and SRID to SQL Server 2017 so that it creates a geometric object in Upload_WKT_Test using ...
1
vote
1
answer
992
views
Openlayers: Using PHP and npm
I've got a rather large MySQL database containing polygons (coordinates) and their additional properties (e. g. text labels in different languages). I would like to use PHP to connect to my database ...
1
vote
1
answer
938
views
On change filter Leaflet
I want to make dynamic filter on Leaflet, but I got a little problem.
so first this my dropdown:
<select id="selc">
<option value="baik">baik</option>
<option value="sedang">...
1
vote
0
answers
77
views
Count points that are within certain radius within a polygon
I have 4 table, I want to count police that are within 5km of a point (dam), schools and clinics within 3km same dam. So far I do get the results if I'm focusing on one table
$str = pg_query($conn, "...
1
vote
0
answers
300
views
Problem with loading big data (GeoJSON) via PHP
I have a problem with loading (big) data via PHP from a spatial database. I let run this project on a localhost Apache Server.
From a data count of about 30.000 edges I get an error
VM885:1 Uncaught ...
1
vote
0
answers
76
views
Display all trajectories location along with dummy location
I'm trying to display the all trajectory location on Google map along with dummy location. I have tried to display dummy locations with sample location and it works fine, but when I try to connect to ...
1
vote
1
answer
368
views
Leaflet Foreach point in GeoJSON check Distanceto
So I was wondering how I can get the points from the
GeoJSON located here.
and then for each of them separately check if the distance of Markers is within 5 meters range of these. I have tried but ...
0
votes
0
answers
142
views
ArcGIS map with basemap toggle and simplemarker pointer
I am using ArcGIS map which gives me an error:
Below is my function which i am using to implementing the map on my
application:
function handlerForVariableB (latt, longt, complaintid)
{
// ...
2
votes
1
answer
2k
views
Show points (layer) from PostgreSQL database on OpenLayers map
I have this code, I want to load a collection of points stored in a table in PostgreSQL database, I retreive the GeoJSON format succesfully, but the points never show up on the map!
The three files ...