Subscribe to this thread
Home - General / All posts - Applying styles to layers in M9
drtees80 post(s)
#01-Jul-19 16:32

I recently downloaded a number of gdb files from a local jurisdiction to be imported into a new base file. I use these "base files" for creating individual projects based on that jurisdiction's GIS data. Previously, I avoided downloading gdb files because of the difficulty in using them in M8. M9 links to these databases with great ease!

The problem, though, is that whatever styles I apply to the individual layers within the linked gdb does not "stick" to that layer. When I save the project and re-open it, all the style information is gone; the layers have reverted to the default gray colors and fill patterns.

Initially, the gdb files were linked outside of the default System folder in the project. I later moved them into the System folder to see if that would make a difference. It doesn't. I haven't imported the gdb files directly into M9 due to the excessive time to open each database each time I open the map file.

Have I misssed a step in the process?

Dimitri


5,620 post(s)
#01-Jul-19 18:22

The problem, though, is that whatever styles I apply to the individual layers within the linked gdb does not "stick" to that layer. When I save the project and re-open it, all the style information is gone; the layers have reverted to the default gray colors and fill patterns.

Correct. ESRI GDB cannot store Manifold style info. GDB also is not a general purpose DBMS (like Oracle, MySQL, PostgreSQL, SQL Server, Db2, etc) within which Manifold can create additional tables specifically to store style and other meta info.

If you want to leave your data linked, what you can do is to follow a procedure similar to that shown in the Example: Style Applied to an Image Server Image topic. In that topic you re-style an image coming in from a server which is read only and into which you can't upload style info about Manifold. But you can copy the image (not the table, just the image) from within the data source and paste it into the Manifold .map part of the project.

[Note, by the way, that this has nothing to do with the system data folder. See the illustrations in the Importing and Linking topic in the "portals to other worlds" section. The read/write portion of your Manifold project is everything that is outside of data sources that are their own limited worlds, like read only data sources or data sources linked from formats to which Manifold style info cannot be saved.]

Suppose you link to the Naperville gas sample GDB that ESRI uses in tutorials. Open up the Landbase folder in the data source and you'll see a Tax Parcel table and a Tax Parcel Drawing. Copy the drawing.

Right click somewhere outside of that data source, like in the main part of your Manifold drawing and Paste what you copied. You'll have a copy of Tax Parcel Drawing that takes its data from the Tax Parcel table inside the GDB.

You can style that Tax Parcel Drawing in the main part of your project. Save the project, and then you can close it and when you open it again the Tax Parcel Drawing will still be styled. Why? Because it's a drawing in the local project where style info can be saved for it. All the data is still in the GDB, because drawings don't store any data in Manifold... the tables do. A drawing is just a viewport that says what table to get data from, what the geom field is and so on.

Suppose you want to use that same drawing in a different project? No problem. Open up your saved project with the Tax Parcel Drawing in one Manifold session and then open your different project in a second Manifold session. Copy the Tax Parcel Drawing and also copy the Naperville GDB data source, and paste both of them into the second Manifold session. Now you have your styled drawing and you also have the data source to which it refers.

Sounds like it would make a fun video. :-)

Ah... almost forgot:

I haven't imported the gdb files directly into M9 due to the excessive time to open each database each time I open the map file.

That doesn't sound right. If you imported the GDB into your map file there is no connection to the GDB and there is no excessive time to open any database. If your data is imported into the map file it pops open in 1/10th of a second, faster than a link to the GDB (GDB is far slower than Manifold .map format).

tjhb

8,958 post(s)
#01-Jul-19 20:17

Small typo that could be confusing (correction in bold):

Suppose you link to the Naperville gas sample GDB ... Copy the drawing.

Right click somewhere outside of that data source, like in the main part of your Manifold drawing Project pane and Paste what you copied. ...

Dimitri


5,620 post(s)
#02-Jul-19 12:41

Good eyes, Tim!

The GDB topic has been expanded with an illustrated example of how to save style in a drawing based on a GDB, plus how to copy/paste to a different Manifold session.

drtees80 post(s)
#01-Jul-19 21:48

Thank you, Dimitri. I wrote the last part of my question in haste. The time it takes to import the GDB really is not the problem, although it does take some time to open the linked gdb immediately after opening the .map file. Rather, it is a matter of trying to corral the size of the resultant .map file on our beleaguered file server. We need to get more storage at work, but haven't impressed upon those in charge of making purchases that it is truly necessary. And, no, we don't have an SQL server running that we can use to store GIS data (another discussion with those who make purchasing decisions). Hence, I juggle with keeping my .map files as compact as possible and quickly delete any LIDAR and high resolution imagery as soon as they have been imported and clipped to an appropriate area. Linking to the gdb files seems like a good idea in theory since it shouldn't actually import data into the project on a permanent basis.

There's nothing like being on the cutting-edge of twentieth-century technology!

Dimitri


5,620 post(s)
#02-Jul-19 08:14

We need to get more storage at work, but haven't impressed upon those in charge of making purchases that it is truly necessary. And, no, we don't have an SQL server running that we can use to store GIS data

Ouch! Painful to hear. I just visited newegg.com and saw you can buy a 12 TB Seagate for under $300, or choose from a range of high quality, high reliability 10 TB drives for under $300 as well. 10TB is a lot of storage... it's two thousand projects that are 500 MB in size.

Using GDB is a fragile (risky), slow and limited proposition while Manifold .map is very robust, very fast, and much broader in capability than GDB. The cost of disk storage these days is heading further downwards towards near-zero while the cost of personnel time keeps increasing. The cost of a couple of big drives (I always install two in a RAID mirror, for fault-tolerance) is much less than the added labor cost of using GDB. Sigh!

You don't need to have SQL Server running. You can just use .map as archival storage. If you need simultaneous access by multiple users, you can always use MySQL... it is fast, the Community Edition of MySQL is free for unlmited storage size, and MySQL allows the same index name to be used in different tables, unlike PostgreSQL, which requires the index name to be unique in a database. See the Database book in the user manual.

adamw


8,775 post(s)
#08-Jul-19 10:12

A belated reply - we'll save changes to styles in GDB. That the system allows you to make changes, but does not save these changes is a bug, it has to either disallow making changes or save them. In the case of GDB, we'll save them.

The process described by Dimitri below - creating a drawing in the MAP file which would reference vector data in the GDB so that styles go into the MAP file and get saved there - will work as well, but we will make it optional.

Manifold User Community Use Agreement Copyright (C) 2007-2019 Manifold Software Limited. All rights reserved.