[Arches] Re: Arches for PPGIS / mapping interface

2017-05-26 Thread Dennis Wuthrich
Hi Andrew,

Yes, Jamie is correct.  The two commands that he references:

python manage.py packages -o add_tileserver_layer -m arches/tileserver/world
.xml -n world_basemap -b

python manage.py packages -o add_tileserver_layer -m arches/tileserver/
hillshade.xml -n hillshade

each create an overlay in Arches.  

As to your question concerning Mapnik.  Arches uses mapnik to support the 
creation of raster overlays (note: as you probably know, the source data 
for a raster overlay can be either raster or vector data). 

Mapnik is a great library and creates beautiful maps, which is one of the 
many reasons that we chose to use it with Arches.  Unfortunately, there's a 
problem with the python bindings for Mapnik on Windows (you can see a 
summary of the issue here: 
https://github.com/mapnik/python-mapnik/issues/145).  This means that 
Mapnik currently can't be configured to work with Arches on Windows 
machines.

What does this mean for you?  On windows, Arches won't be able to create 
raster overlays until the Mapnik bindings are fixed.  In the example above, 
it would no be possible to create the hillshade overlay on a windows 
machine because the source data is an image (e.g.: a raster data source). 
 If you don't want to use Linux (!), you would need to create a service for 
the hillshade image using a map server external to Arches and then register 
your service with Arches.

Note that Arches could create the world overlay (e.g.: a vector source in 
the shapefile format) in the example.  Instead of creating the overlay 
using Mapnik, you could use the shapefile to create vector tiles using 
Arches integrated Tilestache server.  This works great on windows as well 
as Linux and OSX machines.

Hope this long explanation is helpful.

Cheers,

Dennis

On Friday, May 26, 2017 at 6:46:04 AM UTC-7, andrew.m...@nuim.ie wrote:
>
> Hi Dennis
>
> Just checking in to see whether Jamie's post above has identified a 
> problem with our attempted approach at importing data into Arches?
>
> Best wishes
>
> Andrew
>
>
> On Friday, May 19, 2017 at 11:15:05 AM UTC+1, Jamie wrote:
>>
>> Hi Dennis,
>>
>> Thank you for your help, you were correct in that we were confusing the 
>> two. What we're really trying to accomplish is the second one you mentioned 
>> above, defining "overlays".
>>
>> Would I be correct in believing that the commands below performed in the 
>> Developer Installation are doing just this?
>>
>> python manage.py packages -o add_tileserver_layer -m 
>> arches/tileserver/world.xml -n world_basemap -b
>> python manage.py packages -o add_tileserver_layer -m 
>> arches/tileserver/hillshade.xml -n hillshade
>>
>>
>> If so, is this possible to do on a Windows 64-bit machine due to the 
>> incompatibility of Mapnik? (As things currently stand neither of the above 
>> commands display anything for us)
>>
>> Apologies if I'm missing something obvious here, version 4 is my first 
>> experience working with Arches so it's not at all unlikely that the problem 
>> is on my end.
>>
>> Best wishes,
>>
>> Jamie
>>
>> On Tuesday, April 25, 2017 at 6:02:09 PM UTC+1, Dennis Wuthrich wrote:
>>>
>>> Andrew/Jaime,
>>>
>>> It looks like you are conflating 2 different things in Arches.
>>>
>>> Importing a shapefile means loading the geospatial data in the shapefile 
>>> into the Arches database.  You do this by configuring the mapping file 
>>> associated with the resource model(s) that you want to populate.
>>>
>>> Arches also supports a separate capability: creating mapping services 
>>> that can define "overlays" that users can add to maps (e.g.: the search map 
>>> or data entry forms that include maps).  In this case, you don't import the 
>>> shapefile; instead you configure a mapping service that references your 
>>> shapefile.  If you're familiar with geospatial web services, Arches 
>>> implements a mapping server (Tilestache) to create vector and raster map 
>>> services.  We implement this so that you can overlay geodata (say from your 
>>> corporate GIS or other sources) on top of Arches' resources. 
>>>
>>> Based on your question, I'm not sure if you're trying to import data or 
>>> configure a map service.  Arches supports either possibility.  Note that if 
>>> you import data from the shapefile into an Arches resource model, Arches 
>>> will automatically create the map service for you.
>>>
>>> Hope this points you in the right direction.
>>>
>>> Cheers,
>>>
>>> Dennis
>>>
>>> On Tuesday, April 25, 2017 at 9:45:02 AM UTC-7, andrew.m...@nuim.ie 
>>> wrote:

 Hi Dennis

 Thanks very much again for the response.

 As a follow on question: when the .shp file has been converted to .csv, 
 is the import carried out from the same admin panel that you navigate from 
 to create new users? (i.e. an entry is created in "Map layers", "Map 
 sources" and "Tileserver layers" respectively).

 Best wishes

 Andrew/Jamie



 On Thursday, April 13, 2017 at 

[Arches] Re: Arches for PPGIS / mapping interface

2017-05-26 Thread andrew . mcclelland
Hi Dennis

Just checking in to see whether Jamie's post above has identified a problem 
with our attempted approach at importing data into Arches?

Best wishes

Andrew


On Friday, May 19, 2017 at 11:15:05 AM UTC+1, Jamie wrote:
>
> Hi Dennis,
>
> Thank you for your help, you were correct in that we were confusing the 
> two. What we're really trying to accomplish is the second one you mentioned 
> above, defining "overlays".
>
> Would I be correct in believing that the commands below performed in the 
> Developer Installation are doing just this?
>
> python manage.py packages -o add_tileserver_layer -m 
> arches/tileserver/world.xml -n world_basemap -b
> python manage.py packages -o add_tileserver_layer -m 
> arches/tileserver/hillshade.xml -n hillshade
>
>
> If so, is this possible to do on a Windows 64-bit machine due to the 
> incompatibility of Mapnik? (As things currently stand neither of the above 
> commands display anything for us)
>
> Apologies if I'm missing something obvious here, version 4 is my first 
> experience working with Arches so it's not at all unlikely that the problem 
> is on my end.
>
> Best wishes,
>
> Jamie
>
> On Tuesday, April 25, 2017 at 6:02:09 PM UTC+1, Dennis Wuthrich wrote:
>>
>> Andrew/Jaime,
>>
>> It looks like you are conflating 2 different things in Arches.
>>
>> Importing a shapefile means loading the geospatial data in the shapefile 
>> into the Arches database.  You do this by configuring the mapping file 
>> associated with the resource model(s) that you want to populate.
>>
>> Arches also supports a separate capability: creating mapping services 
>> that can define "overlays" that users can add to maps (e.g.: the search map 
>> or data entry forms that include maps).  In this case, you don't import the 
>> shapefile; instead you configure a mapping service that references your 
>> shapefile.  If you're familiar with geospatial web services, Arches 
>> implements a mapping server (Tilestache) to create vector and raster map 
>> services.  We implement this so that you can overlay geodata (say from your 
>> corporate GIS or other sources) on top of Arches' resources. 
>>
>> Based on your question, I'm not sure if you're trying to import data or 
>> configure a map service.  Arches supports either possibility.  Note that if 
>> you import data from the shapefile into an Arches resource model, Arches 
>> will automatically create the map service for you.
>>
>> Hope this points you in the right direction.
>>
>> Cheers,
>>
>> Dennis
>>
>> On Tuesday, April 25, 2017 at 9:45:02 AM UTC-7, andrew.m...@nuim.ie 
>> wrote:
>>>
>>> Hi Dennis
>>>
>>> Thanks very much again for the response.
>>>
>>> As a follow on question: when the .shp file has been converted to .csv, 
>>> is the import carried out from the same admin panel that you navigate from 
>>> to create new users? (i.e. an entry is created in "Map layers", "Map 
>>> sources" and "Tileserver layers" respectively).
>>>
>>> Best wishes
>>>
>>> Andrew/Jamie
>>>
>>>
>>>
>>> On Thursday, April 13, 2017 at 7:30:27 PM UTC+1, Dennis Wuthrich wrote:

 Andrew and Jaime,

 1) The Profile Manager in the Admin panel doesn't link to anything at 
 the minute - is this intentional or a bug in our install? 
 The Profile Manager isn't functional yet (it's intended to support the 
 mobile data collection app that we're working on).

 2) If it is intentional, and it's not ready for use yet, can a new user 
 (and their respective permissions) be created some other way in the 
 meantime?
 Yes, you can manage users and permissions as follows:  go to 
 http://localhost:8000/admin/  (of course, your domain may not be 
 "localhost", use the domain name or IP address of your server).  You'll 
 find user and group management tools here.

 3) Does V4 support import of shapefiles in the same manner as V3?
 V4 treats shapefiles as csv files.  If you want to import a shapefile 
 into v4, first save it as a csv with the geometry field saved as WKT (well 
 known text) with an SRID of 4326.  QGIS makes this very easy (simply 
 right-click on your shapefile in QGIS's layers panel the click on "Save 
 As..." your shapefile as .csv).  Then load as any other csv.


 Hope this helps,

 Dennis


 On Thursday, April 13, 2017 at 9:23:55 AM UTC-7, andrew.m...@nuim.ie 
 wrote:
>
> Hi Dennis
>
> A few more technical questions that I hope someone can help us with.
>
> 1) The Profile Manager in the Admin panel doesn't link to anything at 
> the minute - is this intentional or a bug in our install?
> 2) If it is intentional, and it's not ready for use yet, can a new 
> user (and their respective permissions) be created some other way in the 
> meantime?
> 3) Does V4 support import of shapefiles in the same manner as V3?
>
> Thanks very much for your help.
>
> Best wishes
>
>