[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mapserver-users
Subject:    Re: [mapserver-users] mapserver-users Digest, Vol 156, Issue 3
From:       "CHEN, LIRON (PGT)" <l.chen.18 () abdn ! ac ! uk>
Date:       2021-01-07 18:32:49
Message-ID: VI1PR04MB43973A1D57F025758D5BF6128AAF0 () VI1PR04MB4397 ! eurprd04 ! prod ! outlook ! com
[Download RAW message or body]

Hi Travis,

Thank you for your response! I can connect to different data types with OGR or XSLT  \
for XML, however the problem is that the API only supplies in (non Geo-) JSON or an \
XML format mapserver doesnt like. Its the MetOffice datapoint; I am branching out to \
more sources but I will want to include them. Thats why Im looking for some way to \
convert them as an intermediate step. Ill dig deeper into OGR to see if it can \
connect to that API and maybe still get useable data from it.

Regards,
Liron
________________________________
From: mapserver-users <mapserver-users-bounces@lists.osgeo.org> on behalf of \
                mapserver-users-request@lists.osgeo.org \
                <mapserver-users-request@lists.osgeo.org>
Sent: 04 January 2021 20:00
To: mapserver-users@lists.osgeo.org <mapserver-users@lists.osgeo.org>
Subject: mapserver-users Digest, Vol 156, Issue 3

CAUTION: External email. Ensure this message is from a trusted source before clicking \
links/attachments. If you are concerned forward this email to spam@abdn.ac.uk


Send mapserver-users mailing list submissions to
        mapserver-users@lists.osgeo.org

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.osgeo.org/mailman/listinfo/mapserver-users
or, via email, send a message with subject or body 'help' to
        mapserver-users-request@lists.osgeo.org

You can reach the person managing the list at
        mapserver-users-owner@lists.osgeo.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of mapserver-users digest..."


Today's Topics:

   1. Re: Question about importing xml/json data from api
      (Travis Kirstine)


----------------------------------------------------------------------

Message: 1
Date: Mon, 4 Jan 2021 14:55:24 -0500
From: Travis Kirstine <traviskirstine@gmail.com>
To: "CHEN, LIRON (PGT)" <l.chen.18@abdn.ac.uk>
Cc: "mapserver-users@lists.osgeo.org"
        <mapserver-users@lists.osgeo.org>
Subject: Re: [mapserver-users] Question about importing xml/json data
        from api
Message-ID:
        <CALtm4h11NDiJQgAPRHgwrKOb+7EbpEvk4ccW11JGKGBMifOeDA@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Liron,

Since MapServer is built with GDAL / OGR you connect to most common formats
without parsing, see https://www.mapserver.org/input/vector/ogr.html.
However this does not include hand rolled JSON / XML, if possible retrieve
GeoJSON or some other GDAL / OGR supported format from the API.  You may
want to go through an extra step(s) of converting the data to a format that
supports spatial indexing (like shapefile or geopackage) if working with
large datasets.  Most of this can be done using a shell / batch scripting
and command line tools (ogr2ogr and shptree).  BTW ogr does support direct
connection to some API - like an ESRI feature server which can make the
conversion "easy", however not all OGR supported formats work with MapServer

https://gdal.org/drivers/vector/index.html

Regards







On Fri, 1 Jan 2021 at 18:35, CHEN, LIRON (PGT) <l.chen.18@abdn.ac.uk> wrote:

> Hi and happy New Year!
> 
> Im completely new to MapServer and not from a development background, but
> I hope its ok to ask for help here. Im a GIS postgraduate with some
> programming skill and Im trying to teach myself to set up a service that
> generates maps or layers when called on; but I want the service to generate
> them using the most recently published data from other web sources through
> their respective APIs. They mostly provide XML or JSON formatted spatial
> data.
> 
> Ill inevitably need to read up and practice a lot and thats fine. But can
> anyone point me towards the apps or functionalities that will eventually
> allow me to do this? Just because Im comfortable with C++ I had a look if I
> could import with libcurl and parse with that to something mapserver could
> use but I think thats taking a very long way round.. any help appreciated.
> 
> Kind regards,
> Liron Chen
> 
> 
> The University of Aberdeen is a charity registered in Scotland, No
> SC013683.
> Tha Oilthigh Obar Dheathain na charthannas cl?raichte ann an Alba, ?ir.
> SC013683.
> _______________________________________________
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20210104/1ba7237c/attachment-0001.html>


------------------------------

Subject: Digest Footer

_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


------------------------------

End of mapserver-users Digest, Vol 156, Issue 3
***********************************************


The University of Aberdeen is a charity registered in Scotland, No SC013683.
Tha Oilthigh Obar Dheathain na charthannas cl?raichte ann an Alba, ?ir. SC013683.


[Attachment #3 (text/html)]

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} \
</style> </head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; \
color: rgb(0, 0, 0);"> Hi Travis,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; \
color: rgb(0, 0, 0);"> <br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; \
color: rgb(0, 0, 0);"> Thank you for your response! I can connect to differen<span \
style="font-family: calibri, arial, helvetica, sans-serif; font-size: 12pt; color: \
rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">t data t</span><span \
style="font-family: calibri, arial, helvetica, sans-serif; font-size: 12pt; color: \
rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0);">yp</span><span style="font-family: \
calibri, arial, helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); \
background-color: rgba(0, 0, 0, 0);">es  with</span><span style="font-family: \
calibri, arial, helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); \
background-color: rgba(0, 0, 0, 0);"> OG</span><span style="font-family: calibri, \
arial, helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: \
rgba(0, 0, 0, 0);">R  or </span><span style="color: rgb(0, 0, 0); font-family: \
calibri, arial, helvetica, sans-serif; font-size: 12pt; background-color: rgba(0, 0, \
0, 0); display: inline !important;">XSLT</span><span style="color: rgb(62, 67, 73); \
font-family: Arial, sans-serif; font-size: 12.8px; background-color: rgb(255, 255, \
255); display: inline !important;"><span style="font-family: calibri, arial, \
helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: \
rgba(0, 0, 0, 0);">&nbsp;  for XML, however the problem is that the API only supplies \
in (non Geo-) JSON or an XML format mapserver doesnt like. Its the MetOffice \
datapoint; I am branching out to more sources but I will want to include them. Thats \
why Im looking for some way to convert  them as an intermediate step. Ill dig deeper \
into OGR to see if it can connect to that API and maybe still get useable data from \
it.<br> <br>
Regards,</span></span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; \
color: rgb(0, 0, 0);"> <span style="color: rgb(62, 67, 73); font-family: Arial, \
sans-serif; font-size: 12.8px; background-color: rgb(255, 255, 255); display: inline \
!important;"><span style="font-family: calibri, arial, helvetica, sans-serif; \
font-size: 12pt; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, \
0);">Liron</span></span></div> <div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" \
style="font-size:11pt" color="#000000"><b>From:</b> mapserver-users \
&lt;mapserver-users-bounces@lists.osgeo.org&gt; on behalf of \
mapserver-users-request@lists.osgeo.org \
&lt;mapserver-users-request@lists.osgeo.org&gt;<br> <b>Sent:</b> 04 January 2021 \
20:00<br> <b>To:</b> mapserver-users@lists.osgeo.org \
&lt;mapserver-users@lists.osgeo.org&gt;<br> <b>Subject:</b> mapserver-users Digest, \
Vol 156, Issue 3</font> <div>&nbsp;</div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">CAUTION: External email. Ensure this message is from a trusted \
source before clicking links/attachments. If you are concerned forward this email to \
spam@abdn.ac.uk<br> <br>
<br>
Send mapserver-users mailing list submissions to<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mapserver-users@lists.osgeo.org<br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a \
href="https://lists.osgeo.org/mailman/listinfo/mapserver-users">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
 or, via email, send a message with subject or body 'help' to<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
mapserver-users-request@lists.osgeo.org<br> <br>
You can reach the person managing the list at<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mapserver-users-owner@lists.osgeo.org<br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than &quot;Re: Contents of mapserver-users digest...&quot;<br>
<br>
<br>
Today's Topics:<br>
<br>
&nbsp;&nbsp; 1. Re: Question about importing xml/json data from api<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (Travis Kirstine)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Mon, 4 Jan 2021 14:55:24 -0500<br>
From: Travis Kirstine &lt;traviskirstine@gmail.com&gt;<br>
To: &quot;CHEN, LIRON (PGT)&quot; &lt;l.chen.18@abdn.ac.uk&gt;<br>
Cc: &quot;mapserver-users@lists.osgeo.org&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
                &lt;mapserver-users@lists.osgeo.org&gt;<br>
Subject: Re: [mapserver-users] Question about importing xml/json data<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from api<br>
Message-ID:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
                &lt;CALtm4h11NDiJQgAPRHgwrKOb+7EbpEvk4ccW11JGKGBMifOeDA@mail.gmail.com&gt;<br>
                
Content-Type: text/plain; charset=&quot;utf-8&quot;<br>
<br>
Liron,<br>
<br>
Since MapServer is built with GDAL / OGR you connect to most common formats<br>
without parsing, see <a \
href="https://www.mapserver.org/input/vector/ogr.html">https://www.mapserver.org/input/vector/ogr.html</a>.<br>
 However this does not include hand rolled JSON / XML, if possible retrieve<br>
GeoJSON or some other GDAL / OGR supported format from the API.&nbsp; You may<br>
want to go through an extra step(s) of converting the data to a format that<br>
supports spatial indexing (like shapefile or geopackage) if working with<br>
large datasets.&nbsp; Most of this can be done using a shell / batch scripting<br>
and command line tools (ogr2ogr and shptree).&nbsp; BTW ogr does support direct<br>
connection to some API - like an ESRI feature server which can make the<br>
conversion &quot;easy&quot;, however not all OGR supported formats work with \
MapServer<br> <br>
<a href="https://gdal.org/drivers/vector/index.html">https://gdal.org/drivers/vector/index.html</a><br>
 <br>
Regards<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
On Fri, 1 Jan 2021 at 18:35, CHEN, LIRON (PGT) &lt;l.chen.18@abdn.ac.uk&gt; \
wrote:<br> <br>
&gt; Hi and happy New Year!<br>
&gt;<br>
&gt; Im completely new to MapServer and not from a development background, but<br>
&gt; I hope its ok to ask for help here. Im a GIS postgraduate with some<br>
&gt; programming skill and Im trying to teach myself to set up a service that<br>
&gt; generates maps or layers when called on; but I want the service to generate<br>
&gt; them using the most recently published data from other web sources through<br>
&gt; their respective APIs. They mostly provide XML or JSON formatted spatial<br>
&gt; data.<br>
&gt;<br>
&gt; Ill inevitably need to read up and practice a lot and thats fine. But can<br>
&gt; anyone point me towards the apps or functionalities that will eventually<br>
&gt; allow me to do this? Just because Im comfortable with C++ I had a look if I<br>
&gt; could import with libcurl and parse with that to something mapserver could<br>
&gt; use but I think thats taking a very long way round.. any help appreciated.<br>
&gt;<br>
&gt; Kind regards,<br>
&gt; Liron Chen<br>
&gt;<br>
&gt;<br>
&gt; The University of Aberdeen is a charity registered in Scotland, No<br>
&gt; SC013683.<br>
&gt; Tha Oilthigh Obar Dheathain na charthannas cl?raichte ann an Alba, ?ir.<br>
&gt; SC013683.<br>
&gt; _______________________________________________<br>
&gt; mapserver-users mailing list<br>
&gt; mapserver-users@lists.osgeo.org<br>
&gt; <a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
 &gt;<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: &lt;<a href="http://lists.osgeo.org/pipermail/mapserver-users/attachments/2021010 \
4/1ba7237c/attachment-0001.html">http://lists.osgeo.org/pipermail/mapserver-users/attachments/20210104/1ba7237c/attachment-0001.html</a>&gt;<br>
 <br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
mapserver-users mailing list<br>
mapserver-users@lists.osgeo.org<br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
 <br>
<br>
------------------------------<br>
<br>
End of mapserver-users Digest, Vol 156, Issue 3<br>
***********************************************<br>
</div>
</span></font></div>
<br>
<br>
The University of Aberdeen is a charity registered in Scotland, No SC013683.<br>
Tha Oilthigh Obar Dheathain na charthannas cl&agrave;raichte ann an Alba, &Agrave;ir. \
SC013683. </body>
</html>



_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

--===============0494178251412231663==--

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic