2

And, if I can’t ask it here, can you suggest a suitable S.O site?

Back when this site was called Programmers, the rule of thumb was that if you did it at a keyboard, you asked at S.O, and if you did it at a whiteboard, you asked here.

This is definitely a whiteboard question, but there are a lot of happy downvoters around these days, so I want to clear the question first.

I want users to generate a floorplan, which I will display in HTML with (Angular)JS which will react appropriately when they click on a room on the floorplan (with different behaviour for each room). Good topic/bad topic?

The problem is that I don’t know how to go about it.

I would strongly prefer the users to produce their own floorplan, but, if I must, I am prepared to produce it or, even, to develop some software to let them produce it.

The tricky part there, I think, is getting the data to recognize what delineated each room. I have a very strong preference that this will work if the browser window is resized, but could just about live with a fixed size image).

I see two possibilities:

1) Find SVG image and some FOSS JS to detect which area was clicked (I do not want to code that myself ;-) This might affect how the floorplan gets drawn, and whether I can use some free FOSS to do so.

2) Either a kludge or a bright idea, I am not sure which. I knock up a floorplan drawing app; drag & drop rooms, staircases, etc and offer a colo(u)r palette for a dozen or so colo(u)rs BUT, each time the user choses a colo(u), I subtly tweak its RGB by one. I doubt that the human eye can distinguish 255 blue from 254 blur (or even 235 blue) – the software can. So, I would not need to know the outlines of the rooms, or have to worry about resizing the screen – just get the colo(u)r of the clicked pixel and that indicates the room.

I would prefer to use as much FOSS as possible, so the question seems like a candidate for Software Recommendations, where I did, indeed, ask it, without much luck.

If I can’t get FOSS, then I have to design & code it myself, so I am hoping that this question might fit here. What say you?

  • Possible duplicate of Are Design Review questions on-topic? – gnat Feb 24 '17 at 11:15
  • That say that they are generally on topic, so I might proceed. However, this is only partly a “review my design” question, with two options offered, and partly a “please suggest some options” question, as I am unfamiliar with the topic at hand. Can you please help me rephrase this into a a suitable topic for this or another SE site? – Mawg Feb 24 '17 at 11:24
  • 1
    Well, for me it occurs you got a good answer on SR.SE in between. Just curious, did you consider to solve your problem by creating a plugin for this program? The plugin could generate an image map which fits to your floorplan. – Doc Brown Feb 28 '17 at 13:27
  • I am spending most of my time reading up on stuff that is new to me. I was almost going for HTML Canvas, but am concerned about responsiveness, in the sense of resizing. Now I am leaning very heavily towards SVG. I think that I am going to have to be able to accept floor plans in various formats, from AutoCAD to JPEG & PNG. There are plenty of free convertors to SVG. The difficult part, is to split the floorplan SVG image into multiple SVG paths. I could do it manually, but would prefer to automate it, so I am looking into edge detection, possible by modifying some FOSS flood-fill code. – Mawg Feb 28 '17 at 13:52
  • An alternative method might be to have two SVG images – one as supplied to me, and the second a copy where I manually flood-fill each room to a different RGB value – which would be much simpler than generating paths for them – display the first, supplied, image in the browser while not attaching the second to the DOM. Handle clicks at X,Y on the displayed image by using X,Y to get the pixel RGB on the hidden image, which tells me which room was clicked. Have you any advice for me? – Mawg Feb 28 '17 at 13:52
  • 1
    @Mawg: I am pretty sure whenever there is a conversion involved where the room boundaries in a floorplan got lost, reconstructing them (for example, from colors or by edge detection) will always be a semi-automatic process, where manual corrections are needed. If you need a fully automatic solution, you need to save the boundaries as part of the initial construction process. – Doc Brown Feb 28 '17 at 14:42
  • I would think so, but am not yet sure whether I will have access to such. I will knock up a demo, hawk it around and see what transpires. I have a few good prospects, but doubt if they will give me free access to their floor plans until I at least have a good demo. – Mawg Feb 28 '17 at 14:48
6

The question, as you've defined it here, seems to be either off-topic or too broad.

If you are looking for tools and libraries, Software Recommendations is the place to go. Finding or recommending things are explicitly off-topic here.

Now, design questions are on-topic here. We even have specific guidance for design review questions. However, we also have guidance for questions about where to start or "blue sky" / "greenfield" questions - these types of questions tend to be too broad and need to be focused on particular design problems.

In your particular case, my recommendations would be to look at any options that Software Recommendations turns up and start prototyping software. If you have specific questions about problems with the design, those specific questions will likely be good here.

  • I have given up on s/w recs & decided to implement it myself. Would that make it acceptable, or would it require rephrasing? And, if so, how? I have suggested two posiibilities & woudl like comments on those. – Mawg Feb 24 '17 at 11:21
  • 1
    @Mawg See my third paragraph. Read our guidance for design review questions, where to start questions, and blue sky / greenfield questions. Right now, your question doesn't seem acceptable since it's a "where to start" or "greenfield" question that is too broad. – Thomas Owens Feb 24 '17 at 11:22
  • rooms. I am an embedded programmer & just don’t know the technology available, especially for 2) – Mawg Feb 24 '17 at 11:28
  • 1
    @Mawg We don't recommend technology here. You either need to wait or refine your post on Software Recommendations or do more research on your own. – Thomas Owens Feb 24 '17 at 11:29
  • I see what you mean. But by "recommend", I think of "which is best"? Whereas I want to know what is possible & figure out for myself which is best for me. Google is not my friend, and, as an embedded developer, I have no concept of the technology involved. Can you help me to phrase that acecptably? – Mawg Feb 24 '17 at 11:45
  • @Mawg None of that is acceptable. It all falls under "find or recommend". You need to make a prototype and come back with concrete design questions. – Thomas Owens Feb 24 '17 at 11:56
  • What kind of prototype? Code? that's for S.O. This site is for questions at the whiteboard. My question boils down to which technology can I use? Googel doesn't help me, as I don't know what to ask. – Mawg Feb 24 '17 at 12:29
  • 1
    @Mwag If you have problems with code, yes, ask on Stack Overflow. But you can learn about design from prototyping too. – Thomas Owens Feb 24 '17 at 12:34
  • Thanks, I do realize that; but when you said "You need to make a prototype", I thought that was a new requirement of the site :-/ As it happens, I have the design quite clear, but do not know how to implement it. Can I ask that here? If not, where can I ask? Ii seems to me to be a whiteboard question – Mawg Feb 24 '17 at 15:09
  • 1
    @Mawg Do you want a review of your design? Share it here. Do you want a review of your code? Go to Code Review or Stack Overflow, following their rules. Follow our guidance for design reviews. – Thomas Owens Feb 24 '17 at 15:11
  • Neither nor. I want to know how to split an SVG diagram into sections and to recognze which of those sections was clicked when the SVG is displayed in HTML. It's not a "please write my code for me", It's a "How do I do this"? Do you know of an SE site where I could as? – Mawg Feb 24 '17 at 15:16
  • @Mawg As far as I know, none. No SE site is going to do work for you. When it comes to design, we expect you to have a design you can show us - technology choices, models, interfaces, algorithm descriptions. If you don't have at least some of those and a specific problem, we can't help you here. Other sites are the same. SO expects you to have code and specific errors or problems. CR expects you to have code that works as expected that needs to be improced. – Thomas Owens Feb 24 '17 at 15:24
  • A pity that. No site for "how to" :-( Although, you say "we expect you to have a design you can show us ... If you don't have at least some of those and a specific problem". I do have most of those - this question concerns only the problem, which is a minor subset of teh full fucninality. You can get a "big picture" of the project at hardwarerecs.stackexchange.com/questions/6920/… – Mawg Feb 24 '17 at 15:30
  • 2
    Well, it sounds like a major subset of the full functionality, something that would be decided upon by the system architect wil access to the full requirement spec, hardware and performance constraints, budgeting and costs etc etc. It doesn't sound like anything that can be served up in response to a few paragraphs of post and without an unrealistic amount of effort by developers with some free time:( – Martin James Feb 26 '17 at 1:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .