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.

Filter by
Sorted by
Tagged with
1
vote
1answer
891 views

Display Geojson data from PHP API (http://localhost/sample.php) on google map

I have PHP API (http://localhost/api.php) that gives data in GeoJSON format, how can I show that GeoJSON data on Google map ? Dragging & Dropping GeoJSON data on map is not allowed.
0
votes
1answer
828 views

Plotting lat long on World Map [closed]

I have lat long coordinates of various merchant ships of the world, say 50000. And I have around 100 instances of coordinates (lat long) of each of these ships at various timestamps. I have them on ...
0
votes
1answer
855 views

Display geojson on WMS images in openlayers 3

Here actually am trying to achieve multipolygon on wms layer in openlayers 3. In this i'm calling a php file which is giving the output of geojson format but i don't have any idea where i'm doing . I ...
1
vote
0answers
119 views

How do I increase the 2mB uploadifive limit in Geoserver installed on AWS?

I've recently migrated a site from Geoserver 2.1.4 installed on a hardware server to Geoserver 2.7.0 installed on an Amazon Web Service. The site uses uploadifive to enable the user to upload a pdf to ...
4
votes
1answer
12k views

Zoom to polygon bounds on click. Leaflet ´, GeoJSON

I have a leaflet map with a lot of polygons (borders). I would like to zoom to the bounds on the polygon, when the user click. Until now its only possible for me to zoom to the the bounds of all the ...
1
vote
2answers
504 views

Reduce query time when using both MySQL and PostgreSQL with PostGIS

I am doing a tracking query. The device is sending its location data, timestamp to store in MySQL Database. I want to show the query result of every point with its nearest POI. The POI database is ...
4
votes
1answer
1k views

Geojson in postgis Geometry : Z dimension error

i had this php code : $geom1='{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[-32514.400906806848,4810093.013501738],[-32877.47679116143,4809500.626532529],[-34473.099756614494,...
1
vote
3answers
814 views

QGIS export feature coordinates

I have a big project (whole country) and it contains smaller features (administrative units). My project is in .shp. How to export features' coordinates one by one or all at once as long as all ...
2
votes
2answers
1k views

Using PHP's curl to Upload *.csv file into CartoDB?

I use CartoDB import api to upload csv file correctly, and I can see the 'pointtest' table is created in the cartoDB website. By following command line: #curl -v -F file=@/mnt/hgfs/D/cartodb/...
2
votes
1answer
44 views

Is there an app/plugin combination that suits the tracking of a public bus

In a town near where I live there is a public bus that runs a circuit about once an hour. I was asked if it would be easy to track the bus (presumably via an android device on the bus) and put the ...
1
vote
1answer
175 views

PostGIS table structure question

I have been using QGIS to insert point data accompanied by information for each point into PostGIS. When I open PGAdmin to take a look at the table rows I noticed a column near the start of each row ...
3
votes
1answer
785 views

Spatialite not loaded in PHP5 on Ubuntu

I'm trying to install Spatialite (4.3.0a) on Ubuntu (14.94.2 LTS) ..... I'd like to use it with PHP (5.5.9-1) .... Following this post https://faimsproject.atlassian.net/wiki/display/FAIMS/...
1
vote
0answers
155 views

Prepared statements and MULTILINE geographies [closed]

I'm working on a web application that parses GPX files and enters the contents into a database as Geography objects. Seeing how incoming files can be potentially insecure, I was hoping to use prepared ...
0
votes
1answer
427 views

How configure Spatialite for PHP Version 5.6.14 (on Windows 7 and Apache 2.4)?

I'm on Windows 7, using PHP Version 5.6.14 on Apache 2.4 and I'm trying to access to a Spatialite database. All works fine when execute "no spatial" SQL query in my PHP procedure but when I try to ...
0
votes
1answer
343 views

Generating WMS from PostgreSQL table with GeoServer in phpfile?

I've a PostgreSQL table build from shapefile. In my phpfile I duplicate this table with a new name. Now I want to generate a WMS with the content of the new table. The generation must be ...
1
vote
1answer
650 views

If bounds contain a polygon PHP-Leaflet

I have the latitude and the longitude of view of map ( latitude and longitude of north west and the latitude and longitude of southeast ) and a geojson files with MultiPolygon. (43mo) In PHP i want ...
1
vote
0answers
35 views

Updated GPS coordinate shows rotated point

So I have a GPS coordinate: 8.6258,47.3325 Which I use as my origin. Then I have the path of an object that has been moving around based on the ENU position, say: -10, 12 //east, north in meters -8,...
1
vote
2answers
5k views

Sending valid UserAgent or Referer when Nominatim reverse geocode gets blocked?

I have a php page that requests reverse geocoding data from Nominatim OSM server. It was working for over a year. Recently started blocking my requests with the following message: You have been ...
0
votes
2answers
4k views

Leaflet : How to update polyline ? Live Tracking

var ColorVar = '#bd0026'; var firstpolyline = new L.Polyline(polyList, { color:ColorVar, weight: 8, opacity:0.8, smoothFactor: 1 } ); ...
6
votes
3answers
8k views

Convert WKT to GeoJSON with Leaflet

I have a point type WKT geometry column in a MySQL table storing the location of some stores. I want to display it on a Leaflet map on my website. I've found plenty of tutorials to doing this on ...
0
votes
0answers
354 views

Save JSON from Openlayers using AJAX

I am trying to build a web app where users can use OpenLayers to draw features and then save them either as a download or write to a file on the server which I can collect when I need it. I am happy ...
2
votes
1answer
93 views

Error when passing shapefile to PostGIS through submit button and PHP

I have the following issue when I try to pass a shapefile to PostGIS. When I run this part of code through the terminal: shp2pgsql -s 2100 -d /var/www/dkar/MarCO/Code/python/output/cluster/...
1
vote
1answer
1k views

Converting EPSG:28992 to universal (Google Maps) lat/lon

I'm trying to find a way to convert EPSG:28992 to Google Maps' lat/lon using PHP. Is this possible? I'm trying to convert XYZ: 137634.397 455715.439 0.0. I'm using Kadaster, which is a Dutch ...
4
votes
2answers
19k views

Take data (points) from MySQL to Leaflet Map using PHP and Ajax

I have records with lat and lngs in a MySQL database and I want to add them to a Leaflet map as markers. I have tried a couple of methods but none seem to work. When the webpage opens the map doesn't ...
3
votes
1answer
238 views

Deploying Web AppBuilder Application with php

I have created my web application with the Web AppBuilder Developer edition, downloaded the zip file and customized the index.html file in my localhost environment. Everything works fine until I ...
5
votes
1answer
5k views

Submit form information from a leaflet popup to MySQL table

I have a leaflet map and I want to have the user fill out a form in a leaflet popup and upon clicking the 'submit' button - the information in the form will be inserted into my MySQL database. As a ...
1
vote
1answer
487 views

I am using “Hindi and Gujrati” font then I am getting “Black Squre Dots”?

At the time of generating PDF file when I am using “Hindi and Gujrati” font then I am getting “Black Squre Dots”. Below I am using code. Here I am trying to convert in UTF-8 but it’s not converting. ...
7
votes
5answers
12k views

Getting all vertex lat, long coordinates every 1 meter between two known points using PHP?

I am currently using php to try and write code that will take a start point and end point latitude and longitude coordinate pair in decimal degrees and calculate the latitude and longitude of every ...
2
votes
0answers
89 views

Knowing byte address and byte length of “strip” in LZW-compressed GeoTiff with vanilla PHP?

I have a situation where I need to read cell values from a GeoTiff using vanilla PHP, and while I've been successful reading values from an uncompressed TIF (~800MB), I'm having difficulty reading ...
2
votes
1answer
73 views

Using php to edit CartoDB infowindow?

Perhaps a basic question, but can php code be used in editing the CartoDB infowindow HTML? We want to show or hide a category depending on the value.
3
votes
2answers
1k views

Column 'SHAPE' cannot be null in mysql database even if the query string is correct

I am trying to write an POLYGON into an column named SHAPE which is a geometry type. And created query which looks $sql = "INSERT INTO rokka(zone,district,location,area,SHAPE) VALUES ('$zone','$...
1
vote
1answer
259 views

Serve very basic WMS data to a GIS system from my PHP server

Apologies for the basic nature of this question - I hadn't heard of GIS until this morning! I have a PHP server with some basic data for geographic points in a MySQL database - each one has a latitude,...
0
votes
2answers
1k views

Convert a shapefile to GeoJSON with PHP

Is there a method in PHP to covert a shapefile to GeoJSON? I need to upload shapefile and load it into a PostgreSQL table. I tried PHP exec(), but it didn't work.
1
vote
1answer
1k views

GPS tracking data string format for GRTQ device

I get GPS data from tcp (php socket), but for some devices (GRTQ) I will get an unreadable string. First devices sends: *HQ,XXXXXX,41,4#V1,time,A,**Lat**,N/S,**Lng**,W/E,000.00,000,date,FFFFFBFF,432,...
1
vote
0answers
1k views

How to publish layer on geoserver using rest api with PHP CURL

I'm working in a project that I need to publish a layer automatically on geoserver. Searching I discover that the REST API can help me. Studying the REST API I saw that I need to use cURL to do that(...
0
votes
1answer
4k views

Passing data into leaflet js via a php script

I'm trying to display route data on a map using leaflet. I'm pulling the data from a MYSQL database with a php script. which is working. The data is stored in an array called vechiclelatlong. I use ...
2
votes
3answers
2k views

Load a shapefile in PostgreSQL database with PHP

I am trying to load a shapefile in a PostGIS database using the exec() command. I have read the format I have to follow from here and I checked several similar questions from the forum. Based on the ...
0
votes
0answers
352 views

Post coordinates to Php

I am trying to send (x,y) coordinates from script HTML code to PHP but it doesn't work: -Script code: searchControl.on("results", function (data) { results.clearLayers(); for ...
1
vote
1answer
563 views

Google Maps Javascript and PHP

I try to make a menu bar with icons which show the same icons in the map when clicked, for example hotels or bars. I made a form with radio buttons for choose and click submit. This goes to PHP, ...
1
vote
2answers
1k views

Displaying PostGIS database data

I'm a beginner in this field and tried to display the PostGIS database data in localhost. I used select query in my code, so the table got displayed. I want to display the geographical points in a ...
2
votes
1answer
2k views

Fetching postgis data through php json and passing to leaflet map

I am new to this and trying to explore leaflet and geojson a bit. Please help me with this. This is my php page which I am using to fetch data from PostGIS. (the data opened successfully in the ...
0
votes
1answer
25 views

Fetch the selected value from scale toolbar

can somebody guide me how to fetch that value shown in the image? using jquery and or PHP language?
0
votes
2answers
8k views

How do I json_encode without those quotes for the coordinates in leaflet geojson polygon?

I have a field name: 'coordinates' I have the coordinates stored in there: like this: [[ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ]] when I json_encode($geojson); I get ...
1
vote
0answers
248 views

CentOS 6.5 - After compiling gdal.so: Unable to load dynamic library

CentOS release 6.5 (Final) Linux version 2.6.18-028stab101.1 (root@rhel5-build-x64) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-46) I'm trying to Install Cartaro CMS (http://cartaro.org/). GeoServer, ...
3
votes
1answer
992 views

Put LeafletJS geoJSON's into a MySQL database through PHP

I'm doing a project that will let users manipulate a map through LeafletJS, creating circles and polygons on top of the map. I need to gather these inputs for later analysis, using a MySQL database ...
2
votes
0answers
123 views

How to cut parallelogram with intersecting line?

I have a very specific set of circumstances under which I need to break a parallelogram into 2 pieces. The parallelogram obviously always have 4 vertices and the intersecting line intersects the ...
2
votes
1answer
298 views

Choosing a platform for developing opensource GIS web application.

I am from a non programming background. I started learning GIS opensource web applications from last 3 moths. Now I am using only notepad++ for writing codes and I am familiar with javascript, HTML ...
1
vote
0answers
20k views

Getting multiple dynamic custom markers on map using MapBox in MySQL and PHP? [closed]

Can anyone help me to get multiple custom markers on mapbox using lat/long from the database MySQL? I want to use 2 types of markers on the map, for which I have two separate table of lat/longs in ...
0
votes
0answers
1k views

Changing Style of Layer in GeoServer REST API (PHP)

I would like to change the layer's style via REST. My problem is very similar to here and here. Running the following via curl works: curl.exe -v -u user:password -XPUT -H "Content-type: text/xml" ...
1
vote
0answers
1k views

Route tracking on google map php

i have to make a software which is track a vehicle on Google map using GPS. I have almost done this project but i am stuck at a point, the client require a system that track the bus in a route. I am ...