[Geomoose-users] Linking search results to templates

Bistrais, Bob Bob.Bistrais at maine.gov
Tue Apr 9 13:54:22 PDT 2013


Sounds interesting, but yes, more involved than I think I want to go with it.

From: Basques, Bob (CI-StPaul) [mailto:bob.basques at ci.stpaul.mn.us]
Sent: Tuesday, April 09, 2013 4:36 PM
To: Bistrais, Bob; Brent Fraser
Cc: geomoose-users at lists.osgeo.org
Subject: RE: [Geomoose-users] Linking search results to templates

Bob,

This is probably further than you want to go, but I would be inclined to build a folder watcher or listener script that watches the contents of a folder and adds any new content automatically to a Database for retrieving.  The process of adding the data to the database should also provide a semblance of validation as well.  Then the results are easy to query for, even in a double pass scenario, IE get ID in the view desired, then iterate through for those links attached to that ID, all handled via a SQL statement.  Easy to add to for may different files too.

Bobb




From: geomoose-users-bounces at lists.osgeo.org<mailto:geomoose-users-bounces at lists.osgeo.org> [mailto:geomoose-users-bounces at lists.osgeo.org] On Behalf Of Bistrais, Bob
Sent: Tuesday, April 09, 2013 3:30 PM
To: Brent Fraser
Cc: geomoose-users at lists.osgeo.org<mailto:geomoose-users at lists.osgeo.org>
Subject: Re: [Geomoose-users] Linking search results to templates

Yes, I'm thinking of looking parsing the file names, concerned about search times, but need to give it a try.  The photo names are fairly consistent but not 100% so.

From: Brent Fraser [mailto:bfraser at geoanalytic.com]
Sent: Tuesday, April 09, 2013 4:25 PM
To: Bistrais, Bob
Cc: geomoose-users at lists.osgeo.org<mailto:geomoose-users at lists.osgeo.org>
Subject: Re: [Geomoose-users] Linking search results to templates

I'm always paranoid when it comes to data, so I prefer to have a step where I "load" the data and confirm the result.  But as long as the data is consistent (when does that happen?), maybe you could just modify the PHP to:
    1. get the contents of a directory where the photos are stored
    2. parse the file names
    3. and generate the output HTML.

Basically doing a "join" and template process in the PHP.  Might be a performance issue if there are thousands of photos in the dir....

Best Regards,

Brent Fraser
On 4/9/2013 2:11 PM, Bistrais, Bob wrote:
Thanks Brent,

Looks like most sites have 4 photos, but not all.  I'm finding cases of fewer or more than 4 photos.  Problem is, this could change as the customer adds more sites, or more photos to existing sites.  So I'd have to modify a table every time the customer sends data updates.  I was hoping maybe I could do this through MapServer templating?

From: Brent Fraser [mailto:bfraser at geoanalytic.com]
Sent: Tuesday, April 09, 2013 3:57 PM
To: Bistrais, Bob
Cc: geomoose-users at lists.osgeo.org<mailto:geomoose-users at lists.osgeo.org>
Subject: Re: [Geomoose-users] Linking search results to templates

Bob,


  Depends on the data.  Are there usually 4 photos? If so, just create 4 columns in the Site table and populate them with the path to photos.  If it is more variable (sometimes 1, sometimes 5 photos), create a table to relate Sites to Photos:

SitePhotos
-----------
siteID:    photoPath:
1234    1234Front.jpg
1234    1234Rear.jpg

and do a table join within Mapserver's Map file (in the LAYER's DATA statement) to relate sites to tables.

Best Regards,

Brent Fraser
On 4/9/2013 1:14 PM, Bistrais, Bob wrote:
I'm working on an application which depicts various sites (several thousand of them).  The customer has photos of the different sites, each site usually has 4 pictures, from different angles.  The spatial data does not have an attribute linking the photos to a particular record.  But each photo has the site ID as part of its name.  Example- Site 1234 has photos with names like "1234Front.jpg", "1234Rear.jpg", etc.

What I'd like to do is display search/query results so that the corresponding photos (actually, links to them) will appear in an Identify or query result tab.  I can form the URL's based on the site's ID number, but don't know how to insert these into the identify/query templates.

Has anyone done something similar to this, and would have any advice on how to do this?



_______________________________________________

Geomoose-users mailing list

Geomoose-users at lists.osgeo.org<mailto:Geomoose-users at lists.osgeo.org>

http://lists.osgeo.org/mailman/listinfo/geomoose-users


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20130409/9c7ecf22/attachment.html>


More information about the Geomoose-users mailing list